REGVARS.H
资源名称:pciexp.zip [点击查看]
上传用户:zhuqijet
上传日期:2007-01-04
资源大小:138k
文件大小:1k
源码类别:
驱动编程
开发平台:
Visual C++
- class RegistryVar {
- public:
- static void setInt(UINT id, int value, HKEY root = HKEY_CURRENT_USER);
- static int getInt(UINT id, int def = 0, HKEY root = HKEY_CURRENT_USER);
- static void setString(UINT id, LPCTSTR s, HKEY root = HKEY_CURRENT_USER);
- static CString getString(UINT id, LPCTSTR def = NULL, HKEY root = HKEY_CURRENT_USER);
- protected:
- UINT id;
- HKEY root;
- };
- class RegistryInt : public RegistryVar {
- public:
- RegistryInt(UINT n, HKEY r = HKEY_CURRENT_USER ) {id = n; root = r; }
- int value; // the value
- virtual int load(int def = 0);
- virtual void store();
- };
- class RegistryString : public RegistryVar {
- public:
- RegistryString(UINT n, HKEY r = HKEY_CURRENT_USER) {id = n; root = r; }
- CString value; // the value
- virtual CString load(LPCTSTR def = NULL);
- virtual void store();
- };