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.

147 lines
3.5 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. /*
  9. * SPOOLING - CONTROLLING JOBS
  10. */
  11. #include "winnetwk.h"
  12. #include "mpr.h"
  13. #define LPUINT PUINT
  14. #define WNJ_NULL_JOBID 0
  15. WORD WNetOpenJob(LPTSTR,LPTSTR,WORD,LPINT);
  16. WORD WNetCloseJob(WORD,LPINT,LPTSTR);
  17. WORD WNetWriteJob(HANDLE,LPTSTR,LPINT);
  18. WORD WNetAbortJob(WORD,LPTSTR);
  19. WORD WNetHoldJob(LPTSTR,WORD);
  20. WORD WNetReleaseJob(LPTSTR,WORD);
  21. WORD WNetCancelJob(LPTSTR,WORD);
  22. WORD WNetSetJobCopies(LPTSTR,WORD,WORD);
  23. /*
  24. * SPOOLING - QUEUE AND JOB INFO
  25. */
  26. typedef struct _queuestruct {
  27. WORD pqName;
  28. WORD pqComment;
  29. WORD pqStatus;
  30. WORD pqJobcount;
  31. WORD pqPrinters;
  32. } QUEUESTRUCT;
  33. typedef QUEUESTRUCT far * LPQUEUESTRUCT;
  34. #define WNPRQ_ACTIVE 0x0
  35. #define WNPRQ_PAUSE 0x1
  36. #define WNPRQ_ERROR 0x2
  37. #define WNPRQ_PENDING 0x3
  38. #define WNPRQ_PROBLEM 0x4
  39. typedef struct _jobstruct {
  40. WORD pjId;
  41. WORD pjUsername;
  42. WORD pjParms;
  43. WORD pjPosition;
  44. WORD pjStatus;
  45. DWORD pjSubmitted;
  46. DWORD pjSize;
  47. WORD pjCopies;
  48. WORD pjComment;
  49. } JOBSTRUCT;
  50. typedef JOBSTRUCT far * LPJOBSTRUCT;
  51. #define WNPRJ_QSTATUS 0x0007
  52. #define WNPRJ_QS_QUEUED 0x0000
  53. #define WNPRJ_QS_PAUSED 0x0001
  54. #define WNPRJ_QS_SPOOLING 0x0002
  55. #define WNPRJ_QS_PRINTING 0x0003
  56. #define WNPRJ_DEVSTATUS 0x0FF8
  57. #define WNPRJ_DS_COMPLETE 0x0008
  58. #define WNPRJ_DS_INTERV 0x0010
  59. #define WNPRJ_DS_ERROR 0x0020
  60. #define WNPRJ_DS_DESTOFFLINE 0x0040
  61. #define WNPRJ_DS_DESTPAUSED 0x0080
  62. #define WNPRJ_DS_NOTIFY 0x0100
  63. #define WNPRJ_DS_DESTNOPAPER 0x0200
  64. #define WNPRJ_DS_DESTFORMCHG 0x0400
  65. #define WNPRJ_DS_DESTCRTCHG 0x0800
  66. #define WNPRJ_DS_DESTPENCHG 0x1000
  67. #define SP_QUEUECHANGED 0x0500
  68. WORD WNetWatchQueue(HWND,LPTSTR,LPTSTR,WORD);
  69. WORD WNetUnwatchQueue(LPTSTR);
  70. WORD WNetLockQueueData(LPTSTR,LPTSTR,LPQUEUESTRUCT FAR *);
  71. WORD WNetUnlockQueueData(LPTSTR);
  72. /* this is the data structure returned from LFNFindFirst and
  73. * LFNFindNext. The last field, achName, is variable length. The size
  74. * of the name in that field is given by cchName, plus 1 for the zero
  75. * terminator.
  76. */
  77. typedef struct _filefindbuf2 {
  78. WORD fdateCreation;
  79. WORD ftimeCreation;
  80. WORD fdateLastAccess;
  81. WORD ftimeLastAccess;
  82. WORD fdateLastWrite;
  83. WORD ftimeLastWrite;
  84. DWORD cbFile;
  85. DWORD cbFileAlloc;
  86. WORD attr;
  87. DWORD cbList;
  88. BYTE cchName;
  89. BYTE achName[1];
  90. } FILEFINDBUF2, FAR * PFILEFINDBUF2;
  91. typedef BOOL (FAR PASCAL *PQUERYPROC)( void );
  92. WORD LFNFindFirst(LPTSTR,WORD,LPINT,LPINT,WORD,PFILEFINDBUF2);
  93. WORD LFNFindNext(HANDLE,LPINT,WORD,PFILEFINDBUF2);
  94. WORD LFNFindClose(HANDLE);
  95. WORD LFNGetAttribute(LPTSTR,LPINT);
  96. WORD LFNSetAttribute(LPTSTR,WORD);
  97. WORD LFNCopy(LPTSTR,LPTSTR,PQUERYPROC);
  98. WORD LFNMove(LPTSTR,LPTSTR);
  99. WORD LFNDelete(LPTSTR);
  100. WORD LFNMKDir(LPTSTR);
  101. WORD LFNRMDir(LPTSTR);
  102. WORD LFNGetVolumeLabel(WORD,LPTSTR);
  103. WORD LFNSetVolumeLabel(WORD,LPTSTR);
  104. WORD LFNParse(LPTSTR,LPTSTR,LPTSTR);
  105. WORD LFNVolumeType(WORD,LPINT);
  106. /* return values from LFNParse
  107. */
  108. #define FILE_83_CI 0
  109. #define FILE_83_CS 1
  110. #define FILE_LONG 2
  111. /* volumes types from LFNVolumeType
  112. */
  113. #define VOLUME_STANDARD 0
  114. #define VOLUME_LONGNAMES 1
  115. // will add others later, == DOS int 21h error codes.
  116. // this error code causes a call to WNetGetError, WNetGetErrorText
  117. // to get the error text.
  118. #define ERROR_NETWORKSPECIFIC 0xFFFF