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.

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