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.

1972 lines
60 KiB

  1. /*++
  2. Copyright (c) 1996-1997 Microsoft Corporation
  3. Module Name:
  4. prcomoem.h
  5. Abstract:
  6. Interface declaration for Windows NT printer driver OEM plugins
  7. --*/
  8. #ifndef _PRCOMOEM_H_
  9. #define _PRCOMOEM_H_
  10. //
  11. // This file has to be included after printoem.h. We also need to inlude
  12. // objbase.h or comcat.h from sdk\inc.
  13. //
  14. //
  15. // Each dll/exe must initialize the GUIDs once.If you are not using precompiled
  16. // headers for the file(s) which initializes the GUIDs, define INITGUID before
  17. // including objbase.h.
  18. //
  19. //
  20. // Class ID for OEM rendering component. All OEM rendering plugin need to use this ID.
  21. //
  22. // {6d6abf26-9f38-11d1-882a-00c04fb961ec}
  23. //
  24. DEFINE_GUID(CLSID_OEMRENDER, 0x6d6abf26, 0x9f38, 0x11d1, 0x88, 0x2a, 0x00, 0xc0, 0x4f, 0xb9, 0x61, 0xec);
  25. //
  26. // Class ID for OEM UI component. All OEM UI plugin need to use this ID.
  27. //
  28. // {abce80d7-9f46-11d1-882a-00c04fb961ec}
  29. //
  30. DEFINE_GUID(CLSID_OEMUI, 0xabce80d7, 0x9f46, 0x11d1, 0x88, 0x2a, 0x00, 0xc0, 0x4f, 0xb9, 0x61, 0xec);
  31. //
  32. // Interface ID for IPrintOemCommon Interface
  33. //
  34. // {7f42285e-91d5-11d1-8820-00c04fb961ec}
  35. //
  36. DEFINE_GUID(IID_IPrintOemCommon, 0x7f42285e, 0x91d5, 0x11d1, 0x88, 0x20, 0x00, 0xc0, 0x4f, 0xb9, 0x61, 0xec);
  37. //
  38. // Interface ID for IPrintOemEngine Interface
  39. //
  40. // {63d17590-91d8-11d1-8820-00c04fb961ec}
  41. //
  42. DEFINE_GUID(IID_IPrintOemEngine, 0x63d17590, 0x91d8, 0x11d1, 0x88, 0x20, 0x00, 0xc0, 0x4f, 0xb9, 0x61, 0xec);
  43. //
  44. // Interface ID for IPrintOemUI Interface
  45. //
  46. // {C6A7A9D0-774C-11d1-947F-00A0C90640B8}
  47. //
  48. DEFINE_GUID(IID_IPrintOemUI, 0xc6a7a9d0, 0x774c, 0x11d1, 0x94, 0x7f, 0x0, 0xa0, 0xc9, 0x6, 0x40, 0xb8);
  49. //
  50. // Interface ID for IPrintOemUI2 Interface
  51. //
  52. // {292515F9-B54B-489B-9275-BAB56821395E}
  53. //
  54. DEFINE_GUID(IID_IPrintOemUI2, 0x292515f9, 0xb54b, 0x489b, 0x92, 0x75, 0xba, 0xb5, 0x68, 0x21, 0x39, 0x5e);
  55. //
  56. // Interface ID for IPrintOemDriverUI interface
  57. //
  58. // {92B05D50-78BC-11d1-9480-00A0C90640B8}
  59. //
  60. DEFINE_GUID(IID_IPrintOemDriverUI, 0x92b05d50, 0x78bc, 0x11d1, 0x94, 0x80, 0x0, 0xa0, 0xc9, 0x6, 0x40, 0xb8);
  61. //
  62. // Interface ID for IPrintCoreUI2 interface
  63. //
  64. // {085CCFCA-3ADF-4c9e-B491-D851A6EDC997}
  65. //
  66. DEFINE_GUID(IID_IPrintCoreUI2, 0x85ccfca, 0x3adf, 0x4c9e, 0xb4, 0x91, 0xd8, 0x51, 0xa6, 0xed, 0xc9, 0x97);
  67. //
  68. // Interface ID for IPrintOemPS Interface
  69. //
  70. // {688342b5-8e1a-11d1-881f-00c04fb961ec}
  71. //
  72. DEFINE_GUID(IID_IPrintOemPS, 0x688342b5, 0x8e1a, 0x11d1, 0x88, 0x1f, 0x00, 0xc0, 0x4f, 0xb9, 0x61, 0xec);
  73. //
  74. // Interface ID for IPrintOemPS2 Interface
  75. //
  76. // {BECF7F34-51B3-46c9-8A1C-18679BD21F36}
  77. //
  78. DEFINE_GUID(IID_IPrintOemPS2, 0xbecf7f34, 0x51b3, 0x46c9, 0x8a, 0x1c, 0x18, 0x67, 0x9b, 0xd2, 0x1f, 0x36);
  79. //
  80. // Interface ID for IPrintOemDriverPS interface
  81. //
  82. // {d90060c7-8e1a-11d1-881f-00c04fb961ec}
  83. //
  84. DEFINE_GUID(IID_IPrintOemDriverPS, 0xd90060c7, 0x8e1a, 0x11d1, 0x88, 0x1f, 0x00, 0xc0, 0x4f, 0xb9, 0x61, 0xec);
  85. //
  86. // Interface ID for IPrintCorePS2 interface
  87. //
  88. // {CDBB0B0B-A917-40d7-9FBF-483B3BE7EF22}
  89. DEFINE_GUID(IID_IPrintCorePS2, 0xcdbb0b0b, 0xa917, 0x40d7, 0x9f, 0xbf, 0x48, 0x3b, 0x3b, 0xe7, 0xef, 0x22);
  90. //
  91. // Interface ID for IPrintOemUni Interface
  92. //
  93. // {D67EBBF0-78BF-11d1-9480-00A0C90640B8}
  94. //
  95. DEFINE_GUID(IID_IPrintOemUni, 0xd67ebbf0, 0x78bf, 0x11d1, 0x94, 0x80, 0x0, 0xa0, 0xc9, 0x6, 0x40, 0xb8);
  96. //
  97. // Interface ID for IPrintOemUni2 Interface
  98. //
  99. // {B91220AC-15CC-4e7a-A21E-9591F34D6F6C}
  100. //
  101. DEFINE_GUID(IID_IPrintOemUni2, 0xb91220ac, 0x15cc, 0x4e7a, 0xa2, 0x1e, 0x95, 0x91, 0xf3, 0x4d, 0x6f, 0x6c);
  102. //
  103. // Interface ID for IPrintOemDriverUni interface
  104. //
  105. // {D67EBBF1-78BF-11d1-9480-00A0C90640B8}
  106. //
  107. DEFINE_GUID(IID_IPrintOemDriverUni, 0xd67ebbf1, 0x78bf, 0x11d1, 0x94, 0x80, 0x0, 0xa0, 0xc9, 0x6, 0x40, 0xb8);
  108. #undef IUnknown
  109. #ifdef __cplusplus
  110. extern "C" {
  111. #endif
  112. //
  113. //****************************************************************************
  114. // IPrintOemCommon interface
  115. //****************************************************************************
  116. //
  117. #undef INTERFACE
  118. #define INTERFACE IPrintOemCommon
  119. DECLARE_INTERFACE_(IPrintOemCommon, IUnknown)
  120. {
  121. //
  122. // IUnknown methods
  123. //
  124. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  125. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  126. STDMETHOD_(ULONG, Release) (THIS) PURE;
  127. //
  128. // IPrintOemCommon methods
  129. //
  130. //
  131. // Method for getting OEM related information
  132. //
  133. STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
  134. PVOID pBuffer,
  135. DWORD cbSize,
  136. PDWORD pcbNeeded) PURE;
  137. //
  138. // Method for OEM private devmode handling
  139. //
  140. STDMETHOD(DevMode) (THIS_ DWORD dwMode,
  141. POEMDMPARAM pOemDMParam) PURE;
  142. };
  143. #ifndef KERNEL_MODE
  144. //
  145. // Definitions used by user interface module only.
  146. // Make sure the macro KERNEL_MODE is not defined.
  147. //
  148. //
  149. //****************************************************************************
  150. // IPrintOemUI interface
  151. //****************************************************************************
  152. //
  153. #undef INTERFACE
  154. #define INTERFACE IPrintOemUI
  155. DECLARE_INTERFACE_(IPrintOemUI, IPrintOemCommon)
  156. {
  157. //
  158. // IUnknown methods
  159. //
  160. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj)PURE;
  161. STDMETHOD_(ULONG, AddRef) (THIS)PURE;
  162. STDMETHOD_(ULONG, Release) (THIS)PURE;
  163. //
  164. // IPrintOemCommon methods
  165. //
  166. //
  167. // Method for getting OEM related information
  168. //
  169. STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
  170. PVOID pBuffer,
  171. DWORD cbSize,
  172. PDWORD pcbNeeded) PURE;
  173. //
  174. // Method for OEM private devmode handling
  175. //
  176. STDMETHOD(DevMode) (THIS_ DWORD dwMode,
  177. POEMDMPARAM pOemDMParam) PURE;
  178. //
  179. // IPrintOemUI methods
  180. //
  181. //
  182. // Method for publishing Driver interface.
  183. //
  184. STDMETHOD(PublishDriverInterface) (THIS_ IUnknown *pIUnknown) PURE;
  185. //
  186. // CommonUIProp
  187. //
  188. STDMETHOD(CommonUIProp) (THIS_
  189. DWORD dwMode,
  190. POEMCUIPPARAM pOemCUIPParam
  191. )PURE;
  192. //
  193. // DocumentPropertySheets
  194. //
  195. STDMETHOD(DocumentPropertySheets) (THIS_
  196. PPROPSHEETUI_INFO pPSUIInfo,
  197. LPARAM lParam
  198. )PURE;
  199. //
  200. // DevicePropertySheets
  201. //
  202. STDMETHOD(DevicePropertySheets) (THIS_
  203. PPROPSHEETUI_INFO pPSUIInfo,
  204. LPARAM lParam
  205. )PURE;
  206. //
  207. // DevQueryPrintEx
  208. //
  209. STDMETHOD(DevQueryPrintEx) (THIS_
  210. POEMUIOBJ poemuiobj,
  211. PDEVQUERYPRINT_INFO pDQPInfo,
  212. PDEVMODE pPublicDM,
  213. PVOID pOEMDM
  214. )PURE;
  215. //
  216. // DeviceCapabilities
  217. //
  218. STDMETHOD(DeviceCapabilities) (THIS_
  219. POEMUIOBJ poemuiobj,
  220. HANDLE hPrinter,
  221. PWSTR pDeviceName,
  222. WORD wCapability,
  223. PVOID pOutput,
  224. PDEVMODE pPublicDM,
  225. PVOID pOEMDM,
  226. DWORD dwOld,
  227. DWORD *dwResult
  228. )PURE;
  229. //
  230. // UpgradePrinter
  231. //
  232. STDMETHOD(UpgradePrinter) (THIS_
  233. DWORD dwLevel,
  234. PBYTE pDriverUpgradeInfo
  235. )PURE;
  236. //
  237. // PrinterEvent
  238. //
  239. STDMETHOD(PrinterEvent) (THIS_
  240. PWSTR pPrinterName,
  241. INT iDriverEvent,
  242. DWORD dwFlags,
  243. LPARAM lParam
  244. )PURE;
  245. //
  246. // DriverEvent
  247. //
  248. STDMETHOD(DriverEvent) (THIS_
  249. DWORD dwDriverEvent,
  250. DWORD dwLevel,
  251. LPBYTE pDriverInfo,
  252. LPARAM lParam
  253. )PURE;
  254. //
  255. // QueryColorProfile
  256. //
  257. STDMETHOD(QueryColorProfile) (THIS_
  258. HANDLE hPrinter,
  259. POEMUIOBJ poemuiobj,
  260. PDEVMODE pPublicDM,
  261. PVOID pOEMDM,
  262. ULONG ulQueryMode,
  263. VOID *pvProfileData,
  264. ULONG *pcbProfileData,
  265. FLONG *pflProfileData
  266. )PURE;
  267. //
  268. // FontInstallerDlgProc
  269. //
  270. STDMETHOD(FontInstallerDlgProc) (THIS_
  271. HWND hWnd,
  272. UINT usMsg,
  273. WPARAM wParam,
  274. LPARAM lParam
  275. )PURE;
  276. //
  277. // UpdateExternalFonts
  278. //
  279. STDMETHOD(UpdateExternalFonts) (THIS_
  280. HANDLE hPrinter,
  281. HANDLE hHeap,
  282. PWSTR pwstrCartridges
  283. )PURE;
  284. };
  285. //
  286. //****************************************************************************
  287. // IPrintOemUI2 interface
  288. //****************************************************************************
  289. //
  290. #undef INTERFACE
  291. #define INTERFACE IPrintOemUI2
  292. DECLARE_INTERFACE_(IPrintOemUI2, IPrintOemUI)
  293. {
  294. //
  295. // IUnknown methods
  296. //
  297. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj)PURE;
  298. STDMETHOD_(ULONG, AddRef) (THIS)PURE;
  299. STDMETHOD_(ULONG, Release) (THIS)PURE;
  300. //
  301. // IPrintOemCommon methods
  302. //
  303. //
  304. // Method for getting OEM related information
  305. //
  306. STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
  307. PVOID pBuffer,
  308. DWORD cbSize,
  309. PDWORD pcbNeeded) PURE;
  310. //
  311. // Method for OEM private devmode handling
  312. //
  313. STDMETHOD(DevMode) (THIS_ DWORD dwMode,
  314. POEMDMPARAM pOemDMParam) PURE;
  315. //
  316. // IPrintOemUI methods
  317. //
  318. //
  319. // Method for publishing Driver interface.
  320. //
  321. STDMETHOD(PublishDriverInterface) (THIS_ IUnknown *pIUnknown) PURE;
  322. //
  323. // CommonUIProp
  324. //
  325. STDMETHOD(CommonUIProp) (THIS_
  326. DWORD dwMode,
  327. POEMCUIPPARAM pOemCUIPParam
  328. )PURE;
  329. //
  330. // DocumentPropertySheets
  331. //
  332. STDMETHOD(DocumentPropertySheets) (THIS_
  333. PPROPSHEETUI_INFO pPSUIInfo,
  334. LPARAM lParam
  335. )PURE;
  336. //
  337. // DevicePropertySheets
  338. //
  339. STDMETHOD(DevicePropertySheets) (THIS_
  340. PPROPSHEETUI_INFO pPSUIInfo,
  341. LPARAM lParam
  342. )PURE;
  343. //
  344. // DevQueryPrintEx
  345. //
  346. STDMETHOD(DevQueryPrintEx) (THIS_
  347. POEMUIOBJ poemuiobj,
  348. PDEVQUERYPRINT_INFO pDQPInfo,
  349. PDEVMODE pPublicDM,
  350. PVOID pOEMDM
  351. )PURE;
  352. //
  353. // DeviceCapabilities
  354. //
  355. STDMETHOD(DeviceCapabilities) (THIS_
  356. POEMUIOBJ poemuiobj,
  357. HANDLE hPrinter,
  358. PWSTR pDeviceName,
  359. WORD wCapability,
  360. PVOID pOutput,
  361. PDEVMODE pPublicDM,
  362. PVOID pOEMDM,
  363. DWORD dwOld,
  364. DWORD *dwResult
  365. )PURE;
  366. //
  367. // UpgradePrinter
  368. //
  369. STDMETHOD(UpgradePrinter) (THIS_
  370. DWORD dwLevel,
  371. PBYTE pDriverUpgradeInfo
  372. )PURE;
  373. //
  374. // PrinterEvent
  375. //
  376. STDMETHOD(PrinterEvent) (THIS_
  377. PWSTR pPrinterName,
  378. INT iDriverEvent,
  379. DWORD dwFlags,
  380. LPARAM lParam
  381. )PURE;
  382. //
  383. // DriverEvent
  384. //
  385. STDMETHOD(DriverEvent) (THIS_
  386. DWORD dwDriverEvent,
  387. DWORD dwLevel,
  388. LPBYTE pDriverInfo,
  389. LPARAM lParam
  390. )PURE;
  391. //
  392. // QueryColorProfile
  393. //
  394. STDMETHOD(QueryColorProfile) (THIS_
  395. HANDLE hPrinter,
  396. POEMUIOBJ poemuiobj,
  397. PDEVMODE pPublicDM,
  398. PVOID pOEMDM,
  399. ULONG ulQueryMode,
  400. VOID *pvProfileData,
  401. ULONG *pcbProfileData,
  402. FLONG *pflProfileData
  403. )PURE;
  404. //
  405. // FontInstallerDlgProc
  406. //
  407. STDMETHOD(FontInstallerDlgProc) (THIS_
  408. HWND hWnd,
  409. UINT usMsg,
  410. WPARAM wParam,
  411. LPARAM lParam
  412. )PURE;
  413. //
  414. // UpdateExternalFonts
  415. //
  416. STDMETHOD(UpdateExternalFonts) (THIS_
  417. HANDLE hPrinter,
  418. HANDLE hHeap,
  419. PWSTR pwstrCartridges
  420. )PURE;
  421. //
  422. // IPrintOemUI2 methods
  423. //
  424. //
  425. // QueryJobAttributes
  426. //
  427. STDMETHOD(QueryJobAttributes) (THIS_
  428. HANDLE hPrinter,
  429. PDEVMODE pDevmode,
  430. DWORD dwLevel,
  431. LPBYTE lpAttributeInfo
  432. )PURE;
  433. //
  434. // Hide Standard UI
  435. //
  436. STDMETHOD(HideStandardUI) (THIS_
  437. DWORD dwMode
  438. )PURE;
  439. //
  440. // DocumentEvent
  441. //
  442. STDMETHOD(DocumentEvent) (THIS_
  443. HANDLE hPrinter,
  444. HDC hdc,
  445. INT iEsc,
  446. ULONG cbIn,
  447. PVOID pvIn,
  448. ULONG cbOut,
  449. PVOID pvOut,
  450. PINT piResult
  451. )PURE;
  452. };
  453. //
  454. //****************************************************************************
  455. // IPrintOemDriverUI interface
  456. //****************************************************************************
  457. //
  458. #undef INTERFACE
  459. #define INTERFACE IPrintOemDriverUI
  460. DECLARE_INTERFACE_(IPrintOemDriverUI, IUnknown)
  461. {
  462. //
  463. // IUnknown methods
  464. //
  465. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj)PURE;
  466. STDMETHOD_(ULONG, AddRef) (THIS)PURE;
  467. STDMETHOD_(ULONG, Release) (THIS)PURE;
  468. //
  469. // IPrintOemDriverUI methods
  470. //
  471. //
  472. // Helper function to get driver settings
  473. //
  474. STDMETHOD(DrvGetDriverSetting) (THIS_
  475. PVOID pci,
  476. PCSTR Feature,
  477. PVOID pOutput,
  478. DWORD cbSize,
  479. PDWORD pcbNeeded,
  480. PDWORD pdwOptionsReturned
  481. )PURE;
  482. //
  483. // Helper function to allow OEM plugins upgrade private registry
  484. // settings. This function should be called only by OEM's UpgradePrinter()
  485. //
  486. STDMETHOD(DrvUpgradeRegistrySetting) (THIS_
  487. HANDLE hPrinter,
  488. PCSTR pFeature,
  489. PCSTR pOption
  490. )PURE;
  491. //
  492. // Helper function to allow OEM plugins to update the driver UI
  493. // settings and show constraints. This function should be called only when
  494. // the UI is present.
  495. //
  496. STDMETHOD(DrvUpdateUISetting) (THIS_
  497. PVOID pci,
  498. PVOID pOptItem,
  499. DWORD dwPreviousSelection,
  500. DWORD dwMode
  501. )PURE;
  502. };
  503. //
  504. //****************************************************************************
  505. // IPrintCoreUI2 interface
  506. //
  507. // This is the revised core driver helper interface OEM UI plugin can call.
  508. // It supercedes the old helper interface IPrintOemDriverUI.
  509. //****************************************************************************
  510. //
  511. #undef INTERFACE
  512. #define INTERFACE IPrintCoreUI2
  513. DECLARE_INTERFACE_(IPrintCoreUI2, IPrintOemDriverUI)
  514. {
  515. //
  516. // IUnknown methods
  517. //
  518. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj)PURE;
  519. STDMETHOD_(ULONG, AddRef) (THIS)PURE;
  520. STDMETHOD_(ULONG, Release) (THIS)PURE;
  521. //
  522. // IPrintOemDriverUI methods
  523. //
  524. //
  525. // Helper function to get driver settings. This function is only supported
  526. // for UI plugins that do not fully replace core driver's standard UI.
  527. //
  528. STDMETHOD(DrvGetDriverSetting) (THIS_
  529. PVOID pci,
  530. PCSTR Feature,
  531. PVOID pOutput,
  532. DWORD cbSize,
  533. PDWORD pcbNeeded,
  534. PDWORD pdwOptionsReturned
  535. )PURE;
  536. //
  537. // Helper function to allow OEM plugins upgrade private registry
  538. // settings. This function is supported for any UI plugins and should be
  539. // called only by OEM's UpgradePrinter.
  540. //
  541. STDMETHOD(DrvUpgradeRegistrySetting) (THIS_
  542. HANDLE hPrinter,
  543. PCSTR pFeature,
  544. PCSTR pOption
  545. )PURE;
  546. //
  547. // Helper function to allow OEM plugins to update the driver UI settings.
  548. // This function is only supported for UI plugins that do not fully replace
  549. // core driver's standard UI. It should be called only when the UI is present.
  550. //
  551. STDMETHOD(DrvUpdateUISetting) (THIS_
  552. PVOID pci,
  553. PVOID pOptItem,
  554. DWORD dwPreviousSelection,
  555. DWORD dwMode
  556. )PURE;
  557. //
  558. // IPrintCoreUI2 new methods
  559. //
  560. //
  561. // Following four helper functions are only supported for UI plugins that fully
  562. // replace core driver's standard UI. They should only be called by the UI plugin's
  563. // DocumentPropertySheets, DevicePropertySheets and their property sheet callback
  564. // functions.
  565. //
  566. // Helper function to retrieve driver's current setting as a list of
  567. // feature/option keyword pairs.
  568. //
  569. STDMETHOD(GetOptions) (THIS_
  570. IN POEMUIOBJ poemuiobj,
  571. IN DWORD dwFlags,
  572. IN PCSTR pmszFeaturesRequested,
  573. IN DWORD cbIn,
  574. OUT PSTR pmszFeatureOptionBuf,
  575. IN DWORD cbSize,
  576. OUT PDWORD pcbNeeded) PURE;
  577. //
  578. // Helper function to change driver's setting using a list of feature/option
  579. // keyword pairs.
  580. //
  581. STDMETHOD(SetOptions) (THIS_
  582. IN POEMUIOBJ poemuiobj,
  583. IN DWORD dwFlags,
  584. IN PCSTR pmszFeatureOptionBuf,
  585. IN DWORD cbIn,
  586. OUT PDWORD pdwResult) PURE;
  587. //
  588. // Helper function to retrieve the option(s) of a given feature that are
  589. // constrained in driver's current setting.
  590. //
  591. STDMETHOD(EnumConstrainedOptions) (THIS_
  592. IN POEMUIOBJ poemuiobj,
  593. IN DWORD dwFlags,
  594. IN PCSTR pszFeatureKeyword,
  595. OUT PSTR pmszConstrainedOptionList,
  596. IN DWORD cbSize,
  597. OUT PDWORD pcbNeeded) PURE;
  598. //
  599. // Helper function to retrieve a list of feature/option keyword pairs from
  600. // driver's current setting that conflict with the given feature/option pair.
  601. //
  602. STDMETHOD(WhyConstrained) (THIS_
  603. IN POEMUIOBJ poemuiobj,
  604. IN DWORD dwFlags,
  605. IN PCSTR pszFeatureKeyword,
  606. IN PCSTR pszOptionKeyword,
  607. OUT PSTR pmszReasonList,
  608. IN DWORD cbSize,
  609. OUT PDWORD pcbNeeded) PURE;
  610. //
  611. // Following five helper functions are supported for any UI plugins.
  612. //
  613. // Helper function to retrieve global attribute.
  614. //
  615. STDMETHOD(GetGlobalAttribute) (THIS_
  616. IN POEMUIOBJ poemuiobj,
  617. IN DWORD dwFlags,
  618. IN PCSTR pszAttribute,
  619. OUT PDWORD pdwDataType,
  620. OUT PBYTE pbData,
  621. IN DWORD cbSize,
  622. OUT PDWORD pcbNeeded) PURE;
  623. //
  624. // Helper function to retrieve attribute of a given feature.
  625. //
  626. STDMETHOD(GetFeatureAttribute) (THIS_
  627. IN POEMUIOBJ poemuiobj,
  628. IN DWORD dwFlags,
  629. IN PCSTR pszFeatureKeyword,
  630. IN PCSTR pszAttribute,
  631. OUT PDWORD pdwDataType,
  632. OUT PBYTE pbData,
  633. IN DWORD cbSize,
  634. OUT PDWORD pcbNeeded) PURE;
  635. //
  636. // Helper function to retrieve attribute of a given feature/option selection.
  637. //
  638. STDMETHOD(GetOptionAttribute) (THIS_
  639. IN POEMUIOBJ poemuiobj,
  640. IN DWORD dwFlags,
  641. IN PCSTR pszFeatureKeyword,
  642. IN PCSTR pszOptionKeyword,
  643. IN PCSTR pszAttribute,
  644. OUT PDWORD pdwDataType,
  645. OUT PBYTE pbData,
  646. IN DWORD cbSize,
  647. OUT PDWORD pcbNeeded) PURE;
  648. //
  649. // Helper function to retrieve the list of feature keyword.
  650. //
  651. STDMETHOD(EnumFeatures) (THIS_
  652. IN POEMUIOBJ poemuiobj,
  653. IN DWORD dwFlags,
  654. OUT PSTR pmszFeatureList,
  655. IN DWORD cbSize,
  656. OUT PDWORD pcbNeeded) PURE;
  657. //
  658. // Helper function to retrieve the list of options keyword of a given feature.
  659. //
  660. STDMETHOD(EnumOptions) (THIS_
  661. IN POEMUIOBJ poemuiobj,
  662. IN DWORD dwFlags,
  663. IN PCSTR pszFeatureKeyword,
  664. OUT PSTR pmszOptionList,
  665. IN DWORD cbSize,
  666. OUT PDWORD pcbNeeded) PURE;
  667. //
  668. // Helper function to query system simulation support
  669. //
  670. STDMETHOD(QuerySimulationSupport) (THIS_
  671. IN HANDLE hPrinter,
  672. IN DWORD dwLevel,
  673. OUT PBYTE pCaps,
  674. IN DWORD cbSize,
  675. OUT PDWORD pcbNeeded) PURE;
  676. };
  677. #else // KERNEL_MODE
  678. //
  679. // Definitions used by rendering module only.
  680. // Make sure the macro KERNEL_MODE is defined.
  681. //
  682. //
  683. //****************************************************************************
  684. // IPrintOemEngine interface
  685. //****************************************************************************
  686. //
  687. #undef INTERFACE
  688. #define INTERFACE IPrintOemEngine
  689. DECLARE_INTERFACE_(IPrintOemEngine, IPrintOemCommon)
  690. {
  691. //
  692. // IUnknown methods
  693. //
  694. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  695. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  696. STDMETHOD_(ULONG, Release) (THIS) PURE;
  697. //
  698. // IPrintOemCommon methods
  699. //
  700. //
  701. // Method for getting OEM related information
  702. //
  703. STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
  704. PVOID pBuffer,
  705. DWORD cbSize,
  706. PDWORD pcbNeeded) PURE;
  707. //
  708. // Method for OEM private devmode handling
  709. //
  710. STDMETHOD(DevMode) (THIS_ DWORD dwMode,
  711. POEMDMPARAM pOemDMParam) PURE;
  712. //
  713. // IPrintOemEngine methods
  714. //
  715. //
  716. // Method for OEM to specify DDI hook out
  717. //
  718. STDMETHOD(EnableDriver) (THIS_ DWORD DriverVersion,
  719. DWORD cbSize,
  720. PDRVENABLEDATA pded) PURE;
  721. //
  722. // Method to notify OEM plugin that it is no longer required
  723. //
  724. STDMETHOD(DisableDriver) (THIS) PURE;
  725. //
  726. // Method for OEM to contruct its own PDEV
  727. //
  728. STDMETHOD(EnablePDEV) (THIS_ PDEVOBJ pdevobj,
  729. PWSTR pPrinterName,
  730. ULONG cPatterns,
  731. HSURF *phsurfPatterns,
  732. ULONG cjGdiInfo,
  733. GDIINFO *pGdiInfo,
  734. ULONG cjDevInfo,
  735. DEVINFO *pDevInfo,
  736. DRVENABLEDATA *pded,
  737. OUT PDEVOEM *pDevOem) PURE;
  738. //
  739. // Method for OEM to free any resource associated with its PDEV
  740. //
  741. STDMETHOD(DisablePDEV) (THIS_ PDEVOBJ pdevobj) PURE;
  742. //
  743. // Method for OEM to transfer from old PDEV to new PDEV
  744. //
  745. STDMETHOD(ResetPDEV) (THIS_ PDEVOBJ pdevobjOld,
  746. PDEVOBJ pdevobjNew) PURE;
  747. };
  748. //
  749. //****************************************************************************
  750. // IPrintOemPS interface
  751. //****************************************************************************
  752. //
  753. #undef INTERFACE
  754. #define INTERFACE IPrintOemPS
  755. DECLARE_INTERFACE_(IPrintOemPS, IPrintOemEngine)
  756. {
  757. //
  758. // IUnknown methods
  759. //
  760. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  761. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  762. STDMETHOD_(ULONG, Release) (THIS) PURE;
  763. //
  764. // IPrintOemCommon methods
  765. //
  766. //
  767. // Method for getting OEM related information
  768. //
  769. STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
  770. PVOID pBuffer,
  771. DWORD cbSize,
  772. PDWORD pcbNeeded) PURE;
  773. //
  774. // Method for OEM private devmode handling
  775. //
  776. STDMETHOD(DevMode) (THIS_ DWORD dwMode,
  777. POEMDMPARAM pOemDMParam) PURE;
  778. //
  779. // IPrintOemEngine methods
  780. //
  781. //
  782. // Method for OEM to specify DDI hook out
  783. //
  784. STDMETHOD(EnableDriver) (THIS_ DWORD DriverVersion,
  785. DWORD cbSize,
  786. PDRVENABLEDATA pded) PURE;
  787. //
  788. // Method to notify OEM plugin that it is no longer required
  789. //
  790. STDMETHOD(DisableDriver) (THIS) PURE;
  791. //
  792. // Method for OEM to construct its own PDEV
  793. //
  794. STDMETHOD(EnablePDEV) (THIS_ PDEVOBJ pdevobj,
  795. PWSTR pPrinterName,
  796. ULONG cPatterns,
  797. HSURF *phsurfPatterns,
  798. ULONG cjGdiInfo,
  799. GDIINFO *pGdiInfo,
  800. ULONG cjDevInfo,
  801. DEVINFO *pDevInfo,
  802. DRVENABLEDATA *pded,
  803. OUT PDEVOEM *pDevOem) PURE;
  804. //
  805. // Method for OEM to free any resource associated with its PDEV
  806. //
  807. STDMETHOD(DisablePDEV) (THIS_ PDEVOBJ pdevobj) PURE;
  808. //
  809. // Method for OEM to transfer from old PDEV to new PDEV
  810. //
  811. STDMETHOD(ResetPDEV) (THIS_ PDEVOBJ pdevobjOld,
  812. PDEVOBJ pdevobjNew) PURE;
  813. //
  814. // IPrintOemPS methods
  815. //
  816. //
  817. // Method for publishing Driver interface.
  818. //
  819. STDMETHOD(PublishDriverInterface)(THIS_ IUnknown *pIUnknown) PURE;
  820. //
  821. // Method for OEM to generate output at specific injection point
  822. //
  823. STDMETHOD(Command) (THIS_ PDEVOBJ pdevobj,
  824. DWORD dwIndex,
  825. PVOID pData,
  826. DWORD cbSize,
  827. OUT DWORD *pdwResult) PURE;
  828. };
  829. //
  830. //****************************************************************************
  831. // IPrintOemPS2 interface
  832. //****************************************************************************
  833. //
  834. #undef INTERFACE
  835. #define INTERFACE IPrintOemPS2
  836. DECLARE_INTERFACE_(IPrintOemPS2, IPrintOemPS)
  837. {
  838. //
  839. // IUnknown methods
  840. //
  841. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  842. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  843. STDMETHOD_(ULONG, Release) (THIS) PURE;
  844. //
  845. // IPrintOemCommon methods
  846. //
  847. //
  848. // Method for getting OEM related information
  849. //
  850. STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
  851. PVOID pBuffer,
  852. DWORD cbSize,
  853. PDWORD pcbNeeded) PURE;
  854. //
  855. // Method for OEM private devmode handling
  856. //
  857. STDMETHOD(DevMode) (THIS_ DWORD dwMode,
  858. POEMDMPARAM pOemDMParam) PURE;
  859. //
  860. // IPrintOemEngine methods
  861. //
  862. //
  863. // Method for OEM to specify DDI hook out
  864. //
  865. STDMETHOD(EnableDriver) (THIS_ DWORD DriverVersion,
  866. DWORD cbSize,
  867. PDRVENABLEDATA pded) PURE;
  868. //
  869. // Method to notify OEM plugin that it is no longer required
  870. //
  871. STDMETHOD(DisableDriver) (THIS) PURE;
  872. //
  873. // Method for OEM to construct its own PDEV
  874. //
  875. STDMETHOD(EnablePDEV) (THIS_ PDEVOBJ pdevobj,
  876. PWSTR pPrinterName,
  877. ULONG cPatterns,
  878. HSURF *phsurfPatterns,
  879. ULONG cjGdiInfo,
  880. GDIINFO *pGdiInfo,
  881. ULONG cjDevInfo,
  882. DEVINFO *pDevInfo,
  883. DRVENABLEDATA *pded,
  884. OUT PDEVOEM *pDevOem) PURE;
  885. //
  886. // Method for OEM to free any resource associated with its PDEV
  887. //
  888. STDMETHOD(DisablePDEV) (THIS_ PDEVOBJ pdevobj) PURE;
  889. //
  890. // Method for OEM to transfer from old PDEV to new PDEV
  891. //
  892. STDMETHOD(ResetPDEV) (THIS_ PDEVOBJ pdevobjOld,
  893. PDEVOBJ pdevobjNew) PURE;
  894. //
  895. // IPrintOemPS methods
  896. //
  897. //
  898. // Method for publishing Driver interface.
  899. //
  900. STDMETHOD(PublishDriverInterface)(THIS_ IUnknown *pIUnknown) PURE;
  901. //
  902. // Method for OEM to generate output at specific injection point
  903. //
  904. STDMETHOD(Command) (THIS_ PDEVOBJ pdevobj,
  905. DWORD dwIndex,
  906. PVOID pData,
  907. DWORD cbSize,
  908. OUT DWORD *pdwResult) PURE;
  909. //
  910. // IPrintOemPS2 methods
  911. //
  912. //
  913. // Method for plugin to hook out spooler's WritePrinter API so it
  914. // can get access to output data PostScript driver is generating
  915. //
  916. // At DrvEnablePDEV time, PostScript driver will call this function with
  917. // pdevobj = NULL, pBuf = NULL, cbBuffer = 0 to detect if the plugin
  918. // implements this function. Plugin should return S_OK to indicate it is
  919. // implementing this function, or return E_NOTIMPL otherwise.
  920. //
  921. // In pcbWritten, plugins should return the number of bytes written to the
  922. // spooler's WritePrinter function. Zero doesn't carry a special meaning,
  923. // errors must be reported through the returned HRESULT.
  924. //
  925. STDMETHOD(WritePrinter) (THIS_ PDEVOBJ pdevobj,
  926. PVOID pBuf,
  927. DWORD cbBuffer,
  928. PDWORD pcbWritten) PURE;
  929. //
  930. // Method for plugin to implement if it wants to be called to get the chance
  931. // to override some PDEV settings such as paper margins.
  932. // Plugins that recognize the adjustment type should return S_OK.
  933. // If the adjustment type is unrecognized, they should return S_FALSE
  934. // and not E_NOTIMPL, this code should be reserved for the COM meaning.
  935. // If the plugin fails the call, it should return E_FAIL.
  936. // The chain of plugins will be called until a plugin returns S_OK or
  937. // any failure code other than E_NOTIMPL, in other words, until the first
  938. // plugin that is designed to handle the adjustment is found.
  939. //
  940. STDMETHOD(GetPDEVAdjustment) (THIS_ PDEVOBJ pdevobj,
  941. DWORD dwAdjustType,
  942. PVOID pBuf,
  943. DWORD cbBuffer,
  944. OUT BOOL *pbAdjustmentDone) PURE;
  945. };
  946. //
  947. //****************************************************************************
  948. // IPrintOemDriverPS interface
  949. //****************************************************************************
  950. //
  951. #undef INTERFACE
  952. #define INTERFACE IPrintOemDriverPS
  953. DECLARE_INTERFACE_(IPrintOemDriverPS, IUnknown)
  954. {
  955. //
  956. // IUnknown methods
  957. //
  958. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  959. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  960. STDMETHOD_(ULONG, Release) (THIS) PURE;
  961. //
  962. // IPrintOemDriverPS methods
  963. //
  964. //
  965. // Method for OEM to get driver settings
  966. //
  967. STDMETHOD(DrvGetDriverSetting) (THIS_ PVOID pdriverobj,
  968. PCSTR Feature,
  969. PVOID pOutput,
  970. DWORD cbSize,
  971. PDWORD pcbNeeded,
  972. PDWORD pdwOptionsReturned) PURE;
  973. //
  974. // Method for OEM to write to spooler buffer
  975. //
  976. STDMETHOD(DrvWriteSpoolBuf)(THIS_ PDEVOBJ pdevobj,
  977. PVOID pBuffer,
  978. DWORD cbSize,
  979. OUT DWORD *pdwResult) PURE;
  980. };
  981. //
  982. //****************************************************************************
  983. // IPrintCorePS2 interface
  984. //
  985. // This is the revised core driver helper interface OEM PS render plugin can
  986. // call. It supercedes the old helper interface IPrintOemDriverPS.
  987. //****************************************************************************
  988. //
  989. #undef INTERFACE
  990. #define INTERFACE IPrintCorePS2
  991. DECLARE_INTERFACE_(IPrintCorePS2, IUnknown)
  992. {
  993. //
  994. // IUnknown methods
  995. //
  996. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  997. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  998. STDMETHOD_(ULONG, Release) (THIS) PURE;
  999. //
  1000. // IPrintCorePS2 methods
  1001. //
  1002. //
  1003. // Method for OEM to write to spooler buffer.
  1004. //
  1005. STDMETHOD(DrvWriteSpoolBuf)(THIS_
  1006. IN PDEVOBJ pdevobj,
  1007. IN PVOID pBuffer,
  1008. IN DWORD cbSize,
  1009. OUT DWORD *pdwResult) PURE;
  1010. //
  1011. // Helper function to retrieve driver's current setting as a list of
  1012. // feature/option keyword pairs.
  1013. //
  1014. STDMETHOD(GetOptions) (THIS_
  1015. IN PDEVOBJ pdevobj,
  1016. IN DWORD dwFlags,
  1017. IN PCSTR pmszFeaturesRequested,
  1018. IN DWORD cbIn,
  1019. OUT PSTR pmszFeatureOptionBuf,
  1020. IN DWORD cbSize,
  1021. OUT PDWORD pcbNeeded) PURE;
  1022. //
  1023. // Helper function to retrieve global attribute.
  1024. //
  1025. STDMETHOD(GetGlobalAttribute) (THIS_
  1026. IN PDEVOBJ pdevobj,
  1027. IN DWORD dwFlags,
  1028. IN PCSTR pszAttribute,
  1029. OUT PDWORD pdwDataType,
  1030. OUT PBYTE pbData,
  1031. IN DWORD cbSize,
  1032. OUT PDWORD pcbNeeded) PURE;
  1033. //
  1034. // Helper function to retrieve attribute of a given feature.
  1035. //
  1036. STDMETHOD(GetFeatureAttribute) (THIS_
  1037. IN PDEVOBJ pdevobj,
  1038. IN DWORD dwFlags,
  1039. IN PCSTR pszFeatureKeyword,
  1040. IN PCSTR pszAttribute,
  1041. OUT PDWORD pdwDataType,
  1042. OUT PBYTE pbData,
  1043. IN DWORD cbSize,
  1044. OUT PDWORD pcbNeeded) PURE;
  1045. //
  1046. // Helper function to retrieve attribute of a given feature/option selection.
  1047. //
  1048. STDMETHOD(GetOptionAttribute) (THIS_
  1049. IN PDEVOBJ pdevobj,
  1050. IN DWORD dwFlags,
  1051. IN PCSTR pszFeatureKeyword,
  1052. IN PCSTR pszOptionKeyword,
  1053. IN PCSTR pszAttribute,
  1054. OUT PDWORD pdwDataType,
  1055. OUT PBYTE pbData,
  1056. IN DWORD cbSize,
  1057. OUT PDWORD pcbNeeded) PURE;
  1058. //
  1059. // Helper function to retrieve the list of feature keyword.
  1060. //
  1061. STDMETHOD(EnumFeatures) (THIS_
  1062. IN PDEVOBJ pdevobj,
  1063. IN DWORD dwFlags,
  1064. OUT PSTR pmszFeatureList,
  1065. IN DWORD cbSize,
  1066. OUT PDWORD pcbNeeded) PURE;
  1067. //
  1068. // Helper function to retrieve the list of options keyword of a given feature.
  1069. //
  1070. STDMETHOD(EnumOptions) (THIS_
  1071. IN PDEVOBJ pdevobj,
  1072. IN DWORD dwFlags,
  1073. IN PCSTR pszFeatureKeyword,
  1074. OUT PSTR pmszOptionList,
  1075. IN DWORD cbSize,
  1076. OUT PDWORD pcbNeeded) PURE;
  1077. };
  1078. //
  1079. //****************************************************************************
  1080. // IPrintOemUni interface
  1081. //****************************************************************************
  1082. //
  1083. #undef INTERFACE
  1084. #define INTERFACE IPrintOemUni
  1085. DECLARE_INTERFACE_(IPrintOemUni, IPrintOemEngine)
  1086. {
  1087. //
  1088. // IUnknown methods
  1089. //
  1090. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  1091. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  1092. STDMETHOD_(ULONG, Release) (THIS) PURE;
  1093. //
  1094. // IPrintOemCommon methods
  1095. //
  1096. //
  1097. // Method for getting OEM related information
  1098. //
  1099. STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
  1100. PVOID pBuffer,
  1101. DWORD cbSize,
  1102. PDWORD pcbNeeded) PURE;
  1103. //
  1104. // Method for OEM private devmode handling
  1105. //
  1106. STDMETHOD(DevMode) (THIS_ DWORD dwMode,
  1107. POEMDMPARAM pOemDMParam) PURE;
  1108. //
  1109. // IPrintOemEngine methods
  1110. //
  1111. //
  1112. // Method for OEM to specify DDI hook out
  1113. //
  1114. STDMETHOD(EnableDriver) (THIS_ DWORD DriverVersion,
  1115. DWORD cbSize,
  1116. PDRVENABLEDATA pded) PURE;
  1117. //
  1118. // Method to notify OEM plugin that it is no longer required
  1119. //
  1120. STDMETHOD(DisableDriver) (THIS) PURE;
  1121. //
  1122. // Method for OEM to construct its own PDEV
  1123. //
  1124. STDMETHOD(EnablePDEV) (THIS_ PDEVOBJ pdevobj,
  1125. PWSTR pPrinterName,
  1126. ULONG cPatterns,
  1127. HSURF *phsurfPatterns,
  1128. ULONG cjGdiInfo,
  1129. GDIINFO *pGdiInfo,
  1130. ULONG cjDevInfo,
  1131. DEVINFO *pDevInfo,
  1132. DRVENABLEDATA *pded,
  1133. OUT PDEVOEM *pDevOem) PURE;
  1134. //
  1135. // Method for OEM to free any resource associated with its PDEV
  1136. //
  1137. STDMETHOD(DisablePDEV) (THIS_ PDEVOBJ pdevobj) PURE;
  1138. //
  1139. // Method for OEM to transfer from old PDEV to new PDEV
  1140. //
  1141. STDMETHOD(ResetPDEV) (THIS_ PDEVOBJ pdevobjOld,
  1142. PDEVOBJ pdevobjNew) PURE;
  1143. //
  1144. // IPrintOemUni methods
  1145. //
  1146. //
  1147. // Method for publishing Driver interface.
  1148. //
  1149. STDMETHOD(PublishDriverInterface)(THIS_ IUnknown *pIUnknown) PURE;
  1150. //
  1151. // Method for getting OEM implemented methods.
  1152. // Returns S_OK if the given method is implemented.
  1153. // Returns S_FALSE if the given method is not implemented.
  1154. //
  1155. //
  1156. STDMETHOD(GetImplementedMethod) (THIS_ PSTR pMethodName) PURE;
  1157. //
  1158. // DriverDMS
  1159. //
  1160. STDMETHOD(DriverDMS)(THIS_ PVOID pDevObj,
  1161. PVOID pBuffer,
  1162. DWORD cbSize,
  1163. PDWORD pcbNeeded) PURE;
  1164. //
  1165. // CommandCallback
  1166. //
  1167. STDMETHOD(CommandCallback)(THIS_ PDEVOBJ pdevobj,
  1168. DWORD dwCallbackID,
  1169. DWORD dwCount,
  1170. PDWORD pdwParams,
  1171. OUT INT *piResult) PURE;
  1172. //
  1173. // ImageProcessing
  1174. //
  1175. STDMETHOD(ImageProcessing)(THIS_ PDEVOBJ pdevobj,
  1176. PBYTE pSrcBitmap,
  1177. PBITMAPINFOHEADER pBitmapInfoHeader,
  1178. PBYTE pColorTable,
  1179. DWORD dwCallbackID,
  1180. PIPPARAMS pIPParams,
  1181. OUT PBYTE *ppbResult) PURE;
  1182. //
  1183. // FilterGraphics
  1184. //
  1185. STDMETHOD(FilterGraphics) (THIS_ PDEVOBJ pdevobj,
  1186. PBYTE pBuf,
  1187. DWORD dwLen) PURE;
  1188. //
  1189. // Compression
  1190. //
  1191. STDMETHOD(Compression)(THIS_ PDEVOBJ pdevobj,
  1192. PBYTE pInBuf,
  1193. PBYTE pOutBuf,
  1194. DWORD dwInLen,
  1195. DWORD dwOutLen,
  1196. OUT INT *piResult) PURE;
  1197. //
  1198. // HalftonePattern
  1199. //
  1200. STDMETHOD(HalftonePattern) (THIS_ PDEVOBJ pdevobj,
  1201. PBYTE pHTPattern,
  1202. DWORD dwHTPatternX,
  1203. DWORD dwHTPatternY,
  1204. DWORD dwHTNumPatterns,
  1205. DWORD dwCallbackID,
  1206. PBYTE pResource,
  1207. DWORD dwResourceSize) PURE;
  1208. //
  1209. // MemoryUsage
  1210. //
  1211. STDMETHOD(MemoryUsage) (THIS_ PDEVOBJ pdevobj,
  1212. POEMMEMORYUSAGE pMemoryUsage) PURE;
  1213. //
  1214. // TTYGetInfo
  1215. //
  1216. STDMETHOD(TTYGetInfo)(THIS_ PDEVOBJ pdevobj,
  1217. DWORD dwInfoIndex,
  1218. PVOID pOutputBuf,
  1219. DWORD dwSize,
  1220. DWORD *pcbcNeeded
  1221. ) PURE;
  1222. //
  1223. // DownloadFontheader
  1224. //
  1225. STDMETHOD(DownloadFontHeader)(THIS_ PDEVOBJ pdevobj,
  1226. PUNIFONTOBJ pUFObj,
  1227. OUT DWORD *pdwResult) PURE;
  1228. //
  1229. // DownloadCharGlyph
  1230. //
  1231. STDMETHOD(DownloadCharGlyph)(THIS_ PDEVOBJ pdevobj,
  1232. PUNIFONTOBJ pUFObj,
  1233. HGLYPH hGlyph,
  1234. PDWORD pdwWidth,
  1235. OUT DWORD *pdwResult) PURE;
  1236. //
  1237. // TTDownloadMethod
  1238. //
  1239. STDMETHOD(TTDownloadMethod)(THIS_ PDEVOBJ pdevobj,
  1240. PUNIFONTOBJ pUFObj,
  1241. OUT DWORD *pdwResult) PURE;
  1242. //
  1243. // OutputCharStr
  1244. //
  1245. STDMETHOD(OutputCharStr)(THIS_ PDEVOBJ pdevobj,
  1246. PUNIFONTOBJ pUFObj,
  1247. DWORD dwType,
  1248. DWORD dwCount,
  1249. PVOID pGlyph) PURE;
  1250. //
  1251. // SendFontCmd
  1252. //
  1253. STDMETHOD(SendFontCmd)(THIS_ PDEVOBJ pdevobj,
  1254. PUNIFONTOBJ pUFObj,
  1255. PFINVOCATION pFInv) PURE;
  1256. //
  1257. // TextOutAsBitmap
  1258. //
  1259. STDMETHOD(TextOutAsBitmap)(THIS_ SURFOBJ *pso,
  1260. STROBJ *pstro,
  1261. FONTOBJ *pfo,
  1262. CLIPOBJ *pco,
  1263. RECTL *prclExtra,
  1264. RECTL *prclOpaque,
  1265. BRUSHOBJ *pboFore,
  1266. BRUSHOBJ *pboOpaque,
  1267. POINTL *pptlOrg,
  1268. MIX mix) PURE;
  1269. };
  1270. //
  1271. //****************************************************************************
  1272. // IPrintOemUni2 interface
  1273. //****************************************************************************
  1274. //
  1275. #undef INTERFACE
  1276. #define INTERFACE IPrintOemUni2
  1277. DECLARE_INTERFACE_(IPrintOemUni2, IPrintOemUni)
  1278. {
  1279. //
  1280. // IUnknown methods
  1281. //
  1282. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  1283. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  1284. STDMETHOD_(ULONG, Release) (THIS) PURE;
  1285. //
  1286. // IPrintOemCommon methods
  1287. //
  1288. //
  1289. // Method for getting OEM related information
  1290. //
  1291. STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
  1292. PVOID pBuffer,
  1293. DWORD cbSize,
  1294. PDWORD pcbNeeded) PURE;
  1295. //
  1296. // Method for OEM private devmode handling
  1297. //
  1298. STDMETHOD(DevMode) (THIS_ DWORD dwMode,
  1299. POEMDMPARAM pOemDMParam) PURE;
  1300. //
  1301. // IPrintOemEngine methods
  1302. //
  1303. //
  1304. // Method for OEM to specify DDI hook out
  1305. //
  1306. STDMETHOD(EnableDriver) (THIS_ DWORD DriverVersion,
  1307. DWORD cbSize,
  1308. PDRVENABLEDATA pded) PURE;
  1309. //
  1310. // Method to notify OEM plugin that it is no longer required
  1311. //
  1312. STDMETHOD(DisableDriver) (THIS) PURE;
  1313. //
  1314. // Method for OEM to construct its own PDEV
  1315. //
  1316. STDMETHOD(EnablePDEV) (THIS_ PDEVOBJ pdevobj,
  1317. PWSTR pPrinterName,
  1318. ULONG cPatterns,
  1319. HSURF *phsurfPatterns,
  1320. ULONG cjGdiInfo,
  1321. GDIINFO *pGdiInfo,
  1322. ULONG cjDevInfo,
  1323. DEVINFO *pDevInfo,
  1324. DRVENABLEDATA *pded,
  1325. OUT PDEVOEM *pDevOem) PURE;
  1326. //
  1327. // Method for OEM to free any resource associated with its PDEV
  1328. //
  1329. STDMETHOD(DisablePDEV) (THIS_ PDEVOBJ pdevobj) PURE;
  1330. //
  1331. // Method for OEM to transfer from old PDEV to new PDEV
  1332. //
  1333. STDMETHOD(ResetPDEV) (THIS_ PDEVOBJ pdevobjOld,
  1334. PDEVOBJ pdevobjNew) PURE;
  1335. //
  1336. // IPrintOemUni methods
  1337. //
  1338. //
  1339. // Method for publishing Driver interface.
  1340. //
  1341. STDMETHOD(PublishDriverInterface)(THIS_ IUnknown *pIUnknown) PURE;
  1342. //
  1343. // Method for getting OEM implemented methods.
  1344. // Returns S_OK if the given method is implemented.
  1345. // Returns S_FALSE if the given method is not implemented.
  1346. //
  1347. //
  1348. STDMETHOD(GetImplementedMethod) (THIS_ PSTR pMethodName) PURE;
  1349. //
  1350. // DriverDMS
  1351. //
  1352. STDMETHOD(DriverDMS)(THIS_ PVOID pDevObj,
  1353. PVOID pBuffer,
  1354. DWORD cbSize,
  1355. PDWORD pcbNeeded) PURE;
  1356. //
  1357. // CommandCallback
  1358. //
  1359. STDMETHOD(CommandCallback)(THIS_ PDEVOBJ pdevobj,
  1360. DWORD dwCallbackID,
  1361. DWORD dwCount,
  1362. PDWORD pdwParams,
  1363. OUT INT *piResult) PURE;
  1364. //
  1365. // ImageProcessing
  1366. //
  1367. STDMETHOD(ImageProcessing)(THIS_ PDEVOBJ pdevobj,
  1368. PBYTE pSrcBitmap,
  1369. PBITMAPINFOHEADER pBitmapInfoHeader,
  1370. PBYTE pColorTable,
  1371. DWORD dwCallbackID,
  1372. PIPPARAMS pIPParams,
  1373. OUT PBYTE *ppbResult) PURE;
  1374. //
  1375. // FilterGraphics
  1376. //
  1377. STDMETHOD(FilterGraphics) (THIS_ PDEVOBJ pdevobj,
  1378. PBYTE pBuf,
  1379. DWORD dwLen) PURE;
  1380. //
  1381. // Compression
  1382. //
  1383. STDMETHOD(Compression)(THIS_ PDEVOBJ pdevobj,
  1384. PBYTE pInBuf,
  1385. PBYTE pOutBuf,
  1386. DWORD dwInLen,
  1387. DWORD dwOutLen,
  1388. OUT INT *piResult) PURE;
  1389. //
  1390. // HalftonePattern
  1391. //
  1392. STDMETHOD(HalftonePattern) (THIS_ PDEVOBJ pdevobj,
  1393. PBYTE pHTPattern,
  1394. DWORD dwHTPatternX,
  1395. DWORD dwHTPatternY,
  1396. DWORD dwHTNumPatterns,
  1397. DWORD dwCallbackID,
  1398. PBYTE pResource,
  1399. DWORD dwResourceSize) PURE;
  1400. //
  1401. // MemoryUsage
  1402. //
  1403. STDMETHOD(MemoryUsage) (THIS_ PDEVOBJ pdevobj,
  1404. POEMMEMORYUSAGE pMemoryUsage) PURE;
  1405. //
  1406. // TTYGetInfo
  1407. //
  1408. STDMETHOD(TTYGetInfo)(THIS_ PDEVOBJ pdevobj,
  1409. DWORD dwInfoIndex,
  1410. PVOID pOutputBuf,
  1411. DWORD dwSize,
  1412. DWORD *pcbcNeeded
  1413. ) PURE;
  1414. //
  1415. // DownloadFontheader
  1416. //
  1417. STDMETHOD(DownloadFontHeader)(THIS_ PDEVOBJ pdevobj,
  1418. PUNIFONTOBJ pUFObj,
  1419. OUT DWORD *pdwResult) PURE;
  1420. //
  1421. // DownloadCharGlyph
  1422. //
  1423. STDMETHOD(DownloadCharGlyph)(THIS_ PDEVOBJ pdevobj,
  1424. PUNIFONTOBJ pUFObj,
  1425. HGLYPH hGlyph,
  1426. PDWORD pdwWidth,
  1427. OUT DWORD *pdwResult) PURE;
  1428. //
  1429. // TTDownloadMethod
  1430. //
  1431. STDMETHOD(TTDownloadMethod)(THIS_ PDEVOBJ pdevobj,
  1432. PUNIFONTOBJ pUFObj,
  1433. OUT DWORD *pdwResult) PURE;
  1434. //
  1435. // OutputCharStr
  1436. //
  1437. STDMETHOD(OutputCharStr)(THIS_ PDEVOBJ pdevobj,
  1438. PUNIFONTOBJ pUFObj,
  1439. DWORD dwType,
  1440. DWORD dwCount,
  1441. PVOID pGlyph) PURE;
  1442. //
  1443. // SendFontCmd
  1444. //
  1445. STDMETHOD(SendFontCmd)(THIS_ PDEVOBJ pdevobj,
  1446. PUNIFONTOBJ pUFObj,
  1447. PFINVOCATION pFInv) PURE;
  1448. //
  1449. // TextOutAsBitmap
  1450. //
  1451. STDMETHOD(TextOutAsBitmap)(THIS_ SURFOBJ *pso,
  1452. STROBJ *pstro,
  1453. FONTOBJ *pfo,
  1454. CLIPOBJ *pco,
  1455. RECTL *prclExtra,
  1456. RECTL *prclOpaque,
  1457. BRUSHOBJ *pboFore,
  1458. BRUSHOBJ *pboOpaque,
  1459. POINTL *pptlOrg,
  1460. MIX mix) PURE;
  1461. //
  1462. // IPrintOemUni2 methods
  1463. //
  1464. //
  1465. // Method for plugin to hook out spooler's WritePrinter API so it
  1466. // can get access to output data Universal driver is generating
  1467. //
  1468. // At DrvEnablePDEV time, Universal driver will call this function with
  1469. // pdevobj = NULL, pBuf = NULL, cbBuffer = 0 to detect if the plugin
  1470. // implements this function. Plugin should return S_OK to indicate it is
  1471. // implementing this function, or return E_NOTIMPL otherwise.
  1472. //
  1473. // In pcbWritten, plugins should return the number of bytes written to the
  1474. // spooler's WritePrinter function. Zero doesn't carry a special meaning,
  1475. // errors must be reported through the returned HRESULT.
  1476. //
  1477. STDMETHOD(WritePrinter) (THIS_ PDEVOBJ pdevobj,
  1478. PVOID pBuf,
  1479. DWORD cbBuffer,
  1480. PDWORD pcbWritten) PURE;
  1481. };
  1482. //
  1483. //****************************************************************************
  1484. // IPrintOemDriverUni interface
  1485. //****************************************************************************
  1486. //
  1487. #undef INTERFACE
  1488. #define INTERFACE IPrintOemDriverUni
  1489. DECLARE_INTERFACE_(IPrintOemDriverUni, IUnknown)
  1490. {
  1491. //
  1492. // IUnknown methods
  1493. //
  1494. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
  1495. STDMETHOD_(ULONG, AddRef) (THIS) PURE;
  1496. STDMETHOD_(ULONG, Release) (THIS) PURE;
  1497. //
  1498. // IPrintOemDriverUni methods
  1499. //
  1500. //
  1501. // Function to get driver settings
  1502. //
  1503. STDMETHOD(DrvGetDriverSetting) (THIS_ PVOID pdriverobj,
  1504. PCSTR Feature,
  1505. PVOID pOutput,
  1506. DWORD cbSize,
  1507. PDWORD pcbNeeded,
  1508. PDWORD pdwOptionsReturned) PURE;
  1509. //
  1510. // Common to both Unidrv & Pscript
  1511. //
  1512. STDMETHOD(DrvWriteSpoolBuf)(THIS_ PDEVOBJ pdevobj,
  1513. PVOID pBuffer,
  1514. DWORD cbSize,
  1515. OUT DWORD *pdwResult) PURE;
  1516. //
  1517. // Unidrv specific XMoveTo and YMoveTo. Returns E_NOT_IMPL in Pscript
  1518. //
  1519. STDMETHOD(DrvXMoveTo)(THIS_ PDEVOBJ pdevobj,
  1520. INT x,
  1521. DWORD dwFlags,
  1522. OUT INT *piResult) PURE;
  1523. STDMETHOD(DrvYMoveTo)(THIS_ PDEVOBJ pdevobj,
  1524. INT y,
  1525. DWORD dwFlags,
  1526. OUT INT *piResult) PURE;
  1527. //
  1528. // Unidrv specific. To get the standard variable value.
  1529. //
  1530. STDMETHOD(DrvGetStandardVariable)(THIS_ PDEVOBJ pdevobj,
  1531. DWORD dwIndex,
  1532. PVOID pBuffer,
  1533. DWORD cbSize,
  1534. PDWORD pcbNeeded) PURE;
  1535. //
  1536. // Unidrv specific. To Provide OEM plugins access to GPD data.
  1537. //
  1538. STDMETHOD (DrvGetGPDData)(THIS_ PDEVOBJ pdevobj,
  1539. DWORD dwType, // Type of the data
  1540. PVOID pInputData, // reserved. Should be set to 0
  1541. PVOID pBuffer, // Caller allocated Buffer to be copied
  1542. DWORD cbSize, // Size of the buffer
  1543. PDWORD pcbNeeded // New Size of the buffer if needed.
  1544. ) PURE;
  1545. //
  1546. // Unidrv specific. To do the TextOut.
  1547. //
  1548. STDMETHOD(DrvUniTextOut)(THIS_ SURFOBJ *pso,
  1549. STROBJ *pstro,
  1550. FONTOBJ *pfo,
  1551. CLIPOBJ *pco,
  1552. RECTL *prclExtra,
  1553. RECTL *prclOpaque,
  1554. BRUSHOBJ *pboFore,
  1555. BRUSHOBJ *pboOpaque,
  1556. POINTL *pptlBrushOrg,
  1557. MIX mix) PURE;
  1558. //
  1559. // Warning!!! new method!! must place at end of
  1560. // interface - else major incompatibility with previous oem plugins
  1561. //
  1562. STDMETHOD(DrvWriteAbortBuf)(THIS_ PDEVOBJ pdevobj,
  1563. PVOID pBuffer,
  1564. DWORD cbSize,
  1565. DWORD dwWait // pause data transmission for this many millisecs.
  1566. ) PURE;
  1567. };
  1568. #endif // !KERNEL_MODE
  1569. #ifdef __cplusplus
  1570. }
  1571. #endif
  1572. #endif // !_PRCOMOEM_H_