📄 prcomoem.h
字号:
IN PCSTR pszAttribute,
OUT PDWORD pdwDataType,
OUT PBYTE pbData,
IN DWORD cbSize,
OUT PDWORD pcbNeeded) PURE;
//
// Helper function to retrieve attribute of a given feature/option selection.
//
STDMETHOD(GetOptionAttribute) (THIS_
IN POEMUIOBJ poemuiobj,
IN DWORD dwFlags,
IN PCSTR pszFeatureKeyword,
IN PCSTR pszOptionKeyword,
IN PCSTR pszAttribute,
OUT PDWORD pdwDataType,
OUT PBYTE pbData,
IN DWORD cbSize,
OUT PDWORD pcbNeeded) PURE;
//
// Helper function to retrieve the list of feature keyword.
//
STDMETHOD(EnumFeatures) (THIS_
IN POEMUIOBJ poemuiobj,
IN DWORD dwFlags,
OUT PSTR pmszFeatureList,
IN DWORD cbSize,
OUT PDWORD pcbNeeded) PURE;
//
// Helper function to retrieve the list of options keyword of a given feature.
//
STDMETHOD(EnumOptions) (THIS_
IN POEMUIOBJ poemuiobj,
IN DWORD dwFlags,
IN PCSTR pszFeatureKeyword,
OUT PSTR pmszOptionList,
IN DWORD cbSize,
OUT PDWORD pcbNeeded) PURE;
//
// Helper function to query system simulation support
//
STDMETHOD(QuerySimulationSupport) (THIS_
IN HANDLE hPrinter,
IN DWORD dwLevel,
OUT PBYTE pCaps,
IN DWORD cbSize,
OUT PDWORD pcbNeeded) PURE;
};
#else // KERNEL_MODE
//
// Definitions used by rendering module only.
// Make sure the macro KERNEL_MODE is defined.
//
//
//****************************************************************************
// IPrintOemEngine interface
//****************************************************************************
//
#undef INTERFACE
#define INTERFACE IPrintOemEngine
DECLARE_INTERFACE_(IPrintOemEngine, IPrintOemCommon)
{
//
// IUnknown methods
//
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
//
// IPrintOemCommon methods
//
//
// Method for getting OEM related information
//
STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
PVOID pBuffer,
DWORD cbSize,
PDWORD pcbNeeded) PURE;
//
// Method for OEM private devmode handling
//
STDMETHOD(DevMode) (THIS_ DWORD dwMode,
POEMDMPARAM pOemDMParam) PURE;
//
// IPrintOemEngine methods
//
//
// Method for OEM to specify DDI hook out
//
STDMETHOD(EnableDriver) (THIS_ DWORD DriverVersion,
DWORD cbSize,
PDRVENABLEDATA pded) PURE;
//
// Method to notify OEM plugin that it is no longer required
//
STDMETHOD(DisableDriver) (THIS) PURE;
//
// Method for OEM to contruct its own PDEV
//
STDMETHOD(EnablePDEV) (THIS_ PDEVOBJ pdevobj,
PWSTR pPrinterName,
ULONG cPatterns,
HSURF *phsurfPatterns,
ULONG cjGdiInfo,
GDIINFO *pGdiInfo,
ULONG cjDevInfo,
DEVINFO *pDevInfo,
DRVENABLEDATA *pded,
OUT PDEVOEM *pDevOem) PURE;
//
// Method for OEM to free any resource associated with its PDEV
//
STDMETHOD(DisablePDEV) (THIS_ PDEVOBJ pdevobj) PURE;
//
// Method for OEM to transfer from old PDEV to new PDEV
//
STDMETHOD(ResetPDEV) (THIS_ PDEVOBJ pdevobjOld,
PDEVOBJ pdevobjNew) PURE;
};
//
//****************************************************************************
// IPrintOemPS interface
//****************************************************************************
//
#undef INTERFACE
#define INTERFACE IPrintOemPS
DECLARE_INTERFACE_(IPrintOemPS, IPrintOemEngine)
{
//
// IUnknown methods
//
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
//
// IPrintOemCommon methods
//
//
// Method for getting OEM related information
//
STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
PVOID pBuffer,
DWORD cbSize,
PDWORD pcbNeeded) PURE;
//
// Method for OEM private devmode handling
//
STDMETHOD(DevMode) (THIS_ DWORD dwMode,
POEMDMPARAM pOemDMParam) PURE;
//
// IPrintOemEngine methods
//
//
// Method for OEM to specify DDI hook out
//
STDMETHOD(EnableDriver) (THIS_ DWORD DriverVersion,
DWORD cbSize,
PDRVENABLEDATA pded) PURE;
//
// Method to notify OEM plugin that it is no longer required
//
STDMETHOD(DisableDriver) (THIS) PURE;
//
// Method for OEM to construct its own PDEV
//
STDMETHOD(EnablePDEV) (THIS_ PDEVOBJ pdevobj,
PWSTR pPrinterName,
ULONG cPatterns,
HSURF *phsurfPatterns,
ULONG cjGdiInfo,
GDIINFO *pGdiInfo,
ULONG cjDevInfo,
DEVINFO *pDevInfo,
DRVENABLEDATA *pded,
OUT PDEVOEM *pDevOem) PURE;
//
// Method for OEM to free any resource associated with its PDEV
//
STDMETHOD(DisablePDEV) (THIS_ PDEVOBJ pdevobj) PURE;
//
// Method for OEM to transfer from old PDEV to new PDEV
//
STDMETHOD(ResetPDEV) (THIS_ PDEVOBJ pdevobjOld,
PDEVOBJ pdevobjNew) PURE;
//
// IPrintOemPS methods
//
//
// Method for publishing Driver interface.
//
STDMETHOD(PublishDriverInterface)(THIS_ IUnknown *pIUnknown) PURE;
//
// Method for OEM to generate output at specific injection point
//
STDMETHOD(Command) (THIS_ PDEVOBJ pdevobj,
DWORD dwIndex,
PVOID pData,
DWORD cbSize,
OUT DWORD *pdwResult) PURE;
};
//
//****************************************************************************
// IPrintOemPS2 interface
//****************************************************************************
//
#undef INTERFACE
#define INTERFACE IPrintOemPS2
DECLARE_INTERFACE_(IPrintOemPS2, IPrintOemPS)
{
//
// IUnknown methods
//
STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID* ppvObj) PURE;
STDMETHOD_(ULONG, AddRef) (THIS) PURE;
STDMETHOD_(ULONG, Release) (THIS) PURE;
//
// IPrintOemCommon methods
//
//
// Method for getting OEM related information
//
STDMETHOD(GetInfo) (THIS_ DWORD dwMode,
PVOID pBuffer,
DWORD cbSize,
PDWORD pcbNeeded) PURE;
//
// Method for OEM private devmode handling
//
STDMETHOD(DevMode) (THIS_ DWORD dwMode,
POEMDMPARAM pOemDMParam) PURE;
//
// IPrintOemEngine methods
//
//
// Method for OEM to specify DDI hook out
//
STDMETHOD(EnableDriver) (THIS_ DWORD DriverVersion,
DWORD cbSize,
PDRVENABLEDATA pded) PURE;
//
// Method to notify OEM plugin that it is no longer required
//
STDMETHOD(DisableDriver) (THIS) PURE;
//
// Method for OEM to construct its own PDEV
//
STDMETHOD(EnablePDEV) (THIS_ PDEVOBJ pdevobj,
PWSTR pPrinterName,
ULONG cPatterns,
HSURF *phsurfPatterns,
ULONG cjGdiInfo,
GDIINFO *pGdiInfo,
ULONG cjDevInfo,
DEVINFO *pDevInfo,
DRVENABLEDATA *pded,
OUT PDEVOEM *pDevOem) PURE;
//
// Method for OEM to free any resource associated with its PDEV
//
STDMETHOD(DisablePDEV) (THIS_ PDEVOBJ pdevobj) PURE;
//
// Method for OEM to transfer from old PDEV to new PDEV
//
STDMETHOD(ResetPDEV) (THIS_ PDEVOBJ pdevobjOld,
PDEVOBJ pdevobjNew) PURE;
//
// IPrintOemPS methods
//
//
// Method for publishing Driver interface.
//
STDMETHOD(PublishDriverInterface)(THIS_ IUnknown *pIUnknown) PURE;
//
// Method for OEM to generate output at specific injection point
//
STDMETHOD(Command) (THIS_ PDEVOBJ pdevobj,
DWORD dwIndex,
PVOID pData,
DWORD cbSize,
OUT DWORD *pdwResult) PURE;
//
// IPrintOemPS2 methods
//
//
// Method for plugin to hook out spooler's WritePrinter API so it
// can get access to output data PostScript driver is generating
//
// At DrvEnablePDEV time, PostScript driver will call this function with
// pdevobj = NULL, pBuf = NULL, cbBuffer = 0 to detect if the plugin
// implements this function. Plugin should return S_OK to indicate it is
// implementing this function, or return E_NOTIMPL otherwise.
//
// In pcbWritten, plugins should return the number of bytes written to the
// spooler's WritePrinter function. Zero doesn't carry a special meaning,
// errors must be reported through the returned HRESULT.
//
STDMETHOD(WritePrinter) (THIS_ PDEVOBJ pdevobj,
PVOID pBuf,
DWORD cbBuffer,
PDWORD pcbWritten) PURE;
//
// Method for plugin to implement if it wants to be called to get the chance
// to override some PDEV settings such as paper margins.
// Plugins that recognize the adjustment type should return S_OK.
// If the adjustment type is unrecognized, they should return S_FALSE
// and not E_NOTIMPL, this code should be reserved for the COM meaning.
// If the plugin fails the call, it should return E_FAIL.
// The chain of plugins will be called until a plugin returns S_OK or
// any failure code other than E_NOTIMPL, in other words, until the first
// plugin that is designed to handle the adjustment is found.
//
STDMETHOD(GetPDEVAdjustment) (THIS_ PDEVOBJ pdevobj,
DWORD dwAdjustType,
PVOID pBuf,
DWORD cbBuffer,
OUT BOOL *pbAdjustmentDone) PURE;
};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -