00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef _CCPRINTREGISTRY_H_
00028 #define _CCPRINTREGISTRY_H_
00029
00030 #include "CCTChar.h"
00031 #include <list>
00032
00034 typedef std::list<std::tstring> STRLIST;
00035
00039 namespace CCPrintRegistry
00040 {
00041
00043 DWORD GetRegistryDWORD(HANDLE hPrinter, LPCTSTR lpSetting, DWORD dwDefault);
00051 inline int GetRegistryInt(HANDLE hPrinter, LPCTSTR lpSetting, int nDefault) {return (int)GetRegistryDWORD(hPrinter, lpSetting, (DWORD)nDefault);}
00053 std::tstring GetRegistryString(HANDLE hPrinter, LPCTSTR lpSetting, LPCTSTR lpDefault);
00061 inline bool GetRegistryBool(HANDLE hPrinter, LPCTSTR lpSetting, bool bDefault) {return (GetRegistryDWORD(hPrinter, lpSetting, bDefault ? 1 : 0) == 1);};
00062
00064 bool SetRegistryDWORD(HANDLE hPrinter, LPCTSTR lpSetting, DWORD dwValue);
00071 inline bool SetRegistryInt(HANDLE hPrinter, LPCTSTR lpSetting, int nValue) {return SetRegistryDWORD(hPrinter, lpSetting, (DWORD)nValue);};
00078 inline bool SetRegistryBool(HANDLE hPrinter, LPCTSTR lpSetting, bool bValue) {return SetRegistryDWORD(hPrinter, lpSetting, bValue ? 1 : 0);};
00080 bool SetRegistryString(HANDLE hPrinter, LPCTSTR lpSetting, const std::tstring& sValue);
00081
00083 bool EraseRegistryValue(HANDLE hPrinter, LPCTSTR lpSetting);
00084
00086 bool EnumRegistryValues(HANDLE hPrinter, STRLIST& lValues, LPCTSTR lpPrefix = NULL);
00087
00088 };
00089
00090 #endif //#define _CCPRINTREGISTRY_H_