Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

372 lines
9.0 KiB

  1. // do not edit: generated from system headerfile
  2. /*
  3. * Windows/Network Interface
  4. * Copyright (C) Microsoft 1989
  5. *
  6. * Standard WINNET Driver Header File, spec version 3.10
  7. * rev. 3.10.05 ;Internal
  8. */
  9. // basic type and macro definitions elided; see lmuitype.h
  10. #ifndef NOBASICTYPES
  11. typedef WORD far * LPWORD;
  12. #endif // NOBASICTYPES
  13. /*
  14. * SPOOLING - CONTROLLING JOBS
  15. */
  16. #define WNJ_NULL_JOBID 0
  17. WORD FAR PASCAL WNetOpenJob(LPSTR,LPSTR,WORD,LPINT);
  18. WORD FAR PASCAL WNetCloseJob(WORD,LPINT,LPSTR);
  19. WORD FAR PASCAL WNetWriteJob(HANDLE,LPSTR,LPINT);
  20. WORD FAR PASCAL WNetAbortJob(WORD,LPSTR);
  21. WORD FAR PASCAL WNetHoldJob(LPSTR,WORD);
  22. WORD FAR PASCAL WNetReleaseJob(LPSTR,WORD);
  23. WORD FAR PASCAL WNetCancelJob(LPSTR,WORD);
  24. WORD FAR PASCAL WNetSetJobCopies(LPSTR,WORD,WORD);
  25. /*
  26. * SPOOLING - QUEUE AND JOB INFO
  27. */
  28. typedef struct _queuestruct {
  29. WORD pqName;
  30. WORD pqComment;
  31. WORD pqStatus;
  32. WORD pqJobcount;
  33. WORD pqPrinters;
  34. } QUEUESTRUCT;
  35. typedef QUEUESTRUCT far * LPQUEUESTRUCT;
  36. #define WNPRQ_ACTIVE 0x0
  37. #define WNPRQ_PAUSE 0x1
  38. #define WNPRQ_ERROR 0x2
  39. #define WNPRQ_PENDING 0x3
  40. #define WNPRQ_PROBLEM 0x4
  41. typedef struct _jobstruct {
  42. WORD pjId;
  43. WORD pjUsername;
  44. WORD pjParms;
  45. WORD pjPosition;
  46. WORD pjStatus;
  47. DWORD pjSubmitted;
  48. DWORD pjSize;
  49. WORD pjCopies;
  50. WORD pjComment;
  51. } JOBSTRUCT;
  52. typedef JOBSTRUCT far * LPJOBSTRUCT;
  53. #define WNPRJ_QSTATUS 0x0007
  54. #define WNPRJ_QS_QUEUED 0x0000
  55. #define WNPRJ_QS_PAUSED 0x0001
  56. #define WNPRJ_QS_SPOOLING 0x0002
  57. #define WNPRJ_QS_PRINTING 0x0003
  58. #define WNPRJ_DEVSTATUS 0x0FF8
  59. #define WNPRJ_DS_COMPLETE 0x0008
  60. #define WNPRJ_DS_INTERV 0x0010
  61. #define WNPRJ_DS_ERROR 0x0020
  62. #define WNPRJ_DS_DESTOFFLINE 0x0040
  63. #define WNPRJ_DS_DESTPAUSED 0x0080
  64. #define WNPRJ_DS_NOTIFY 0x0100
  65. #define WNPRJ_DS_DESTNOPAPER 0x0200
  66. #define WNPRJ_DS_DESTFORMCHG 0x0400
  67. #define WNPRJ_DS_DESTCRTCHG 0x0800
  68. #define WNPRJ_DS_DESTPENCHG 0x1000
  69. #define SP_QUEUECHANGED 0x0500
  70. WORD FAR PASCAL WNetWatchQueue(HWND,LPSTR,LPSTR,WORD);
  71. WORD FAR PASCAL WNetUnwatchQueue(LPSTR);
  72. WORD FAR PASCAL WNetLockQueueData(LPSTR,LPSTR,LPQUEUESTRUCT FAR *);
  73. WORD FAR PASCAL WNetUnlockQueueData(LPSTR);
  74. /*
  75. * CONNECTIONS
  76. */
  77. WORD FAR PASCAL WNetAddConnection(LPSTR,LPSTR,LPSTR);
  78. WORD FAR PASCAL WNetCancelConnection(LPSTR,BOOL);
  79. WORD FAR PASCAL WNetGetConnection(LPSTR,LPSTR,LPWORD);
  80. WORD FAR PASCAL WNetRestoreConnection(HWND,LPSTR);
  81. /*
  82. * CAPABILITIES
  83. */
  84. #define WNNC_SPEC_VERSION 0x0001
  85. #define WNNC_NET_TYPE 0x0002
  86. #define WNNC_NET_NONE 0x0000
  87. #define WNNC_NET_MSNet 0x0100
  88. #define WNNC_NET_LanMan 0x0200
  89. #define WNNC_NET_NetWare 0x0300
  90. #define WNNC_NET_Vines 0x0400
  91. #define WNNC_DRIVER_VERSION 0x0003
  92. #define WNNC_USER 0x0004
  93. #define WNNC_USR_GetUser 0x0001
  94. #define WNNC_CONNECTION 0x0006
  95. #define WNNC_CON_AddConnection 0x0001
  96. #define WNNC_CON_CancelConnection 0x0002
  97. #define WNNC_CON_GetConnections 0x0004
  98. #define WNNC_CON_AutoConnect 0x0008
  99. #define WNNC_CON_BrowseDialog 0x0010
  100. #define WNNC_CON_RestoreConnection 0x0020
  101. #define WNNC_PRINTING 0x0007
  102. #define WNNC_PRT_OpenJob 0x0002
  103. #define WNNC_PRT_CloseJob 0x0004
  104. #define WNNC_PRT_HoldJob 0x0010
  105. #define WNNC_PRT_ReleaseJob 0x0020
  106. #define WNNC_PRT_CancelJob 0x0040
  107. #define WNNC_PRT_SetJobCopies 0x0080
  108. #define WNNC_PRT_WatchQueue 0x0100
  109. #define WNNC_PRT_UnwatchQueue 0x0200
  110. #define WNNC_PRT_LockQueueData 0x0400
  111. #define WNNC_PRT_UnlockQueueData 0x0800
  112. #define WNNC_PRT_ChangeMsg 0x1000
  113. #define WNNC_PRT_AbortJob 0x2000
  114. #define WNNC_PRT_NoArbitraryLock 0x4000
  115. #define WNNC_PRT_WriteJob 0x8000
  116. #define WNNC_DIALOG 0x0008
  117. #define WNNC_DLG_DeviceMode 0x0001
  118. #define WNNC_DLG_BrowseDialog 0x0002
  119. #define WNNC_DLG_ConnectDialog 0x0004
  120. #define WNNC_DLG_DisconnectDialog 0x0008
  121. #define WNNC_DLG_ViewQueueDialog 0x0010
  122. #define WNNC_DLG_PropertyDialog 0x0020
  123. #define WNNC_DLG_ConnectionDialog 0x0040
  124. #define WNNC_ADMIN 0x0009
  125. #define WNNC_ADM_GetDirectoryType 0x0001
  126. #define WNNC_ADM_DirectoryNotify 0x0002
  127. #define WNNC_ADM_LongNames 0x0004
  128. #define WNNC_ERROR 0x000A
  129. #define WNNC_ERR_GetError 0x0001
  130. #define WNNC_ERR_GetErrorText 0x0002
  131. WORD FAR PASCAL WNetGetCaps(WORD);
  132. /*
  133. * OTHER
  134. */
  135. WORD FAR PASCAL WNetGetUser(LPSTR,LPINT);
  136. /*
  137. * BROWSE DIALOG
  138. */
  139. #define WNBD_CONN_UNKNOWN 0x0
  140. #define WNBD_CONN_DISKTREE 0x1
  141. #define WNBD_CONN_PRINTQ 0x3
  142. #define WNBD_MAX_LENGTH 0x80 // path length, includes the NULL
  143. #define WNTYPE_DRIVE 1
  144. #define WNTYPE_FILE 2
  145. #define WNTYPE_PRINTER 3
  146. #define WNTYPE_COMM 4
  147. #define WNPS_FILE 0
  148. #define WNPS_DIR 1
  149. #define WNPS_MULT 2
  150. WORD FAR PASCAL WNetDeviceMode(HWND);
  151. WORD FAR PASCAL WNetBrowseDialog(HWND,WORD,LPSTR);
  152. WORD FAR PASCAL WNetConnectDialog(HWND,WORD);
  153. WORD FAR PASCAL WNetDisconnectDialog(HWND,WORD);
  154. WORD FAR PASCAL WNetConnectionDialog(HWND,WORD);
  155. WORD FAR PASCAL WNetViewQueueDialog(HWND,LPSTR);
  156. WORD FAR PASCAL WNetPropertyDialog(HWND hwndParent, WORD iButton, WORD nPropSel, LPSTR lpszName, WORD nType);
  157. WORD FAR PASCAL WNetGetPropertyText(WORD iButton, WORD nPropSel, LPSTR lpszName, LPSTR lpszButtonName, WORD cbButtonName, WORD nType);
  158. /*
  159. * ADMIN
  160. */
  161. #define WNDT_NORMAL 0
  162. #define WNDT_NETWORK 1
  163. #define WNDN_MKDIR 1
  164. #define WNDN_RMDIR 2
  165. #define WNDN_MVDIR 3
  166. WORD FAR PASCAL WNetGetDirectoryType(LPSTR,LPINT);
  167. WORD FAR PASCAL WNetDirectoryNotify(HWND,LPSTR,WORD);
  168. /*
  169. * ERRORS
  170. */
  171. WORD FAR PASCAL WNetGetError(LPINT);
  172. WORD FAR PASCAL WNetGetErrorText(WORD,LPSTR,LPINT);
  173. /*
  174. * STATUS CODES
  175. */
  176. /* General */
  177. #define WN_SUCCESS 0x0000
  178. #define WN_NOT_SUPPORTED 0x0001
  179. #define WN_NET_ERROR 0x0002
  180. #define WN_MORE_DATA 0x0003
  181. #define WN_BAD_POINTER 0x0004
  182. #define WN_BAD_VALUE 0x0005
  183. #define WN_BAD_PASSWORD 0x0006
  184. #define WN_ACCESS_DENIED 0x0007
  185. #define WN_FUNCTION_BUSY 0x0008
  186. #define WN_WINDOWS_ERROR 0x0009
  187. #define WN_BAD_USER 0x000A
  188. #define WN_OUT_OF_MEMORY 0x000B
  189. #define WN_CANCEL 0x000C
  190. #define WN_CONTINUE 0x000D
  191. /* Connection */
  192. #define WN_NOT_CONNECTED 0x0030
  193. #define WN_OPEN_FILES 0x0031
  194. #define WN_BAD_NETNAME 0x0032
  195. #define WN_BAD_LOCALNAME 0x0033
  196. #define WN_ALREADY_CONNECTED 0x0034
  197. #define WN_DEVICE_ERROR 0x0035
  198. #define WN_CONNECTION_CLOSED 0x0036
  199. /* Printing */
  200. #define WN_BAD_JOBID 0x0040
  201. #define WN_JOB_NOT_FOUND 0x0041
  202. #define WN_JOB_NOT_HELD 0x0042
  203. #define WN_BAD_QUEUE 0x0043
  204. #define WN_BAD_FILE_HANDLE 0x0044
  205. #define WN_CANT_SET_COPIES 0x0045
  206. #define WN_ALREADY_LOCKED 0x0046
  207. #define WN_NO_ERROR 0x0050
  208. /* stuff in user, not driver, for shell apps ;Internal */
  209. WORD FAR PASCAL WNetErrorText(WORD,LPSTR,WORD); /* ;Internal */
  210. #ifdef LFN
  211. /* this is the data structure returned from LFNFindFirst and
  212. * LFNFindNext. The last field, achName, is variable length. The size
  213. * of the name in that field is given by cchName, plus 1 for the zero
  214. * terminator.
  215. */
  216. typedef struct _filefindbuf2
  217. {
  218. WORD fdateCreation;
  219. WORD ftimeCreation;
  220. WORD fdateLastAccess;
  221. WORD ftimeLastAccess;
  222. WORD fdateLastWrite;
  223. WORD ftimeLastWrite;
  224. DWORD cbFile;
  225. DWORD cbFileAlloc;
  226. WORD attr;
  227. DWORD cbList;
  228. BYTE cchName;
  229. BYTE achName[1];
  230. } FILEFINDBUF2, FAR * PFILEFINDBUF2;
  231. typedef BOOL (FAR PASCAL *PQUERYPROC)( void );
  232. WORD FAR PASCAL LFNFindFirst(LPSTR,WORD,LPINT,LPINT,WORD,PFILEFINDBUF2);
  233. WORD FAR PASCAL LFNFindNext(HANDLE,LPINT,WORD,PFILEFINDBUF2);
  234. WORD FAR PASCAL LFNFindClose(HANDLE);
  235. WORD FAR PASCAL LFNGetAttribute(LPSTR,LPINT);
  236. WORD FAR PASCAL LFNSetAttribute(LPSTR,WORD);
  237. WORD FAR PASCAL LFNCopy(LPSTR,LPSTR,PQUERYPROC);
  238. WORD FAR PASCAL LFNMove(LPSTR,LPSTR);
  239. WORD FAR PASCAL LFNDelete(LPSTR);
  240. WORD FAR PASCAL LFNMKDir(LPSTR);
  241. WORD FAR PASCAL LFNRMDir(LPSTR);
  242. WORD FAR PASCAL LFNGetVolumeLabel(WORD,LPSTR);
  243. WORD FAR PASCAL LFNSetVolumeLabel(WORD,LPSTR);
  244. WORD FAR PASCAL LFNParse(LPSTR,LPSTR,LPSTR);
  245. WORD FAR PASCAL LFNVolumeType(WORD,LPINT);
  246. /* return values from LFNParse
  247. */
  248. #define FILE_83_CI 0
  249. #define FILE_83_CS 1
  250. #define FILE_LONG 2
  251. /* volumes types from LFNVolumeType
  252. */
  253. #define VOLUME_STANDARD 0
  254. #define VOLUME_LONGNAMES 1
  255. /* error code return values
  256. */
  257. #define ERROR_SUCCESS 0
  258. // will add others later, == DOS int 21h error codes.
  259. // this error code causes a call to WNetGetError, WNetGetErrorText
  260. // to get the error text.
  261. #define ERROR_NETWORKSPECIFIC 0xFFFF
  262. #endif
  263. typedef struct _NETRESOURCE
  264. {
  265. DWORD dwScope;
  266. DWORD dwType;
  267. DWORD dwDisplayType;
  268. DWORD dwUsage;
  269. LPSTR lpLocalName;
  270. LPSTR lpRemoteName;
  271. LPSTR lpComment;
  272. LPSTR lpProvider;
  273. } NETRESOURCE, *LPNETRESOURCE;
  274. enum
  275. {
  276. Resource_CONNECTED,
  277. Resource_GLOBALNET
  278. };
  279. enum ENUMTYPE
  280. {
  281. NET_USE,
  282. NET_SERVER,
  283. NET_SHARE
  284. };
  285. #define ResourceType_DISK 0x01
  286. #define ResourceType_PRINT 0x02
  287. #define ResourceUsage_UNDEFINE 0x00
  288. #define ResourceUsage_CONNECTABLE 0x01
  289. #define ResourceUsage_CONTAINER 0x02
  290. #define WN_BAD_HANDLE 0x0060
  291. #define WN_NO_MORE_ENTRIES 0x0061
  292. DWORD FAR PASCAL WNetOpenEnum( DWORD dwScope, DWORD dwType, DWORD dwUsage,
  293. LPNETRESOURCE lpNetResource, HANDLE * lphEnum );
  294. DWORD FAR PASCAL WNetEnumResource( HANDLE hEnum, LPDWORD lpcCount,
  295. LPVOID lpBuffer, DWORD cbBuffer );
  296. DWORD FAR PASCAL WNetCloseEnum( HANDLE hEnum );