Common/devmode.h File Reference

Define common data types, and external function prototypes for devmode functions in the UI and rendering plugins Based on: Devmode.h Printer Driver Plugin Sample by Microsoft Corporation. More...

#include "LicenseInfo.h"
Include dependency graph for devmode.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  LicenseLocationInfo
 Structure holding license stamp location data. More...
struct  tagOEMDEV
 Structure for extra plugin data. More...

Typedefs

typedef struct tagOEMDEV OEMDEV
 Structure for extra plugin data.
typedef const OEMDEVPCOEMDEV
 Pointer to a constant structure of plugin data.

Enumerations

enum  LicenseLocation
 

License stamp location enumeration.


Functions

HRESULT hrOEMDevMode (DWORD dwMode, POEMDMPARAM pOemDMParam)
 Handler for plugin data structure creation and initialization.
BOOL ConvertOEMDevmode (PCOEMDEV pOEMDevIn, POEMDEV pOEMDevOut, HANDLE hPrinter)
 Handler for copy/initialization of plugin data.
BOOL MakeOEMDevmodeValid (POEMDEV pOEMDevmode)
 Handler for validation of plugin data.
void Dump (PCOEMDEV pOEMDevIn)
 This function dumps the plugin data structure for testing purpuses.
void ReadOEMDevFromRegistry (POEMDEV pDev, HANDLE hPrinter)
 Reads the plugin data from the registry.
bool WriteOEMDevToRegistry (const POEMDEV pDev, HANDLE hPrinter)
 Writes the plugin data to the registry.

Detailed Description

Define common data types, and external function prototypes for devmode functions in the UI and rendering plugins Based on: Devmode.h Printer Driver Plugin Sample by Microsoft Corporation.

Definition in file devmode.h.


Function Documentation

BOOL ConvertOEMDevmode ( PCOEMDEV  pOEMDevIn,
POEMDEV  pOEMDevOut,
HANDLE  hPrinter 
)

Handler for copy/initialization of plugin data.

Parameters:
pOEMDevIn Pointer to the structure to read data from
pOEMDevOut Pointer to the structure to write data into
hPrinter Handle to the printer
Returns:
TRUE if all went well, FALSE if there's a problem

Definition at line 251 of file devmode.cpp.

References tagOEMDEV::dmOEMExtra, and InitToDefault().

Referenced by hrOEMDevMode().

void Dump ( PCOEMDEV  pOEMDevmode  ) 

This function dumps the plugin data structure for testing purpuses.

Parameters:
pOEMDevmode Pointer to the printer data structure to dump

Definition at line 347 of file devmode.cpp.

References tagOEMDEV::bAutoOpen, tagOEMDEV::bAutoURLs, tagOEMDEV::bSetProperties, CCPRINT_SIGNATURE, tagOEMDEV::cFilename, tagOEMDEV::dmOEMExtra, LicenseLocationInfo::eFirstPage, LicenseLocationInfo::eOtherPages, tagOEMDEV::info, tagOEMDEV::location, and LicenseInfo::m_eLicense.

HRESULT hrOEMDevMode ( DWORD  dwMode,
POEMDMPARAM  pOemDMParam 
)

Handler for plugin data structure creation and initialization.

Parameters:
dwMode Initialization mode information (see IPrintOemPS::DevMode function in the DDK)
pOemDMParam Pointer to an OEMDMPARAM structure containing printer data
Returns:
S_OK if successful, E_FAIL if failed

Definition at line 184 of file devmode.cpp.

References ConvertOEMDevmode(), InitToDefault(), and MakeOEMDevmodeValid().

BOOL MakeOEMDevmodeValid ( POEMDEV  pOEMDevmode  ) 

Handler for validation of plugin data.

Parameters:
pOEMDevmode Pointer to the printer data structure to initialize
Returns:
TRUE if initialized successfully, FALSE if failed

Definition at line 317 of file devmode.cpp.

References CCPRINT_SIGNATURE, tagOEMDEV::cFilename, and tagOEMDEV::dmOEMExtra.

Referenced by hrOEMDevMode().

void ReadOEMDevFromRegistry ( POEMDEV  pDev,
HANDLE  hPrinter 
)

Reads the plugin data from the registry.

Parameters:
pDev Pointer to the plugin data
hPrinter Handle to the printer

Definition at line 380 of file devmode.cpp.

References tagOEMDEV::bAutoOpen, tagOEMDEV::bAutoURLs, tagOEMDEV::bCreateAsTemp, tagOEMDEV::bSetProperties, CanOpenPDFFiles(), CCPrintRegistry::GetRegistryBool(), tagOEMDEV::info, tagOEMDEV::location, CCPrintLicenseInfo::ReadFromRegistry(), and SETTINGS_AUTOOPEN.

Referenced by InitToDefault().

bool WriteOEMDevToRegistry ( const POEMDEV  pDev,
HANDLE  hPrinter 
)

Writes the plugin data to the registry.

Parameters:
pDev Pointer to the plugin data
hPrinter Handle to the printer
Returns:
true if written successfully, false if failed

Definition at line 398 of file devmode.cpp.

References tagOEMDEV::bAutoOpen, tagOEMDEV::bAutoURLs, tagOEMDEV::bCreateAsTemp, tagOEMDEV::bSetProperties, tagOEMDEV::info, tagOEMDEV::location, CCPrintRegistry::SetRegistryBool(), SETTINGS_AUTOOPEN, and CCPrintLicenseInfo::WriteToRegistry().

Referenced by hrOEMDocumentPropertySheets(), and OEMDocUICallBack().


Generated on Mon Jun 18 12:40:25 2012 for CC PDF Converter by doxygen 1.6.1