Leaked source code of windows server 2003
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.

1386 lines
31 KiB

  1. /*++
  2. Copyright (c) 1990 Microsoft Corporation
  3. Module Name:
  4. rpcspool.c
  5. Abstract:
  6. Spooler API entry points for RPC Clients.
  7. Author:
  8. Steve Wilson (NT) (swilson) 1-Jun-1995
  9. [Notes:]
  10. optional-notes
  11. Revision History:
  12. --*/
  13. #include "precomp.h"
  14. #include "server.h"
  15. #include "client.h"
  16. #include "yspool.h"
  17. VOID
  18. PrinterHandleRundown(
  19. HANDLE hPrinter);
  20. BOOL
  21. GetPrinterDriverExW(
  22. HANDLE hPrinter,
  23. LPWSTR pEnvironment,
  24. DWORD Level,
  25. LPBYTE pDriverInfo,
  26. DWORD cbBuf,
  27. LPDWORD pcbNeeded,
  28. DWORD dwClientMajorVersion,
  29. DWORD dwClientMinorVersion,
  30. PDWORD pdwServerMajorVersion,
  31. PDWORD pdwServerMinorVersion);
  32. BOOL
  33. SpoolerInit(
  34. VOID);
  35. DWORD
  36. RpcEnumPrinters(
  37. DWORD Flags,
  38. LPWSTR Name,
  39. DWORD Level,
  40. LPBYTE pPrinterEnum,
  41. DWORD cbBuf,
  42. LPDWORD pcbNeeded,
  43. LPDWORD pcReturned
  44. )
  45. {
  46. return YEnumPrinters( Flags,
  47. Name,
  48. Level,
  49. pPrinterEnum,
  50. cbBuf,
  51. pcbNeeded,
  52. pcReturned,
  53. RPC_CALL);
  54. }
  55. DWORD
  56. RpcOpenPrinter(
  57. LPWSTR pPrinterName,
  58. HANDLE *phPrinter,
  59. LPWSTR pDatatype,
  60. LPDEVMODE_CONTAINER pDevModeContainer,
  61. DWORD AccessRequired
  62. )
  63. {
  64. return YOpenPrinter(pPrinterName,
  65. phPrinter,
  66. pDatatype,
  67. pDevModeContainer,
  68. AccessRequired,
  69. RPC_CALL);
  70. }
  71. DWORD
  72. RpcOpenPrinterEx(
  73. LPWSTR pPrinterName,
  74. HANDLE *phPrinter,
  75. LPWSTR pDatatype,
  76. LPDEVMODE_CONTAINER pDevModeContainer,
  77. DWORD AccessRequired,
  78. LPSPLCLIENT_CONTAINER pSplClientContainer
  79. )
  80. {
  81. return YOpenPrinterEx(pPrinterName,
  82. phPrinter,
  83. pDatatype,
  84. pDevModeContainer,
  85. AccessRequired,
  86. RPC_CALL,
  87. pSplClientContainer);
  88. }
  89. //
  90. // RpcSplOpenPrinter differs from RpcOpenPrinterEx in the SPLCLIENT_CONTAINER buffer type
  91. // It is defined as [in, out] in RpcSplOpenPrinter and just [in] in the latter
  92. //
  93. DWORD
  94. RpcSplOpenPrinter(
  95. LPWSTR pPrinterName,
  96. HANDLE *phPrinter,
  97. LPWSTR pDatatype,
  98. LPDEVMODE_CONTAINER pDevModeContainer,
  99. DWORD AccessRequired,
  100. LPSPLCLIENT_CONTAINER pSplClientContainer
  101. )
  102. {
  103. return YOpenPrinterEx(pPrinterName,
  104. phPrinter,
  105. pDatatype,
  106. pDevModeContainer,
  107. AccessRequired,
  108. RPC_CALL,
  109. pSplClientContainer);
  110. }
  111. DWORD
  112. RpcResetPrinter(
  113. HANDLE hPrinter,
  114. LPWSTR pDatatype,
  115. LPDEVMODE_CONTAINER pDevModeContainer
  116. )
  117. {
  118. return YResetPrinter( hPrinter,
  119. pDatatype,
  120. pDevModeContainer,
  121. RPC_CALL);
  122. }
  123. DWORD
  124. RpcSetJob(
  125. HANDLE hPrinter,
  126. DWORD JobId,
  127. JOB_CONTAINER *pJobContainer,
  128. DWORD Command
  129. )
  130. {
  131. return YSetJob( hPrinter,
  132. JobId,
  133. pJobContainer,
  134. Command,
  135. RPC_CALL);
  136. }
  137. DWORD
  138. RpcGetJob(
  139. HANDLE hPrinter,
  140. DWORD JobId,
  141. DWORD Level,
  142. LPBYTE pJob,
  143. DWORD cbBuf,
  144. LPDWORD pcbNeeded
  145. )
  146. {
  147. return YGetJob( hPrinter,
  148. JobId,
  149. Level,
  150. pJob,
  151. cbBuf,
  152. pcbNeeded,
  153. RPC_CALL);
  154. }
  155. DWORD
  156. RpcEnumJobs(
  157. HANDLE hPrinter,
  158. DWORD FirstJob,
  159. DWORD NoJobs,
  160. DWORD Level,
  161. LPBYTE pJob,
  162. DWORD cbBuf,
  163. LPDWORD pcbNeeded,
  164. LPDWORD pcReturned
  165. )
  166. {
  167. return YEnumJobs( hPrinter,
  168. FirstJob,
  169. NoJobs,
  170. Level,
  171. pJob,
  172. cbBuf,
  173. pcbNeeded,
  174. pcReturned,
  175. RPC_CALL);
  176. }
  177. DWORD
  178. RpcAddPrinter(
  179. LPWSTR pName,
  180. PPRINTER_CONTAINER pPrinterContainer,
  181. PDEVMODE_CONTAINER pDevModeContainer,
  182. PSECURITY_CONTAINER pSecurityContainer,
  183. HANDLE *phPrinter
  184. )
  185. {
  186. return YAddPrinter( pName,
  187. pPrinterContainer,
  188. pDevModeContainer,
  189. pSecurityContainer,
  190. phPrinter,
  191. RPC_CALL);
  192. }
  193. DWORD
  194. RpcAddPrinterEx(
  195. LPWSTR pName,
  196. PPRINTER_CONTAINER pPrinterContainer,
  197. PDEVMODE_CONTAINER pDevModeContainer,
  198. PSECURITY_CONTAINER pSecurityContainer,
  199. PSPLCLIENT_CONTAINER pClientContainer,
  200. HANDLE *phPrinter
  201. )
  202. {
  203. return YAddPrinterEx(pName,
  204. pPrinterContainer,
  205. pDevModeContainer,
  206. pSecurityContainer,
  207. phPrinter,
  208. RPC_CALL,
  209. pClientContainer);
  210. }
  211. DWORD
  212. RpcDeletePrinter(
  213. HANDLE hPrinter
  214. )
  215. {
  216. return YDeletePrinter(hPrinter, RPC_CALL);
  217. }
  218. DWORD
  219. RpcAddPrinterConnection(
  220. LPWSTR pName
  221. )
  222. {
  223. return YAddPrinterConnection(pName, RPC_CALL);
  224. }
  225. DWORD
  226. RpcDeletePrinterConnection(
  227. LPWSTR pName
  228. )
  229. {
  230. return YDeletePrinterConnection(pName, RPC_CALL);
  231. }
  232. DWORD
  233. RpcSetPrinter(
  234. HANDLE hPrinter,
  235. PPRINTER_CONTAINER pPrinterContainer,
  236. PDEVMODE_CONTAINER pDevModeContainer,
  237. PSECURITY_CONTAINER pSecurityContainer,
  238. DWORD Command
  239. )
  240. {
  241. return YSetPrinter(
  242. hPrinter,
  243. pPrinterContainer,
  244. pDevModeContainer,
  245. pSecurityContainer,
  246. Command,
  247. RPC_CALL);
  248. }
  249. DWORD
  250. RpcGetPrinter(
  251. HANDLE hPrinter,
  252. DWORD Level,
  253. LPBYTE pPrinter,
  254. DWORD cbBuf,
  255. LPDWORD pcbNeeded
  256. )
  257. {
  258. return YGetPrinter( hPrinter,
  259. Level,
  260. pPrinter,
  261. cbBuf,
  262. pcbNeeded,
  263. RPC_CALL);
  264. }
  265. DWORD
  266. RpcAddPrinterDriver(
  267. LPWSTR pName,
  268. LPDRIVER_CONTAINER pDriverContainer
  269. )
  270. {
  271. return YAddPrinterDriver( pName,
  272. pDriverContainer,
  273. RPC_CALL);
  274. }
  275. DWORD
  276. RpcAddPrinterDriverEx(
  277. LPWSTR pName,
  278. LPDRIVER_CONTAINER pDriverContainer,
  279. DWORD dwFileCopyFlags
  280. )
  281. {
  282. return YAddPrinterDriverEx( pName,
  283. pDriverContainer,
  284. dwFileCopyFlags,
  285. RPC_CALL);
  286. }
  287. DWORD
  288. RpcAddDriverCatalog(
  289. HANDLE hPrinter,
  290. DRIVER_INFCAT_CONTAINER *pDriverInfCatContainer,
  291. DWORD dwCatalogCopyFlags
  292. )
  293. {
  294. return YAddDriverCatalog(hPrinter,
  295. pDriverInfCatContainer,
  296. dwCatalogCopyFlags,
  297. RPC_CALL);
  298. }
  299. DWORD
  300. RpcEnumPrinterDrivers(
  301. LPWSTR pName,
  302. LPWSTR pEnvironment,
  303. DWORD Level,
  304. LPBYTE pDrivers,
  305. DWORD cbBuf,
  306. LPDWORD pcbNeeded,
  307. LPDWORD pcReturned
  308. )
  309. {
  310. return YEnumPrinterDrivers( pName,
  311. pEnvironment,
  312. Level,
  313. pDrivers,
  314. cbBuf,
  315. pcbNeeded,
  316. pcReturned,
  317. RPC_CALL);
  318. }
  319. DWORD
  320. RpcGetPrinterDriver(
  321. HANDLE hPrinter,
  322. LPWSTR pEnvironment,
  323. DWORD Level,
  324. LPBYTE pDriverInfo,
  325. DWORD cbBuf,
  326. LPDWORD pcbNeeded
  327. )
  328. {
  329. return YGetPrinterDriver( hPrinter,
  330. pEnvironment,
  331. Level,
  332. pDriverInfo,
  333. cbBuf,
  334. pcbNeeded,
  335. RPC_CALL);
  336. }
  337. DWORD
  338. RpcGetPrinterDriverDirectory(
  339. LPWSTR pName,
  340. LPWSTR pEnvironment,
  341. DWORD Level,
  342. LPBYTE pDriverInfo,
  343. DWORD cbBuf,
  344. LPDWORD pcbNeeded
  345. )
  346. {
  347. return YGetPrinterDriverDirectory( pName,
  348. pEnvironment,
  349. Level,
  350. pDriverInfo,
  351. cbBuf,
  352. pcbNeeded,
  353. RPC_CALL);
  354. }
  355. DWORD
  356. RpcDeletePrinterDriver(
  357. LPWSTR pName,
  358. LPWSTR pEnvironment,
  359. LPWSTR pDriverName
  360. )
  361. {
  362. return YDeletePrinterDriver(pName,
  363. pEnvironment,
  364. pDriverName,
  365. RPC_CALL);
  366. }
  367. DWORD
  368. RpcDeletePrinterDriverEx(
  369. LPWSTR pName,
  370. LPWSTR pEnvironment,
  371. LPWSTR pDriverName,
  372. DWORD dwDeleteFlag,
  373. DWORD dwVersionNum
  374. )
  375. {
  376. return YDeletePrinterDriverEx(pName,
  377. pEnvironment,
  378. pDriverName,
  379. dwDeleteFlag,
  380. dwVersionNum,
  381. RPC_CALL);
  382. }
  383. DWORD
  384. RpcAddPerMachineConnection(
  385. LPWSTR pServer,
  386. LPCWSTR pPrinterName,
  387. LPCWSTR pPrintServer,
  388. LPCWSTR pProvider
  389. )
  390. {
  391. return YAddPerMachineConnection(pServer,
  392. pPrinterName,
  393. pPrintServer,
  394. pProvider,
  395. RPC_CALL);
  396. }
  397. DWORD
  398. RpcDeletePerMachineConnection(
  399. LPWSTR pServer,
  400. LPCWSTR pPrinterName
  401. )
  402. {
  403. return YDeletePerMachineConnection(pServer,
  404. pPrinterName,
  405. RPC_CALL);
  406. }
  407. DWORD
  408. RpcEnumPerMachineConnections(
  409. LPWSTR pServer,
  410. LPBYTE pPrinterEnum,
  411. DWORD cbBuf,
  412. LPDWORD pcbNeeded,
  413. LPDWORD pcReturned
  414. )
  415. {
  416. return YEnumPerMachineConnections(pServer,
  417. pPrinterEnum,
  418. cbBuf,
  419. pcbNeeded,
  420. pcReturned,
  421. RPC_CALL);
  422. }
  423. DWORD
  424. RpcAddPrintProcessor(
  425. LPWSTR pName,
  426. LPWSTR pEnvironment,
  427. LPWSTR pPathName,
  428. LPWSTR pPrintProcessorName
  429. )
  430. {
  431. return YAddPrintProcessor( pName,
  432. pEnvironment,
  433. pPathName,
  434. pPrintProcessorName,
  435. RPC_CALL);
  436. }
  437. DWORD
  438. RpcEnumPrintProcessors(
  439. LPWSTR pName,
  440. LPWSTR pEnvironment,
  441. DWORD Level,
  442. LPBYTE pPrintProcessors,
  443. DWORD cbBuf,
  444. LPDWORD pcbNeeded,
  445. LPDWORD pcReturned
  446. )
  447. {
  448. return YEnumPrintProcessors(pName,
  449. pEnvironment,
  450. Level,
  451. pPrintProcessors,
  452. cbBuf,
  453. pcbNeeded,
  454. pcReturned,
  455. RPC_CALL);
  456. }
  457. DWORD
  458. RpcGetPrintProcessorDirectory(
  459. LPWSTR pName,
  460. LPWSTR pEnvironment,
  461. DWORD Level,
  462. LPBYTE pPrintProcessorInfo,
  463. DWORD cbBuf,
  464. LPDWORD pcbNeeded
  465. )
  466. {
  467. return YGetPrintProcessorDirectory( pName,
  468. pEnvironment,
  469. Level,
  470. pPrintProcessorInfo,
  471. cbBuf,
  472. pcbNeeded,
  473. RPC_CALL);
  474. }
  475. DWORD
  476. RpcEnumPrintProcessorDatatypes(
  477. LPWSTR pName,
  478. LPWSTR pPrintProcessorName,
  479. DWORD Level,
  480. LPBYTE pDatatypes,
  481. DWORD cbBuf,
  482. LPDWORD pcbNeeded,
  483. LPDWORD pcReturned
  484. )
  485. {
  486. return YEnumPrintProcessorDatatypes(pName,
  487. pPrintProcessorName,
  488. Level,
  489. pDatatypes,
  490. cbBuf,
  491. pcbNeeded,
  492. pcReturned,
  493. RPC_CALL);
  494. }
  495. DWORD
  496. RpcStartDocPrinter(
  497. HANDLE hPrinter,
  498. LPDOC_INFO_CONTAINER pDocInfoContainer,
  499. LPDWORD pJobId
  500. )
  501. {
  502. return YStartDocPrinter(hPrinter,
  503. pDocInfoContainer,
  504. pJobId,
  505. RPC_CALL);
  506. }
  507. DWORD
  508. RpcStartPagePrinter(
  509. HANDLE hPrinter
  510. )
  511. {
  512. return YStartPagePrinter(hPrinter, RPC_CALL);
  513. }
  514. DWORD
  515. RpcWritePrinter(
  516. HANDLE hPrinter,
  517. LPBYTE pBuf,
  518. DWORD cbBuf,
  519. LPDWORD pcWritten
  520. )
  521. {
  522. return YWritePrinter( hPrinter,
  523. pBuf,
  524. cbBuf,
  525. pcWritten,
  526. RPC_CALL);
  527. }
  528. DWORD
  529. RpcSeekPrinter(
  530. HANDLE hPrinter,
  531. LARGE_INTEGER liDistanceToMove,
  532. PLARGE_INTEGER pliNewPointer,
  533. DWORD dwMoveMethod,
  534. BOOL bWritePrinter
  535. )
  536. {
  537. return YSeekPrinter( hPrinter,
  538. liDistanceToMove,
  539. pliNewPointer,
  540. dwMoveMethod,
  541. bWritePrinter,
  542. RPC_CALL );
  543. }
  544. DWORD
  545. RpcEndPagePrinter(
  546. HANDLE hPrinter
  547. )
  548. {
  549. return YEndPagePrinter(hPrinter, RPC_CALL);
  550. }
  551. DWORD
  552. RpcAbortPrinter(
  553. HANDLE hPrinter
  554. )
  555. {
  556. return YAbortPrinter(hPrinter, RPC_CALL);
  557. }
  558. DWORD
  559. RpcReadPrinter(
  560. HANDLE hPrinter,
  561. LPBYTE pBuf,
  562. DWORD cbBuf,
  563. LPDWORD pRead
  564. )
  565. {
  566. return YReadPrinter(hPrinter,
  567. pBuf,
  568. cbBuf,
  569. pRead,
  570. RPC_CALL);
  571. }
  572. DWORD
  573. RpcEndDocPrinter(
  574. HANDLE hPrinter
  575. )
  576. {
  577. return YEndDocPrinter(hPrinter, RPC_CALL);
  578. }
  579. DWORD
  580. RpcAddJob(
  581. HANDLE hPrinter,
  582. DWORD Level,
  583. LPBYTE pAddJob,
  584. DWORD cbBuf,
  585. LPDWORD pcbNeeded
  586. )
  587. {
  588. return YAddJob( hPrinter,
  589. Level,
  590. pAddJob,
  591. cbBuf,
  592. pcbNeeded,
  593. RPC_CALL);
  594. }
  595. DWORD
  596. RpcScheduleJob(
  597. HANDLE hPrinter,
  598. DWORD JobId
  599. )
  600. {
  601. return YScheduleJob(hPrinter,
  602. JobId,
  603. RPC_CALL);
  604. }
  605. DWORD
  606. RpcGetPrinterData(
  607. HANDLE hPrinter,
  608. LPTSTR pValueName,
  609. LPDWORD pType,
  610. LPBYTE pData,
  611. DWORD nSize,
  612. LPDWORD pcbNeeded
  613. )
  614. {
  615. return YGetPrinterData(hPrinter,
  616. pValueName,
  617. pType,
  618. pData,
  619. nSize,
  620. pcbNeeded,
  621. RPC_CALL);
  622. }
  623. DWORD
  624. RpcGetPrinterDataEx(
  625. HANDLE hPrinter,
  626. LPCTSTR pKeyName,
  627. LPCTSTR pValueName,
  628. LPDWORD pType,
  629. LPBYTE pData,
  630. DWORD nSize,
  631. LPDWORD pcbNeeded
  632. )
  633. {
  634. return YGetPrinterDataEx(hPrinter,
  635. pKeyName,
  636. pValueName,
  637. pType,
  638. pData,
  639. nSize,
  640. pcbNeeded,
  641. RPC_CALL);
  642. }
  643. DWORD
  644. RpcEnumPrinterData(
  645. HANDLE hPrinter,
  646. DWORD dwIndex, // index of value to query
  647. LPWSTR pValueName, // address of buffer for value string
  648. DWORD cbValueName, // size of buffer for value string
  649. LPDWORD pcbValueName, // address for size of value buffer
  650. LPDWORD pType, // address of buffer for type code
  651. LPBYTE pData, // address of buffer for value data
  652. DWORD cbData, // size of buffer for value data
  653. LPDWORD pcbData // address for size of data buffer
  654. )
  655. {
  656. return YEnumPrinterData(hPrinter,
  657. dwIndex,
  658. pValueName,
  659. cbValueName,
  660. pcbValueName,
  661. pType,
  662. pData,
  663. cbData,
  664. pcbData,
  665. RPC_CALL);
  666. }
  667. DWORD
  668. RpcEnumPrinterDataEx(
  669. HANDLE hPrinter,
  670. LPCWSTR pKeyName, // address of key name
  671. LPBYTE pEnumValues,
  672. DWORD cbEnumValues,
  673. LPDWORD pcbEnumValues,
  674. LPDWORD pnEnumValues
  675. )
  676. {
  677. return YEnumPrinterDataEx( hPrinter,
  678. pKeyName,
  679. pEnumValues,
  680. cbEnumValues,
  681. pcbEnumValues,
  682. pnEnumValues,
  683. RPC_CALL);
  684. }
  685. DWORD
  686. RpcEnumPrinterKey(
  687. HANDLE hPrinter,
  688. LPCWSTR pKeyName, // address of key name
  689. LPWSTR pSubkey, // address of buffer for value string
  690. DWORD cbSubkey, // size of buffer for value string
  691. LPDWORD pcbSubkey // address for size of value buffer
  692. )
  693. {
  694. return YEnumPrinterKey( hPrinter,
  695. pKeyName,
  696. pSubkey,
  697. cbSubkey,
  698. pcbSubkey,
  699. RPC_CALL);
  700. }
  701. DWORD
  702. RpcDeletePrinterData(
  703. HANDLE hPrinter,
  704. LPWSTR pValueName
  705. )
  706. {
  707. return YDeletePrinterData(hPrinter, pValueName, RPC_CALL);
  708. }
  709. DWORD
  710. RpcDeletePrinterDataEx(
  711. HANDLE hPrinter,
  712. LPCWSTR pKeyName,
  713. LPCWSTR pValueName
  714. )
  715. {
  716. return YDeletePrinterDataEx(hPrinter, pKeyName, pValueName, RPC_CALL);
  717. }
  718. DWORD
  719. RpcDeletePrinterKey(
  720. HANDLE hPrinter,
  721. LPCWSTR pKeyName
  722. )
  723. {
  724. return YDeletePrinterKey(hPrinter, pKeyName, RPC_CALL);
  725. }
  726. DWORD
  727. RpcSetPrinterData(
  728. HANDLE hPrinter,
  729. LPTSTR pValueName,
  730. DWORD Type,
  731. LPBYTE pData,
  732. DWORD cbData
  733. )
  734. {
  735. return YSetPrinterData( hPrinter,
  736. pValueName,
  737. Type,
  738. pData,
  739. cbData,
  740. RPC_CALL);
  741. }
  742. DWORD
  743. RpcSetPrinterDataEx(
  744. HANDLE hPrinter,
  745. LPCTSTR pKeyName,
  746. LPCTSTR pValueName,
  747. DWORD Type,
  748. LPBYTE pData,
  749. DWORD cbData
  750. )
  751. {
  752. return YSetPrinterDataEx( hPrinter,
  753. pKeyName,
  754. pValueName,
  755. Type,
  756. pData,
  757. cbData,
  758. RPC_CALL);
  759. }
  760. DWORD
  761. RpcWaitForPrinterChange(
  762. HANDLE hPrinter,
  763. DWORD Flags,
  764. LPDWORD pFlags
  765. )
  766. {
  767. return YWaitForPrinterChange( hPrinter,
  768. Flags,
  769. pFlags,
  770. RPC_CALL);
  771. }
  772. DWORD
  773. RpcClosePrinter(
  774. LPHANDLE phPrinter
  775. )
  776. {
  777. return YClosePrinter(phPrinter, RPC_CALL);
  778. }
  779. DWORD
  780. RpcAddForm(
  781. HANDLE hPrinter,
  782. PFORM_CONTAINER pFormInfoContainer
  783. )
  784. {
  785. return YAddForm( hPrinter,
  786. pFormInfoContainer,
  787. RPC_CALL);
  788. }
  789. DWORD
  790. RpcDeleteForm(
  791. HANDLE hPrinter,
  792. LPWSTR pFormName
  793. )
  794. {
  795. return YDeleteForm( hPrinter,
  796. pFormName,
  797. RPC_CALL);
  798. }
  799. DWORD
  800. RpcGetForm(
  801. PRINTER_HANDLE hPrinter,
  802. LPWSTR pFormName,
  803. DWORD Level,
  804. LPBYTE pForm,
  805. DWORD cbBuf,
  806. LPDWORD pcbNeeded
  807. )
  808. {
  809. return YGetForm(hPrinter,
  810. pFormName,
  811. Level,
  812. pForm,
  813. cbBuf,
  814. pcbNeeded,
  815. RPC_CALL);
  816. }
  817. DWORD
  818. RpcSetForm(
  819. PRINTER_HANDLE hPrinter,
  820. LPWSTR pFormName,
  821. PFORM_CONTAINER pFormInfoContainer
  822. )
  823. {
  824. return YSetForm(hPrinter,
  825. pFormName,
  826. pFormInfoContainer,
  827. RPC_CALL);
  828. }
  829. DWORD
  830. RpcEnumForms(
  831. PRINTER_HANDLE hPrinter,
  832. DWORD Level,
  833. LPBYTE pForm,
  834. DWORD cbBuf,
  835. LPDWORD pcbNeeded,
  836. LPDWORD pcReturned
  837. )
  838. {
  839. return YEnumForms( hPrinter,
  840. Level,
  841. pForm,
  842. cbBuf,
  843. pcbNeeded,
  844. pcReturned,
  845. RPC_CALL);
  846. }
  847. DWORD
  848. RpcEnumPorts(
  849. LPWSTR pName,
  850. DWORD Level,
  851. LPBYTE pPort,
  852. DWORD cbBuf,
  853. LPDWORD pcbNeeded,
  854. LPDWORD pcReturned
  855. )
  856. {
  857. return YEnumPorts( pName,
  858. Level,
  859. pPort,
  860. cbBuf,
  861. pcbNeeded,
  862. pcReturned,
  863. RPC_CALL);
  864. }
  865. DWORD
  866. RpcEnumMonitors(
  867. LPWSTR pName,
  868. DWORD Level,
  869. LPBYTE pMonitor,
  870. DWORD cbBuf,
  871. LPDWORD pcbNeeded,
  872. LPDWORD pcReturned
  873. )
  874. {
  875. return YEnumMonitors( pName,
  876. Level,
  877. pMonitor,
  878. cbBuf,
  879. pcbNeeded,
  880. pcReturned,
  881. RPC_CALL);
  882. }
  883. DWORD
  884. RpcAddPort(
  885. LPWSTR pName,
  886. ULONG_PTR hWnd,
  887. LPWSTR pMonitorName
  888. )
  889. {
  890. return YAddPort( pName,
  891. (HWND)hWnd,
  892. pMonitorName,
  893. RPC_CALL);
  894. }
  895. DWORD
  896. RpcConfigurePort(
  897. LPWSTR pName,
  898. ULONG_PTR hWnd,
  899. LPWSTR pPortName
  900. )
  901. {
  902. return YConfigurePort( pName,
  903. (HWND)hWnd,
  904. pPortName,
  905. RPC_CALL);
  906. }
  907. DWORD
  908. RpcDeletePort(
  909. LPWSTR pName,
  910. ULONG_PTR hWnd,
  911. LPWSTR pPortName
  912. )
  913. {
  914. return YDeletePort( pName,
  915. (HWND)hWnd,
  916. pPortName,
  917. RPC_CALL);
  918. }
  919. DWORD
  920. RpcXcvData(
  921. HANDLE hXcv,
  922. PCWSTR pszDataName,
  923. PBYTE pInputData,
  924. DWORD cbInputData,
  925. PBYTE pOutputData,
  926. DWORD cbOutputData,
  927. PDWORD pcbOutputNeeded,
  928. PDWORD pdwStatus
  929. )
  930. {
  931. return YXcvData(hXcv,
  932. pszDataName,
  933. pInputData,
  934. cbInputData,
  935. pOutputData,
  936. cbOutputData,
  937. pcbOutputNeeded,
  938. pdwStatus,
  939. RPC_CALL);
  940. }
  941. DWORD
  942. RpcCreatePrinterIC(
  943. HANDLE hPrinter,
  944. HANDLE *pHandle,
  945. LPDEVMODE_CONTAINER pDevModeContainer
  946. )
  947. {
  948. return YCreatePrinterIC(hPrinter,
  949. pHandle,
  950. pDevModeContainer,
  951. RPC_CALL);
  952. }
  953. DWORD
  954. RpcPlayGdiScriptOnPrinterIC(
  955. GDI_HANDLE hPrinterIC,
  956. LPBYTE pIn,
  957. DWORD cIn,
  958. LPBYTE pOut,
  959. DWORD cOut,
  960. DWORD ul
  961. )
  962. {
  963. return YPlayGdiScriptOnPrinterIC( hPrinterIC,
  964. pIn,
  965. cIn,
  966. pOut,
  967. cOut,
  968. ul,
  969. RPC_CALL);
  970. }
  971. DWORD
  972. RpcDeletePrinterIC(
  973. GDI_HANDLE *phPrinterIC
  974. )
  975. {
  976. return YDeletePrinterIC(phPrinterIC, 1, RPC_CALL);
  977. }
  978. VOID
  979. GDI_HANDLE_rundown(
  980. HANDLE hPrinterIC
  981. )
  982. {
  983. YDeletePrinterIC(&hPrinterIC, 0, RPC_CALL);
  984. }
  985. DWORD
  986. RpcPrinterMessageBox(
  987. PRINTER_HANDLE hPrinter,
  988. DWORD Error,
  989. ULONG_PTR hWnd,
  990. LPWSTR pText,
  991. LPWSTR pCaption,
  992. DWORD dwType
  993. )
  994. {
  995. return YPrinterMessageBox(hPrinter, Error, (HWND)hWnd, pText, pCaption, dwType, RPC_CALL);
  996. }
  997. DWORD
  998. RpcAddMonitor(
  999. LPWSTR pName,
  1000. PMONITOR_CONTAINER pMonitorContainer
  1001. )
  1002. {
  1003. return YAddMonitor( pName,
  1004. pMonitorContainer,
  1005. RPC_CALL);
  1006. }
  1007. DWORD
  1008. RpcDeleteMonitor(
  1009. LPWSTR pName,
  1010. LPWSTR pEnvironment,
  1011. LPWSTR pMonitorName
  1012. )
  1013. {
  1014. return YDeleteMonitor( pName,
  1015. pEnvironment,
  1016. pMonitorName,
  1017. RPC_CALL);
  1018. }
  1019. DWORD
  1020. RpcDeletePrintProcessor(
  1021. LPWSTR pName,
  1022. LPWSTR pEnvironment,
  1023. LPWSTR pPrintProcessorName
  1024. )
  1025. {
  1026. return YDeletePrintProcessor(pName,
  1027. pEnvironment,
  1028. pPrintProcessorName,
  1029. RPC_CALL);
  1030. }
  1031. DWORD
  1032. RpcAddPrintProvidor(
  1033. LPWSTR pName,
  1034. PPROVIDOR_CONTAINER pProvidorContainer
  1035. )
  1036. {
  1037. return YAddPrintProvidor(pName, pProvidorContainer, RPC_CALL);
  1038. }
  1039. DWORD
  1040. RpcDeletePrintProvidor(
  1041. LPWSTR pName,
  1042. LPWSTR pEnvironment,
  1043. LPWSTR pPrintProvidorName
  1044. )
  1045. {
  1046. return YDeletePrintProvidor(pName,
  1047. pEnvironment,
  1048. pPrintProvidorName,
  1049. RPC_CALL);
  1050. }
  1051. DWORD
  1052. RpcGetPrinterDriver2(
  1053. HANDLE hPrinter,
  1054. LPWSTR pEnvironment,
  1055. DWORD Level,
  1056. LPBYTE pDriverInfo,
  1057. DWORD cbBuf,
  1058. LPDWORD pcbNeeded,
  1059. DWORD dwClientMajorVersion,
  1060. DWORD dwClientMinorVersion,
  1061. PDWORD pdwServerMajorVersion,
  1062. PDWORD pdwServerMinorVersion
  1063. )
  1064. {
  1065. return YGetPrinterDriver2(hPrinter,
  1066. pEnvironment,
  1067. Level,
  1068. pDriverInfo,
  1069. cbBuf,
  1070. pcbNeeded,
  1071. dwClientMajorVersion,
  1072. dwClientMinorVersion,
  1073. pdwServerMajorVersion,
  1074. pdwServerMinorVersion,
  1075. RPC_CALL);
  1076. }
  1077. DWORD
  1078. RpcAddPortEx(
  1079. LPWSTR pName,
  1080. LPPORT_CONTAINER pPortContainer,
  1081. LPPORT_VAR_CONTAINER pPortVarContainer,
  1082. LPWSTR pMonitorName
  1083. )
  1084. {
  1085. return YAddPortEx( pName,
  1086. pPortContainer,
  1087. pPortVarContainer,
  1088. pMonitorName,
  1089. RPC_CALL);
  1090. }
  1091. DWORD
  1092. RpcSpoolerInit(
  1093. LPWSTR pName
  1094. )
  1095. {
  1096. return YSpoolerInit(pName, RPC_CALL);
  1097. }
  1098. DWORD
  1099. RpcResetPrinterEx(
  1100. HANDLE hPrinter,
  1101. LPWSTR pDatatype,
  1102. LPDEVMODE_CONTAINER pDevModeContainer,
  1103. DWORD dwFlag
  1104. )
  1105. {
  1106. return YResetPrinterEx( hPrinter,
  1107. pDatatype,
  1108. pDevModeContainer,
  1109. dwFlag,
  1110. RPC_CALL);
  1111. }
  1112. DWORD
  1113. RpcSetAllocFailCount(
  1114. HANDLE hPrinter,
  1115. DWORD dwFailCount,
  1116. LPDWORD lpdwAllocCount,
  1117. LPDWORD lpdwFreeCount,
  1118. LPDWORD lpdwFailCountHit
  1119. )
  1120. {
  1121. return YSetAllocFailCount( hPrinter,
  1122. dwFailCount,
  1123. lpdwAllocCount,
  1124. lpdwFreeCount,
  1125. lpdwFailCountHit,
  1126. RPC_CALL);
  1127. }
  1128. DWORD
  1129. RpcSetPort(
  1130. LPWSTR pName,
  1131. LPWSTR pPortName,
  1132. LPPORT_CONTAINER pPortContainer
  1133. )
  1134. {
  1135. return YSetPort(pName,
  1136. pPortName,
  1137. pPortContainer,
  1138. RPC_CALL);
  1139. }
  1140. DWORD
  1141. RpcClusterSplOpen(
  1142. LPWSTR pszServer,
  1143. LPWSTR pszResource,
  1144. PHANDLE phSpooler,
  1145. LPWSTR pszName,
  1146. LPWSTR pszAddress
  1147. )
  1148. {
  1149. return YClusterSplOpen( pszServer,
  1150. pszResource,
  1151. phSpooler,
  1152. pszName,
  1153. pszAddress,
  1154. RPC_CALL );
  1155. }
  1156. DWORD
  1157. RpcClusterSplClose(
  1158. PHANDLE phSpooler
  1159. )
  1160. {
  1161. return YClusterSplClose( phSpooler, RPC_CALL );
  1162. }
  1163. DWORD
  1164. RpcClusterSplIsAlive(
  1165. HANDLE hSpooler
  1166. )
  1167. {
  1168. return YClusterSplIsAlive( hSpooler, RPC_CALL );
  1169. }
  1170. DWORD
  1171. RpcGetSpoolFileInfo(
  1172. HANDLE hPrinter,
  1173. DWORD dwAppProcessId,
  1174. DWORD dwLevel,
  1175. LPBYTE pSpoolFileInfo,
  1176. DWORD cbBuf,
  1177. LPDWORD pcbNeeded)
  1178. {
  1179. return YGetSpoolFileInfo(hPrinter, dwAppProcessId,
  1180. dwLevel, pSpoolFileInfo,
  1181. cbBuf, pcbNeeded, RPC_CALL);
  1182. }
  1183. DWORD
  1184. RpcGetSpoolFileInfo2(
  1185. HANDLE hPrinter,
  1186. DWORD dwAppProcessId,
  1187. DWORD dwLevel,
  1188. LPFILE_INFO_CONTAINER pSplFileInfoContainer
  1189. )
  1190. {
  1191. return YGetSpoolFileInfo2(hPrinter, dwAppProcessId,
  1192. dwLevel, pSplFileInfoContainer,
  1193. RPC_CALL);
  1194. }
  1195. DWORD
  1196. RpcCommitSpoolData(
  1197. HANDLE hPrinter,
  1198. DWORD dwAppProcessId,
  1199. DWORD cbCommit,
  1200. DWORD dwLevel,
  1201. LPBYTE pSpoolFileInfo,
  1202. DWORD cbBuf,
  1203. LPDWORD pcbNeeded)
  1204. {
  1205. return YCommitSpoolData(hPrinter, dwAppProcessId, cbCommit,
  1206. dwLevel, pSpoolFileInfo, cbBuf, pcbNeeded, RPC_CALL);
  1207. }
  1208. DWORD
  1209. RpcCommitSpoolData2(
  1210. HANDLE hPrinter,
  1211. DWORD dwAppProcessId,
  1212. DWORD cbCommit,
  1213. DWORD dwLevel,
  1214. LPFILE_INFO_CONTAINER pSplFileInfoContainer)
  1215. {
  1216. return YCommitSpoolData2(hPrinter, dwAppProcessId, cbCommit,
  1217. dwLevel, pSplFileInfoContainer, RPC_CALL);
  1218. }
  1219. DWORD
  1220. RpcCloseSpoolFileHandle(
  1221. HANDLE hPrinter)
  1222. {
  1223. return YCloseSpoolFileHandle(hPrinter, RPC_CALL);
  1224. }
  1225. DWORD
  1226. RpcFlushPrinter(
  1227. HANDLE hPrinter,
  1228. LPBYTE pBuf,
  1229. DWORD cbBuf,
  1230. LPDWORD pcWritten,
  1231. DWORD cSleep
  1232. )
  1233. {
  1234. return YFlushPrinter( hPrinter,
  1235. pBuf,
  1236. cbBuf,
  1237. pcWritten,
  1238. cSleep,
  1239. RPC_CALL);
  1240. }
  1241. DWORD
  1242. RpcSendRecvBidiData(
  1243. IN HANDLE hPrinter,
  1244. IN LPCWSTR pAction,
  1245. IN PRPC_BIDI_REQUEST_CONTAINER pReqData,
  1246. OUT PRPC_BIDI_RESPONSE_CONTAINER* ppRespData
  1247. )
  1248. {
  1249. return ( YSendRecvBidiData(hPrinter,
  1250. pAction,
  1251. (PBIDI_REQUEST_CONTAINER)pReqData,
  1252. (PBIDI_RESPONSE_CONTAINER*)ppRespData,
  1253. RPC_CALL) );
  1254. }