Implementation of Devmode functions shared with OEM UI and OEM rendering modules. Based on: Devmode.cpp Printer Driver Plugin Sample by Microsoft Corporation. More...
#include "precomp.h"
#include "debug.h"
#include "devmode.h"
#include "CCCommon.h"
#include "CCPrintLicenseInfo.h"
#include "CCPrintRegistry.h"
#include "Helpers.h"
Go to the source code of this file.
Functions | |
void | InitToDefault (POEMDEV pOEMDevOut, HANDLE hPrinter) |
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 pOEMDevmode) |
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. |
Implementation of Devmode functions shared with OEM UI and OEM rendering modules. Based on: Devmode.cpp Printer Driver Plugin Sample by Microsoft Corporation.
Definition in file devmode.cpp.
Handler for copy/initialization of plugin data.
pOEMDevIn | Pointer to the structure to read data from | |
pOEMDevOut | Pointer to the structure to write data into | |
hPrinter | Handle to the printer |
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.
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.
dwMode | Initialization mode information (see IPrintOemPS::DevMode function in the DDK) | |
pOemDMParam | Pointer to an OEMDMPARAM structure containing printer data |
Definition at line 184 of file devmode.cpp.
References ConvertOEMDevmode(), InitToDefault(), and MakeOEMDevmodeValid().
void InitToDefault | ( | POEMDEV | pOEMDevOut, | |
HANDLE | hPrinter | |||
) |
pOEMDevOut | Pointer to the structure to write data into | |
hPrinter | Handle to the printer |
Definition at line 170 of file devmode.cpp.
References CCPRINT_SIGNATURE, tagOEMDEV::cFilename, tagOEMDEV::dmOEMExtra, and ReadOEMDevFromRegistry().
Referenced by ConvertOEMDevmode(), and hrOEMDevMode().
BOOL MakeOEMDevmodeValid | ( | POEMDEV | pOEMDevmode | ) |
Handler for validation of plugin data.
pOEMDevmode | Pointer to the printer data structure to initialize |
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.
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.
pDev | Pointer to the plugin data | |
hPrinter | Handle to the printer |
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().