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.

282 lines
8.9 KiB

  1. /*++
  2. Copyright (c) 1996-1999 Microsoft Corporation
  3. Module Name:
  4. comoem.h
  5. Abstract:
  6. Environment:
  7. Windows NT Unidrv driver
  8. Revision History:
  9. Created it.
  10. --*/
  11. ////////////////////////////////////////////////////////////////////////////////
  12. //
  13. // Interface Oem Class Factory definition
  14. //
  15. class IOemCF : public IClassFactory
  16. {
  17. public:
  18. // *** IUnknown methods ***
  19. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj);
  20. STDMETHOD_(ULONG,AddRef) (THIS);
  21. STDMETHOD_(ULONG,Release) (THIS);
  22. // *** IClassFactory methods ***
  23. STDMETHOD(CreateInstance) (THIS_
  24. LPUNKNOWN pUnkOuter,
  25. REFIID riid,
  26. LPVOID FAR* ppvObject);
  27. STDMETHOD(LockServer) (THIS_ BOOL bLock);
  28. // Constructor
  29. IOemCF(): m_cRef(1) { };
  30. ~IOemCF() { };
  31. protected:
  32. LONG m_cRef;
  33. };
  34. ////////////////////////////////////////////////////////////////////////////////
  35. //
  36. // Interface Oem CallBack definition
  37. //
  38. class IOemCB:public IPrintOemUni
  39. {
  40. public:
  41. // *** IUnknown methods ***
  42. STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR* ppvObj);
  43. STDMETHOD_(ULONG,AddRef) (THIS);
  44. STDMETHOD_(ULONG,Release) (THIS);
  45. //
  46. // Method for publishing Driver interface.
  47. //
  48. STDMETHOD(PublishDriverInterface)(THIS_ IUnknown *pIUnknown);
  49. //
  50. // Method for getting the implemented methods.
  51. // Returns S_OK if the given method is implemneted.
  52. // Returns S_FALSE if the given method is notimplemneted.
  53. //
  54. STDMETHOD(GetImplementedMethod)(THIS_ PSTR pMethodName);
  55. //
  56. // Method for OEM to specify DDI hook out
  57. //
  58. STDMETHOD(EnableDriver) (THIS_ DWORD DriverVersion,
  59. DWORD cbSize,
  60. PDRVENABLEDATA pded);
  61. //
  62. // Method to notify OEM plugin that it is no longer required
  63. //
  64. STDMETHOD(DisableDriver) (THIS);
  65. //
  66. // Method for OEM to contruct its own PDEV
  67. //
  68. STDMETHOD(EnablePDEV) (THIS_ PDEVOBJ pdevobj,
  69. PWSTR pPrinterName,
  70. ULONG cPatterns,
  71. HSURF *phsurfPatterns,
  72. ULONG cjGdiInfo,
  73. GDIINFO *pGdiInfo,
  74. ULONG cjDevInfo,
  75. DEVINFO *pDevInfo,
  76. DRVENABLEDATA *pded,
  77. OUT PDEVOEM *pDevOem);
  78. //
  79. // Method for OEM to free any resource associated with its PDEV
  80. //
  81. STDMETHOD(DisablePDEV) (THIS_ PDEVOBJ pdevobj);
  82. //
  83. // Method for OEM to transfer from old PDEV to new PDEV
  84. //
  85. STDMETHOD(ResetPDEV) (THIS_ PDEVOBJ pdevobjOld,
  86. PDEVOBJ pdevobjNew);
  87. //
  88. // Get OEM dll related information
  89. //
  90. STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
  91. PVOID pBuffer,
  92. DWORD cbSize,
  93. PDWORD pcbNeeded);
  94. //
  95. // OEMDriverDMS - UNIDRV only, return E_NOTIMPL on Pscript
  96. //
  97. STDMETHOD(DriverDMS)(THIS_ PVOID pDevObj,
  98. PVOID pBuffer,
  99. DWORD cbSize,
  100. PDWORD pcbNeeded);
  101. //
  102. // OEMDevMode
  103. //
  104. STDMETHOD(DevMode) (THIS_ DWORD dwMode,
  105. POEMDMPARAM pOemDMParam);
  106. //
  107. // OEMCommandCallback - UNIDRV only, return E_NOTIMPL on Pscript
  108. //
  109. STDMETHOD(CommandCallback)(THIS_ PDEVOBJ pdevobj,
  110. DWORD dwCallbackID,
  111. DWORD dwCount,
  112. PDWORD pdwParams,
  113. OUT INT *piResult);
  114. //
  115. // OEMImageProcessing - UNIDRV only, return E_NOTIMPL on Pscript
  116. //
  117. STDMETHOD(ImageProcessing)(THIS_ PDEVOBJ pdevobj,
  118. PBYTE pSrcBitmap,
  119. PBITMAPINFOHEADER pBitmapInfoHeader,
  120. PBYTE pColorTable,
  121. DWORD dwCallbackID,
  122. PIPPARAMS pIPParams,
  123. OUT PBYTE *ppbResult);
  124. //
  125. // OEMFilterGraphics - UNIDRV only, return E_NOTIMPL on Pscript
  126. //
  127. STDMETHOD(FilterGraphics) (THIS_ PDEVOBJ pdevobj,
  128. PBYTE pBuf,
  129. DWORD dwLen);
  130. //
  131. // OEMCompression - UNIDRV only, return E_NOTIMPL on Pscript
  132. //
  133. STDMETHOD(Compression)(THIS_ PDEVOBJ pdevobj,
  134. PBYTE pInBuf,
  135. PBYTE pOutBuf,
  136. DWORD dwInLen,
  137. DWORD dwOutLen,
  138. OUT INT *piResult);
  139. //
  140. // OEMHalftone - UNIDRV only, return E_NOTIMPL on Pscript
  141. //
  142. STDMETHOD(HalftonePattern) (THIS_ PDEVOBJ pdevobj,
  143. PBYTE pHTPattern,
  144. DWORD dwHTPatternX,
  145. DWORD dwHTPatternY,
  146. DWORD dwHTNumPatterns,
  147. DWORD dwCallbackID,
  148. PBYTE pResource,
  149. DWORD dwResourceSize);
  150. //
  151. // OEMMemoryUsage - UNIDRV only, return E_NOTIMPL on Pscript
  152. //
  153. STDMETHOD(MemoryUsage) (THIS_ PDEVOBJ pdevobj,
  154. POEMMEMORYUSAGE pMemoryUsage);
  155. //
  156. // OEMTTYGetInfo - UNIDRV only, return E_NOTIMPL on Pscript
  157. //
  158. STDMETHOD(TTYGetInfo)(THIS_ PDEVOBJ pdevobj,
  159. DWORD dwInfoIndex,
  160. PVOID pOutputBuf,
  161. DWORD dwSize,
  162. DWORD *pcbcNeeded);
  163. //
  164. // OEMDownloadFontheader - UNIDRV only
  165. //
  166. STDMETHOD(DownloadFontHeader)(THIS_ PDEVOBJ pdevobj,
  167. PUNIFONTOBJ pUFObj,
  168. OUT DWORD *pdwResult);
  169. //
  170. // OEMDownloadCharGlyph - UNIDRV only
  171. //
  172. STDMETHOD(DownloadCharGlyph)(THIS_ PDEVOBJ pdevobj,
  173. PUNIFONTOBJ pUFObj,
  174. HGLYPH hGlyph,
  175. PDWORD pdwWidth,
  176. OUT DWORD *pdwResult);
  177. //
  178. // OEMTTDownloadMethod - UNIDRV only
  179. //
  180. STDMETHOD(TTDownloadMethod)(THIS_ PDEVOBJ pdevobj,
  181. PUNIFONTOBJ pUFObj,
  182. OUT DWORD *pdwResult);
  183. //
  184. // OEMOutputCharStr - UNIDRV only
  185. //
  186. STDMETHOD(OutputCharStr)(THIS_ PDEVOBJ pdevobj,
  187. PUNIFONTOBJ pUFObj,
  188. DWORD dwType,
  189. DWORD dwCount,
  190. PVOID pGlyph);
  191. //
  192. // OEMSendFontCmd - UNIDRV only
  193. //
  194. STDMETHOD(SendFontCmd)(THIS_ PDEVOBJ pdevobj,
  195. PUNIFONTOBJ pUFObj,
  196. PFINVOCATION pFInv);
  197. //
  198. // OEMTextOutAsBitmap - UNIDRV only
  199. //
  200. STDMETHOD(TextOutAsBitmap)(THIS_ SURFOBJ *pso,
  201. STROBJ *pstro,
  202. FONTOBJ *pfo,
  203. CLIPOBJ *pco,
  204. RECTL *prclExtra,
  205. RECTL *prclOpaque,
  206. BRUSHOBJ *pboFore,
  207. BRUSHOBJ *pboOpaque,
  208. POINTL *pptlOrg,
  209. MIX mix);
  210. IOemCB() { m_cRef = 1; pOEMHelp = NULL; };
  211. ~IOemCB() { };
  212. protected:
  213. IPrintOemDriverUni* pOEMHelp;
  214. LONG m_cRef;
  215. };