Annotation of mstools/h/winnetwk.h, revision 1.1

1.1     ! root        1: /*++
        !             2: 
        !             3: Copyright (c) 1991  Microsoft Corporation
        !             4: 
        !             5: Module Name:
        !             6: 
        !             7:     winnetwk.h
        !             8: 
        !             9: Abstract:
        !            10: 
        !            11:     Standard WINNET Header File for NT-WIN32
        !            12: 
        !            13: Author:
        !            14: 
        !            15:     Dan Lafferty (danl)     08-Oct-1991
        !            16: 
        !            17: Environment:
        !            18: 
        !            19:     User Mode -Win32
        !            20: 
        !            21: Notes:
        !            22: 
        !            23:     optional-notes
        !            24: 
        !            25: Revision History:
        !            26: 
        !            27:     08-Oct-1991     danl
        !            28:        created from winnet 3.10.05 version.
        !            29: 
        !            30:     10-Dec-1991     Johnl
        !            31:        Updated to conform to Win32 Net API Spec. vers 0.4
        !            32: 
        !            33:     01-Apr-1992     JohnL
        !            34:        Changed CONNECTION_REMEMBERED flag to CONNECT_UPDATE_PROFILE
        !            35:        Updated WNetCancelConnection2 to match spec.
        !            36: 
        !            37:     23-Apr-1992     Johnl
        !            38:        Added error code mappings.  Changed byte counts to character counts.
        !            39: 
        !            40:     27-May-1992     ChuckC
        !            41:        Made into .x file.
        !            42: 
        !            43: --*/
        !            44: 
        !            45: #ifndef _WINNETWK_
        !            46: #define _WINNETWK_
        !            47: 
        !            48: //
        !            49: // RESOURCE ENUMERATION
        !            50: //
        !            51: 
        !            52: #define RESOURCE_CONNECTED      0x00000001
        !            53: #define RESOURCE_GLOBALNET      0x00000002
        !            54: #define RESOURCE_REMEMBERED     0x00000003
        !            55: 
        !            56: #define RESOURCETYPE_ANY        0x00000000
        !            57: #define RESOURCETYPE_DISK       0x00000001
        !            58: #define RESOURCETYPE_PRINT      0x00000002
        !            59: 
        !            60: #define RESOURCEUSAGE_CONNECTABLE   0x00000001
        !            61: #define RESOURCEUSAGE_CONTAINER     0x00000002
        !            62: #define RESOURCEUSAGE_RESERVED      0x80000000
        !            63: 
        !            64: typedef struct  _NETRESOURCEA {
        !            65:     DWORD    dwScope;
        !            66:     DWORD    dwType;
        !            67:     DWORD    dwUsage;
        !            68:     LPSTR    lpLocalName;
        !            69:     LPSTR    lpRemoteName;
        !            70:     LPSTR    lpComment ;
        !            71:     LPSTR    lpProvider;
        !            72: }NETRESOURCEA, *LPNETRESOURCEA;
        !            73: typedef struct  _NETRESOURCEW {
        !            74:     DWORD    dwScope;
        !            75:     DWORD    dwType;
        !            76:     DWORD    dwUsage;
        !            77:     LPWSTR   lpLocalName;
        !            78:     LPWSTR   lpRemoteName;
        !            79:     LPWSTR   lpComment ;
        !            80:     LPWSTR   lpProvider;
        !            81: }NETRESOURCEW, *LPNETRESOURCEW;
        !            82: #ifdef UNICODE
        !            83: #define NETRESOURCE NETRESOURCEW
        !            84: #define LPNETRESOURCE LPNETRESOURCEW
        !            85: #else
        !            86: #define NETRESOURCE NETRESOURCEA
        !            87: #define LPNETRESOURCE LPNETRESOURCEA
        !            88: #endif // UNICODE
        !            89: 
        !            90: 
        !            91: //
        !            92: //  CONNECTIONS
        !            93: // 
        !            94: 
        !            95: #define CONNECT_UPDATE_PROFILE    0x00000001
        !            96: 
        !            97: DWORD APIENTRY
        !            98: WNetAddConnectionA (
        !            99:      LPSTR   lpRemoteName,
        !           100:      LPSTR   lpPassword,
        !           101:      LPSTR   lpLocalName
        !           102:     );
        !           103: DWORD APIENTRY
        !           104: WNetAddConnectionW (
        !           105:      LPWSTR   lpRemoteName,
        !           106:      LPWSTR   lpPassword,
        !           107:      LPWSTR   lpLocalName
        !           108:     );
        !           109: #ifdef UNICODE
        !           110: #define WNetAddConnection WNetAddConnectionW
        !           111: #else
        !           112: #define WNetAddConnection WNetAddConnectionA
        !           113: #endif // !UNICODE
        !           114: 
        !           115: 
        !           116: DWORD APIENTRY
        !           117: WNetAddConnection2A (
        !           118:      LPNETRESOURCEA lpNetResource,
        !           119:      LPSTR        lpPassword,
        !           120:      LPSTR        lpUserName,
        !           121:      DWORD          dwFlags
        !           122:     );
        !           123: DWORD APIENTRY
        !           124: WNetAddConnection2W (
        !           125:      LPNETRESOURCEW lpNetResource,
        !           126:      LPWSTR        lpPassword,
        !           127:      LPWSTR        lpUserName,
        !           128:      DWORD          dwFlags
        !           129:     );
        !           130: #ifdef UNICODE
        !           131: #define WNetAddConnection2 WNetAddConnection2W
        !           132: #else
        !           133: #define WNetAddConnection2 WNetAddConnection2A
        !           134: #endif // !UNICODE
        !           135: 
        !           136: DWORD APIENTRY
        !           137: WNetCancelConnectionA (
        !           138:      LPSTR lpName,
        !           139:      BOOL    fForce
        !           140:     );
        !           141: DWORD APIENTRY
        !           142: WNetCancelConnectionW (
        !           143:      LPWSTR lpName,
        !           144:      BOOL    fForce
        !           145:     );
        !           146: #ifdef UNICODE
        !           147: #define WNetCancelConnection WNetCancelConnectionW
        !           148: #else
        !           149: #define WNetCancelConnection WNetCancelConnectionA
        !           150: #endif // !UNICODE
        !           151: 
        !           152: DWORD APIENTRY
        !           153: WNetCancelConnection2A (
        !           154:      LPSTR lpName,
        !           155:      DWORD   dwFlags,
        !           156:      BOOL    fForce
        !           157:     );
        !           158: DWORD APIENTRY
        !           159: WNetCancelConnection2W (
        !           160:      LPWSTR lpName,
        !           161:      DWORD   dwFlags,
        !           162:      BOOL    fForce
        !           163:     );
        !           164: #ifdef UNICODE
        !           165: #define WNetCancelConnection2 WNetCancelConnection2W
        !           166: #else
        !           167: #define WNetCancelConnection2 WNetCancelConnection2A
        !           168: #endif // !UNICODE
        !           169: 
        !           170: 
        !           171: DWORD APIENTRY
        !           172: WNetGetConnectionA (
        !           173:      LPSTR lpLocalName,
        !           174:      LPSTR lpRemoteName,
        !           175:      LPDWORD lpnLength
        !           176:     );
        !           177: DWORD APIENTRY
        !           178: WNetGetConnectionW (
        !           179:      LPWSTR lpLocalName,
        !           180:      LPWSTR lpRemoteName,
        !           181:      LPDWORD lpnLength
        !           182:     );
        !           183: #ifdef UNICODE
        !           184: #define WNetGetConnection WNetGetConnectionW
        !           185: #else
        !           186: #define WNetGetConnection WNetGetConnectionA
        !           187: #endif // !UNICODE
        !           188: 
        !           189: 
        !           190: DWORD APIENTRY
        !           191: WNetOpenEnumA (
        !           192:      DWORD          dwScope,
        !           193:      DWORD          dwType,
        !           194:      DWORD          dwUsage,
        !           195:      LPNETRESOURCEA lpNetResource,
        !           196:      LPHANDLE       lphEnum
        !           197:     );
        !           198: DWORD APIENTRY
        !           199: WNetOpenEnumW (
        !           200:      DWORD          dwScope,
        !           201:      DWORD          dwType,
        !           202:      DWORD          dwUsage,
        !           203:      LPNETRESOURCEW lpNetResource,
        !           204:      LPHANDLE       lphEnum
        !           205:     );
        !           206: #ifdef UNICODE
        !           207: #define WNetOpenEnum WNetOpenEnumW
        !           208: #else
        !           209: #define WNetOpenEnum WNetOpenEnumA
        !           210: #endif // !UNICODE
        !           211: 
        !           212: DWORD APIENTRY
        !           213: WNetEnumResourceA (
        !           214:      HANDLE  hEnum,
        !           215:      LPDWORD lpcCount,
        !           216:      LPVOID  lpBuffer,
        !           217:      LPDWORD lpBufferSize
        !           218:     );
        !           219: DWORD APIENTRY
        !           220: WNetEnumResourceW (
        !           221:      HANDLE  hEnum,
        !           222:      LPDWORD lpcCount,
        !           223:      LPVOID  lpBuffer,
        !           224:      LPDWORD lpBufferSize
        !           225:     );
        !           226: #ifdef UNICODE
        !           227: #define WNetEnumResource WNetEnumResourceW
        !           228: #else
        !           229: #define WNetEnumResource WNetEnumResourceA
        !           230: #endif // !UNICODE
        !           231: 
        !           232: DWORD APIENTRY
        !           233: WNetCloseEnum (
        !           234:     HANDLE   hEnum
        !           235:     );
        !           236: 
        !           237: //
        !           238: //  OTHER
        !           239: // 
        !           240: 
        !           241: DWORD APIENTRY
        !           242: WNetGetUserA (
        !           243:      LPSTR  lpName,
        !           244:      LPSTR  lpUserName,
        !           245:      LPDWORD  lpnLength
        !           246:     );
        !           247: DWORD APIENTRY
        !           248: WNetGetUserW (
        !           249:      LPWSTR  lpName,
        !           250:      LPWSTR  lpUserName,
        !           251:      LPDWORD  lpnLength
        !           252:     );
        !           253: #ifdef UNICODE
        !           254: #define WNetGetUser WNetGetUserW
        !           255: #else
        !           256: #define WNetGetUser WNetGetUserA
        !           257: #endif // !UNICODE
        !           258: 
        !           259: //
        !           260: //  BROWSE DIALOG
        !           261: // 
        !           262: 
        !           263: DWORD APIENTRY WNetConnectionDialog(
        !           264:     HWND  hwnd,
        !           265:     DWORD dwType
        !           266:     );
        !           267: 
        !           268: //
        !           269: //  ERRORS
        !           270: // 
        !           271: 
        !           272: DWORD APIENTRY
        !           273: WNetGetLastErrorA (
        !           274:      LPDWORD    lpError,
        !           275:      LPSTR    lpErrorBuf,
        !           276:      DWORD      nErrorBufSize,
        !           277:      LPSTR    lpNameBuf,
        !           278:      DWORD      nNameBufSize
        !           279:     );
        !           280: DWORD APIENTRY
        !           281: WNetGetLastErrorW (
        !           282:      LPDWORD    lpError,
        !           283:      LPWSTR    lpErrorBuf,
        !           284:      DWORD      nErrorBufSize,
        !           285:      LPWSTR    lpNameBuf,
        !           286:      DWORD      nNameBufSize
        !           287:     );
        !           288: #ifdef UNICODE
        !           289: #define WNetGetLastError WNetGetLastErrorW
        !           290: #else
        !           291: #define WNetGetLastError WNetGetLastErrorA
        !           292: #endif // !UNICODE
        !           293: 
        !           294: //
        !           295: //  STATUS CODES
        !           296: //
        !           297: //  This section is provided for backward compatibility.  Use of the ERROR_*
        !           298: //  codes is preferred.  The WN_* error codes may not be available in future
        !           299: //  releases.
        !           300: // 
        !           301: 
        !           302: // General   
        !           303: 
        !           304: #define WN_SUCCESS                NO_ERROR
        !           305: #define WN_NOT_SUPPORTED          ERROR_NOT_SUPPORTED
        !           306: #define WN_NET_ERROR              ERROR_UNEXP_NET_ERR
        !           307: #define WN_MORE_DATA              ERROR_MORE_DATA
        !           308: #define WN_BAD_POINTER            ERROR_INVALID_ADDRESS
        !           309: #define WN_BAD_VALUE              ERROR_INVALID_PARAMETER
        !           310: #define WN_BAD_PASSWORD           ERROR_INVALID_PASSWORD
        !           311: #define WN_ACCESS_DENIED          ERROR_ACCESS_DENIED
        !           312: #define WN_FUNCTION_BUSY          ERROR_BUSY
        !           313: #define WN_WINDOWS_ERROR          ERROR_UNEXP_NET_ERR
        !           314: #define WN_BAD_USER               ERROR_BAD_USERNAME
        !           315: #define WN_OUT_OF_MEMORY          ERROR_NOT_ENOUGH_MEMORY
        !           316: #define WN_NO_NETWORK             ERROR_NO_NETWORK
        !           317: #define WN_EXTENDED_ERROR         ERROR_EXTENDED_ERROR
        !           318: 
        !           319: // Connection
        !           320: 
        !           321: #define WN_NOT_CONNECTED          ERROR_NOT_CONNECTED
        !           322: #define WN_OPEN_FILES             ERROR_OPEN_FILES
        !           323: #define WN_DEVICE_IN_USE          ERROR_DEVICE_IN_USE
        !           324: #define WN_BAD_NETNAME            ERROR_BAD_NET_NAME
        !           325: #define WN_BAD_LOCALNAME          ERROR_BAD_DEVICE
        !           326: #define WN_ALREADY_CONNECTED      ERROR_ALREADY_ASSIGNED
        !           327: #define WN_DEVICE_ERROR           ERROR_GEN_FAILURE
        !           328: #define WN_CONNECTION_CLOSED      ERROR_CONNECTION_UNAVAIL
        !           329: #define WN_NO_NET_OR_BAD_PATH     ERROR_NO_NET_OR_BAD_PATH
        !           330: #define WN_BAD_PROVIDER           ERROR_BAD_PROVIDER
        !           331: #define WN_CANNOT_OPEN_PROFILE    ERROR_CANNOT_OPEN_PROFILE
        !           332: #define WN_BAD_PROFILE            ERROR_BAD_PROFILE
        !           333: 
        !           334: // Enumeration
        !           335: 
        !           336: #define WN_BAD_HANDLE             ERROR_INVALID_HANDLE
        !           337: #define WN_NO_MORE_ENTRIES        ERROR_NO_MORE_ITEMS
        !           338: #define WN_NOT_CONTAINER          ERROR_NOT_CONTAINER
        !           339: 
        !           340: #define WN_NO_ERROR               NO_ERROR
        !           341: 
        !           342: #endif  // _WINNETWK_

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.