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.

203 lines
5.0 KiB

  1. /*
  2. * Windows/Network Interface
  3. * Copyright (C) Microsoft 1989
  4. *
  5. * Standard WINNET Driver Header File, spec version 3.10
  6. * rev. 3.10.05 ;Internal
  7. *
  8. * Note: This file has been modified to not include the 16 bit only
  9. * portions under win32 and to not duplicate the functions
  10. * contained in winnet32.h.
  11. */
  12. // basic type and macro definitions elided; see lmuitype.h
  13. #ifndef NOBASICTYPES
  14. typedef WORD far * LPWORD;
  15. #endif // NOBASICTYPES
  16. #ifndef _WNET1632_H_
  17. #error Do not include this file directly, include it through WNet1632.h
  18. #endif //_WNET1632_H_
  19. #ifndef WIN32
  20. /*
  21. * SPOOLING - CONTROLLING JOBS
  22. */
  23. // BUGBUG
  24. // we should move this one to somewhere
  25. typedef UINT FAR * LPUINT ;
  26. #define WNJ_NULL_JOBID 0
  27. WORD FAR PASCAL WNetOpenJob(LPSTR,LPSTR,WORD,LPINT);
  28. WORD FAR PASCAL WNetCloseJob(WORD,LPINT,LPSTR);
  29. WORD FAR PASCAL WNetWriteJob(HANDLE,LPSTR,LPINT);
  30. WORD FAR PASCAL WNetAbortJob(WORD,LPSTR);
  31. WORD FAR PASCAL WNetHoldJob(LPSTR,WORD);
  32. WORD FAR PASCAL WNetReleaseJob(LPSTR,WORD);
  33. WORD FAR PASCAL WNetCancelJob(LPSTR,WORD);
  34. WORD FAR PASCAL WNetSetJobCopies(LPSTR,WORD,WORD);
  35. /*
  36. * SPOOLING - QUEUE AND JOB INFO
  37. */
  38. typedef struct _queuestruct {
  39. WORD pqName;
  40. WORD pqComment;
  41. WORD pqStatus;
  42. WORD pqJobcount;
  43. WORD pqPrinters;
  44. } QUEUESTRUCT;
  45. typedef QUEUESTRUCT far * LPQUEUESTRUCT;
  46. #define WNPRQ_ACTIVE 0x0
  47. #define WNPRQ_PAUSE 0x1
  48. #define WNPRQ_ERROR 0x2
  49. #define WNPRQ_PENDING 0x3
  50. #define WNPRQ_PROBLEM 0x4
  51. typedef struct _jobstruct {
  52. WORD pjId;
  53. WORD pjUsername;
  54. WORD pjParms;
  55. WORD pjPosition;
  56. WORD pjStatus;
  57. DWORD pjSubmitted;
  58. DWORD pjSize;
  59. WORD pjCopies;
  60. WORD pjComment;
  61. } JOBSTRUCT;
  62. typedef JOBSTRUCT far * LPJOBSTRUCT;
  63. #define WNPRJ_QSTATUS 0x0007
  64. #define WNPRJ_QS_QUEUED 0x0000
  65. #define WNPRJ_QS_PAUSED 0x0001
  66. #define WNPRJ_QS_SPOOLING 0x0002
  67. #define WNPRJ_QS_PRINTING 0x0003
  68. #define WNPRJ_DEVSTATUS 0x0FF8
  69. #define WNPRJ_DS_COMPLETE 0x0008
  70. #define WNPRJ_DS_INTERV 0x0010
  71. #define WNPRJ_DS_ERROR 0x0020
  72. #define WNPRJ_DS_DESTOFFLINE 0x0040
  73. #define WNPRJ_DS_DESTPAUSED 0x0080
  74. #define WNPRJ_DS_NOTIFY 0x0100
  75. #define WNPRJ_DS_DESTNOPAPER 0x0200
  76. #define WNPRJ_DS_DESTFORMCHG 0x0400
  77. #define WNPRJ_DS_DESTCRTCHG 0x0800
  78. #define WNPRJ_DS_DESTPENCHG 0x1000
  79. #define SP_QUEUECHANGED 0x0500
  80. WORD FAR PASCAL WNetWatchQueue(HWND,LPSTR,LPSTR,WORD);
  81. WORD FAR PASCAL WNetUnwatchQueue(LPSTR);
  82. WORD FAR PASCAL WNetLockQueueData(LPSTR,LPSTR,LPQUEUESTRUCT FAR *);
  83. WORD FAR PASCAL WNetUnlockQueueData(LPSTR);
  84. #define WNNC_PRINTING 0x0007
  85. #define WNNC_PRT_OpenJob 0x0002
  86. #define WNNC_PRT_CloseJob 0x0004
  87. #define WNNC_PRT_HoldJob 0x0010
  88. #define WNNC_PRT_ReleaseJob 0x0020
  89. #define WNNC_PRT_CancelJob 0x0040
  90. #define WNNC_PRT_SetJobCopies 0x0080
  91. #define WNNC_PRT_WatchQueue 0x0100
  92. #define WNNC_PRT_UnwatchQueue 0x0200
  93. #define WNNC_PRT_LockQueueData 0x0400
  94. #define WNNC_PRT_UnlockQueueData 0x0800
  95. #define WNNC_PRT_ChangeMsg 0x1000
  96. #define WNNC_PRT_AbortJob 0x2000
  97. #define WNNC_PRT_NoArbitraryLock 0x4000
  98. #define WNNC_PRT_WriteJob 0x8000
  99. #endif
  100. /*
  101. * OTHER
  102. */
  103. UINT FAR PASCAL WNetGetUser(LPSTR,LPUINT);
  104. #ifndef WIN32
  105. /* Printing */
  106. #define WN_BAD_JOBID 0x0040
  107. #define WN_JOB_NOT_FOUND 0x0041
  108. #define WN_JOB_NOT_HELD 0x0042
  109. #define WN_BAD_QUEUE 0x0043
  110. #define WN_BAD_FILE_HANDLE 0x0044
  111. #define WN_CANT_SET_COPIES 0x0045
  112. #define WN_ALREADY_LOCKED 0x0046
  113. #endif //!WIN32
  114. #if defined( LFN ) && !defined( WIN32 )
  115. /* this is the data structure returned from LFNFindFirst and
  116. * LFNFindNext. The last field, achName, is variable length. The size
  117. * of the name in that field is given by cchName, plus 1 for the zero
  118. * terminator.
  119. */
  120. typedef struct _filefindbuf2
  121. {
  122. WORD fdateCreation;
  123. WORD ftimeCreation;
  124. WORD fdateLastAccess;
  125. WORD ftimeLastAccess;
  126. WORD fdateLastWrite;
  127. WORD ftimeLastWrite;
  128. DWORD cbFile;
  129. DWORD cbFileAlloc;
  130. WORD attr;
  131. DWORD cbList;
  132. BYTE cchName;
  133. BYTE achName[1];
  134. } FILEFINDBUF2, FAR * PFILEFINDBUF2;
  135. typedef BOOL (FAR PASCAL *PQUERYPROC)( void );
  136. WORD FAR PASCAL LFNFindFirst(LPSTR,WORD,LPINT,LPINT,WORD,PFILEFINDBUF2);
  137. WORD FAR PASCAL LFNFindNext(HANDLE,LPINT,WORD,PFILEFINDBUF2);
  138. WORD FAR PASCAL LFNFindClose(HANDLE);
  139. WORD FAR PASCAL LFNGetAttribute(LPSTR,LPINT);
  140. WORD FAR PASCAL LFNSetAttribute(LPSTR,WORD);
  141. WORD FAR PASCAL LFNCopy(LPSTR,LPSTR,PQUERYPROC);
  142. WORD FAR PASCAL LFNMove(LPSTR,LPSTR);
  143. WORD FAR PASCAL LFNDelete(LPSTR);
  144. WORD FAR PASCAL LFNMKDir(LPSTR);
  145. WORD FAR PASCAL LFNRMDir(LPSTR);
  146. WORD FAR PASCAL LFNGetVolumeLabel(WORD,LPSTR);
  147. WORD FAR PASCAL LFNSetVolumeLabel(WORD,LPSTR);
  148. WORD FAR PASCAL LFNParse(LPSTR,LPSTR,LPSTR);
  149. WORD FAR PASCAL LFNVolumeType(WORD,LPINT);
  150. /* return values from LFNParse
  151. */
  152. #define FILE_83_CI 0
  153. #define FILE_83_CS 1
  154. #define FILE_LONG 2
  155. /* volumes types from LFNVolumeType
  156. */
  157. #define VOLUME_STANDARD 0
  158. #define VOLUME_LONGNAMES 1
  159. /* error code return values
  160. */
  161. #define ERROR_SUCCESS 0
  162. // will add others later, == DOS int 21h error codes.
  163. // this error code causes a call to WNetGetError, WNetGetErrorText
  164. // to get the error text.
  165. #define ERROR_NETWORKSPECIFIC 0xFFFF
  166. #endif // LFN && !WIN32