srvsvc.ndl revision da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * CDDL HEADER START
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 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * See the License for the specific language governing permissions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and limitations under the License.
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 * CDDL HEADER END
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Use is subject to license terms.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LanMan RPC (WKSSVC and SRVSVC) interface definitions.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * WARNING: The cpp(1) macros in this file are not understood by
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * TYPE CONSTRUCTOR MACROS FOR INFORMATION RESULTS
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ****************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This is an explanation of the macros that follow this comment.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The LANMAN API's look something like this:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetXXXGetInfo (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN char * servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN char * XXX_name,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN int level,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT char ** bufptr);
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 * 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 * As best we can determine, the MSC developers use an RPI that looks
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * like this (approximately in IDL):
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 * 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 * struct {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * int _keyvalue_;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_1 *info1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_2 *info2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * } bufptr;
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 * union XXXGetInfo_result_u {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [case(1)]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_1 * info1;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [case(2)]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_2 * info2;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct XXXGetInfo_result {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * int level;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union XXXGetInfo_result_u bufptr;
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 * 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 * INFO1RES_DEFINITION(XXXGetInfo,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFO1RES_UNION_ENTRY(XXXGetInfo, 1)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFO1RES_UNION_ENTRY(XXXGetInfo, 2))
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 * The INFO1RES_DEFINITION macro defines two types:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union ...__ru {...}
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct ..._result { DWORD level; union ..._ru bufptr; }
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * There is a similar macro, INFO1RESBUF_DEFINITION, which defines
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * actual space rather than just pointers. It defines:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union ...._rb {...}
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * typedef union ..._rb ..._rb;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Which is handy in functions because the initial coding sequence
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * looks something like:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXXGetInfoParam (struct XXXGetInfo_param *param) {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXXGetInfo_rb rb;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * param->result.level = param->level; // for marshalling
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * param->result.bufptr.nullptr = &rb; // anything fits
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 * struct XXX_INFO_1_result {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * unsigned entriesread;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [size_is(entriesread)]
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXX_INFO_1 * table;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * union { XXX_INFO_1_result *info1; ...}
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 * 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 * INFO1RES_...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Type constructors for single-result case
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFO1RESBUF_...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Type constructors for single-result buffering.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * INFONRES_...
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Type constructors for multiple-result case
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw CASE(NUM) struct INFOPREF##_##NUM##_result * bufptr##NUM;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This just makes things a little easier on the stub modules:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * XXXGetInfoParam (struct XXXGetInfo_param *param) {
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * struct mslm_infonres infonres;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * infonres.entriesread = 0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * infonres.entries = 0;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * param->result.level = param->level; // for marshalling
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * param->result.bufptr.p = &infonres;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SERVER SERVICE (SRVSVC)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ****************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetConnectEnum:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Description:
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Request for mslm_NetConnectEnum returns
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * info of resources in MLRPC server connected
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * to network. Correctly level 0 and level 1 information
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * are supported.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Level 0 connect information.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Level 1 connect information.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetFileEnum: under construction.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetFileClose
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * I think this definition is complete but as it doesn't do anything
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * it probably isn't a big issue. It is used to close files reported
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * via NetFileEnum (i.e. the file id).
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetShareGetInfo: netname is the name of a share.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetShareSetInfo: netname is the name of a share.
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 * IN struct mlsm_NetShareGetInfoRes result;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ***********************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetSessionEnum
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The NetSessionEnum function provides information about sessions
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * established on a server.
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 * Windows NT/2000/XP: The parameter order is as follows.
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 * 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 * 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 * Parameters
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 * 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 * 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 * [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 * 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 * [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 * 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 * entriesread
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * [out] Pointer to a value that receives the count of elements actually
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * enumerated.
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 * 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 * 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 * sesi1_cname
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Pointer to a Unicode string specifying the name of the computer that
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * established the session.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_username
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Pointer to a Unicode string specifying the name of the user who established
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the session.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_num_opens
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Specifies a DWORD value that contains the number of files, devices,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and pipes opened during the session.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_time
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Specifies a DWORD value that contains the number of seconds the session
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * has been active.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * sesi1_idle_time
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Specifies a DWORD value that contains the number of seconds the session
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * has been idle.
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 * NetSessionDel (Platform SDK: Network Management)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The NetSessionDel function ends a network session between a server
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * and a workstation.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Security Requirements
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Only members of the Administrators or Account Operators local group
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * can successfully execute the NetSessionDel function.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Windows NT/2000/XP: The parameter order is as follows.
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NET_API_STATUS NetSessionDel(LPWSTR servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPWSTR UncClientName,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * LPWSTR username);
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 * API_FUNCTION NetSessionDel(const char FAR *pszServer,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * const char FAR *pszClientName,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * short sReserved);
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Parameters
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 * 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 * 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 * 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 * 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/* for svX_platform */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Bit-mapped values for svX_type fields */
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_ALL 0xFFFFFFFF /* handy for NetServerEnum2 */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* NT-Server 4.0 sends 0x0006_120B */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* NT-workstation 4.0 send 0x0004_1013 */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Special value for sv102_disc that specifies infinite disconnect time */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw#define SV_NODISC (-1L) /* No autodisconnect timeout enforced */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Values of svX_security field */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Values of svX_hidden field */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Let's get some info already */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SRVSVC NetRemoteTOD (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN LPTSTR servername,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT _TIME_OF_DAY_INFO *bufptr,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT long status
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * SRVSVC_NetNameValidate (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN LPTSTR servername;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN REFERENCE LPTSTR pathname;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN DWORD type;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN DWORD flags;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT DWORD status;
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 * } bufptr,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN DWORD prefmaxlen,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT DWORD totalentries,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN OUT DWORD ?* resume_handle,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT DWORD status
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Share types for shiX_type fields - duplicated from cifs.h
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* Maximum uses for shiX_max_uses fields */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Note: shi502_security_descriptor should be a pointer to a
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * security descriptor (W32SEC_SECURITY_DESCRIPTOR):
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * PSECURITY_DESCRIPTOR shi502_security_descriptor;
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * For now we can just use a DWORD and set it to zero.
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 /* IN DWORD reserved; */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetShareEnumSticky is the same as NetShareEnum except that hidden
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * shares are not returned. This call was apparently added due to a
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * bug in the NT implementation of NetShareEnum - it didn't process
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * the resume handle correctly so that attempts to enumerate large
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * share lists resulted in an infinite loop.
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 * Right now, we can't send back SD of the requested object
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * in MLRPC 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 * A Pointer
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A Length
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A Pointer
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A Length (equal to the prev length)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * A buffer
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * return value
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * This is the request:
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 * 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 * IN Security Descriptor (looks like):
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * Length2 (== Length1)
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * buffer itself
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The SRVSVC already
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * WKSSVC -- Workstation Service
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw ****************************************************************
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NET_API_STATUS NET_API_FUNCTION
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * NetWkstaGetInfo (
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN LPTSTR servername OPTIONAL,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * IN DWORD level,
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * OUT LPBYTE *bufptr
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* NetWkstaGetInfo only. System information - user access */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw/* NetWkstaGetInfo only. System information - admin or operator access */
da6c28aaf62fa55f0fdb8004aa40f88f23bf53f0amw * The WKSSVC already