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.

1258 lines
29 KiB

  1. /*++
  2. Copyright (c) 1990 - 1996 Microsoft Corporation
  3. All rights reserved
  4. Module Name:
  5. winspool.idl
  6. Abstract:
  7. A very simple interface which is part of an RPC application (client and
  8. server) demonstrating how to use RPC on NT.
  9. Author:
  10. mikemon 12-10-90 Created.
  11. Environment:
  12. User Mode -Win32
  13. Revision History:
  14. --*/
  15. [
  16. uuid(12345678-1234-ABCD-EF00-0123456789AB),
  17. version(1.0),
  18. #ifdef __midl
  19. ms_union,
  20. #endif // __midl
  21. endpoint("mscn_np:[\\pipe\\spoolss]"),
  22. pointer_default(unique)
  23. ]
  24. interface winspool
  25. {
  26. import "import.idl";
  27. #include "..\inc\ntfytab.h"
  28. typedef WORD TABLE;
  29. typedef struct _NOTIFY_ATTRIB_TABLE {
  30. WORD Attrib;
  31. TABLE Table;
  32. } NOTIFY_ATTRIB_TABLE, *PNOTIFY_ATTRIB_TABLE;
  33. typedef [context_handle] void *PRINTER_HANDLE;
  34. typedef [context_handle] void *GDI_HANDLE;
  35. typedef [handle] wchar_t *STRING_HANDLE;
  36. typedef [string] wchar_t *SPL_STRING;
  37. typedef struct _PORT_VAR_CONTAINER {
  38. DWORD cbMonitorData;
  39. [size_is(cbMonitorData), unique] LPBYTE pMonitorData;
  40. } PORT_VAR_CONTAINER, *PPORT_VAR_CONTAINER, *LPPORT_VAR_CONTAINER;
  41. typedef struct _PORT_CONTAINER {
  42. DWORD Level;
  43. [switch_is(Level)] union {
  44. [case(1)]
  45. LPPORT_INFO_1W pPortInfo1;
  46. [case(2)]
  47. LPPORT_INFO_2W pPortInfo2;
  48. [case(3)]
  49. LPPORT_INFO_3W pPortInfo3;
  50. [case((DWORD)-1)]
  51. LPPORT_INFO_FFW pPortInfoFF;
  52. } PortInfo;
  53. } PORT_CONTAINER, *PPORT_CONTAINER, *LPPORT_CONTAINER;
  54. typedef struct _DEVMODE_CONTAINER {
  55. DWORD cbBuf;
  56. [size_is(cbBuf), unique] LPBYTE pDevMode;
  57. } DEVMODE_CONTAINER, *PDEVMODE_CONTAINER, *LPDEVMODE_CONTAINER;
  58. typedef struct _SECURITY_CONTAINER {
  59. DWORD cbBuf;
  60. [size_is(cbBuf), unique] LPBYTE pSecurity;
  61. } SECURITY_CONTAINER, *PSECURITY_CONTAINER, *LPSECURITY_CONTAINER;
  62. typedef struct _PRINTER_CONTAINER {
  63. DWORD Level;
  64. [switch_is(Level)] union {
  65. [case(0)]
  66. LPPRINTER_INFO_STRESSW pPrinterInfoStress;
  67. [case(1)]
  68. LPPRINTER_INFO_1W pPrinterInfo1;
  69. [case(2)]
  70. LPPRINTER_INFO_2W pPrinterInfo2;
  71. [case(3)]
  72. LPPRINTER_INFO_3 pPrinterInfo3;
  73. [case(4)]
  74. LPPRINTER_INFO_4W pPrinterInfo0;
  75. [case(5)]
  76. LPPRINTER_INFO_5W pPrinterInfo5;
  77. [case(6)]
  78. LPPRINTER_INFO_6 pPrinterInfo6;
  79. [case(7)]
  80. LPPRINTER_INFO_7W pPrinterInfo7;
  81. [case(8)]
  82. LPPRINTER_INFO_8W pPrinterInfo8;
  83. [case(9)]
  84. LPPRINTER_INFO_9W pPrinterInfo9;
  85. } PrinterInfo;
  86. } PRINTER_CONTAINER, *PPRINTER_CONTAINER, *LPPRINTER_CONTAINER;
  87. typedef struct _JOB_CONTAINER {
  88. DWORD Level;
  89. [switch_is(Level)] union {
  90. [case(1)]
  91. JOB_INFO_1W *Level1;
  92. [case(2)]
  93. JOB_INFO_2W *Level2;
  94. [case(3)]
  95. JOB_INFO_3 *Level3;
  96. } JobInfo;
  97. } JOB_CONTAINER, *PJOB_CONTAINER, *LPJOB_CONTAINER;
  98. // To handle dependentFiles field which is a list of strings
  99. // -- MuhuntS
  100. typedef struct _RPC_DRIVER_INFO_3W {
  101. DWORD cVersion;
  102. SPL_STRING pName;
  103. SPL_STRING pEnvironment;
  104. SPL_STRING pDriverPath;
  105. SPL_STRING pDataFile;
  106. SPL_STRING pConfigFile;
  107. SPL_STRING pHelpFile;
  108. SPL_STRING pMonitorName;
  109. SPL_STRING pDefaultDataType;
  110. DWORD cchDependentFiles;
  111. [size_is(cchDependentFiles), unique] WCHAR *pDependentFiles;
  112. } RPC_DRIVER_INFO_3W, *PRPC_DRIVER_INFO_3W, *LPRPC_DRIVER_INFO_3W;
  113. typedef struct _RPC_DRIVER_INFO_4W {
  114. DWORD cVersion;
  115. SPL_STRING pName;
  116. SPL_STRING pEnvironment;
  117. SPL_STRING pDriverPath;
  118. SPL_STRING pDataFile;
  119. SPL_STRING pConfigFile;
  120. SPL_STRING pHelpFile;
  121. SPL_STRING pMonitorName;
  122. SPL_STRING pDefaultDataType;
  123. DWORD cchDependentFiles;
  124. [size_is(cchDependentFiles), unique] WCHAR *pDependentFiles;
  125. DWORD cchPreviousNames;
  126. [size_is(cchPreviousNames), unique] WCHAR *pszzPreviousNames;
  127. } RPC_DRIVER_INFO_4W, *PRPC_DRIVER_INFO_4W, *LPRPC_DRIVER_INFO_4W;
  128. typedef struct _RPC_DRIVER_INFO_6W {
  129. DWORD cVersion;
  130. SPL_STRING pName;
  131. SPL_STRING pEnvironment;
  132. SPL_STRING pDriverPath;
  133. SPL_STRING pDataFile;
  134. SPL_STRING pConfigFile;
  135. SPL_STRING pHelpFile;
  136. SPL_STRING pMonitorName;
  137. SPL_STRING pDefaultDataType;
  138. DWORD cchDependentFiles;
  139. [size_is(cchDependentFiles), unique] WCHAR *pDependentFiles;
  140. DWORD cchPreviousNames;
  141. [size_is(cchPreviousNames), unique] WCHAR *pszzPreviousNames;
  142. FILETIME ftDriverDate;
  143. DWORDLONG dwlDriverVersion;
  144. SPL_STRING pMfgName;
  145. SPL_STRING pOEMUrl;
  146. SPL_STRING pHardwareID;
  147. SPL_STRING pProvider;
  148. } RPC_DRIVER_INFO_6W, *PRPC_DRIVER_INFO_6W, *LPRPC_DRIVER_INFO_6W;
  149. typedef struct _DRIVER_CONTAINER {
  150. DWORD Level;
  151. [switch_is(Level)] union {
  152. [case(1)]
  153. LPDRIVER_INFO_1W Level1;
  154. [case(2)]
  155. LPDRIVER_INFO_2W Level2;
  156. [case(3)]
  157. LPRPC_DRIVER_INFO_3W Level3;
  158. [case(4)]
  159. LPRPC_DRIVER_INFO_4W Level4;
  160. [case(6)]
  161. LPRPC_DRIVER_INFO_6W Level6;
  162. } DriverInfo;
  163. } DRIVER_CONTAINER, *PDRIVER_CONTAINER, *LPDRIVER_CONTAINER;
  164. typedef struct _RPC_DRIVER_INFCAT_INFO_1 {
  165. [string, ref] wchar_t *pszCatPath;
  166. [string, unique] wchar_t *pszCatNameOnSystem;
  167. } RPC_DRIVER_INFCAT_INFO_1, *PRPC_DRIVER_INFCAT_INFO_1, *LPRPC_DRIVER_INFCAT_INFO_1;
  168. typedef struct _RPC_DRIVER_INFCAT_INFO_2 {
  169. [string, ref] wchar_t *pszCatPath;
  170. [string, ref] wchar_t *pszInfPath;
  171. [string, unique] wchar_t *pszSrcLoc;
  172. DWORD dwMediaType;
  173. DWORD dwCopyStyle;
  174. } RPC_DRIVER_INFCAT_INFO_2, *PRPC_DRIVER_INFCAT_INFO_2, *LPRPC_DRIVER_INFCAT_INFO_2;
  175. typedef struct _DRIVER_INFCAT_CONTAINER {
  176. DWORD dwLevel;
  177. [switch_is(dwLevel)] union {
  178. [case(1)]
  179. LPRPC_DRIVER_INFCAT_INFO_1 pDriverInfCatInfo1;
  180. [case(2)]
  181. LPRPC_DRIVER_INFCAT_INFO_2 pDriverInfCatInfo2;
  182. } DriverInfCatInfo;
  183. } DRIVER_INFCAT_CONTAINER, *PDRIVER_INFCAT_CONTAINER, *LPDRIVER_INFCAT_CONTAINER;
  184. typedef struct _DOC_INFO_CONTAINER {
  185. DWORD Level;
  186. [switch_is(Level)] union {
  187. [case(1)]
  188. LPDOC_INFO_1W pDocInfo1;
  189. } DocInfo;
  190. } DOC_INFO_CONTAINER, *PDOC_INFO_CONTAINER, *LPDOC_INFO_CONTAINER;
  191. typedef struct _FORM_CONTAINER {
  192. DWORD Level;
  193. [switch_is(Level)] union {
  194. [case(1)]
  195. LPFORM_INFO_1W pFormInfo1;
  196. } FormInfo;
  197. } FORM_CONTAINER, *PFORM_CONTAINER, *LPFORM_CONTAINER;
  198. typedef struct _MONITOR_CONTAINER {
  199. DWORD Level;
  200. [switch_is(Level)] union {
  201. [case(1)]
  202. LPMONITOR_INFO_1W pMonitorInfo1;
  203. [case(2)]
  204. LPMONITOR_INFO_2W pMonitorInfo2;
  205. } MonitorInfo;
  206. } MONITOR_CONTAINER, *PMONITOR_CONTAINER, *LPMONITOR_CONTAINER;
  207. typedef struct _RPC_PROVIDOR_INFO_2W {
  208. DWORD cchOrder;
  209. [size_is(cchOrder), unique] WCHAR *pOrder;
  210. } RPC_PROVIDOR_INFO_2W, *PRPC_PROVIDOR_INFO_2W, *LPRPC_PROVIDOR_INFO_2W;
  211. typedef struct _PROVIDOR_CONTAINER {
  212. DWORD Level;
  213. [switch_is(Level)] union {
  214. [case(1)]
  215. LPPROVIDOR_INFO_1W pProvidorInfo1;
  216. [case(2)]
  217. LPRPC_PROVIDOR_INFO_2W pRpcProvidorInfo2;
  218. } ProvidorInfo;
  219. } PROVIDOR_CONTAINER, *PPROVIDOR_CONTAINER, *LPPROVIDOR_CONTAINER;
  220. typedef struct _SPLCLIENT_CONTAINER {
  221. DWORD Level;
  222. [switch_is(Level)] union {
  223. [case(1)]
  224. LPSPLCLIENT_INFO_1 pClientInfo1;
  225. [case(2)]
  226. LPSPLCLIENT_INFO_2 pClientInfo2;
  227. } ClientInfo;
  228. } SPLCLIENT_CONTAINER, *PSPLCLIENT_CONTAINER, *LPSPLCLIENT_CONTAINER;
  229. typedef struct _FILE_INFO_CONTAINER {
  230. DWORD Level;
  231. [switch_is(Level)] union {
  232. [case(1)]
  233. SPOOL_FILE_INFO_1 *Level1;
  234. [default];
  235. } FileInfo;
  236. } FILE_INFO_CONTAINER, *PFILE_INFO_CONTAINER, *LPFILE_INFO_CONTAINER;
  237. typedef struct _STRING_CONTAINER {
  238. DWORD cbBuf;
  239. [size_is(cbBuf/2), unique] LPWSTR pszString;
  240. } STRING_CONTAINER, *PSTRING_CONTAINER;
  241. typedef struct _RPC_BINARY_CONTAINER {
  242. DWORD cbBuf;
  243. [size_is(cbBuf), unique] LPBYTE pszString;
  244. } RPC_BINARY_CONTAINER, *PRPC_BINARY_CONTAINER;
  245. typedef struct _SYSTEMTIME_CONTAINER {
  246. DWORD cbBuf;
  247. PSYSTEMTIME pSystemTime;
  248. } SYSTEMTIME_CONTAINER, *PSYSTEMTIME_CONTAINER;
  249. typedef struct _RPC_V2_NOTIFY_OPTIONS_TYPE {
  250. WORD Type;
  251. WORD Reserved0;
  252. DWORD Reserved1;
  253. DWORD Reserved2;
  254. DWORD Count;
  255. [size_is(Count), unique] PWORD pFields;
  256. } RPC_V2_NOTIFY_OPTIONS_TYPE, *PRPC_V2_NOTIFY_OPTIONS_TYPE;
  257. typedef struct _RPC_V2_NOTIFY_OPTIONS {
  258. DWORD Version;
  259. DWORD Reserved;
  260. DWORD Count;
  261. [size_is(Count), unique] PRPC_V2_NOTIFY_OPTIONS_TYPE pTypes;
  262. } RPC_V2_NOTIFY_OPTIONS, *PRPC_V2_NOTIFY_OPTIONS;
  263. typedef [switch_type(DWORD)] union _RPC_V2_NOTIFY_INFO_DATA_DATA {
  264. [case(TABLE_STRING)]
  265. STRING_CONTAINER String;
  266. [case(TABLE_DWORD)]
  267. DWORD dwData[2];
  268. [case(TABLE_TIME)]
  269. SYSTEMTIME_CONTAINER SystemTime;
  270. [case(TABLE_DEVMODE)]
  271. DEVMODE_CONTAINER DevMode;
  272. [case(TABLE_SECURITYDESCRIPTOR)]
  273. SECURITY_CONTAINER SecurityDescriptor;
  274. } RPC_V2_NOTIFY_INFO_DATA_DATA, *PRPC_V2_NOTIFY_INFO_DATA_DATA;
  275. typedef struct _RPC_V2_NOTIFY_INFO_DATA {
  276. WORD Type;
  277. WORD Field;
  278. DWORD Reserved;
  279. DWORD Id;
  280. [switch_is(Reserved & 0xffff)] RPC_V2_NOTIFY_INFO_DATA_DATA Data;
  281. } RPC_V2_NOTIFY_INFO_DATA, *PRPC_V2_NOTIFY_INFO_DATA;
  282. typedef struct _RPC_V2_NOTIFY_INFO {
  283. DWORD Version;
  284. DWORD Flags;
  285. DWORD Count;
  286. [size_is(Count), unique] RPC_V2_NOTIFY_INFO_DATA aData[];
  287. } RPC_V2_NOTIFY_INFO, *PRPC_V2_NOTIFY_INFO;
  288. typedef [switch_type(DWORD)] union _RPC_V2_UREPLY_PRINTER {
  289. [case (REPLY_PRINTER_CHANGE)]
  290. PRPC_V2_NOTIFY_INFO pInfo;
  291. } RPC_V2_UREPLY_PRINTER, *PRPC_V2_UREPLY_PRINTER;
  292. DWORD
  293. RpcEnumPrinters(
  294. [in] DWORD Flags,
  295. [in, string, unique] STRING_HANDLE Name,
  296. [in] DWORD Level,
  297. [in, out, unique, size_is(cbBuf)] LPBYTE pPrinterEnum,
  298. [in] DWORD cbBuf,
  299. [out] LPDWORD pcbNeeded,
  300. [out] LPDWORD pcReturned
  301. );
  302. DWORD
  303. RpcOpenPrinter(
  304. [in, string, unique] STRING_HANDLE pPrinterName,
  305. [out] PRINTER_HANDLE *pHandle,
  306. [in, string, unique] wchar_t * pDatatype,
  307. [in] LPDEVMODE_CONTAINER pDevMode,
  308. [in] DWORD AccessRequired
  309. );
  310. DWORD
  311. RpcSetJob(
  312. [in] PRINTER_HANDLE hPrinter,
  313. [in] DWORD JobId,
  314. [in, unique] LPJOB_CONTAINER pJobContainer,
  315. [in] DWORD Command
  316. );
  317. DWORD
  318. RpcGetJob(
  319. [in] PRINTER_HANDLE hPrinter,
  320. [in] DWORD JobId,
  321. [in] DWORD Level,
  322. [in, out, unique, size_is(cbBuf)] LPBYTE pJob,
  323. [in] DWORD cbBuf,
  324. [out] LPDWORD pcbNeeded
  325. );
  326. DWORD
  327. RpcEnumJobs(
  328. [in] PRINTER_HANDLE hPrinter,
  329. [in] DWORD FirstJob,
  330. [in] DWORD NoJobs,
  331. [in] DWORD Level,
  332. [in, out, unique, size_is(cbBuf)] LPBYTE pJob,
  333. [in] DWORD cbBuf,
  334. [out] LPDWORD pcbNeeded,
  335. [out] LPDWORD pcReturned
  336. );
  337. DWORD
  338. RpcAddPrinter(
  339. [in, string, unique] STRING_HANDLE pName,
  340. [in] PPRINTER_CONTAINER pPrinterContainer,
  341. [in] PDEVMODE_CONTAINER pDevModeContainer,
  342. [in] PSECURITY_CONTAINER pSecurityContainer,
  343. [out] PRINTER_HANDLE *pHandle
  344. );
  345. DWORD
  346. RpcDeletePrinter(
  347. [in] PRINTER_HANDLE hPrinter
  348. );
  349. DWORD
  350. RpcSetPrinter(
  351. [in] PRINTER_HANDLE hPrinter,
  352. [in] PPRINTER_CONTAINER pPrinterContainer,
  353. [in] PDEVMODE_CONTAINER pDevModeContainer,
  354. [in] PSECURITY_CONTAINER pSecurityContainer,
  355. [in] DWORD Command
  356. );
  357. DWORD
  358. RpcGetPrinter(
  359. [in] PRINTER_HANDLE hPrinter,
  360. [in] DWORD Level,
  361. [in, out, unique, size_is(cbBuf)] LPBYTE pPrinter,
  362. [in] DWORD cbBuf,
  363. [out] LPDWORD pcbNeeded
  364. );
  365. DWORD
  366. RpcAddPrinterDriver(
  367. [in, string, unique] STRING_HANDLE pName,
  368. [in] PDRIVER_CONTAINER pDriverContainer
  369. );
  370. DWORD
  371. RpcEnumPrinterDrivers(
  372. [in, string, unique] STRING_HANDLE pName,
  373. [in, unique, string] wchar_t * pEnvironment,
  374. [in] DWORD Level,
  375. [in, out, unique, size_is(cbBuf)] LPBYTE pDrivers,
  376. [in] DWORD cbBuf,
  377. [out] LPDWORD pcbNeeded,
  378. [out] LPDWORD pcReturned
  379. );
  380. DWORD
  381. RpcGetPrinterDriver(
  382. [in] PRINTER_HANDLE hPrinter,
  383. [in, unique, string] wchar_t * pEnvironment,
  384. [in] DWORD Level,
  385. [in, out, unique, size_is(cbBuf)] LPBYTE pDriver,
  386. [in] DWORD cbBuf,
  387. [out] LPDWORD pcbNeeded
  388. );
  389. DWORD
  390. RpcGetPrinterDriverDirectory(
  391. [in, string, unique] STRING_HANDLE pName,
  392. [in, unique, string] wchar_t * pEnvironment,
  393. [in] DWORD Level,
  394. [in, out, unique, size_is(cbBuf)] LPBYTE pDriverDirectory,
  395. [in] DWORD cbBuf,
  396. [out] LPDWORD pcbNeeded
  397. );
  398. DWORD
  399. RpcDeletePrinterDriver(
  400. [in, string, unique] STRING_HANDLE pName,
  401. [in, string] wchar_t * pEnvironment,
  402. [in, string] wchar_t * pDriverName
  403. );
  404. DWORD
  405. RpcAddPrintProcessor(
  406. [in, string, unique] STRING_HANDLE pName,
  407. [in, string] wchar_t * pEnvironment,
  408. [in, string] wchar_t * pPathName,
  409. [in, string] wchar_t * pPrintProcessorName
  410. );
  411. DWORD
  412. RpcEnumPrintProcessors(
  413. [in, string, unique] STRING_HANDLE pName,
  414. [in, unique, string] wchar_t * pEnvironment,
  415. [in] DWORD Level,
  416. [in, out, unique, size_is(cbBuf)] LPBYTE pPrintProcessorInfo,
  417. [in] DWORD cbBuf,
  418. [out] LPDWORD pcbNeeded,
  419. [out] LPDWORD pcReturned
  420. );
  421. DWORD
  422. RpcGetPrintProcessorDirectory(
  423. [in, string, unique] STRING_HANDLE pName,
  424. [in, unique, string] wchar_t * pEnvironment,
  425. [in] DWORD Level,
  426. [in, out, unique, size_is(cbBuf)] LPBYTE pPrintProcessorDirectory,
  427. [in] DWORD cbBuf,
  428. [out] LPDWORD pcbNeeded
  429. );
  430. DWORD
  431. RpcStartDocPrinter(
  432. [in] PRINTER_HANDLE hPrinter,
  433. [in] PDOC_INFO_CONTAINER pDocInfoContainer,
  434. [out] LPDWORD pJobId
  435. );
  436. DWORD
  437. RpcStartPagePrinter(
  438. [in] PRINTER_HANDLE hPrinter
  439. );
  440. DWORD
  441. RpcWritePrinter(
  442. [in] PRINTER_HANDLE hPrinter,
  443. [in, size_is(cbBuf)] LPBYTE pBuf,
  444. [in] DWORD cbBuf,
  445. [out] LPDWORD pcWritten
  446. );
  447. DWORD
  448. RpcEndPagePrinter(
  449. [in] PRINTER_HANDLE hPrinter
  450. );
  451. DWORD
  452. RpcAbortPrinter(
  453. [in] PRINTER_HANDLE hPrinter
  454. );
  455. DWORD
  456. RpcReadPrinter(
  457. [in] PRINTER_HANDLE hPrinter,
  458. [out, size_is(cbBuf)] LPBYTE pBuf,
  459. [in] DWORD cbBuf,
  460. [out] LPDWORD pcNoBytesRead
  461. );
  462. DWORD
  463. RpcEndDocPrinter(
  464. [in] PRINTER_HANDLE hPrinter
  465. );
  466. DWORD
  467. RpcAddJob(
  468. [in] PRINTER_HANDLE hPrinter,
  469. [in] DWORD Level,
  470. [in, out, unique, size_is(cbBuf)] LPBYTE pAddJob,
  471. [in] DWORD cbBuf,
  472. [out] LPDWORD pcbNeeded
  473. );
  474. DWORD
  475. RpcScheduleJob(
  476. [in] PRINTER_HANDLE hPrinter,
  477. [in] DWORD JobId
  478. );
  479. DWORD
  480. RpcGetPrinterData(
  481. [in] PRINTER_HANDLE hPrinter,
  482. [in, string] wchar_t * pValueName,
  483. [out] LPDWORD pType,
  484. [out, size_is(nSize)] LPBYTE pData,
  485. [in] DWORD nSize,
  486. [out] LPDWORD pcbNeeded
  487. );
  488. DWORD
  489. RpcSetPrinterData(
  490. [in] PRINTER_HANDLE hPrinter,
  491. [in, string] wchar_t * pValueName,
  492. [in] DWORD Type,
  493. [in, size_is(cbData)] LPBYTE pData,
  494. [in] DWORD cbData
  495. );
  496. DWORD
  497. RpcWaitForPrinterChange(
  498. [in] PRINTER_HANDLE hPrinter,
  499. [in] DWORD Flags,
  500. [out] LPDWORD pFlags
  501. );
  502. DWORD
  503. RpcClosePrinter(
  504. [in, out] PRINTER_HANDLE *phPrinter
  505. );
  506. DWORD
  507. RpcAddForm(
  508. [in] PRINTER_HANDLE hPrinter,
  509. [in] PFORM_CONTAINER pFormInfoContainer
  510. );
  511. DWORD
  512. RpcDeleteForm(
  513. [in] PRINTER_HANDLE hPrinter,
  514. [in, string] wchar_t * pFormName
  515. );
  516. DWORD
  517. RpcGetForm(
  518. [in] PRINTER_HANDLE hPrinter,
  519. [in, string] wchar_t * pFormName,
  520. [in] DWORD Level,
  521. [in, out, unique, size_is(cbBuf)] LPBYTE pForm,
  522. [in] DWORD cbBuf,
  523. [out] LPDWORD pcbNeeded
  524. );
  525. DWORD
  526. RpcSetForm(
  527. [in] PRINTER_HANDLE hPrinter,
  528. [in, string] wchar_t * pFormName,
  529. [in] PFORM_CONTAINER pFormInfoContainer
  530. );
  531. DWORD
  532. RpcEnumForms(
  533. [in] PRINTER_HANDLE hPrinter,
  534. [in] DWORD Level,
  535. [in, out, unique, size_is(cbBuf)] LPBYTE pForm,
  536. [in] DWORD cbBuf,
  537. [out] LPDWORD pcbNeeded,
  538. [out] LPDWORD pcReturned
  539. );
  540. DWORD
  541. RpcEnumPorts(
  542. [in, string, unique] STRING_HANDLE pName,
  543. [in] DWORD Level,
  544. [in, out, unique, size_is(cbBuf)] LPBYTE pPort,
  545. [in] DWORD cbBuf,
  546. [out] LPDWORD pcbNeeded,
  547. [out] LPDWORD pcReturned
  548. );
  549. DWORD
  550. RpcEnumMonitors(
  551. [in, string, unique] STRING_HANDLE pName,
  552. [in] DWORD Level,
  553. [in, out, unique, size_is(cbBuf)] LPBYTE pMonitor,
  554. [in] DWORD cbBuf,
  555. [out] LPDWORD pcbNeeded,
  556. [out] LPDWORD pcReturned
  557. );
  558. DWORD
  559. RpcAddPort(
  560. [in, string, unique] STRING_HANDLE pName,
  561. [in] ULONG_PTR hWnd,
  562. [in, string] wchar_t * pMonitorName
  563. );
  564. DWORD
  565. RpcConfigurePort(
  566. [in, string, unique] STRING_HANDLE pName,
  567. [in] ULONG_PTR hWnd,
  568. [in, string] wchar_t * pPortName
  569. );
  570. DWORD
  571. RpcDeletePort(
  572. [in, string, unique] STRING_HANDLE pName,
  573. [in] ULONG_PTR hWnd,
  574. [in, string] wchar_t * pPortName
  575. );
  576. DWORD
  577. RpcCreatePrinterIC(
  578. [in] PRINTER_HANDLE hPrinter,
  579. [out] GDI_HANDLE *pHandle,
  580. [in] LPDEVMODE_CONTAINER pDevModeContainer
  581. );
  582. DWORD
  583. RpcPlayGdiScriptOnPrinterIC(
  584. [in] GDI_HANDLE hPrinterIC,
  585. [in, size_is(cIn)] LPBYTE pIn,
  586. [in] DWORD cIn,
  587. [out, size_is(cOut)] LPBYTE pOut,
  588. [in] DWORD cOut,
  589. [in] DWORD ul
  590. );
  591. DWORD
  592. RpcDeletePrinterIC(
  593. [in, out] GDI_HANDLE *phPrinterIC
  594. );
  595. DWORD
  596. RpcAddPrinterConnection(
  597. [in, string] STRING_HANDLE pName
  598. );
  599. DWORD
  600. RpcDeletePrinterConnection(
  601. [in, string] STRING_HANDLE pName
  602. );
  603. DWORD
  604. RpcPrinterMessageBox(
  605. [in] PRINTER_HANDLE hPrinter,
  606. [in] DWORD Error,
  607. [in] ULONG_PTR hWnd,
  608. [in, string, unique] wchar_t *pText,
  609. [in, string, unique] wchar_t *pCaption,
  610. [in] DWORD dwType
  611. );
  612. DWORD
  613. RpcAddMonitor(
  614. [in, string, unique] STRING_HANDLE Name,
  615. [in] PMONITOR_CONTAINER pMonitorContainer
  616. );
  617. DWORD
  618. RpcDeleteMonitor(
  619. [in, string, unique] STRING_HANDLE Name,
  620. [in, unique, string] wchar_t * pEnvironment,
  621. [in, string] wchar_t *pMonitorName
  622. );
  623. DWORD
  624. RpcDeletePrintProcessor(
  625. [in, string, unique] STRING_HANDLE Name,
  626. [in, unique, string] wchar_t * pEnvironment,
  627. [in, string] wchar_t *pPrintProcessorName
  628. );
  629. DWORD
  630. RpcAddPrintProvidor(
  631. [in, string, unique] STRING_HANDLE Name,
  632. [in] PPROVIDOR_CONTAINER pProvidorContainer
  633. );
  634. DWORD
  635. RpcDeletePrintProvidor(
  636. [in, string, unique] STRING_HANDLE Name,
  637. [in, unique, string] wchar_t * pEnvironment,
  638. [in, string] wchar_t *pPrintProvidorName
  639. );
  640. DWORD
  641. RpcEnumPrintProcessorDatatypes(
  642. [in, string, unique] STRING_HANDLE pName,
  643. [in, unique, string] wchar_t * pPrintProcessorName,
  644. [in] DWORD Level,
  645. [in, out, unique, size_is(cbBuf)] LPBYTE pDatatypes,
  646. [in] DWORD cbBuf,
  647. [out] LPDWORD pcbNeeded,
  648. [out] LPDWORD pcReturned
  649. );
  650. DWORD
  651. RpcResetPrinter(
  652. [in] PRINTER_HANDLE hPrinter,
  653. [in, string, unique] wchar_t * pDatatype,
  654. [in] LPDEVMODE_CONTAINER pDevMode
  655. );
  656. //
  657. // Everything below is new to the interface (new for daytona).
  658. //
  659. DWORD
  660. RpcGetPrinterDriver2(
  661. [in] PRINTER_HANDLE hPrinter,
  662. [in, unique, string] wchar_t * pEnvironment,
  663. [in] DWORD Level,
  664. [in, out, unique, size_is(cbBuf)] LPBYTE pDriver,
  665. [in] DWORD cbBuf,
  666. [out] LPDWORD pcbNeeded,
  667. [in] DWORD dwClientMajorVersion,
  668. [in] DWORD dwClientMinorVersion,
  669. [out] LPDWORD pdwServerMaxVersion,
  670. [out] LPDWORD pdwServerMinVersion
  671. );
  672. DWORD
  673. RpcClientFindFirstPrinterChangeNotification(
  674. [in] PRINTER_HANDLE hPrinter,
  675. [in] DWORD fdwFlags,
  676. [in] DWORD fdwOptions,
  677. [in] DWORD dwPID,
  678. [in, unique] PRPC_V2_NOTIFY_OPTIONS pOptions,
  679. [out] LPDWORD pdwEvent
  680. );
  681. DWORD
  682. RpcFindNextPrinterChangeNotification(
  683. [in] PRINTER_HANDLE hPrinter,
  684. [in] DWORD fdwFlags,
  685. [out] LPDWORD pdwChange,
  686. [in, unique] PRPC_V2_NOTIFY_OPTIONS pOptions,
  687. [out] PRPC_V2_NOTIFY_INFO* ppInfo
  688. );
  689. DWORD
  690. RpcFindClosePrinterChangeNotification(
  691. [in] PRINTER_HANDLE hPrinter
  692. );
  693. //
  694. // This func will never be used (only be beta2 daytona)
  695. //
  696. DWORD
  697. RpcRouterFindFirstPrinterChangeNotificationOld(
  698. [in] PRINTER_HANDLE hPrinter,
  699. [in] DWORD fdwFlags,
  700. [in] DWORD fdwOptions,
  701. [in, string, unique] wchar_t * pszLocalMachine,
  702. [in] DWORD dwPrinterLocal
  703. );
  704. //
  705. // The following calls:
  706. //
  707. // RpcReplyPrinterOpenChangeNotification
  708. // RpcReplyPrinterChangeNotification
  709. // RpcReplyPrinterCloseChangeNotification
  710. //
  711. // Originate from the printserver's spooler and go the the client
  712. // machine for notifications.
  713. //
  714. DWORD
  715. RpcReplyOpenPrinter(
  716. [in, string] STRING_HANDLE pMachine,
  717. [out] PRINTER_HANDLE *phPrinterNotify,
  718. [in] DWORD dwPrinterRemote,
  719. [in] DWORD dwType,
  720. [in] DWORD cbBuffer,
  721. [in, unique, size_is(cbBuffer)] LPBYTE pBuffer
  722. );
  723. DWORD
  724. RpcRouterReplyPrinter(
  725. [in] PRINTER_HANDLE hNotify,
  726. [in] DWORD fdwFlags,
  727. [in] DWORD cbBuffer,
  728. [in, unique, size_is(cbBuffer)] LPBYTE pBuffer
  729. );
  730. DWORD
  731. RpcReplyClosePrinter(
  732. [in, out] PRINTER_HANDLE *phNotify
  733. );
  734. DWORD
  735. RpcAddPortEx(
  736. [in, string, unique] STRING_HANDLE pName,
  737. [in] LPPORT_CONTAINER pPortContainer,
  738. [in] LPPORT_VAR_CONTAINER pPortVarContainer,
  739. [in, string] wchar_t * pMonitorName
  740. );
  741. DWORD
  742. RpcRemoteFindFirstPrinterChangeNotification(
  743. [in] PRINTER_HANDLE hPrinter,
  744. [in] DWORD fdwFlags,
  745. [in] DWORD fdwOptions,
  746. [in, string, unique] wchar_t * pszLocalMachine,
  747. [in] DWORD dwPrinterLocal,
  748. [in] DWORD cbBuffer,
  749. [in, out, unique, size_is(cbBuffer)] LPBYTE pBuffer
  750. );
  751. DWORD
  752. RpcSpoolerInit(
  753. [in] STRING_HANDLE pName
  754. );
  755. DWORD
  756. RpcResetPrinterEx(
  757. [in] PRINTER_HANDLE hPrinter,
  758. [in, string, unique] wchar_t * pDatatype,
  759. [in] LPDEVMODE_CONTAINER pDevMode,
  760. [in] DWORD dwFlags
  761. );
  762. //
  763. // The following calls are new for PPC release NT 3.51
  764. //
  765. DWORD
  766. RpcRemoteFindFirstPrinterChangeNotificationEx(
  767. [in] PRINTER_HANDLE hPrinter,
  768. [in] DWORD fdwFlags,
  769. [in] DWORD fdwOptions,
  770. [in, string, unique] wchar_t * pszLocalMachine,
  771. [in] DWORD dwPrinterLocal,
  772. [in, unique] PRPC_V2_NOTIFY_OPTIONS pOptions
  773. );
  774. DWORD
  775. RpcRouterReplyPrinterEx(
  776. [in] PRINTER_HANDLE hNotify,
  777. [in] DWORD dwColor,
  778. [in] DWORD fdwFlags,
  779. [out] PDWORD pdwResult,
  780. [in] DWORD dwReplyType,
  781. [in, switch_is(dwReplyType)] RPC_V2_UREPLY_PRINTER Reply
  782. );
  783. DWORD
  784. RpcRouterRefreshPrinterChangeNotification(
  785. [in] PRINTER_HANDLE hPrinter,
  786. [in] DWORD dwColor,
  787. [in, unique] PRPC_V2_NOTIFY_OPTIONS pOptions,
  788. [out] PRPC_V2_NOTIFY_INFO* ppInfo
  789. );
  790. // Testing Apis for PPC
  791. DWORD
  792. RpcSetAllocFailCount(
  793. [in] PRINTER_HANDLE hPrinter,
  794. [in] DWORD dwFailCount,
  795. [out] LPDWORD lpdwAllocCount,
  796. [out] LPDWORD lpdwFreeCount,
  797. [out] LPDWORD lpdwFailCountHit
  798. );
  799. // New for SUR beta NT 4.0
  800. DWORD
  801. RpcOpenPrinterEx(
  802. [in, string, unique] STRING_HANDLE pPrinterName,
  803. [out] PRINTER_HANDLE *pHandle,
  804. [in, string, unique] wchar_t * pDatatype,
  805. [in] LPDEVMODE_CONTAINER pDevMode,
  806. [in] DWORD AccessRequired,
  807. [in] PSPLCLIENT_CONTAINER pClientInfo
  808. );
  809. DWORD
  810. RpcAddPrinterEx(
  811. [in, string, unique] STRING_HANDLE pName,
  812. [in] PPRINTER_CONTAINER pPrinterContainer,
  813. [in] PDEVMODE_CONTAINER pDevModeContainer,
  814. [in] PSECURITY_CONTAINER pSecurityContainer,
  815. [in] PSPLCLIENT_CONTAINER pClientInfo,
  816. [out] PRINTER_HANDLE *pHandle
  817. );
  818. DWORD
  819. RpcSetPort(
  820. [in, string, unique] STRING_HANDLE pName,
  821. [in, string, unique] wchar_t * pPortName,
  822. [in] LPPORT_CONTAINER pPortContainer
  823. );
  824. DWORD
  825. RpcEnumPrinterData(
  826. [in] PRINTER_HANDLE hPrinter,
  827. [in] DWORD dwIndex,
  828. [out, size_is(cbValueName/sizeof(wchar_t))] wchar_t * pValueName,
  829. [in] DWORD cbValueName,
  830. [out] LPDWORD pcbValueName,
  831. [out] LPDWORD pType,
  832. [out, size_is(cbData)] LPBYTE pData,
  833. [in] DWORD cbData,
  834. [out] LPDWORD pcbData
  835. );
  836. DWORD
  837. RpcDeletePrinterData(
  838. [in] PRINTER_HANDLE hPrinter,
  839. [in, string] wchar_t * pValueName
  840. );
  841. //
  842. // New for clustering
  843. //
  844. DWORD
  845. RpcClusterSplOpen(
  846. [in, string, unique] STRING_HANDLE pServerName,
  847. [in, string, unique] wchar_t * pResource,
  848. [out] PRINTER_HANDLE *pHandle,
  849. [in, string, unique] wchar_t * pName,
  850. [in, string, unique] wchar_t * pAddress
  851. );
  852. DWORD
  853. RpcClusterSplClose(
  854. [in, out] PRINTER_HANDLE * phPrinter
  855. );
  856. DWORD
  857. RpcClusterSplIsAlive(
  858. [in] PRINTER_HANDLE hPrinter
  859. );
  860. DWORD
  861. RpcSetPrinterDataEx(
  862. [in] PRINTER_HANDLE hPrinter,
  863. [in, string] const wchar_t * pKeyName,
  864. [in, string] const wchar_t * pValueName,
  865. [in] DWORD Type,
  866. [in, size_is(cbData)] LPBYTE pData,
  867. [in] DWORD cbData
  868. );
  869. DWORD
  870. RpcGetPrinterDataEx(
  871. [in] PRINTER_HANDLE hPrinter,
  872. [in, string] const wchar_t * pKeyName,
  873. [in, string] const wchar_t * pValueName,
  874. [out] LPDWORD pType,
  875. [out, size_is(nSize)] LPBYTE pData,
  876. [in] DWORD nSize,
  877. [out] LPDWORD pcbNeeded
  878. );
  879. DWORD
  880. RpcEnumPrinterDataEx(
  881. [in] PRINTER_HANDLE hPrinter,
  882. [in, string] const wchar_t * pKeyName,
  883. [out, size_is(cbEnumValues)] LPBYTE pEnumValues,
  884. [in] DWORD cbEnumValues,
  885. [out] LPDWORD pcbEnumValues,
  886. [out] LPDWORD pnEnumValues
  887. );
  888. DWORD
  889. RpcEnumPrinterKey(
  890. [in] PRINTER_HANDLE hPrinter,
  891. [in, string] const wchar_t * pKeyName,
  892. [out, size_is(cbSubkey/sizeof(wchar_t))] wchar_t * pSubkey,
  893. [in] DWORD cbSubkey,
  894. [out] LPDWORD pcbSubkey
  895. );
  896. DWORD
  897. RpcDeletePrinterDataEx(
  898. [in] PRINTER_HANDLE hPrinter,
  899. [in, string] const wchar_t * pKeyName,
  900. [in, string] const wchar_t * pValueName
  901. );
  902. DWORD
  903. RpcDeletePrinterKey(
  904. [in] PRINTER_HANDLE hPrinter,
  905. [in, string] const wchar_t * pKeyName
  906. );
  907. DWORD
  908. RpcSeekPrinter(
  909. [in] PRINTER_HANDLE hPrinter,
  910. [in] LARGE_INTEGER liDistanceToMove,
  911. [out] PLARGE_INTEGER pliNewPointer,
  912. [in] DWORD dwMoveMethod,
  913. [in] BOOL bWrite
  914. );
  915. DWORD
  916. RpcDeletePrinterDriverEx(
  917. [in, string, unique] STRING_HANDLE pName,
  918. [in, string] wchar_t *pEnvironment,
  919. [in, string] wchar_t *pDriverName,
  920. [in] DWORD dwDeleteFlag,
  921. [in] DWORD dwVersionNum
  922. );
  923. DWORD
  924. RpcAddPerMachineConnection(
  925. [in, string, unique] STRING_HANDLE pServer,
  926. [in, string] const wchar_t * pPrinterName,
  927. [in, string] const wchar_t * pPrintServer,
  928. [in, string] const wchar_t * pProvider
  929. );
  930. DWORD
  931. RpcDeletePerMachineConnection(
  932. [in, string, unique] STRING_HANDLE pServer,
  933. [in, string] const wchar_t * pPrinterName
  934. );
  935. DWORD
  936. RpcEnumPerMachineConnections(
  937. [in, string, unique] STRING_HANDLE pServer,
  938. [in, out, unique, size_is(cbBuf)] LPBYTE pPrinterEnum,
  939. [in] DWORD cbBuf,
  940. [out] LPDWORD pcbNeeded,
  941. [out] LPDWORD pcReturned
  942. );
  943. DWORD
  944. RpcXcvData(
  945. [in] PRINTER_HANDLE hXcv,
  946. [in, string] const wchar_t *pszDataName,
  947. [in, size_is(cbInputData)] PBYTE pInputData,
  948. [in] DWORD cbInputData,
  949. [out, size_is(cbOutputData)] PBYTE pOutputData,
  950. [in] DWORD cbOutputData,
  951. [out] PDWORD pcbOutputNeeded,
  952. [in, out] PDWORD pdwStatus
  953. );
  954. DWORD
  955. RpcAddPrinterDriverEx(
  956. [in, string, unique] STRING_HANDLE pName,
  957. [in] PDRIVER_CONTAINER pDriverContainer,
  958. [in] DWORD dwFileCopyFlags
  959. );
  960. // Private Spooler interface to return the server side hPrinter to the client
  961. DWORD
  962. RpcSplOpenPrinter(
  963. [in, string, unique] STRING_HANDLE pPrinterName,
  964. [out] PRINTER_HANDLE *pHandle,
  965. [in, string, unique] wchar_t * pDatatype,
  966. [in] LPDEVMODE_CONTAINER pDevMode,
  967. [in] DWORD AccessRequired,
  968. [in, out] PSPLCLIENT_CONTAINER pSplClientContainer
  969. );
  970. DWORD
  971. RpcGetSpoolFileInfo(
  972. [in] PRINTER_HANDLE hPrinter,
  973. [in] DWORD dwAppProcessId,
  974. [in] DWORD dwLevel,
  975. [out, size_is(cbBuf)] LPBYTE pSpoolFileInfo,
  976. [in] DWORD cbBuf,
  977. [out] LPDWORD pcbNeeded
  978. );
  979. DWORD
  980. RpcCommitSpoolData(
  981. [in] PRINTER_HANDLE hPrinter,
  982. [in] DWORD dwAppProcessId,
  983. [in] DWORD cbCommit,
  984. [in] DWORD dwLevel,
  985. [out, size_is(cbBuf)] LPBYTE pSpoolFileInfo,
  986. [in] DWORD cbBuf,
  987. [out] LPDWORD pcbNeeded
  988. );
  989. DWORD
  990. RpcGetSpoolFileInfo2(
  991. [in] PRINTER_HANDLE hPrinter,
  992. [in] DWORD dwAppProcessId,
  993. [in] DWORD dwLevel,
  994. [in,out] LPFILE_INFO_CONTAINER pSplFileInfoContainer
  995. );
  996. DWORD
  997. RpcCommitSpoolData2(
  998. [in] PRINTER_HANDLE hPrinter,
  999. [in] DWORD dwAppProcessId,
  1000. [in] DWORD cbCommit,
  1001. [in] DWORD dwLevel,
  1002. [in,out] LPFILE_INFO_CONTAINER pSplFileInfoContainer
  1003. );
  1004. DWORD
  1005. RpcCloseSpoolFileHandle(
  1006. [in] PRINTER_HANDLE hPrinter
  1007. );
  1008. DWORD
  1009. RpcFlushPrinter(
  1010. [in] PRINTER_HANDLE hPrinter,
  1011. [in, size_is(cbBuf)] LPBYTE pBuf,
  1012. [in] DWORD cbBuf,
  1013. [out] LPDWORD pcWritten,
  1014. [in] DWORD cSleep
  1015. );
  1016. typedef struct _RPC_BIDI_DATA
  1017. {
  1018. DWORD dwBidiType;
  1019. [switch_is(dwBidiType)] union {
  1020. [case(BIDI_NULL, BIDI_BOOL)]
  1021. BOOL bData;
  1022. [case(BIDI_INT)]
  1023. LONG iData;
  1024. [case(BIDI_STRING, BIDI_TEXT, BIDI_ENUM)]
  1025. [string,unique] wchar_t* sData;
  1026. [case(BIDI_FLOAT)]
  1027. FLOAT fData;
  1028. [case(BIDI_BLOB)]
  1029. RPC_BINARY_CONTAINER biData;
  1030. } u;
  1031. } RPC_BIDI_DATA, *PRPC_BIDI_DATA, *LPRPC_BIDI_DATA;
  1032. typedef struct _RPC_BIDI_REQUEST_DATA {
  1033. DWORD dwReqNumber;
  1034. [string,unique] wchar_t* pSchema;
  1035. RPC_BIDI_DATA data;
  1036. } RPC_BIDI_REQUEST_DATA, *PRPC_BIDI_REQUEST_DATA, *LPRPC_BIDI_REQUEST_DATA;
  1037. typedef struct _RPC_BIDI_REQUEST_CONTAINER {
  1038. DWORD Version;
  1039. DWORD Flags;
  1040. DWORD Count;
  1041. [size_is(Count), unique] RPC_BIDI_REQUEST_DATA aData[];
  1042. } RPC_BIDI_REQUEST_CONTAINER, *PRPC_BIDI_REQUEST_CONTAINER, *LPRPC_BIDI_REQUEST_CONTAINER;
  1043. typedef struct _RPC_BIDI_RESPONSE_DATA {
  1044. DWORD dwResult;
  1045. DWORD dwReqNumber;
  1046. [string,unique] wchar_t* pSchema;
  1047. RPC_BIDI_DATA data;
  1048. } RPC_BIDI_RESPONSE_DATA, *PRPC_BIDI_RESPONSE_DATA, *LPRPC_BIDI_RESPONSE_DATA;
  1049. typedef struct _RPC_BIDI_RESPONSE_CONTAINER {
  1050. DWORD Version;
  1051. DWORD Flags;
  1052. DWORD Count;
  1053. [size_is(Count), unique] RPC_BIDI_RESPONSE_DATA aData[];
  1054. } RPC_BIDI_RESPONSE_CONTAINER, *PRPC_BIDI_RESPONSE_CONTAINER, *LPRPC_BIDI_RESPONSE_CONTAINER;
  1055. DWORD RpcSendRecvBidiData (
  1056. [in] PRINTER_HANDLE hPrinter,
  1057. [in,string,unique] const wchar_t *pAction,
  1058. [in] PRPC_BIDI_REQUEST_CONTAINER pReqData,
  1059. [out] PRPC_BIDI_RESPONSE_CONTAINER *ppRespData);
  1060. DWORD RpcAddDriverCatalog(
  1061. [in] PRINTER_HANDLE hPrinter,
  1062. [in] PDRIVER_INFCAT_CONTAINER pDriverInfCatContainer,
  1063. [in] DWORD dwCatalogCopyFlags);
  1064. }