10#pragma warning(disable:4820)
13#define WNNC_NET_MSNET 0x00010000
14#define WNNC_NET_LANMAN 0x00020000
15#define WNNC_NET_NETWARE 0x00030000
16#define WNNC_NET_VINES 0x00040000
17#define WNNC_NET_10NET 0x00050000
18#define WNNC_NET_LOCUS 0x00060000
19#define WNNC_NET_SUN_PC_NFS 0x00070000
20#define WNNC_NET_LANSTEP 0x00080000
21#define WNNC_NET_9TILES 0x00090000
22#define WNNC_NET_LANTASTIC 0x000A0000
23#define WNNC_NET_AS400 0x000B0000
24#define WNNC_NET_FTP_NFS 0x000C0000
25#define WNNC_NET_PATHWORKS 0x000D0000
26#define WNNC_NET_LIFENET 0x000E0000
27#define WNNC_NET_POWERLAN 0x000F0000
28#define WNNC_NET_BWNFS 0x00100000
29#define WNNC_NET_COGENT 0x00110000
30#define WNNC_NET_FARALLON 0x00120000
31#define WNNC_NET_APPLETALK 0x00130000
32#define WNNC_NET_INTERGRAPH 0x00140000
33#define WNNC_NET_SYMFONET 0x00150000
34#define WNNC_NET_CLEARCASE 0x00160000
35#define WNNC_NET_FRONTIER 0x00170000
36#define WNNC_NET_BMC 0x00180000
37#define WNNC_NET_DCE 0x00190000
38#define WNNC_NET_AVID 0x001A0000
39#define WNNC_NET_DOCUSPACE 0x001B0000
40#define WNNC_NET_MANGOSOFT 0x001C0000
41#define WNNC_NET_SERNET 0x001D0000
42#define WNNC_NET_DECORB 0x00200000
43#define WNNC_NET_PROTSTOR 0x00210000
44#define WNNC_NET_FJ_REDIR 0x00220000
45#define WNNC_NET_DISTINCT 0x00230000
46#define WNNC_NET_TWINS 0x00240000
47#define WNNC_NET_RDR2SAMPLE 0x00250000
48#define WNNC_NET_CSC 0x00260000
49#define WNNC_NET_3IN1 0x00270000
50#define WNNC_NET_EXTENDNET 0x00290000
51#define WNNC_NET_OBJECT_DIRE 0x00300000
52#define WNNC_NET_MASFAX 0x00310000
53#define WNNC_NET_HOB_NFS 0x00320000
54#define WNNC_NET_SHIVA 0x00330000
55#define WNNC_NET_IBMAL 0x00340000
56#define WNNC_CRED_MANAGER 0xFFFF0000
58#define RESOURCE_CONNECTED 1
59#define RESOURCE_GLOBALNET 2
60#define RESOURCE_REMEMBERED 3
61#define RESOURCE_RECENT 4
62#define RESOURCE_CONTEXT 5
63#define RESOURCETYPE_ANY 0
64#define RESOURCETYPE_DISK 1
65#define RESOURCETYPE_PRINT 2
66#define RESOURCETYPE_RESERVED 8
67#define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
68#define RESOURCEUSAGE_CONNECTABLE 0x00000001
69#define RESOURCEUSAGE_CONTAINER 0x00000002
70#define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
71#define RESOURCEUSAGE_SIBLING 0x00000008
72#define RESOURCEUSAGE_ATTACHED 0x00000010
73#define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
74#define RESOURCEUSAGE_RESERVED 0x80000000
75#define RESOURCEDISPLAYTYPE_GENERIC 0
76#define RESOURCEDISPLAYTYPE_DOMAIN 1
77#define RESOURCEDISPLAYTYPE_SERVER 2
78#define RESOURCEDISPLAYTYPE_SHARE 3
79#define RESOURCEDISPLAYTYPE_FILE 4
80#define RESOURCEDISPLAYTYPE_GROUP 5
81#define RESOURCEDISPLAYTYPE_NETWORK 6
82#define RESOURCEDISPLAYTYPE_ROOT 7
83#define RESOURCEDISPLAYTYPE_SHAREADMIN 8
84#define RESOURCEDISPLAYTYPE_DIRECTORY 9
85#define RESOURCEDISPLAYTYPE_TREE 10
86#define NETPROPERTY_PERSISTENT 1
87#define CONNECT_UPDATE_PROFILE 1
88#define CONNECT_UPDATE_RECENT 2
89#define CONNECT_TEMPORARY 4
90#define CONNECT_INTERACTIVE 8
91#define CONNECT_PROMPT 16
92#define CONNECT_NEED_DRIVE 32
93#define CONNECT_REFCOUNT 64
94#define CONNECT_REDIRECT 128
95#define CONNECT_LOCALDRIVE 256
96#define CONNECT_CURRENT_MEDIA 512
97#define CONNECT_COMMANDLINE 2048
98#define CONNECT_CMD_SAVECRED 4096
99#define CONNDLG_RO_PATH 1
100#define CONNDLG_CONN_POINT 2
101#define CONNDLG_USE_MRU 4
102#define CONNDLG_HIDE_BOX 8
103#define CONNDLG_PERSIST 16
104#define CONNDLG_NOT_PERSIST 32
105#define DISC_UPDATE_PROFILE 1
106#define DISC_NO_FORCE 64
107#define WNFMT_MULTILINE 1
108#define WNFMT_ABBREVIATED 2
109#define WNFMT_INENUM 16
110#define WNFMT_CONNECTION 32
111#define WN_SUCCESS NO_ERROR
112#define WN_NO_ERROR NO_ERROR
113#define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
114#define WN_CANCEL ERROR_CANCELLED
115#define WN_RETRY ERROR_RETRY
116#define WN_NET_ERROR ERROR_UNEXP_NET_ERR
117#define WN_MORE_DATA ERROR_MORE_DATA
118#define WN_BAD_POINTER ERROR_INVALID_ADDRESS
119#define WN_BAD_VALUE ERROR_INVALID_PARAMETER
120#define WN_BAD_USER ERROR_BAD_USERNAME
121#define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
122#define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
123#define WN_FUNCTION_BUSY ERROR_BUSY
124#define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
125#define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
126#define WN_NO_NETWORK ERROR_NO_NETWORK
127#define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
128#define WN_BAD_LEVEL ERROR_INVALID_LEVEL
129#define WN_BAD_HANDLE ERROR_INVALID_HANDLE
130#define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
131#define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
132#define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
133#define WN_OPEN_FILES ERROR_OPEN_FILES
134#define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
135#define WN_BAD_NETNAME ERROR_BAD_NET_NAME
136#define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
137#define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
138#define WN_DEVICE_ERROR ERROR_GEN_FAILURE
139#define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
140#define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
141#define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
142#define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
143#define WN_BAD_PROFILE ERROR_BAD_PROFILE
144#define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
145#define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
146#define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
147#define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
148#define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
149#define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
150#define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
151#define UNIVERSAL_NAME_INFO_LEVEL 1
152#define REMOTE_NAME_INFO_LEVEL 2
153#define NETINFO_DLL16 1
154#define NETINFO_DISKRED 4
155#define NETINFO_PRINTERRED 8
158#define PP_DISPLAYERRORS 1
159#define WNCON_FORNETCARD 1
160#define WNCON_NOTROUTED 2
161#define WNCON_SLOWLINK 4
162#define WNCON_DYNAMIC 8
545typedef struct tagPASSWORD_CACHE_ENTRY
553} PASSWORD_CACHE_ENTRY;
562#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESW
563#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEW
564#define PFNGETPROFILEPATH PFNGETPROFILEPATHW
570#define WNetEnumResource WNetEnumResourceW
571#define WNetOpenEnum WNetOpenEnumW
572#define WNetGetResourceInformation WNetGetResourceInformationW
573#define WNetGetUniversalName WNetGetUniversalNameW
574#define WNetSetConnection WNetSetConnectionW
575#define WNetUseConnection WNetUseConnectionW
576#define WNetGetConnection WNetGetConnectionW
577#define WNetCancelConnection2 WNetCancelConnection2W
578#define WNetCancelConnection WNetCancelConnectionW
579#define WNetAddConnection3 WNetAddConnection3W
580#define WNetAddConnection2 WNetAddConnection2W
581#define WNetAddConnection WNetAddConnectionW
582#define WNetConnectionDialog1 WNetConnectionDialog1W
583#define WNetDisconnectDialog1 WNetDisconnectDialog1W
584#define WNetGetNetworkInformation WNetGetNetworkInformationW
585#define WNetGetProviderName WNetGetProviderNameW
586#define WNetGetUser WNetGetUserW
587#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceW
588#define WNetGetLastError WNetGetLastErrorW
590#define PFNGETPROFILEPATH PFNGETPROFILEPATHA
591#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEA
592#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESA
598#define WNetOpenEnum WNetOpenEnumA
599#define WNetEnumResource WNetEnumResourceA
600#define WNetGetResourceInformation WNetGetResourceInformationA
601#define WNetGetUniversalName WNetGetUniversalNameA
602#define WNetConnectionDialog1 WNetConnectionDialog1A
603#define WNetDisconnectDialog1 WNetDisconnectDialog1A
604#define WNetAddConnection2 WNetAddConnection2A
605#define WNetAddConnection3 WNetAddConnection3A
606#define WNetCancelConnection WNetCancelConnectionA
607#define WNetCancelConnection2 WNetCancelConnection2A
608#define WNetGetConnection WNetGetConnectionA
609#define WNetUseConnection WNetUseConnectionA
610#define WNetSetConnection WNetSetConnectionA
611#define WNetAddConnection WNetAddConnectionA
612#define WNetGetUser WNetGetUserA
613#define WNetGetProviderName WNetGetProviderNameA
614#define WNetGetNetworkInformation WNetGetNetworkInformationA
615#define WNetGetLastError WNetGetLastErrorA
616#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceA
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
#define _Out_writes_opt_(s)
#define _Out_writes_bytes_(s)
DWORD WINAPI WNetGetCachedPassword(LPSTR pbResource, WORD cbResource, LPSTR pbPassword, LPWORD pcbPassword, BYTE nType)
UINT WINAPI WNetEnumCachedPasswords(LPSTR pbPrefix, WORD cbPrefix, BYTE nType, ENUMPASSWORDPROC enumPasswordProc, DWORD param)
DWORD WINAPI WNetCachePassword(LPSTR pbResource, WORD cbResource, LPSTR pbPassword, WORD cbPassword, BYTE nType, WORD x)
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
_Check_return_ DWORD APIENTRY WNetOpenEnumW(_In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPNETRESOURCEW, _Out_ LPHANDLE)
_Check_return_ DWORD APIENTRY WNetAddConnectionA(_In_ LPCSTR, _In_opt_ LPCSTR, _In_opt_ LPCSTR)
_Check_return_ DWORD APIENTRY WNetDisconnectDialog(_In_opt_ HWND, _In_ DWORD)
_Check_return_ DWORD APIENTRY WNetCancelConnectionA(_In_ LPCSTR, _In_ BOOL)
struct _UNIVERSAL_NAME_INFOW * LPUNIVERSAL_NAME_INFOW
_Check_return_ DWORD APIENTRY WNetGetLastErrorA(_Out_ LPDWORD lpError, _Out_writes_(nErrorBufSize) LPSTR lpErrorBuf, _In_ DWORD nErrorBufSize, _Out_writes_(nNameBufSize) LPSTR lpNameBuf, _In_ DWORD nNameBufSize)
struct _DISCDLGSTRUCTW * LPDISCDLGSTRUCTW
struct _REMOTE_NAME_INFOA REMOTE_NAME_INFOA
_Check_return_ DWORD APIENTRY WNetAddConnection3W(_In_opt_ HWND, _In_ LPNETRESOURCEW, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ DWORD)
struct _NETRESOURCEA * LPNETRESOURCEA
_Check_return_ DWORD APIENTRY WNetCancelConnection2A(_In_ LPCSTR, _In_ DWORD, _In_ BOOL)
_Check_return_ DWORD APIENTRY WNetGetUserW(_In_opt_ LPCWSTR lpName, _Out_writes_(*lpnLength) LPWSTR lpUserName, _Inout_ LPDWORD lpnLength)
_Check_return_ DWORD APIENTRY WNetConnectionDialog1A(_Inout_ LPCONNECTDLGSTRUCTA)
struct _UNIVERSAL_NAME_INFOW UNIVERSAL_NAME_INFOW
REMOTE_NAME_INFOA REMOTE_NAME_INFO
_Check_return_ DWORD APIENTRY WNetCancelConnectionW(_In_ LPCWSTR, _In_ BOOL)
CONNECTDLGSTRUCTA CONNECTDLGSTRUCT
DISCDLGSTRUCTA DISCDLGSTRUCT
_Check_return_ DWORD APIENTRY WNetGetResourceInformationW(_In_ LPNETRESOURCEW lpNetResource, _Out_writes_bytes_(*lpcbBuffer) LPVOID lpBuffer, _Inout_ LPDWORD lpcbBuffer, _Outptr_ LPWSTR *lplpSystem)
_Check_return_ DWORD APIENTRY WNetConnectionDialog1W(_Inout_ LPCONNECTDLGSTRUCTW)
UINT(PASCAL * PFNGETPROFILEPATHW)(LPCWSTR, LPWSTR, UINT)
struct _UNIVERSAL_NAME_INFOA * LPUNIVERSAL_NAME_INFOA
struct _CONNECTDLGSTRUCTW * LPCONNECTDLGSTRUCTW
struct _NETINFOSTRUCT * LPNETINFOSTRUCT
struct _REMOTE_NAME_INFOW REMOTE_NAME_INFOW
_Check_return_ DWORD APIENTRY WNetGetLastErrorW(_Out_ LPDWORD lpError, _Out_writes_(nErrorBufSize) LPWSTR lpErrorBuf, _In_ DWORD nErrorBufSize, _Out_writes_(nNameBufSize) LPWSTR lpNameBuf, _In_ DWORD nNameBufSize)
_Check_return_ DWORD APIENTRY WNetGetProviderNameW(_In_ DWORD dwNetType, _Out_writes_(*lpBufferSize) LPWSTR lpProviderName, _Inout_ LPDWORD lpBufferSize)
struct _UNIVERSAL_NAME_INFOA UNIVERSAL_NAME_INFOA
struct _NETCONNECTINFOSTRUCT * LPNETCONNECTINFOSTRUCT
_Check_return_ DWORD APIENTRY WNetDisconnectDialog1W(_In_ LPDISCDLGSTRUCTW)
_Check_return_ DWORD APIENTRY WNetAddConnection2W(_In_ LPNETRESOURCEW, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ DWORD)
_Check_return_ DWORD APIENTRY WNetGetConnectionA(_In_ LPCSTR lpLocalName, _Out_writes_opt_(*lpnLength) LPSTR lpRemoteName, _Inout_ LPDWORD lpnLength)
struct _NETRESOURCEA NETRESOURCEA
_Check_return_ DWORD APIENTRY WNetCloseEnum(_In_ HANDLE)
_Check_return_ DWORD APIENTRY WNetCancelConnection2W(_In_ LPCWSTR, _In_ DWORD, _In_ BOOL)
DWORD WINAPI WNetRestoreConnectionA(HWND, LPCSTR)
struct _DISCDLGSTRUCTA DISCDLGSTRUCTA
struct _NETCONNECTINFOSTRUCT NETCONNECTINFOSTRUCT
UINT(PASCAL * PFNGETPROFILEPATHA)(LPCSTR, LPSTR, UINT)
_Check_return_ DWORD APIENTRY WNetOpenEnumA(_In_ DWORD, _In_ DWORD, _In_ DWORD, _In_opt_ LPNETRESOURCEA, _Out_ LPHANDLE)
struct _NETRESOURCEW NETRESOURCEW
CONNECTDLGSTRUCTA * LPCONNECTDLGSTRUCT
_Check_return_ DWORD APIENTRY WNetGetUserA(_In_opt_ LPCSTR lpName, _Out_writes_(*lpnLength) LPSTR lpUserName, _Inout_ LPDWORD lpnLength)
_Check_return_ DWORD APIENTRY WNetAddConnection2A(_In_ LPNETRESOURCEA, _In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_ DWORD)
DWORD APIENTRY WNetSetConnectionA(LPCSTR, DWORD, PVOID)
_Check_return_ DWORD APIENTRY MultinetGetConnectionPerformanceA(_In_ LPNETRESOURCEA, _Out_ LPNETCONNECTINFOSTRUCT)
_Check_return_ DWORD APIENTRY WNetGetNetworkInformationW(_In_ LPCWSTR, _Out_ LPNETINFOSTRUCT)
struct _REMOTE_NAME_INFOW * LPREMOTE_NAME_INFOW
_Check_return_ DWORD APIENTRY WNetGetResourceInformationA(_In_ LPNETRESOURCEA lpNetResource, _Out_writes_bytes_(*lpcbBuffer) LPVOID lpBuffer, _Inout_ LPDWORD lpcbBuffer, _Outptr_ LPSTR *lplpSystem)
struct _NETINFOSTRUCT NETINFOSTRUCT
_Check_return_ DWORD APIENTRY WNetUseConnectionA(_In_opt_ HWND hwndOwner, _In_ LPNETRESOURCEA lpNetResource, _In_opt_ LPCSTR lpPassword, _In_opt_ LPCSTR lpUserId, _In_ DWORD dwFlags, _Out_writes_opt_(*lpBufferSize) LPSTR lpAccessName, _Inout_opt_ LPDWORD lpBufferSize, _Out_opt_ LPDWORD lpResult)
_Check_return_ DWORD APIENTRY WNetGetNetworkInformationA(_In_ LPCSTR, _Out_ LPNETINFOSTRUCT)
_Check_return_ DWORD APIENTRY WNetAddConnection3A(_In_opt_ HWND, _In_ LPNETRESOURCEA, _In_opt_ LPCSTR, _In_opt_ LPCSTR, _In_ DWORD)
UNIVERSAL_NAME_INFOA UNIVERSAL_NAME_INFO
BOOL(PASCAL * PFNPROCESSPOLICIESA)(HWND, LPCSTR, LPCSTR, LPCSTR, DWORD)
struct _DISCDLGSTRUCTW DISCDLGSTRUCTW
struct _DISCDLGSTRUCTA * LPDISCDLGSTRUCTA
struct _REMOTE_NAME_INFOA * LPREMOTE_NAME_INFOA
NETRESOURCEA * LPNETRESOURCE
BOOL(PASCAL * PFNPROCESSPOLICIESW)(HWND, LPCWSTR, LPCWSTR, LPCWSTR, DWORD)
_Check_return_ DWORD APIENTRY WNetEnumResourceW(_In_ HANDLE hEnum, _Inout_ LPDWORD lpcCount, _Out_writes_bytes_(*lpBufferSize) LPVOID lpBuffer, _Inout_ LPDWORD lpBufferSize)
UINT(PASCAL * PFNRECONCILEPROFILEA)(LPCSTR, LPCSTR, DWORD)
_Check_return_ DWORD APIENTRY WNetConnectionDialog(_In_ HWND, _In_ DWORD)
struct _CONNECTDLGSTRUCTA CONNECTDLGSTRUCTA
struct _CONNECTDLGSTRUCTW CONNECTDLGSTRUCTW
DISCDLGSTRUCTA * LPDISCDLGSTRUCT
_Check_return_ DWORD APIENTRY MultinetGetConnectionPerformanceW(_In_ LPNETRESOURCEW, _Out_ LPNETCONNECTINFOSTRUCT)
UINT(PASCAL * PFNRECONCILEPROFILEW)(LPCWSTR, LPCWSTR, DWORD)
_Check_return_ DWORD APIENTRY WNetEnumResourceA(_In_ HANDLE hEnum, _Inout_ LPDWORD lpcCount, _Out_writes_bytes_(*lpBufferSize) LPVOID lpBuffer, _Inout_ LPDWORD lpBufferSize)
_Check_return_ DWORD APIENTRY WNetDisconnectDialog1A(_In_ LPDISCDLGSTRUCTA)
_Check_return_ DWORD APIENTRY WNetGetUniversalNameW(_In_ LPCWSTR lpLocalPath, _In_ DWORD dwInfoLevel, _Out_writes_bytes_(*lpBufferSize) LPVOID lpBuffer, _Inout_ LPDWORD lpBufferSize)
UNIVERSAL_NAME_INFOA * LPUNIVERSAL_NAME_INFO
REMOTE_NAME_INFOA * LPREMOTE_NAME_INFO
_Check_return_ DWORD APIENTRY WNetGetConnectionW(_In_ LPCWSTR lpLocalName, _Out_writes_opt_(*lpnLength) LPWSTR lpRemoteName, _Inout_ LPDWORD lpnLength)
_Check_return_ DWORD APIENTRY WNetUseConnectionW(_In_opt_ HWND hwndOwner, _In_ LPNETRESOURCEW lpNetResource, _In_opt_ LPCWSTR lpPassword, _In_opt_ LPCWSTR lpUserId, _In_ DWORD dwFlags, _Out_writes_opt_(*lpBufferSize) LPWSTR lpAccessName, _Inout_opt_ LPDWORD lpBufferSize, _Out_opt_ LPDWORD lpResult)
_Check_return_ DWORD APIENTRY WNetAddConnectionW(_In_ LPCWSTR, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR)
DWORD WINAPI WNetRestoreConnectionW(HWND, LPCWSTR)
_Check_return_ DWORD APIENTRY WNetGetUniversalNameA(_In_ LPCSTR lpLocalPath, _In_ DWORD dwInfoLevel, _Out_writes_bytes_(*lpBufferSize) LPVOID lpBuffer, _Inout_ LPDWORD lpBufferSize)
struct _NETRESOURCEW * LPNETRESOURCEW
struct _CONNECTDLGSTRUCTA * LPCONNECTDLGSTRUCTA
DWORD APIENTRY WNetSetConnectionW(LPCWSTR, DWORD, PVOID)
_Check_return_ DWORD APIENTRY WNetGetProviderNameA(_In_ DWORD dwNetType, _Out_writes_(*lpBufferSize) LPSTR lpProviderName, _Inout_ LPDWORD lpBufferSize)