srvsvc.ndl revision 8d7e41661dc4633488e93b13363137523ce59977
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The contents of this file are subject to the terms of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Common Development and Distribution License (the "License").
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You may not use this file except in compliance with the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * or http://www.opensolaris.org/os/licensing.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When distributing Covered Code, include this CDDL HEADER in each
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If applicable, add the following below this CDDL HEADER, with the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fields enclosed by brackets "[]" replaced with your own identifying
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information: Portions Copyright [yyyy] [name of copyright owner]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER END
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Use is subject to license terms.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifndef _MLSVC_LANMAN_NDL_
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define _MLSVC_LANMAN_NDL_
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LanMan RPC (WKSSVC and SRVSVC) interface definitions.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#include "ndrtypes.ndl"
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * WARNING: The cpp(1) macros in this file are not understood by
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * /usr/bin/cpp. Use /usr/libexec/cpp instead.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * TYPE CONSTRUCTOR MACROS FOR INFORMATION RESULTS
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ****************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This is an explanation of the macros that follow this comment.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The LANMAN API's look something like this:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetXXXGetInfo (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN char * servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN char * XXX_name,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN int level,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT char ** bufptr);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The bufptr is a pointer-to-pointer (**). The NetXXXGetInfo() function
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * malloc()s memory, and sets *bufptr to the memory. The API's
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * are undiscriminated about what bufptr really points to.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * However, for RPI (Remote Procedure Interface), this just won't fly.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * We have to know what the result data looks like in order to
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * properly (un)marshall it.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * As best we can determine, the MSC developers use an RPI that looks
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * like this (approximately in IDL):
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * RemoteNetXXXGetInfo (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN char * servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN char * XXX_name,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN int level,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT union switch(level) {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case(1): XXX_INFO_1 * info1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case(2): XXX_INFO_2 * info2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } bufptr);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The level guides the (un)marshalling as it follows the pointer.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * DCE(MS) IDL will automatically form a structure for the union
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * which looks about like this (much as Sun/RPC does):
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * int _keyvalue_;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_1 *info1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_2 *info2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } _u_;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } bufptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This struct is not made visible to the application. It is purely
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * an internal (automagic) thing. However, ndrgen does not do this.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The ndrgen input MUST remain a valid C header file, and all
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct and union declarations must be exact, and we (would) have
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * to tediously code sequences like this (approximately NDL)):
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union XXXGetInfo_result_u {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [case(1)]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_1 * info1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [case(2)]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_2 * info2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct XXXGetInfo_result {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * int level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union XXXGetInfo_result_u bufptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct XXXGetInfo_param { // still have to code this one
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] char * servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] ushort level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [out] struct XXXGetInfo_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This is error prone and difficult to write, and more difficult
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and distracting to read. It is hard to pick through the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * necessary evils and see what's really going on. To mitigate
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the situation, we have a series of macros which generate
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the tedious code, and are easily recognized as supporting
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * fluff rather than important structures:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFO1RES_DEFINITION(XXXGetInfo,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFO1RES_UNION_ENTRY(XXXGetInfo, 1)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFO1RES_UNION_ENTRY(XXXGetInfo, 2))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * structt XXXGetInfo_param { // still have to code this one
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] char * servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] ushort level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [out] struct XXXGetInfo_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The INFO1RES_DEFINITION macro defines two types:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union ...__ru {...}
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct ..._result { DWORD level; union ..._ru bufptr; }
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * There is a similar macro, INFO1RESBUF_DEFINITION, which defines
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * actual space rather than just pointers. It defines:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union ...._rb {...}
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * typedef union ..._rb ..._rb;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Which is handy in functions because the initial coding sequence
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * looks something like:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXXGetInfoParam (struct XXXGetInfo_param *param) {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXXGetInfo_rb rb;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * param->result.level = param->level; // for marshalling
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * param->result.bufptr.nullptr = &rb; // anything fits
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * There are two flavors of Info results. The first is the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * single XXX_INFO_x result, which the foregoing example
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * uses. The second flavor is when there are multiple entries
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * possible. Again, for the sake of guiding the marshalling,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the RPIs use something accommodating:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct XXX_INFO_1_result {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * unsigned entriesread;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [size_is(entriesread)]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_1 * table;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union { XXX_INFO_1_result *info1; ...}
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Notice this is using XXX_INFO_1_result rather than just XXX_INFO_1.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The requirements from this point are much like before. Because of
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the variable-length value, there is no realistic way to do something
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * like INFO1RESBUF_DEFINITION.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * There are two sets of macros here. INFO1RES_xxx are for the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * single result case, and INFONRES_xxx for the multiple entry case.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFO1RES_...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Type constructors for single-result case
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RES_DEFINITION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RES_UNION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RES_STRUCT(INFOPREF)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RES_UNION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union INFOPREF##__ru { \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RES_UNION_NULLPTR \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ENTRIES \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RES_UNION_NULLPTR \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DEFAULT char * nullptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RES_UNION_ENTRY(INFOPREF,NUM) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(NUM) struct INFOPREF##_##NUM * bufptr##NUM;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RES_STRUCT(INFOPREF) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct INFOPREF##_result { \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD level; \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(level) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union INFOPREF##__ru bufptr; \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFO1RESBUF_...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Type constructors for single-result buffering.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifndef NDRGEN
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RESBUF_DEFINITION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw typedef union INFOPREF##_rb { \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ENTRIES \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw } INFOPREF##_rb;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RESBUF_UNION_ENTRY(INFOPREF,NUM) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(NUM) struct INFOPREF##_##NUM buf##NUM;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#else
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RESBUF_DEFINITION(INFOPREF, ENTRIES)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFO1RESBUF_UNION_ENTRY(INFOPREF,NUM)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFONRES_...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Type constructors for multiple-result case
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_RESULT(INFOPREF,NUM) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct INFOPREF##_##NUM##_result { \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD entriesread; \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SIZE_IS(entriesread) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct INFOPREF##_##NUM *entries; \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_DEFINITION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_STRUCT(INFOPREF)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_UNION(INFOPREF, ENTRIES) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union INFOPREF##__ru { \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_NULLPTR \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_INFONRES \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ENTRIES \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_UNION_NULLPTR \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DEFAULT char * nullptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifndef NDRGEN
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_UNION_INFONRES \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_infonres * p;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#else
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_UNION_INFONRES
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_UNION_ENTRY(INFOPREF,NUM) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(NUM) struct INFOPREF##_##NUM##_result * bufptr##NUM;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define INFONRES_STRUCT(INFOPREF) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct INFOPREF##_result { \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD level; \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(level) \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union INFOPREF##__ru bufptr; \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw };
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifndef NDRGEN
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This just makes things a little easier on the stub modules:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXXGetInfoParam (struct XXXGetInfo_param *param) {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct mslm_infonres infonres;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * infonres.entriesread = 0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * infonres.entries = 0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * param->result.level = param->level; // for marshalling
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * param->result.bufptr.p = &infonres;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_infonres {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD entriesread;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw void * entries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb * SRVSVC - Server Service
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb/* Windows NT */
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetCharDevEnum 0x00
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetCharDevGetInfo 0x01
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetCharDevControl 0x02
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetCharDevQEnum 0x03
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetCharDevQGetInfo 0x04
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetCharDevQSetInfo 0x05
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetCharDevQPurge 0x06
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetCharDevQPurgeSelf 0x07
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetConnectEnum 0x08
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetFileEnum 0x09
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetFileGetInfo 0x0a
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetFileClose 0x0b
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetSessionEnum 0x0c
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetSessionDel 0x0d
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetShareAdd 0x0e
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetShareEnum 0x0f
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetShareGetInfo 0x10
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetShareSetInfo 0x11
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetShareDel 0x12
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetShareDelSticky 0x13
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetShareCheck 0x14
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerGetInfo 0x15
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerSetInfo 0x16
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerDiskEnum 0x17
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerStatisticsGet 0x18
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerTransportAdd 0x19
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerTransportEnum 0x1a
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerTransportDel 0x1b
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetRemoteTOD 0x1c
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerSetServiceBits 0x1d
3db3f65c6274eb042354801a308c8e9bc4994553amw#define SRVSVC_OPNUM_NetPathType 0x1e
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetPathCanonicalize 0x1f
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetPathCompare 0x20
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetNameValidate 0x21
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetNameCanonicalize 0x22
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetNameCompare 0x23
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetShareEnumSticky 0x24
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetShareDelStart 0x25
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetShareDelCommit 0x26
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetGetFileSecurity 0x27
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetSetFileSecurity 0x28
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerTransportAddEx 0x29
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerSetServiceBitsEx 0x2a
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetDfsGetVersion 0x2b
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb/* Windows 2000 */
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetDfsCreateLocalPartition 0x2c
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetDfsDeleteLocalPartition 0x2d
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetDfsSetLocalVolumeState 0x2e
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetDfsSetServerInfo 0x2f
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetDfsCreateExitPoint 0x30
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetDfsDeleteExitPoint 0x31
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetDfsModifyPrefix 0x32
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetDfsFixLocalVolume 0x33
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetDfsManagerReportSiteInfo 0x34
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb/* Windows XP and Windows Server 2003 */
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerTransportDelEx 0x35
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb/* Windows Vista */
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerAliasAdd 0x36
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerAliasEnum 0x37
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetServerAliasDel 0x38
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define SRVSVC_OPNUM_NetShareDelEx 0x39
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
3db3f65c6274eb042354801a308c8e9bc4994553amw * NetConnectEnum
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Level 0 connect information.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetConnectInfoBuf0 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD coni0_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetConnectInfo0 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD entries_read;
3db3f65c6274eb042354801a308c8e9bc4994553amw SIZE_IS(entries_read)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetConnectInfoBuf0 *ci0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Level 1 connect information.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetConnectInfoBuf1 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD coni1_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD coni1_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD coni1_num_opens;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD coni1_num_users;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD coni1_time;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR coni1_username;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR coni1_netname; /* share name */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetConnectInfo1 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD entries_read;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SIZE_IS(entries_read)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetConnectInfoBuf1 *ci1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion mslm_NetConnectInfoResUnion {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(0) struct mslm_NetConnectInfo0 *info0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(1) struct mslm_NetConnectInfo1 *info1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DEFAULT char *nullptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetConnectInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD switch_value;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(switch_value)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union mslm_NetConnectInfoResUnion ru;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetConnectEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetConnectEnum {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR qualifier; /* share name */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT struct mslm_NetConnectInfo info;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD pref_max_len;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD total_entries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD *resume_handle;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
3db3f65c6274eb042354801a308c8e9bc4994553amw * NetFileEnum
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
3db3f65c6274eb042354801a308c8e9bc4994553amwstruct mslm_NetFileInfoBuf2 {
3db3f65c6274eb042354801a308c8e9bc4994553amw DWORD fi2_id;
3db3f65c6274eb042354801a308c8e9bc4994553amw};
3db3f65c6274eb042354801a308c8e9bc4994553amw
3db3f65c6274eb042354801a308c8e9bc4994553amwstruct mslm_NetFileInfo2 {
3db3f65c6274eb042354801a308c8e9bc4994553amw DWORD entries_read;
3db3f65c6274eb042354801a308c8e9bc4994553amw SIZE_IS(entries_read)
3db3f65c6274eb042354801a308c8e9bc4994553amw struct mslm_NetFileInfoBuf2 *fi2;
3db3f65c6274eb042354801a308c8e9bc4994553amw};
3db3f65c6274eb042354801a308c8e9bc4994553amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetFileInfoBuf3 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD fi3_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD fi3_permissions;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD fi3_num_locks;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR fi3_pathname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR fi3_username;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetFileInfo3 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD entries_read;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SIZE_IS(entries_read)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetFileInfoBuf3 *fi3;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion mslm_NetFileInfoResUnion {
3db3f65c6274eb042354801a308c8e9bc4994553amw CASE(2) struct mslm_NetFileInfo2 *info2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(3) struct mslm_NetFileInfo3 *info3;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DEFAULT char *nullptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetFileInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD switch_value;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(switch_value)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union mslm_NetFileInfoResUnion ru;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetFileEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetFileEnum {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
3db3f65c6274eb042354801a308c8e9bc4994553amw IN DWORD basepath;
3db3f65c6274eb042354801a308c8e9bc4994553amw IN DWORD username;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT struct mslm_NetFileInfo info;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD pref_max_len;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD total_entries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD *resume_handle;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetFileClose
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
3db3f65c6274eb042354801a308c8e9bc4994553amw * Close files using a file id reported by NetFileEnum.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetFileClose)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetFileClose {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD file_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetShareGetInfo: netname is the name of a share.
3db3f65c6274eb042354801a308c8e9bc4994553amw *
3db3f65c6274eb042354801a308c8e9bc4994553amw * Levels:
3db3f65c6274eb042354801a308c8e9bc4994553amw * 1 Sets information about the shared resource: name, type
3db3f65c6274eb042354801a308c8e9bc4994553amw * of resource and a comment.
3db3f65c6274eb042354801a308c8e9bc4994553amw * 2 Sets information about the shared resource: name, type,
3db3f65c6274eb042354801a308c8e9bc4994553amw * permissions, password and number of connections.
3db3f65c6274eb042354801a308c8e9bc4994553amw * 501 Sets information about the shared resource: name, type
3db3f65c6274eb042354801a308c8e9bc4994553amw * of resource and a comment.
3db3f65c6274eb042354801a308c8e9bc4994553amw * 502 Sets information about the shared resource, including
3db3f65c6274eb042354801a308c8e9bc4994553amw * the name, type, permissions, number of connections etc.
8d7e41661dc4633488e93b13363137523ce59977jose borrego * 503 Contains information about the shared resource;
8d7e41661dc4633488e93b13363137523ce59977jose borrego * identical to 502 except for the addition of a servername.
3db3f65c6274eb042354801a308c8e9bc4994553amw * 1004 Specifies a comment for the shared resource.
3db3f65c6274eb042354801a308c8e9bc4994553amw * 1005 Specifies a set of flags describing the shared resource.
3db3f65c6274eb042354801a308c8e9bc4994553amw * 1006 Specifies the maximum number of concurrent connections
3db3f65c6274eb042354801a308c8e9bc4994553amw * that the shared resource can accommodate.
3db3f65c6274eb042354801a308c8e9bc4994553amw * 1501 Specifies the SECURITY_DESCRIPTOR for the share.
3db3f65c6274eb042354801a308c8e9bc4994553amw *
3db3f65c6274eb042354801a308c8e9bc4994553amw * Windows Me/98/95 supports level 50, which is similar to level 1.
3db3f65c6274eb042354801a308c8e9bc4994553amw *
3db3f65c6274eb042354801a308c8e9bc4994553amw * shi1005_flags: SHI1005_VALID_FLAGS_SET defines the set of flags that
3db3f65c6274eb042354801a308c8e9bc4994553amw * can be set with the NetShareSetInfo function. SHI1005_FLAGS_DFS and
3db3f65c6274eb042354801a308c8e9bc4994553amw * SHI1005_FLAGS_DFS_ROOT can only be returned, but not set.
3db3f65c6274eb042354801a308c8e9bc4994553amw *
3db3f65c6274eb042354801a308c8e9bc4994553amw * 0x01 SHI1005_FLAGS_DFS
3db3f65c6274eb042354801a308c8e9bc4994553amw * The specified share is present in a Dfs tree structure.
3db3f65c6274eb042354801a308c8e9bc4994553amw * This flag cannot be set with NetShareSetInfo.
3db3f65c6274eb042354801a308c8e9bc4994553amw *
3db3f65c6274eb042354801a308c8e9bc4994553amw * 0x02 SHI1005_FLAGS_DFS_ROOT
3db3f65c6274eb042354801a308c8e9bc4994553amw * The specified share is the root volume in a Dfs tree.
3db3f65c6274eb042354801a308c8e9bc4994553amw * This flag cannot be set with NetShareSetInfo.
3db3f65c6274eb042354801a308c8e9bc4994553amw *
3db3f65c6274eb042354801a308c8e9bc4994553amw * 0x30 CSC_MASK Client-side caching (CSC) state:
3db3f65c6274eb042354801a308c8e9bc4994553amw * 0x00 CSC_CACHE_MANUAL_REINT Automatic file-by-file
3db3f65c6274eb042354801a308c8e9bc4994553amw * reintegration not allowed.
3db3f65c6274eb042354801a308c8e9bc4994553amw * 0x10 CSC_CACHE_AUTO_REINT File-by-file reintegration allowed.
3db3f65c6274eb042354801a308c8e9bc4994553amw * 0x20 CSC_CACHE_VDO File opens do not need to be flowed.
3db3f65c6274eb042354801a308c8e9bc4994553amw * 0x30 CSC_CACHE_NONE CSC is disabled for this share.
3db3f65c6274eb042354801a308c8e9bc4994553amw *
3db3f65c6274eb042354801a308c8e9bc4994553amw * 0x0100 SHI1005_FLAGS_RESTRICT_EXCLUSIVE_OPENS
3db3f65c6274eb042354801a308c8e9bc4994553amw * The specified share disallows exclusive file opens,
3db3f65c6274eb042354801a308c8e9bc4994553amw * where reads to an open file are disallowed.
3db3f65c6274eb042354801a308c8e9bc4994553amw *
3db3f65c6274eb042354801a308c8e9bc4994553amw * 0x0200 SHI1005_FLAGS_FORCE_SHARED_DELETE
3db3f65c6274eb042354801a308c8e9bc4994553amw * Shared files in the specified share can be forcibly deleted.
3db3f65c6274eb042354801a308c8e9bc4994553amw *
3db3f65c6274eb042354801a308c8e9bc4994553amw * 0x0400 SHI1005_FLAGS_ALLOW_NAMESPACE_CACHING
3db3f65c6274eb042354801a308c8e9bc4994553amw * Clients are allowed to cache the namespace of the share.
3db3f65c6274eb042354801a308c8e9bc4994553amw *
3db3f65c6274eb042354801a308c8e9bc4994553amw * 0x0800 SHI1005_FLAGS_ACCESS_BASED_DIRECTORY_ENUM
3db3f65c6274eb042354801a308c8e9bc4994553amw * The server will filter directory entries based on the access
3db3f65c6274eb042354801a308c8e9bc4994553amw * permissions of the client. This flag is only supported on
3db3f65c6274eb042354801a308c8e9bc4994553amw * servers running Windows Server 2003 SP1.
3db3f65c6274eb042354801a308c8e9bc4994553amw * Note: The access-based enumeration (ABE) flag may also
3db3f65c6274eb042354801a308c8e9bc4994553amw * appear as SHI1005_FLAGS_ENFORCE_NAMESPACE_ACCESS.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
8d7e41661dc4633488e93b13363137523ce59977jose borrego
8d7e41661dc4633488e93b13363137523ce59977jose borrego#define CSC_MASK 0x30
8d7e41661dc4633488e93b13363137523ce59977jose borrego#define CSC_CACHE_MANUAL_REINT 0x00
8d7e41661dc4633488e93b13363137523ce59977jose borrego#define CSC_CACHE_AUTO_REINT 0x10
8d7e41661dc4633488e93b13363137523ce59977jose borrego#define CSC_CACHE_VDO 0x20
8d7e41661dc4633488e93b13363137523ce59977jose borrego#define CSC_CACHE_NONE 0x30
8d7e41661dc4633488e93b13363137523ce59977jose borrego
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareGetInfo0 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi0_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareGetInfo1 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi1_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi1_type; /* type of resource such as IPC$ */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi1_comment;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareGetInfo2 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_comment;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_permissions;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_max_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_current_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_path;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_passwd;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
3db3f65c6274eb042354801a308c8e9bc4994553amwstruct mslm_NetShareGetInfo501 {
3db3f65c6274eb042354801a308c8e9bc4994553amw LPTSTR shi501_netname;
3db3f65c6274eb042354801a308c8e9bc4994553amw DWORD shi501_type;
3db3f65c6274eb042354801a308c8e9bc4994553amw LPTSTR shi501_comment;
3db3f65c6274eb042354801a308c8e9bc4994553amw DWORD shi501_reserved;
3db3f65c6274eb042354801a308c8e9bc4994553amw};
3db3f65c6274eb042354801a308c8e9bc4994553amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareGetInfo502 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_comment;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_permissions;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_max_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_current_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_path;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_passwd;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_reserved;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_security_descriptor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
8d7e41661dc4633488e93b13363137523ce59977jose borregostruct mslm_NetShareGetInfo503 {
8d7e41661dc4633488e93b13363137523ce59977jose borrego LPTSTR shi503_netname;
8d7e41661dc4633488e93b13363137523ce59977jose borrego DWORD shi503_type;
8d7e41661dc4633488e93b13363137523ce59977jose borrego LPTSTR shi503_comment;
8d7e41661dc4633488e93b13363137523ce59977jose borrego DWORD shi503_permissions;
8d7e41661dc4633488e93b13363137523ce59977jose borrego DWORD shi503_max_uses;
8d7e41661dc4633488e93b13363137523ce59977jose borrego DWORD shi503_current_uses;
8d7e41661dc4633488e93b13363137523ce59977jose borrego LPTSTR shi503_path;
8d7e41661dc4633488e93b13363137523ce59977jose borrego LPTSTR shi503_passwd;
8d7e41661dc4633488e93b13363137523ce59977jose borrego LPTSTR shi503_servername;
8d7e41661dc4633488e93b13363137523ce59977jose borrego DWORD shi503_reserved;
8d7e41661dc4633488e93b13363137523ce59977jose borrego DWORD shi503_security_descriptor;
8d7e41661dc4633488e93b13363137523ce59977jose borrego};
8d7e41661dc4633488e93b13363137523ce59977jose borrego
8d7e41661dc4633488e93b13363137523ce59977jose borregostruct mslm_NetShareGetInfo1004 {
8d7e41661dc4633488e93b13363137523ce59977jose borrego LPTSTR shi1004_comment;
8d7e41661dc4633488e93b13363137523ce59977jose borrego};
8d7e41661dc4633488e93b13363137523ce59977jose borrego
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareGetInfo1005 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi1005_flags;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
8d7e41661dc4633488e93b13363137523ce59977jose borregostruct mslm_NetShareGetInfo1006 {
8d7e41661dc4633488e93b13363137523ce59977jose borrego DWORD shi1006_max_uses;
8d7e41661dc4633488e93b13363137523ce59977jose borrego};
8d7e41661dc4633488e93b13363137523ce59977jose borrego
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion mlsm_NetShareGetInfoResUnion {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(0) struct mslm_NetShareGetInfo0 *info0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(1) struct mslm_NetShareGetInfo1 *info1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(2) struct mslm_NetShareGetInfo2 *info2;
3db3f65c6274eb042354801a308c8e9bc4994553amw CASE(501) struct mslm_NetShareGetInfo501 *info501;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(502) struct mslm_NetShareGetInfo502 *info502;
8d7e41661dc4633488e93b13363137523ce59977jose borrego CASE(1004) struct mslm_NetShareGetInfo1004 *info1004;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(1005) struct mslm_NetShareGetInfo1005 *info1005;
8d7e41661dc4633488e93b13363137523ce59977jose borrego CASE(1006) struct mslm_NetShareGetInfo1006 *info1006;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DEFAULT char *nullptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mlsm_NetShareGetInfoRes {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD switch_value;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(switch_value)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union mlsm_NetShareGetInfoResUnion ru;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetShareGetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mlsm_NetShareGetInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN REFERENCE LPTSTR netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT struct mlsm_NetShareGetInfoRes result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetShareSetInfo: netname is the name of a share.
3db3f65c6274eb042354801a308c8e9bc4994553amw * The levels and shi1005_flags are as described for NetShareGetInfo.
3db3f65c6274eb042354801a308c8e9bc4994553amw *
3db3f65c6274eb042354801a308c8e9bc4994553amw * Support for Access-based Enumeration (ABE) was added to Windows in
3db3f65c6274eb042354801a308c8e9bc4994553amw * Windows Server 2003 Service Pack 1. ABE filters directory contents
3db3f65c6274eb042354801a308c8e9bc4994553amw * (and other shared resources) returned via a share based on a user's
3db3f65c6274eb042354801a308c8e9bc4994553amw * access rights, i.e. a user would not see objects that are
3db3f65c6274eb042354801a308c8e9bc4994553amw * inaccessible to that user. ABE requests are made using info level
3db3f65c6274eb042354801a308c8e9bc4994553amw * 1005 with the value 0x0800 in the flags field (see NetShareGetInfo).
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetShareSetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mlsm_NetShareSetInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN REFERENCE LPTSTR netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This should accept all the same levels as NetShareGetInfo
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * but we always return ACCESS_DENIED for now. So there's no
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * point in unmarshalling the share information.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN struct mlsm_NetShareGetInfoRes result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD parm_err_ptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD parm_err;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetSessionEnum
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The NetSessionEnum function provides information about sessions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * established on a server.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Only members of the Administrators or Account Operators local groups
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * can successfully execute the NetSessionEnum function at level 1 or
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * level 2. No special group membership is required for level 0 or level
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 10 calls.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows NT/2000/XP: The parameter order is as follows.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NET_API_STATUS NetSessionEnum(LPWSTR servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPWSTR UncClientName,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPWSTR username,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * DWORD level,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPBYTE *bufptr,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * DWORD prefmaxlen,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPDWORD entriesread,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPDWORD totalentries,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPDWORD resume_handle);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows 95/98/Me: The calling application must use the cbBuffer parameter
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * to specify the size, in bytes, of the information buffer pointed to by the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * pbBuffer parameter. (The cbBuffer parameter replaces the prefmaxlen
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * parameter.) Neither a user name parameter nor a resume handle parameter is
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * available on this platform. Therefore, the parameter list is as follows.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * API_FUNCTION NetSessionEnum(const char FAR *pszServer,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * short sLevel,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * char FAR *pbBuffer,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * unsigned short cbBuffer,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * unsigned short FAR *pcEntriesRead,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * unsigned short FAR *pcTotalAvail);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Parameters
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * servername
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Pointer to a string that specifies the DNS or NetBIOS name of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * remote server on which the function is to execute. If this parameter is
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NULL, the local computer is used.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows NT 4.0 and earlier: This string must begin with \\.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * UncClientName
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Pointer to a string that specifies the name of the computer session
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * for which information is to be returned. If this parameter is NULL,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetSessionEnum returns information for all computer sessions on the server.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * username
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Pointer to a string that specifies the name of the user for which
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * information is to be returned. If this parameter is NULL, NetSessionEnum
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * returns information for all users.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * level
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Specifies the information level of the data. This parameter can be
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * one of the following values.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows NT/2000/XP: The following levels are valid.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Value Meaning
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 0 Return the name of the computer that established the session.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The bufptr parameter points to an array of SESSION_INFO_0
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * structures.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 1 Return the name of the computer, name of the user, and open files,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * pipes, and devices on the computer. The bufptr parameter points to
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * an array of SESSION_INFO_1 structures.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 2 In addition to the information indicated for level 1, return the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * type of client and how the user established the session. The bufptr
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * parameter points to an array of SESSION_INFO_2 structures.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 10 Return the name of the computer, name of the user, and active and
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * idle times for the session. The bufptr parameter points to an array
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * of SESSION_INFO_10 structures.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 502 Return the name of the computer; name of the user; open files,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * pipes, and devices on the computer; and the name of the transport
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the client is using. The bufptr parameter points to an array of
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SESSION_INFO_502 structures.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows 95/98/Me: The following level is valid.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Value Meaning
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 50 Return the name of the computer, name of the user, open files on
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the computer, and the name of the transport protocol the client is
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * using. The pbBuffer parameter points to an array of session_info_50
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * structures.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * bufptr
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [out] Pointer to the buffer that receives the data. The format of this
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * data depends on the value of the level parameter.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows NT/2000/XP: This buffer is allocated by the system and must be
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * freed using the NetApiBufferFree function. Note that you must free the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * buffer even if the function fails with ERROR_MORE_DATA.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows 95/98/Me: The caller must allocate and deallocate this buffer.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * prefmaxlen
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Specifies the preferred maximum length of returned data, in bytes.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If you specify MAX_PREFERRED_LENGTH, the function allocates the amount
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * of memory required for the data. If you specify another value in this
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * parameter, it can restrict the number of bytes that the function returns.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * If the buffer size is insufficient to hold all entries, the function
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * returns ERROR_MORE_DATA. For more information, see Network Management
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Function Buffers and Network Management Function Buffer Lengths.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * entriesread
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [out] Pointer to a value that receives the count of elements actually
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * enumerated.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * totalentries
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [out] Pointer to a value that receives the total number of entries that
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * could have been enumerated from the current resume position.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * resume_handle
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in/out] Pointer to a value that contains a resume handle which is used
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * to continue an existing session search. The handle should be zero on the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * first call and left unchanged for subsequent calls. If resume_handle is
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NULL, no resume handle is stored.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SESSION_INFO_1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * ==============
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The SESSION_INFO_1 structure contains information about the session,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * including name of the computer; name of the user; and open files, pipes,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and devices on the computer.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Members
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_cname
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Pointer to a Unicode string specifying the name of the computer that
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * established the session.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_username
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Pointer to a Unicode string specifying the name of the user who established
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the session.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_num_opens
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Specifies a DWORD value that contains the number of files, devices,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and pipes opened during the session.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_time
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Specifies a DWORD value that contains the number of seconds the session
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * has been active.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_idle_time
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Specifies a DWORD value that contains the number of seconds the session
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * has been idle.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_user_flags
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Specifies a DWORD value that describes how the user established the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * session. This member can be one of the following values:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SESS_GUEST The user specified by the sesi1_username member
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * established the session using a guest account.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SESS_NOENCRYPTION The user specified by the sesi1_username member
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * established the session without using password
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * encryption.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SESS_GUEST 0x00000001
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SESS_NOENCRYPTION 0x00000002
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SESSION_INFO_0 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sesi0_cname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_RESULT(mslm_SESSION_INFO, 0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SESSION_INFO_1 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sesi1_cname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sesi1_uname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sesi1_nopens;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sesi1_time;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sesi1_itime;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sesi1_uflags;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_RESULT(mslm_SESSION_INFO, 1)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_DEFINITION(mslm_NetSessionEnum,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_ENTRY(mslm_SESSION_INFO, 0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_ENTRY(mslm_SESSION_INFO, 1))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetSessionEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetSessionEnum {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD unc_clientname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD username;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT struct mslm_NetSessionEnum_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD pref_max_len;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD total_entries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD *resume_handle;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetSessionDel (Platform SDK: Network Management)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The NetSessionDel function ends a network session between a server
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and a workstation.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Security Requirements
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Only members of the Administrators or Account Operators local group
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * can successfully execute the NetSessionDel function.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows NT/2000/XP: The parameter order is as follows.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NET_API_STATUS NetSessionDel(LPWSTR servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPWSTR UncClientName,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPWSTR username);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows 95/98/Me: The sReserved parameter replaces the username
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * parameter. For more information, see the following Remarks section.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The parameter list is as follows.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * API_FUNCTION NetSessionDel(const char FAR *pszServer,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * const char FAR *pszClientName,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * short sReserved);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Parameters
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * servername
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Pointer to a string that specifies the DNS or NetBIOS name
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * of the remote server on which the function is to execute. If this
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * parameter is NULL, the local computer is used.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows NT 4.0 and earlier: This string must begin with \\.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * UncClientName
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Pointer to a string that specifies the computer name of the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * client to disconnect. If UncClientName is NULL, then all the sessions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * of the user identified by the username parameter will be deleted on
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the server specified by servername. For more information, see
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetSessionEnum.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * username
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [in] Pointer to a string that specifies the name of the user whose
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * session is to be terminated. If this parameter is NULL, all users'
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sessions from the client specified by the UncClientName parameter
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * are to be terminated.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Remarks
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows 95/98/Me: You must specify the session key in the sReserved
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * parameter when you call NetSessionDel. The session key is returned by
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the NetSessionEnum function or the NetSessionGetInfo function in the
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi50_key member of the session_info_50 structure.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetSessionDel)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetSessionDel {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR unc_clientname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR username;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SRVSVC NetServerGetInfo (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN LPTSTR servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN DWORD level,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT union switch(level) {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case 100: _SERVER_INFO_100 * p100;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case 101: _SERVER_INFO_101 * p101;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case 102: _SERVER_INFO_102 * p102;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } bufptr,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT DWORD status
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * )
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* for svX_platform */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_PLATFORM_ID_OS2 400
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_PLATFORM_ID_NT 500
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Bit-mapped values for svX_type fields */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_WORKSTATION 0x00000001
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SERVER 0x00000002
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SQLSERVER 0x00000004
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_DOMAIN_CTRL 0x00000008
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_DOMAIN_BAKCTRL 0x00000010
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_TIME_SOURCE 0x00000020
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_AFP 0x00000040
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_NOVELL 0x00000080
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_DOMAIN_MEMBER 0x00000100
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_PRINTQ_SERVER 0x00000200
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_DIALIN_SERVER 0x00000400
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_XENIX_SERVER 0x00000800
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SERVER_UNIX SV_TYPE_XENIX_SERVER
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_NT 0x00001000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_WFW 0x00002000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SERVER_MFPN 0x00004000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SERVER_NT 0x00008000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_POTENTIAL_BROWSER 0x00010000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_BACKUP_BROWSER 0x00020000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_MASTER_BROWSER 0x00040000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_DOMAIN_MASTER 0x00080000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SERVER_OSF 0x00100000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SERVER_VMS 0x00200000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_WINDOWS 0x00400000 /* Windows95 and above */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_ALTERNATE_XPORT 0x20000000 /* return list for
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * alternate transport */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_LOCAL_LIST_ONLY 0x40000000 /* Return local list only */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_DOMAIN_ENUM 0x80000000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_ALL 0xFFFFFFFF /* handy for NetServerEnum2 */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* NT-Server 4.0 sends 0x0006_120B */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SENT_BY_NT_4_0_SERVER \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ( SV_TYPE_WORKSTATION \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_SERVER \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_DOMAIN_CTRL \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_NT \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_BACKUP_BROWSER \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_MASTER_BROWSER)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* NT-workstation 4.0 send 0x0004_1013 */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_TYPE_SENT_BY_NT_4_0_WORKSTATION \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ( SV_TYPE_WORKSTATION \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_SERVER \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_DOMAIN_BAKCTRL \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_NT \
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw | SV_TYPE_MASTER_BROWSER)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Special value for sv102_disc that specifies infinite disconnect time */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_NODISC (-1L) /* No autodisconnect timeout enforced */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Values of svX_security field */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_USERSECURITY 1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_SHARESECURITY 0
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Values of svX_hidden field */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_HIDDEN 1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_VISIBLE 0
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Let's get some info already */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SERVER_INFO_100 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv100_platform_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sv100_name;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SERVER_INFO_101 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv101_platform_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sv101_name;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv101_version_major;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv101_version_minor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv101_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sv101_comment;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SERVER_INFO_102 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_platform_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sv102_name;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_version_major;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_version_minor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sv102_comment;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_users;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_disc;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_hidden; /* BOOL */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_announce;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_anndelta;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD sv102_licenses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR sv102_userpath;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion mslm_NetServerGetInfo_ru {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(100) struct mslm_SERVER_INFO_100 *bufptr100;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(101) struct mslm_SERVER_INFO_101 *bufptr101;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(102) struct mslm_SERVER_INFO_102 *bufptr102;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DEFAULT char *nullptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetServerGetInfo_result {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(level)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union mslm_NetServerGetInfo_ru bufptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetServerGetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetServerGetInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT struct mslm_NetServerGetInfo_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SRVSVC NetRemoteTOD (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN LPTSTR servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT _TIME_OF_DAY_INFO *bufptr,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT long status
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * )
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_TIME_OF_DAY_INFO {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_elapsedt;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_msecs;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_hours;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_mins;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_secs;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_hunds;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_timezone;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_tinterval;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_day;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_month;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_year;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD tod_weekday;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetRemoteTOD)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetRemoteTOD {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT struct mslm_TIME_OF_DAY_INFO *bufptr;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
3db3f65c6274eb042354801a308c8e9bc4994553amw#define NAMETYPE_USER 1
3db3f65c6274eb042354801a308c8e9bc4994553amw#define NAMETYPE_PASSWORD 2
3db3f65c6274eb042354801a308c8e9bc4994553amw#define NAMETYPE_GROUP 3
3db3f65c6274eb042354801a308c8e9bc4994553amw#define NAMETYPE_COMPUTER 4
3db3f65c6274eb042354801a308c8e9bc4994553amw#define NAMETYPE_EVENT 5
3db3f65c6274eb042354801a308c8e9bc4994553amw#define NAMETYPE_DOMAIN 6
3db3f65c6274eb042354801a308c8e9bc4994553amw#define NAMETYPE_SERVICE 7
3db3f65c6274eb042354801a308c8e9bc4994553amw#define NAMETYPE_NET 8
3db3f65c6274eb042354801a308c8e9bc4994553amw#define NAMETYPE_SHARE 9
3db3f65c6274eb042354801a308c8e9bc4994553amw#define NAMETYPE_MESSAGE 10
3db3f65c6274eb042354801a308c8e9bc4994553amw#define NAMETYPE_MESSAGEDEST 11
3db3f65c6274eb042354801a308c8e9bc4994553amw#define NAMETYPE_SHAREPASSWORD 12
3db3f65c6274eb042354801a308c8e9bc4994553amw#define NAMETYPE_WORKGROUP 13
3db3f65c6274eb042354801a308c8e9bc4994553amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetNameValidate)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetNameValidate {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN REFERENCE LPTSTR pathname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD flags;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SRVSVC NetShareEnum (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN LPTSTR servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT union switch(level) {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case 0: struct {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * DWORD entriesread;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [size_is(entriesread)]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * _SHARE_INFO_0 *entries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } *bufptr0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case 1: struct {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * DWORD entriesread;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [size_is(entriesread)]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * _SHARE_INFO_1 *entries;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } *bufptr1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * ...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } bufptr,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN DWORD prefmaxlen,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT DWORD totalentries,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN OUT DWORD ?* resume_handle,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT DWORD status
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * )
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Share types for shiX_type fields - duplicated from cifs.h
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#ifndef _SHARE_TYPES_DEFINED_
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define _SHARE_TYPES_DEFINED_
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_DISKTREE 0x00000000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_PRINTQ 0x00000001
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_DEVICE 0x00000002
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_IPC 0x00000003
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_MASK 0x0000000F
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_DFS 0x00000064
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_HIDDEN 0x80000000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define STYPE_SPECIAL 0x80000000
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif /* _SHARE_TYPES_DEFINED_ */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Maximum uses for shiX_max_uses fields */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SHI_USES_UNLIMITED (DWORD)-1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SHARE_INFO_0 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi0_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_RESULT(mslm_SHARE_INFO,0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SHARE_INFO_1 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi1_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi1_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi1_remark;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_RESULT(mslm_SHARE_INFO,1)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SHARE_INFO_2 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_remark;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_permissions;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_max_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi2_current_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_path;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi2_passwd;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_RESULT(mslm_SHARE_INFO,2)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw/*
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw * shi501_flags must be zero.
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw */
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amwstruct mslm_SHARE_INFO_501 {
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw LPTSTR shi501_netname;
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw DWORD shi501_type;
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw LPTSTR shi501_remark;
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw DWORD shi501_flags;
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw};
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amwINFONRES_RESULT(mslm_SHARE_INFO,501)
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Note: shi502_security_descriptor should be a pointer to a
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * security descriptor (W32SEC_SECURITY_DESCRIPTOR):
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * PSECURITY_DESCRIPTOR shi502_security_descriptor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw * For now use a DWORD and set it to zero.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_SHARE_INFO_502 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_remark;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_permissions;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_max_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_current_uses;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_path;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR shi502_passwd;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_reserved;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD shi502_security_descriptor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_RESULT(mslm_SHARE_INFO,502)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion mslm_NetShareAddInfo_u {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(2) struct mslm_SHARE_INFO_2 *info2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(502) struct mslm_SHARE_INFO_502 *info502;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareAddInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD switch_value;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw SWITCH(switch_value)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw union mslm_NetShareAddInfo_u un;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetShareAdd)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareAdd {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN struct mslm_NetShareAddInfo info;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD *parm_err;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFONRES_DEFINITION(mslm_NetShareEnum,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_ENTRY(mslm_SHARE_INFO,0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_ENTRY(mslm_SHARE_INFO,1)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_ENTRY(mslm_SHARE_INFO,2)
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw INFONRES_UNION_ENTRY(mslm_SHARE_INFO,501)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFONRES_UNION_ENTRY(mslm_SHARE_INFO,502))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw/*
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw * NetShareEnum: enumerate all shares (see also NetShareEnumSticky).
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw * Note: the server should ignore the content of servername.
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetShareEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareEnum {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD level;
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw INOUT struct mslm_NetShareEnum_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD prefmaxlen;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD totalentries;
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw INOUT DWORD *resume_handle;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Delete a share. The reserved field appears in netmon
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * but I've left it out in case it's not always present.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This won't affect RPC processing.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetShareDel)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareDel {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN REFERENCE LPTSTR netname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw /* IN DWORD reserved; */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw * NetShareEnumSticky is the same as NetShareEnum except that
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw * STYPE_SPECIAL (hidden or special) shares are not returned.
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw * Note: the server should ignore the content of servername.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetShareEnumSticky)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetShareEnumSticky {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INOUT DWORD level;
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw INOUT struct mslm_NetShareEnum_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD prefmaxlen;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD totalentries;
19d41fcc9d25d65db5db7c75dc9bbb68550868d2amw INOUT DWORD *resume_handle;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * When you install Windows NT Server Tools on a Win95 client,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * a security tab will be added to properties dialog box of files/folders.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Within this security tab, when you try to get/set permissions on a
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * file/folder the next two RPC calls are used.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetGetFileSecurity)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetGetFileSecurity {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR sharename;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN REFERENCE LPTSTR filename;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD securityinfo;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw /*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Right now, we can't send back SD of the requested object
8d7e41661dc4633488e93b13363137523ce59977jose borrego * in RPC code, so we just reply with access denied error
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * code. Thus, this output declaration is only valid in this
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * case i.e., it's not complete.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * It looks like:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A Pointer
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A Length
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A Pointer
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A Length (equal to the prev length)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A buffer
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * return value
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD length;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This is the request:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: RPC Client call srvsvc:NetrpSetFileSecurity(..)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: SRVSVC_HANDLE ServerName = \\WK76-177
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: LPWSTR ShareName = AFSHIN
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: LPWSTR lpFileName = \salek.txt
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: SECURITY_INFORMATION SecurityInformation = 4 (0x4)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * -R_SRVSVC: PADT_SECURITY_DESCRIPTOR SecurityDescriptor {..}
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: DWORD Length = 64 (0x40)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: LPBYTE Buffer = 4496048 (0x449AB0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * R_SRVSVC: LPBYTE Buffer [..] = 01 00 04 80 00 00 00 00 00 00 00 00 00 00 00
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * ...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw *
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 000000A0 00 83 46 00 0B 00 00 00 00 00 00 00 0B 00 ..F...........
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 000000B0 00 00 5C 00 5C 00 57 00 4B 00 37 00 36 00 2D 00 ..\.\.W.K.7.6.-.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 000000C0 31 00 37 00 37 00 00 00 08 00 16 83 46 00 07 00 1.7.7.......F...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 000000D0 00 00 00 00 00 00 07 00 00 00 41 00 46 00 53 00 ..........A.F.S.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 000000E0 48 00 49 00 4E 00 00 00 00 00 0B 00 00 00 00 00 H.I.N...........
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 000000F0 00 00 0B 00 00 00 5C 00 73 00 61 00 6C 00 65 00 ......\.s.a.l.e.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000100 6B 00 2E 00 74 00 78 00 74 00 00 00 00 00 04 00 k...t.x.t.......
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000110 00 00 40 00 00 00 B0 9A 44 00 40 00 00 00 01 00 ..@.....D.@.....
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000120 04 80 00 00 00 00 00 00 00 00 00 00 00 00 14 00 ................
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000130 00 00 02 00 2C 00 01 00 00 00 00 00 24 00 00 00 ....,.......$...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000140 00 A0 01 05 00 00 00 00 00 05 15 00 00 00 1A 24 ...............$
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000150 44 38 90 00 0F 02 65 3A BE 4C FF 03 00 00 00 00 D8....e:.L......
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * 00000160 00 00 00 00 00 00 00 00 00 00 ..........
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(SRVSVC_OPNUM_NetSetFileSecurity)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetSetFileSecurity {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR sharename;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN REFERENCE LPTSTR filename;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD securityinfo;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw /*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN Security Descriptor (looks like):
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Length1
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Pointer
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Length2 (== Length1)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * buffer itself
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The SRVSVC already
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINTERFACE(0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion srvsvc_interface {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetConnectEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetConnectEnum NetConnectEnum;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetFileEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetFileEnum NetFileEnum;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetFileClose)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetFileClose NetFileClose;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetShareGetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mlsm_NetShareGetInfo NetShareGetInfo;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetShareSetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mlsm_NetShareGetInfo NetShareSetInfo;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetSessionDel)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetSessionDel NetSessionDel;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetSessionEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetSessionEnum NetSessionEnum;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetServerGetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetServerGetInfo NetServerGetInfo;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetRemoteTOD)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetRemoteTOD NetRemoteTOD;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetNameValidate)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetNameValidate NetNameValidate;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetShareAdd)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetShareAdd NetShareAdd;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetShareDel)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetShareDel NetShareDel;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetShareEnum)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetShareEnum NetShareEnum;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetShareEnumSticky)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetShareEnumSticky NetShareEnumSticky;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetGetFileSecurity)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetGetFileSecurity NetGetFileSecurity;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(SRVSVC_OPNUM_NetSetFileSecurity)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw struct mslm_NetSetFileSecurity NetSetFileSecurity;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwtypedef union srvsvc_interface srvsvc_interface_t;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwEXTERNTYPEINFO(srvsvc_interface)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb * WKSSVC - Workstation Service
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb/* Windows NT */
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetWkstaGetInfo 0x00
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetWkstaSetInfo 0x01
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetWkstaUserEnum 0x02
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetWkstaUserGetInfo 0x03
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetWkstaUserSetInfo 0x04
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetWkstaTransportEnum 0x05
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetWkstaTransportAdd 0x06
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetWkstaTransportDel 0x07
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetUseAdd 0x08
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetUseGetInfo 0x09
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetUseDel 0x0a
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetUseEnum 0x0b
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetMessageBufferSend 0x0c
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetWkstaStatisticsGet 0x0d
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetLogonDomainNameAdd 0x0e
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb/* Windows 2000 */
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetLogonDomainNameDel 0x0f
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetJoinDomain 0x10
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetUnjoinDomain 0x11
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetValidateName 0x12
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetRenameMachineInDomain 0x13
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetGetJoinInformation 0x14
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetGetJoinableOUs 0x15
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetJoinDomain2 0x16
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetUnjoinDomain2 0x17
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetRenameMachineInDomain2 0x18
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetValidateName2 0x19
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetGetJoinableOUs2 0x1a
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb/* Windows XP and Windows Server 2003 */
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetAddAlternateComputerName 0x1b
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetRemoveAlternateComputerName 0x1c
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetSetPrimaryComputerName 0x1d
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetEnumerateComputerNames 0x1e
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb#define WKSSVC_OPNUM_NetWorkstationResetDfsCache 0x1f
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_WKSTA_INFO_100 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki100_platform_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki100_computername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki100_langroup;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki100_ver_major;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki100_ver_minor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* NetWkstaGetInfo only. System information - user access */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_WKSTA_INFO_101 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki101_platform_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki101_computername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki101_langroup;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki101_ver_major;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki101_ver_minor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki101_lanroot;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* NetWkstaGetInfo only. System information - admin or operator access */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_WKSTA_INFO_102 {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki102_platform_id;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki102_computername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki102_langroup;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki102_ver_major;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki102_ver_minor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw LPTSTR wki102_lanroot;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw DWORD wki102_logged_on_users;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbstruct mslm_WKSTA_INFO_502 {
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD char_wait;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD collection_time;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD maximum_collection_count;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD keep_connection;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD max_commands;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD session_timeout;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD size_char_buf;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD max_threads;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD lock_quota;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD lock_increment;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD lock_maximum;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD pipe_increment;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD pipe_maximum;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD cache_file_timeout;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD dormant_file_limit;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD read_ahead_throughput;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD num_mailslot_buffers;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD num_srv_announce_buffers;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD max_illegal_dgram_events;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD dgram_event_reset_freq;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD log_election_packets;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD use_opportunistic_locking;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD use_unlock_behind;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD use_close_behind;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD buf_named_pipes;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD use_lock_read_unlock;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD utilize_nt_caching;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD use_raw_read;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD use_raw_write;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD use_write_raw_data;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD use_encryption;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD buf_files_deny_write;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD buf_read_only_files;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD force_core_create_mode;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD use_512_byte_max_transfer;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb};
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFO1RES_DEFINITION(mslm_NetWkstaGetInfo,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RES_UNION_ENTRY(mslm_WKSTA_INFO,100)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RES_UNION_ENTRY(mslm_WKSTA_INFO,101)
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb INFO1RES_UNION_ENTRY(mslm_WKSTA_INFO,102)
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb INFO1RES_UNION_ENTRY(mslm_WKSTA_INFO,502))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINFO1RESBUF_DEFINITION(mslm_NetWkstaGetInfo,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RESBUF_UNION_ENTRY(mslm_WKSTA_INFO,100)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw INFO1RESBUF_UNION_ENTRY(mslm_WKSTA_INFO,101)
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb INFO1RESBUF_UNION_ENTRY(mslm_WKSTA_INFO,102)
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb INFO1RESBUF_UNION_ENTRY(mslm_WKSTA_INFO,502))
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwOPERATION(WKSSVC_OPNUM_NetWkstaGetInfo)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwstruct mslm_NetWkstaGetInfo {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw IN DWORD level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT struct mslm_NetWkstaGetInfo_result result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw OUT DWORD status;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb/*
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb ***********************************************************************
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb * NetWkstaTransportEnum
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb ***********************************************************************
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb */
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbstruct mslm_NetWkstaTransportInfo0 {
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD quality_of_service;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD num_vcs;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb LPTSTR transport_name;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb LPTSTR transport_address;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD wan_ish;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb};
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbstruct mslm_NetWkstaTransportCtr0 {
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD count;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb SIZE_IS(count)
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb struct mslm_NetWkstaTransportInfo0 *ti0;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb};
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbunion mslm_NetWkstaTransportInfo_ru {
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb CASE(0) struct mslm_NetWkstaTransportCtr0 *info0;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DEFAULT char *nullptr;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb};
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbstruct mslm_NetWkstaTransportInfo {
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD address;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb DWORD level;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb SWITCH(level)
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb union mslm_NetWkstaTransportInfo_ru ru;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb};
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbOPERATION(WKSSVC_OPNUM_NetWkstaTransportEnum)
faa1795a28a5c712eed6d0a3f84d98c368a316c6jbstruct mslm_NetWkstaTransportEnum {
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb IN LPTSTR servername;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb INOUT struct mslm_NetWkstaTransportInfo info;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb IN DWORD pref_max_len;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb OUT DWORD total_entries;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb INOUT DWORD *resume_handle;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb OUT DWORD status;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb};
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/*
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The WKSSVC already
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwINTERFACE(0)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwunion wkssvc_interface {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(WKSSVC_OPNUM_NetWkstaGetInfo)
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb struct mslm_NetWkstaGetInfo NetWkstaGetInfo;
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb CASE(WKSSVC_OPNUM_NetWkstaTransportEnum)
faa1795a28a5c712eed6d0a3f84d98c368a316c6jb struct mslm_NetWkstaTransportEnum NetWkstaTransportEnum;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw};
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwtypedef union wkssvc_interface wkssvc_interface_t;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amwEXTERNTYPEINFO(wkssvc_interface)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#endif /* _MLSVC_LANMAN_NDL_ */