source: Daodan/MinGW/include/winnetwk.h@ 1056

Last change on this file since 1056 was 1046, checked in by alloc, 8 years ago

Daodan: Added Windows MinGW and build batch file

File size: 13.6 KB
RevLine 
[1046]1#ifndef _WINNETWK_H
2#define _WINNETWK_H
3#if __GNUC__ >=3
4#pragma GCC system_header
5#endif
6
7#ifdef __cplusplus
8extern "C" {
9#endif
10#define WNNC_NET_MSNET 0x00010000
11#define WNNC_NET_LANMAN 0x00020000
12#define WNNC_NET_NETWARE 0x00030000
13#define WNNC_NET_VINES 0x00040000
14#define WNNC_NET_10NET 0x00050000
15#define WNNC_NET_LOCUS 0x00060000
16#define WNNC_NET_SUN_PC_NFS 0x00070000
17#define WNNC_NET_LANSTEP 0x00080000
18#define WNNC_NET_9TILES 0x00090000
19#define WNNC_NET_LANTASTIC 0x000A0000
20#define WNNC_NET_AS400 0x000B0000
21#define WNNC_NET_FTP_NFS 0x000C0000
22#define WNNC_NET_PATHWORKS 0x000D0000
23#define WNNC_NET_LIFENET 0x000E0000
24#define WNNC_NET_POWERLAN 0x000F0000
25#define WNNC_NET_BWNFS 0x00100000
26#define WNNC_NET_COGENT 0x00110000
27#define WNNC_NET_FARALLON 0x00120000
28#define WNNC_NET_APPLETALK 0x00130000
29#define WNNC_NET_INTERGRAPH 0x00140000
30#define WNNC_NET_SYMFONET 0x00150000
31#define WNNC_NET_CLEARCASE 0x00160000
32#define WNNC_NET_FRONTIER 0x00170000
33#define WNNC_NET_BMC 0x00180000
34#define WNNC_NET_DCE 0x00190000
35#define WNNC_NET_AVID 0x001A0000
36#define WNNC_NET_DOCUSPACE 0x001B0000
37#define WNNC_NET_MANGOSOFT 0x001C0000
38#define WNNC_NET_SERNET 0x001D0000
39#define WNNC_NET_DECORB 0x00200000
40#define WNNC_NET_PROTSTOR 0x00210000
41#define WNNC_NET_FJ_REDIR 0x00220000
42#define WNNC_NET_DISTINCT 0x00230000
43#define WNNC_NET_TWINS 0x00240000
44#define WNNC_NET_RDR2SAMPLE 0x00250000
45#define WNNC_NET_CSC 0x00260000
46#define WNNC_NET_3IN1 0x00270000
47#define WNNC_NET_EXTENDNET 0x00290000
48#define WNNC_NET_OBJECT_DIRE 0x00300000
49#define WNNC_NET_MASFAX 0x00310000
50#define WNNC_NET_HOB_NFS 0x00320000
51#define WNNC_NET_SHIVA 0x00330000
52#define WNNC_NET_IBMAL 0x00340000
53#define WNNC_CRED_MANAGER 0xFFFF0000
54
55#define RESOURCE_CONNECTED 1
56#define RESOURCE_GLOBALNET 2
57#define RESOURCE_REMEMBERED 3
58#define RESOURCE_RECENT 4
59#define RESOURCE_CONTEXT 5
60#define RESOURCETYPE_ANY 0
61#define RESOURCETYPE_DISK 1
62#define RESOURCETYPE_PRINT 2
63#define RESOURCETYPE_RESERVED 8
64#define RESOURCETYPE_UNKNOWN 0xFFFFFFFF
65#define RESOURCEUSAGE_CONNECTABLE 0x00000001
66#define RESOURCEUSAGE_CONTAINER 0x00000002
67#define RESOURCEUSAGE_NOLOCALDEVICE 0x00000004
68#define RESOURCEUSAGE_SIBLING 0x00000008
69#define RESOURCEUSAGE_ATTACHED 0x00000010
70#define RESOURCEUSAGE_ALL (RESOURCEUSAGE_CONNECTABLE | RESOURCEUSAGE_CONTAINER | RESOURCEUSAGE_ATTACHED)
71#define RESOURCEUSAGE_RESERVED 0x80000000
72#define RESOURCEDISPLAYTYPE_GENERIC 0
73#define RESOURCEDISPLAYTYPE_DOMAIN 1
74#define RESOURCEDISPLAYTYPE_SERVER 2
75#define RESOURCEDISPLAYTYPE_SHARE 3
76#define RESOURCEDISPLAYTYPE_FILE 4
77#define RESOURCEDISPLAYTYPE_GROUP 5
78#define RESOURCEDISPLAYTYPE_NETWORK 6
79#define RESOURCEDISPLAYTYPE_ROOT 7
80#define RESOURCEDISPLAYTYPE_SHAREADMIN 8
81#define RESOURCEDISPLAYTYPE_DIRECTORY 9
82#define RESOURCEDISPLAYTYPE_TREE 10
83#define NETPROPERTY_PERSISTENT 1
84#define CONNECT_UPDATE_PROFILE 1
85#define CONNECT_UPDATE_RECENT 2
86#define CONNECT_TEMPORARY 4
87#define CONNECT_INTERACTIVE 8
88#define CONNECT_PROMPT 16
89#define CONNECT_NEED_DRIVE 32
90#define CONNECT_REFCOUNT 64
91#define CONNECT_REDIRECT 128
92#define CONNECT_LOCALDRIVE 256
93#define CONNECT_CURRENT_MEDIA 512
94#define CONNDLG_RO_PATH 1
95#define CONNDLG_CONN_POINT 2
96#define CONNDLG_USE_MRU 4
97#define CONNDLG_HIDE_BOX 8
98#define CONNDLG_PERSIST 16
99#define CONNDLG_NOT_PERSIST 32
100#define DISC_UPDATE_PROFILE 1
101#define DISC_NO_FORCE 64
102#define WNFMT_MULTILINE 1
103#define WNFMT_ABBREVIATED 2
104#define WNFMT_INENUM 16
105#define WNFMT_CONNECTION 32
106#define WN_SUCCESS NO_ERROR
107#define WN_NO_ERROR NO_ERROR
108#define WN_NOT_SUPPORTED ERROR_NOT_SUPPORTED
109#define WN_CANCEL ERROR_CANCELLED
110#define WN_RETRY ERROR_RETRY
111#define WN_NET_ERROR ERROR_UNEXP_NET_ERR
112#define WN_MORE_DATA ERROR_MORE_DATA
113#define WN_BAD_POINTER ERROR_INVALID_ADDRESS
114#define WN_BAD_VALUE ERROR_INVALID_PARAMETER
115#define WN_BAD_USER ERROR_BAD_USERNAME
116#define WN_BAD_PASSWORD ERROR_INVALID_PASSWORD
117#define WN_ACCESS_DENIED ERROR_ACCESS_DENIED
118#define WN_FUNCTION_BUSY ERROR_BUSY
119#define WN_WINDOWS_ERROR ERROR_UNEXP_NET_ERR
120#define WN_OUT_OF_MEMORY ERROR_NOT_ENOUGH_MEMORY
121#define WN_NO_NETWORK ERROR_NO_NETWORK
122#define WN_EXTENDED_ERROR ERROR_EXTENDED_ERROR
123#define WN_BAD_LEVEL ERROR_INVALID_LEVEL
124#define WN_BAD_HANDLE ERROR_INVALID_HANDLE
125#define WN_NOT_INITIALIZING ERROR_ALREADY_INITIALIZED
126#define WN_NO_MORE_DEVICES ERROR_NO_MORE_DEVICES
127#define WN_NOT_CONNECTED ERROR_NOT_CONNECTED
128#define WN_OPEN_FILES ERROR_OPEN_FILES
129#define WN_DEVICE_IN_USE ERROR_DEVICE_IN_USE
130#define WN_BAD_NETNAME ERROR_BAD_NET_NAME
131#define WN_BAD_LOCALNAME ERROR_BAD_DEVICE
132#define WN_ALREADY_CONNECTED ERROR_ALREADY_ASSIGNED
133#define WN_DEVICE_ERROR ERROR_GEN_FAILURE
134#define WN_CONNECTION_CLOSED ERROR_CONNECTION_UNAVAIL
135#define WN_NO_NET_OR_BAD_PATH ERROR_NO_NET_OR_BAD_PATH
136#define WN_BAD_PROVIDER ERROR_BAD_PROVIDER
137#define WN_CANNOT_OPEN_PROFILE ERROR_CANNOT_OPEN_PROFILE
138#define WN_BAD_PROFILE ERROR_BAD_PROFILE
139#define WN_BAD_DEV_TYPE ERROR_BAD_DEV_TYPE
140#define WN_DEVICE_ALREADY_REMEMBERED ERROR_DEVICE_ALREADY_REMEMBERED
141#define WN_NO_MORE_ENTRIES ERROR_NO_MORE_ITEMS
142#define WN_NOT_CONTAINER ERROR_NOT_CONTAINER
143#define WN_NOT_AUTHENTICATED ERROR_NOT_AUTHENTICATED
144#define WN_NOT_LOGGED_ON ERROR_NOT_LOGGED_ON
145#define WN_NOT_VALIDATED ERROR_NO_LOGON_SERVERS
146#define UNIVERSAL_NAME_INFO_LEVEL 1
147#define REMOTE_NAME_INFO_LEVEL 2
148#define NETINFO_DLL16 1
149#define NETINFO_DISKRED 4
150#define NETINFO_PRINTERRED 8
151#define RP_LOGON 1
152#define RP_INIFILE 2
153#define PP_DISPLAYERRORS 1
154#define WNCON_FORNETCARD 1
155#define WNCON_NOTROUTED 2
156#define WNCON_SLOWLINK 4
157#define WNCON_DYNAMIC 8
158
159#ifndef RC_INVOKED
160typedef struct _NETRESOURCEA {
161 DWORD dwScope;
162 DWORD dwType;
163 DWORD dwDisplayType;
164 DWORD dwUsage;
165 LPSTR lpLocalName;
166 LPSTR lpRemoteName;
167 LPSTR lpComment ;
168 LPSTR lpProvider;
169}NETRESOURCEA,*LPNETRESOURCEA;
170typedef struct _NETRESOURCEW {
171 DWORD dwScope;
172 DWORD dwType;
173 DWORD dwDisplayType;
174 DWORD dwUsage;
175 LPWSTR lpLocalName;
176 LPWSTR lpRemoteName;
177 LPWSTR lpComment ;
178 LPWSTR lpProvider;
179}NETRESOURCEW,*LPNETRESOURCEW;
180typedef struct _CONNECTDLGSTRUCTA{
181 DWORD cbStructure;
182 HWND hwndOwner;
183 LPNETRESOURCEA lpConnRes;
184 DWORD dwFlags;
185 DWORD dwDevNum;
186} CONNECTDLGSTRUCTA,*LPCONNECTDLGSTRUCTA;
187typedef struct _CONNECTDLGSTRUCTW{
188 DWORD cbStructure;
189 HWND hwndOwner;
190 LPNETRESOURCEW lpConnRes;
191 DWORD dwFlags;
192 DWORD dwDevNum;
193} CONNECTDLGSTRUCTW,*LPCONNECTDLGSTRUCTW;
194typedef struct _DISCDLGSTRUCTA{
195 DWORD cbStructure;
196 HWND hwndOwner;
197 LPSTR lpLocalName;
198 LPSTR lpRemoteName;
199 DWORD dwFlags;
200} DISCDLGSTRUCTA,*LPDISCDLGSTRUCTA;
201typedef struct _DISCDLGSTRUCTW{
202 DWORD cbStructure;
203 HWND hwndOwner;
204 LPWSTR lpLocalName;
205 LPWSTR lpRemoteName;
206 DWORD dwFlags;
207} DISCDLGSTRUCTW,*LPDISCDLGSTRUCTW;
208typedef struct _UNIVERSAL_NAME_INFOA { LPSTR lpUniversalName; }UNIVERSAL_NAME_INFOA,*LPUNIVERSAL_NAME_INFOA;
209typedef struct _UNIVERSAL_NAME_INFOW { LPWSTR lpUniversalName; }UNIVERSAL_NAME_INFOW,*LPUNIVERSAL_NAME_INFOW;
210typedef struct _REMOTE_NAME_INFOA {
211 LPSTR lpUniversalName;
212 LPSTR lpConnectionName;
213 LPSTR lpRemainingPath;
214}REMOTE_NAME_INFOA,*LPREMOTE_NAME_INFOA;
215typedef struct _REMOTE_NAME_INFOW {
216 LPWSTR lpUniversalName;
217 LPWSTR lpConnectionName;
218 LPWSTR lpRemainingPath;
219}REMOTE_NAME_INFOW,*LPREMOTE_NAME_INFOW;
220typedef struct _NETINFOSTRUCT{
221 DWORD cbStructure;
222 DWORD dwProviderVersion;
223 DWORD dwStatus;
224 DWORD dwCharacteristics;
225 DWORD dwHandle;
226 WORD wNetType;
227 DWORD dwPrinters;
228 DWORD dwDrives;
229} NETINFOSTRUCT,*LPNETINFOSTRUCT;
230typedef UINT(PASCAL *PFNGETPROFILEPATHA)(LPCSTR,LPSTR,UINT);
231typedef UINT(PASCAL *PFNGETPROFILEPATHW)(LPCWSTR,LPWSTR,UINT);
232typedef UINT(PASCAL *PFNRECONCILEPROFILEA)(LPCSTR,LPCSTR,DWORD);
233typedef UINT(PASCAL *PFNRECONCILEPROFILEW)(LPCWSTR,LPCWSTR,DWORD);
234typedef BOOL(PASCAL *PFNPROCESSPOLICIESA)(HWND,LPCSTR,LPCSTR,LPCSTR,DWORD);
235typedef BOOL(PASCAL *PFNPROCESSPOLICIESW)(HWND,LPCWSTR,LPCWSTR,LPCWSTR,DWORD);
236typedef struct _NETCONNECTINFOSTRUCT{
237 DWORD cbStructure;
238 DWORD dwFlags;
239 DWORD dwSpeed;
240 DWORD dwDelay;
241 DWORD dwOptDataSize;
242} NETCONNECTINFOSTRUCT,*LPNETCONNECTINFOSTRUCT;
243
244DWORD APIENTRY WNetAddConnectionA(LPCSTR,LPCSTR,LPCSTR);
245DWORD APIENTRY WNetAddConnectionW(LPCWSTR,LPCWSTR,LPCWSTR);
246DWORD APIENTRY WNetAddConnection2A(LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
247DWORD APIENTRY WNetAddConnection2W(LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
248DWORD APIENTRY WNetAddConnection3A(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD);
249DWORD APIENTRY WNetAddConnection3W(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD);
250DWORD APIENTRY WNetCancelConnectionA(LPCSTR,BOOL);
251DWORD APIENTRY WNetCancelConnectionW(LPCWSTR,BOOL);
252DWORD APIENTRY WNetCancelConnection2A(LPCSTR,DWORD,BOOL);
253DWORD APIENTRY WNetCancelConnection2W(LPCWSTR,DWORD,BOOL);
254DWORD APIENTRY WNetGetConnectionA(LPCSTR,LPSTR,PDWORD);
255DWORD APIENTRY WNetGetConnectionW(LPCWSTR,LPWSTR,PDWORD);
256DWORD APIENTRY WNetUseConnectionA(HWND,LPNETRESOURCEA,LPCSTR,LPCSTR,DWORD,LPSTR,PDWORD,PDWORD);
257DWORD APIENTRY WNetUseConnectionW(HWND,LPNETRESOURCEW,LPCWSTR,LPCWSTR,DWORD,LPWSTR,PDWORD,PDWORD);
258DWORD APIENTRY WNetSetConnectionA(LPCSTR,DWORD,PVOID);
259DWORD APIENTRY WNetSetConnectionW(LPCWSTR,DWORD,PVOID);
260DWORD APIENTRY WNetConnectionDialog(HWND,DWORD);
261DWORD APIENTRY WNetDisconnectDialog(HWND,DWORD);
262DWORD APIENTRY WNetConnectionDialog1A(LPCONNECTDLGSTRUCTA);
263DWORD APIENTRY WNetConnectionDialog1W(LPCONNECTDLGSTRUCTW);
264DWORD APIENTRY WNetDisconnectDialog1A(LPDISCDLGSTRUCTA);
265DWORD APIENTRY WNetDisconnectDialog1W(LPDISCDLGSTRUCTW);
266DWORD APIENTRY WNetOpenEnumA(DWORD,DWORD,DWORD,LPNETRESOURCEA,LPHANDLE);
267DWORD APIENTRY WNetOpenEnumW(DWORD,DWORD,DWORD,LPNETRESOURCEW,LPHANDLE);
268DWORD APIENTRY WNetEnumResourceA(HANDLE,PDWORD,PVOID,PDWORD);
269DWORD APIENTRY WNetEnumResourceW(HANDLE,PDWORD,PVOID,PDWORD);
270DWORD APIENTRY WNetCloseEnum(HANDLE);
271DWORD APIENTRY WNetGetUniversalNameA(LPCSTR,DWORD,PVOID,PDWORD);
272DWORD APIENTRY WNetGetUniversalNameW(LPCWSTR,DWORD,PVOID,PDWORD);
273DWORD APIENTRY WNetGetUserA(LPCSTR,LPSTR,PDWORD);
274DWORD APIENTRY WNetGetUserW(LPCWSTR,LPWSTR,PDWORD);
275DWORD APIENTRY WNetGetProviderNameA(DWORD,LPSTR,PDWORD);
276DWORD APIENTRY WNetGetProviderNameW(DWORD,LPWSTR,PDWORD);
277DWORD APIENTRY WNetGetNetworkInformationA(LPCSTR,LPNETINFOSTRUCT);
278DWORD APIENTRY WNetGetNetworkInformationW(LPCWSTR,LPNETINFOSTRUCT);
279DWORD APIENTRY WNetGetResourceInformationA(LPNETRESOURCEA,LPVOID,LPDWORD,LPSTR*);
280DWORD APIENTRY WNetGetResourceInformationW(LPNETRESOURCEW,LPVOID,LPDWORD,LPWSTR*);
281DWORD APIENTRY WNetGetResourceParentA(LPNETRESOURCEA,LPVOID,LPDWORD);
282DWORD APIENTRY WNetGetResourceParentW(LPNETRESOURCEW,LPVOID,LPDWORD);
283DWORD APIENTRY WNetGetLastErrorA(PDWORD,LPSTR,DWORD,LPSTR,DWORD);
284DWORD APIENTRY WNetGetLastErrorW(PDWORD,LPWSTR,DWORD,LPWSTR,DWORD);
285DWORD APIENTRY MultinetGetConnectionPerformanceA(LPNETRESOURCEA,LPNETCONNECTINFOSTRUCT);
286DWORD APIENTRY MultinetGetConnectionPerformanceW(LPNETRESOURCEW,LPNETCONNECTINFOSTRUCT);
287#ifdef UNICODE
288#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESW
289#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEW
290#define PFNGETPROFILEPATH PFNGETPROFILEPATHW
291typedef NETRESOURCEW NETRESOURCE,*LPNETRESOURCE;
292typedef CONNECTDLGSTRUCTW CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
293typedef DISCDLGSTRUCTW DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
294typedef REMOTE_NAME_INFOW REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
295typedef UNIVERSAL_NAME_INFOW UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
296#define WNetEnumResource WNetEnumResourceW
297#define WNetOpenEnum WNetOpenEnumW
298#define WNetGetResourceInformation WNetGetResourceInformationW
299#define WNetGetResourceParent WNetGetResourceParentW
300#define WNetGetUniversalName WNetGetUniversalNameW
301#define WNetSetConnection WNetSetConnectionW
302#define WNetUseConnection WNetUseConnectionW
303#define WNetGetConnection WNetGetConnectionW
304#define WNetCancelConnection2 WNetCancelConnection2W
305#define WNetCancelConnection WNetCancelConnectionW
306#define WNetAddConnection3 WNetAddConnection3W
307#define WNetAddConnection2 WNetAddConnection2W
308#define WNetAddConnection WNetAddConnectionW
309#define WNetConnectionDialog1 WNetConnectionDialog1W
310#define WNetDisconnectDialog1 WNetDisconnectDialog1W
311#define WNetGetNetworkInformation WNetGetNetworkInformationW
312#define WNetGetProviderName WNetGetProviderNameW
313#define WNetGetUser WNetGetUserW
314#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceW
315#define WNetGetLastError WNetGetLastErrorW
316#else
317#define PFNGETPROFILEPATH PFNGETPROFILEPATHA
318#define PFNRECONCILEPROFILE PFNRECONCILEPROFILEA
319#define PFNPROCESSPOLICIES PFNPROCESSPOLICIESA
320typedef NETRESOURCEA NETRESOURCE,*LPNETRESOURCE;
321typedef CONNECTDLGSTRUCTA CONNECTDLGSTRUCT,*LPCONNECTDLGSTRUCT;
322typedef DISCDLGSTRUCTA DISCDLGSTRUCT,*LPDISCDLGSTRUCT;
323typedef UNIVERSAL_NAME_INFOA UNIVERSAL_NAME_INFO,*LPUNIVERSAL_NAME_INFO;
324typedef REMOTE_NAME_INFOA REMOTE_NAME_INFO,*LPREMOTE_NAME_INFO;
325#define WNetOpenEnum WNetOpenEnumA
326#define WNetEnumResource WNetEnumResourceA
327#define WNetGetResourceInformation WNetGetResourceInformationA
328#define WNetGetResourceParent WNetGetResourceParentA
329#define WNetGetUniversalName WNetGetUniversalNameA
330#define WNetConnectionDialog1 WNetConnectionDialog1A
331#define WNetDisconnectDialog1 WNetDisconnectDialog1A
332#define WNetAddConnection2 WNetAddConnection2A
333#define WNetAddConnection3 WNetAddConnection3A
334#define WNetCancelConnection WNetCancelConnectionA
335#define WNetCancelConnection2 WNetCancelConnection2A
336#define WNetGetConnection WNetGetConnectionA
337#define WNetUseConnection WNetUseConnectionA
338#define WNetSetConnection WNetSetConnectionA
339#define WNetAddConnection WNetAddConnectionA
340#define WNetGetUser WNetGetUserA
341#define WNetGetProviderName WNetGetProviderNameA
342#define WNetGetNetworkInformation WNetGetNetworkInformationA
343#define WNetGetLastError WNetGetLastErrorA
344#define MultinetGetConnectionPerformance MultinetGetConnectionPerformanceA
345#endif
346#endif
347#ifdef __cplusplus
348}
349#endif
350#endif
Note: See TracBrowser for help on using the repository browser.