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.

847 lines
14 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. yspool.h
  5. Abstract:
  6. This module provides all the public exported APIs relating to Printer
  7. and Job management for the Print Providor Routing layer
  8. Author:
  9. AdinaTru 02/25/2000
  10. [Notes:]
  11. optional-notes
  12. Revision History:
  13. --*/
  14. #include "mtype.h"
  15. DWORD
  16. YEnumPrinters(
  17. DWORD Flags,
  18. LPWSTR Name,
  19. DWORD Level,
  20. LPBYTE pPrinterEnum,
  21. DWORD cbBuf,
  22. LPDWORD pcbNeeded,
  23. LPDWORD pcReturned,
  24. CALL_ROUTE Route
  25. );
  26. DWORD
  27. YOpenPrinter(
  28. LPWSTR pPrinterName,
  29. HANDLE *phPrinter,
  30. LPWSTR pDatatype,
  31. LPDEVMODE_CONTAINER pDevModeContainer,
  32. DWORD AccessRequired,
  33. CALL_ROUTE Route
  34. );
  35. DWORD
  36. YOpenPrinterEx(
  37. LPWSTR pPrinterName,
  38. HANDLE *phPrinter,
  39. LPWSTR pDatatype,
  40. LPDEVMODE_CONTAINER pDevModeContainer,
  41. DWORD AccessRequired,
  42. CALL_ROUTE Route,
  43. PSPLCLIENT_CONTAINER pSplClientContainer
  44. );
  45. DWORD
  46. YResetPrinter(
  47. HANDLE hPrinter,
  48. LPWSTR pDatatype,
  49. LPDEVMODE_CONTAINER pDevModeContainer,
  50. CALL_ROUTE Route
  51. );
  52. DWORD
  53. YSetJob(
  54. HANDLE hPrinter,
  55. DWORD JobId,
  56. JOB_CONTAINER *pJobContainer,
  57. DWORD Command,
  58. CALL_ROUTE Route
  59. );
  60. DWORD
  61. YGetJob(
  62. HANDLE hPrinter,
  63. DWORD JobId,
  64. DWORD Level,
  65. LPBYTE pJob,
  66. DWORD cbBuf,
  67. LPDWORD pcbNeeded,
  68. CALL_ROUTE Route
  69. );
  70. DWORD
  71. YEnumJobs(
  72. HANDLE hPrinter,
  73. DWORD FirstJob,
  74. DWORD NoJobs,
  75. DWORD Level,
  76. LPBYTE pJob,
  77. DWORD cbBuf,
  78. LPDWORD pcbNeeded,
  79. LPDWORD pcReturned,
  80. CALL_ROUTE Route
  81. );
  82. DWORD
  83. YAddPrinter(
  84. LPWSTR pName,
  85. PPRINTER_CONTAINER pPrinterContainer,
  86. PDEVMODE_CONTAINER pDevModeContainer,
  87. PSECURITY_CONTAINER pSecurityContainer,
  88. HANDLE *phPrinter,
  89. CALL_ROUTE Route
  90. );
  91. DWORD
  92. YAddPrinterEx(
  93. LPWSTR pName,
  94. PPRINTER_CONTAINER pPrinterContainer,
  95. PDEVMODE_CONTAINER pDevModeContainer,
  96. PSECURITY_CONTAINER pSecurityContainer,
  97. HANDLE *phPrinter,
  98. CALL_ROUTE Route,
  99. PSPLCLIENT_CONTAINER pSplClientContainer
  100. );
  101. DWORD
  102. YDeletePrinter(
  103. HANDLE hPrinter,
  104. CALL_ROUTE Route
  105. );
  106. DWORD
  107. YAddPrinterConnection(
  108. LPWSTR pName,
  109. CALL_ROUTE Route
  110. );
  111. DWORD
  112. YDeletePrinterConnection(
  113. LPWSTR pName,
  114. CALL_ROUTE Route
  115. );
  116. DWORD
  117. YSetPrinter(
  118. HANDLE hPrinter,
  119. PPRINTER_CONTAINER pPrinterContainer,
  120. PDEVMODE_CONTAINER pDevModeContainer,
  121. PSECURITY_CONTAINER pSecurityContainer,
  122. DWORD Command,
  123. CALL_ROUTE Route
  124. );
  125. DWORD
  126. YGetPrinter(
  127. HANDLE hPrinter,
  128. DWORD Level,
  129. LPBYTE pPrinter,
  130. DWORD cbBuf,
  131. LPDWORD pcbNeeded,
  132. CALL_ROUTE Route
  133. );
  134. DWORD
  135. YAddPrinterDriver(
  136. LPWSTR pName,
  137. LPDRIVER_CONTAINER pDriverContainer,
  138. CALL_ROUTE Route
  139. );
  140. DWORD
  141. YAddPrinterDriverEx(
  142. LPWSTR pName,
  143. LPDRIVER_CONTAINER pDriverContainer,
  144. DWORD dwFileCopyFlags,
  145. CALL_ROUTE Route
  146. );
  147. DWORD
  148. YAddDriverCatalog(
  149. HANDLE hPrinter,
  150. DRIVER_INFCAT_CONTAINER *pDriverInfCatContainer,
  151. DWORD dwCatalogCopyFlags,
  152. CALL_ROUTE Route
  153. );
  154. DWORD
  155. YEnumPrinterDrivers(
  156. LPWSTR pName,
  157. LPWSTR pEnvironment,
  158. DWORD Level,
  159. LPBYTE pDrivers,
  160. DWORD cbBuf,
  161. LPDWORD pcbNeeded,
  162. LPDWORD pcReturned,
  163. CALL_ROUTE Route
  164. );
  165. DWORD
  166. YGetPrinterDriver(
  167. HANDLE hPrinter,
  168. LPWSTR pEnvironment,
  169. DWORD Level,
  170. LPBYTE pDriverInfo,
  171. DWORD cbBuf,
  172. LPDWORD pcbNeeded,
  173. CALL_ROUTE Route
  174. );
  175. DWORD
  176. YGetPrinterDriverDirectory(
  177. LPWSTR pName,
  178. LPWSTR pEnvironment,
  179. DWORD Level,
  180. LPBYTE pDriverInfo,
  181. DWORD cbBuf,
  182. LPDWORD pcbNeeded,
  183. CALL_ROUTE Route
  184. );
  185. DWORD
  186. YDeletePrinterDriver(
  187. LPWSTR pName,
  188. LPWSTR pEnvironment,
  189. LPWSTR pDriverName,
  190. CALL_ROUTE Route
  191. );
  192. DWORD
  193. YDeletePrinterDriverEx(
  194. LPWSTR pName,
  195. LPWSTR pEnvironment,
  196. LPWSTR pDriverName,
  197. DWORD dwDeleteFlag,
  198. DWORD dwVersionNum,
  199. CALL_ROUTE Route
  200. );
  201. DWORD
  202. YAddPerMachineConnection(
  203. LPWSTR pServer,
  204. LPCWSTR pPrinterName,
  205. LPCWSTR pPrintServer,
  206. LPCWSTR pProvider,
  207. CALL_ROUTE Route
  208. );
  209. DWORD
  210. YDeletePerMachineConnection(
  211. LPWSTR pServer,
  212. LPCWSTR pPrinterName,
  213. CALL_ROUTE Route
  214. );
  215. DWORD
  216. YEnumPerMachineConnections(
  217. LPWSTR pServer,
  218. LPBYTE pPrinterEnum,
  219. DWORD cbBuf,
  220. LPDWORD pcbNeeded,
  221. LPDWORD pcReturned,
  222. CALL_ROUTE Route
  223. );
  224. DWORD
  225. YAddPrintProcessor(
  226. LPWSTR pName,
  227. LPWSTR pEnvironment,
  228. LPWSTR pPathName,
  229. LPWSTR pPrintProcessorName,
  230. CALL_ROUTE Route
  231. );
  232. DWORD
  233. YEnumPrintProcessors(
  234. LPWSTR pName,
  235. LPWSTR pEnvironment,
  236. DWORD Level,
  237. LPBYTE pPrintProcessors,
  238. DWORD cbBuf,
  239. LPDWORD pcbNeeded,
  240. LPDWORD pcReturned,
  241. CALL_ROUTE Route
  242. );
  243. DWORD
  244. YGetPrintProcessorDirectory(
  245. LPWSTR pName,
  246. LPWSTR pEnvironment,
  247. DWORD Level,
  248. LPBYTE pPrintProcessorInfo,
  249. DWORD cbBuf,
  250. LPDWORD pcbNeeded,
  251. CALL_ROUTE Route
  252. );
  253. DWORD
  254. YEnumPrintProcessorDatatypes(
  255. LPWSTR pName,
  256. LPWSTR pPrintProcessorName,
  257. DWORD Level,
  258. LPBYTE pDatatypes,
  259. DWORD cbBuf,
  260. LPDWORD pcbNeeded,
  261. LPDWORD pcReturned,
  262. CALL_ROUTE Route
  263. );
  264. DWORD
  265. YStartDocPrinter(
  266. HANDLE hPrinter,
  267. LPDOC_INFO_CONTAINER pDocInfoContainer,
  268. LPDWORD pJobId,
  269. CALL_ROUTE Route
  270. );
  271. DWORD
  272. YStartPagePrinter(
  273. HANDLE hPrinter,
  274. CALL_ROUTE Route
  275. );
  276. DWORD
  277. YWritePrinter(
  278. HANDLE hPrinter,
  279. LPBYTE pBuf,
  280. DWORD cbBuf,
  281. LPDWORD pcWritten,
  282. CALL_ROUTE Route
  283. );
  284. DWORD
  285. YSeekPrinter(
  286. HANDLE hPrinter,
  287. LARGE_INTEGER liDistanceToMove,
  288. PLARGE_INTEGER pliNewPointer,
  289. DWORD dwMoveMethod,
  290. BOOL bWritePrinter,
  291. CALL_ROUTE Route
  292. );
  293. DWORD
  294. YFlushPrinter(
  295. HANDLE hPrinter,
  296. LPBYTE pBuf,
  297. DWORD cbBuf,
  298. LPDWORD pcWritten,
  299. DWORD cSleep,
  300. CALL_ROUTE Route
  301. );
  302. DWORD
  303. YEndPagePrinter(
  304. HANDLE hPrinter,
  305. CALL_ROUTE Route
  306. );
  307. DWORD
  308. YAbortPrinter(
  309. HANDLE hPrinter,
  310. CALL_ROUTE Route
  311. );
  312. DWORD
  313. YReadPrinter(
  314. HANDLE hPrinter,
  315. LPBYTE pBuf,
  316. DWORD cbBuf,
  317. LPDWORD pRead,
  318. CALL_ROUTE Route
  319. );
  320. DWORD
  321. YSplReadPrinter(
  322. HANDLE hPrinter,
  323. LPBYTE *pBuf,
  324. DWORD cbBuf,
  325. CALL_ROUTE Route
  326. );
  327. DWORD
  328. YEndDocPrinter(
  329. HANDLE hPrinter,
  330. CALL_ROUTE Route
  331. );
  332. DWORD
  333. YAddJob(
  334. HANDLE hPrinter,
  335. DWORD Level,
  336. LPBYTE pAddJob,
  337. DWORD cbBuf,
  338. LPDWORD pcbNeeded,
  339. CALL_ROUTE Route
  340. );
  341. DWORD
  342. YScheduleJob(
  343. HANDLE hPrinter,
  344. DWORD JobId,
  345. CALL_ROUTE Route
  346. );
  347. DWORD
  348. YGetPrinterData(
  349. HANDLE hPrinter,
  350. LPTSTR pValueName,
  351. LPDWORD pType,
  352. LPBYTE pData,
  353. DWORD nSize,
  354. LPDWORD pcbNeeded,
  355. CALL_ROUTE Route
  356. );
  357. DWORD
  358. YGetPrinterDataEx(
  359. HANDLE hPrinter,
  360. LPCTSTR pKeyName,
  361. LPCTSTR pValueName,
  362. LPDWORD pType,
  363. LPBYTE pData,
  364. DWORD nSize,
  365. LPDWORD pcbNeeded,
  366. CALL_ROUTE Route
  367. );
  368. DWORD
  369. YEnumPrinterData(
  370. HANDLE hPrinter,
  371. DWORD dwIndex, // index of value to query
  372. LPWSTR pValueName, // address of buffer for value string
  373. DWORD cbValueName, // size of buffer for value string
  374. LPDWORD pcbValueName, // address for size of value buffer
  375. LPDWORD pType, // address of buffer for type code
  376. LPBYTE pData, // address of buffer for value data
  377. DWORD cbData, // size of buffer for value data
  378. LPDWORD pcbData, // address for size of data buffer
  379. CALL_ROUTE Route
  380. );
  381. DWORD
  382. YEnumPrinterDataEx(
  383. HANDLE hPrinter,
  384. LPCWSTR pKeyName,
  385. LPBYTE pEnumValues,
  386. DWORD cbEnumValues,
  387. LPDWORD pcbEnumValues,
  388. LPDWORD pnEnumValues,
  389. CALL_ROUTE Route
  390. );
  391. DWORD
  392. YEnumPrinterKey(
  393. HANDLE hPrinter,
  394. LPCWSTR pKeyName,
  395. LPWSTR pSubkey, // address of buffer for value string
  396. DWORD cbSubkey, // size of buffer for value string
  397. LPDWORD pcbSubkey, // address for size of value buffer
  398. CALL_ROUTE Route
  399. );
  400. DWORD
  401. YDeletePrinterData(
  402. HANDLE hPrinter,
  403. LPWSTR pValueName,
  404. CALL_ROUTE Route
  405. );
  406. DWORD
  407. YDeletePrinterDataEx(
  408. HANDLE hPrinter,
  409. LPCWSTR pKeyName,
  410. LPCWSTR pValueName,
  411. CALL_ROUTE Route
  412. );
  413. DWORD
  414. YDeletePrinterKey(
  415. HANDLE hPrinter,
  416. LPCWSTR pKeyName,
  417. CALL_ROUTE Route
  418. );
  419. DWORD
  420. YSetPrinterData(
  421. HANDLE hPrinter,
  422. LPTSTR pValueName,
  423. DWORD Type,
  424. LPBYTE pData,
  425. DWORD cbData,
  426. CALL_ROUTE Route
  427. );
  428. DWORD
  429. YSetPrinterDataEx(
  430. HANDLE hPrinter,
  431. LPCTSTR pKeyName,
  432. LPCTSTR pValueName,
  433. DWORD Type,
  434. LPBYTE pData,
  435. DWORD cbData,
  436. CALL_ROUTE Route
  437. );
  438. DWORD
  439. YWaitForPrinterChange(
  440. HANDLE hPrinter,
  441. DWORD Flags,
  442. LPDWORD pFlags,
  443. CALL_ROUTE Route
  444. );
  445. DWORD
  446. YClosePrinter(
  447. LPHANDLE phPrinter,
  448. CALL_ROUTE Route
  449. );
  450. VOID
  451. PRINTER_HANDLE_rundown(
  452. HANDLE hPrinter
  453. );
  454. DWORD
  455. YAddForm(
  456. HANDLE hPrinter,
  457. PFORM_CONTAINER pFormInfoContainer,
  458. CALL_ROUTE Route
  459. );
  460. DWORD
  461. YDeleteForm(
  462. HANDLE hPrinter,
  463. LPWSTR pFormName,
  464. CALL_ROUTE Route
  465. );
  466. DWORD
  467. YGetForm(
  468. PRINTER_HANDLE hPrinter,
  469. LPWSTR pFormName,
  470. DWORD Level,
  471. LPBYTE pForm,
  472. DWORD cbBuf,
  473. LPDWORD pcbNeeded,
  474. CALL_ROUTE Route
  475. );
  476. DWORD
  477. YSetForm(
  478. PRINTER_HANDLE hPrinter,
  479. LPWSTR pFormName,
  480. PFORM_CONTAINER pFormInfoContainer,
  481. CALL_ROUTE Route
  482. );
  483. DWORD
  484. YEnumForms(
  485. PRINTER_HANDLE hPrinter,
  486. DWORD Level,
  487. LPBYTE pForm,
  488. DWORD cbBuf,
  489. LPDWORD pcbNeeded,
  490. LPDWORD pcReturned,
  491. CALL_ROUTE Route
  492. );
  493. DWORD
  494. YEnumPorts(
  495. LPWSTR pName,
  496. DWORD Level,
  497. LPBYTE pPort,
  498. DWORD cbBuf,
  499. LPDWORD pcbNeeded,
  500. LPDWORD pcReturned,
  501. CALL_ROUTE Route
  502. );
  503. DWORD
  504. YEnumMonitors(
  505. LPWSTR pName,
  506. DWORD Level,
  507. LPBYTE pMonitor,
  508. DWORD cbBuf,
  509. LPDWORD pcbNeeded,
  510. LPDWORD pcReturned,
  511. CALL_ROUTE Route
  512. );
  513. DWORD
  514. YAddPort(
  515. LPWSTR pName,
  516. HWND hWnd,
  517. LPWSTR pMonitorName,
  518. CALL_ROUTE Route
  519. );
  520. DWORD
  521. YConfigurePort(
  522. LPWSTR pName,
  523. HWND hWnd,
  524. LPWSTR pPortName,
  525. CALL_ROUTE Route
  526. );
  527. DWORD
  528. YDeletePort(
  529. LPWSTR pName,
  530. HWND hWnd,
  531. LPWSTR
  532. pPortName,
  533. CALL_ROUTE Route
  534. );
  535. DWORD
  536. YXcvData(
  537. HANDLE hXcv,
  538. PCWSTR pszDataName,
  539. PBYTE pInputData,
  540. DWORD cbInputData,
  541. PBYTE pOutputData,
  542. DWORD cbOutputData,
  543. PDWORD pcbOutputNeeded,
  544. PDWORD pdwStatus,
  545. CALL_ROUTE Route
  546. );
  547. DWORD
  548. YCreatePrinterIC(
  549. HANDLE hPrinter,
  550. HANDLE *pHandle,
  551. LPDEVMODE_CONTAINER pDevModeContainer,
  552. CALL_ROUTE Route
  553. );
  554. DWORD
  555. YPlayGdiScriptOnPrinterIC(
  556. GDI_HANDLE hPrinterIC,
  557. LPBYTE pIn,
  558. DWORD cIn,
  559. LPBYTE pOut,
  560. DWORD cOut,
  561. DWORD ul,
  562. CALL_ROUTE Route
  563. );
  564. DWORD
  565. YDeletePrinterIC(
  566. GDI_HANDLE *phPrinterIC,
  567. BOOL bImpersonate,
  568. CALL_ROUTE Route
  569. );
  570. DWORD
  571. YPrinterMessageBox(
  572. PRINTER_HANDLE hPrinter,
  573. DWORD Error,
  574. HWND hWnd,
  575. LPWSTR pText,
  576. LPWSTR pCaption,
  577. DWORD dwType,
  578. CALL_ROUTE Route
  579. );
  580. DWORD
  581. YAddMonitor(
  582. LPWSTR pName,
  583. PMONITOR_CONTAINER pMonitorContainer,
  584. CALL_ROUTE Route
  585. );
  586. DWORD
  587. YDeleteMonitor(
  588. LPWSTR pName,
  589. LPWSTR pEnvironment,
  590. LPWSTR pMonitorName,
  591. CALL_ROUTE Route
  592. );
  593. DWORD
  594. YDeletePrintProcessor(
  595. LPWSTR pName,
  596. LPWSTR pEnvironment,
  597. LPWSTR pPrintProcessorName,
  598. CALL_ROUTE Route
  599. );
  600. DWORD
  601. YAddPrintProvidor(
  602. LPWSTR pName,
  603. PPROVIDOR_CONTAINER pProvidorContainer,
  604. CALL_ROUTE Route
  605. );
  606. DWORD
  607. YDeletePrintProvidor(
  608. LPWSTR pName,
  609. LPWSTR pEnvironment,
  610. LPWSTR pPrintProvidorName,
  611. CALL_ROUTE Route
  612. );
  613. DWORD
  614. YGetPrinterDriver2(
  615. HANDLE hPrinter,
  616. LPWSTR pEnvironment,
  617. DWORD Level,
  618. LPBYTE pDriverInfo,
  619. DWORD cbBuf,
  620. LPDWORD pcbNeeded,
  621. DWORD dwClientMajorVersion,
  622. DWORD dwClientMinorVersion,
  623. PDWORD pdwServerMajorVersion,
  624. PDWORD pdwServerMinorVersion,
  625. CALL_ROUTE Route
  626. );
  627. DWORD
  628. YAddPortEx(
  629. LPWSTR pName,
  630. LPPORT_CONTAINER pPortContainer,
  631. LPPORT_VAR_CONTAINER pPortVarContainer,
  632. LPWSTR pMonitorName,
  633. CALL_ROUTE Route
  634. );
  635. DWORD
  636. YSpoolerInit(
  637. LPWSTR pName,
  638. CALL_ROUTE Route
  639. );
  640. DWORD
  641. YResetPrinterEx(
  642. HANDLE hPrinter,
  643. LPWSTR pDatatype,
  644. LPDEVMODE_CONTAINER pDevModeContainer,
  645. DWORD dwFlag,
  646. CALL_ROUTE Route
  647. );
  648. DWORD
  649. YSetAllocFailCount(
  650. HANDLE hPrinter,
  651. DWORD dwFailCount,
  652. LPDWORD lpdwAllocCount,
  653. LPDWORD lpdwFreeCount,
  654. LPDWORD lpdwFailCountHit,
  655. CALL_ROUTE Route
  656. );
  657. DWORD
  658. YSetPort(
  659. LPWSTR pName,
  660. LPWSTR pPortName,
  661. LPPORT_CONTAINER pPortContainer,
  662. CALL_ROUTE Route
  663. );
  664. DWORD
  665. YClusterSplOpen(
  666. LPCTSTR pszServer,
  667. LPCTSTR pszResource,
  668. PHANDLE phSpooler,
  669. LPCTSTR pszName,
  670. LPCTSTR pszAddress,
  671. CALL_ROUTE Route
  672. );
  673. DWORD
  674. YClusterSplClose(
  675. PHANDLE phSpooler,
  676. CALL_ROUTE Route
  677. );
  678. DWORD
  679. YClusterSplIsAlive(
  680. HANDLE hSpooler,
  681. CALL_ROUTE Route
  682. );
  683. VOID
  684. YDriverUnloadComplete(
  685. LPWSTR pDriverFile
  686. );
  687. DWORD
  688. YGetSpoolFileInfo(
  689. HANDLE hPrinter,
  690. DWORD dwAppProcessId,
  691. DWORD dwLevel,
  692. LPBYTE pSpoolFileInfo,
  693. DWORD cbBuf,
  694. LPDWORD pcbNeeded,
  695. CALL_ROUTE Route
  696. );
  697. DWORD
  698. YGetSpoolFileInfo2(
  699. HANDLE hPrinter,
  700. DWORD dwAppProcessId,
  701. DWORD dwLevel,
  702. LPFILE_INFO_CONTAINER pSplFileInfoContainer,
  703. CALL_ROUTE Route
  704. );
  705. DWORD
  706. YCommitSpoolData(
  707. HANDLE hPrinter,
  708. DWORD dwAppProcessId,
  709. DWORD cbCommit,
  710. DWORD dwLevel,
  711. LPBYTE pSpoolFileInfo,
  712. DWORD cbBuf,
  713. LPDWORD pcbNeeded,
  714. CALL_ROUTE Route
  715. );
  716. DWORD
  717. YCommitSpoolData2(
  718. HANDLE hPrinter,
  719. DWORD dwAppProcessId,
  720. DWORD cbCommit,
  721. DWORD dwLevel,
  722. LPFILE_INFO_CONTAINER pSplFileInfoContainer,
  723. CALL_ROUTE Route
  724. );
  725. DWORD
  726. YCloseSpoolFileHandle(
  727. HANDLE hPrinter,
  728. CALL_ROUTE Route
  729. );
  730. DWORD
  731. YSendRecvBidiData(
  732. IN HANDLE hPrinter,
  733. IN LPCWSTR pAction,
  734. IN PBIDI_REQUEST_CONTAINER pReqData,
  735. OUT PBIDI_RESPONSE_CONTAINER* ppRespData,
  736. CALL_ROUTE Route
  737. );