1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64
|
/*
CRegistry class
Copyright (C) 2002-2004 Antonio Foranna
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
The author can be contacted at:
ntnfrn_email-temp@yahoo.it
*/
//---------------------------------------------------------------------------
#ifndef CRegistryH
#define CRegistryH
//---------------------------------------------------------------------------
#include <windows.h>
#include <stdlib.h>
#include <string.h>
//#include <memory.h>
class CRegistry
{
public:
CRegistry();
~CRegistry();
BOOL Open(HKEY hKey, char *SubKey);
BOOL OpenCreate(HKEY hKey, char *SubKey);
void Close();
void DeleteVal(char *SubKey);
void DeleteKey(char *SubKey);
void SetBool(char *keyStr , bool val);
void SetByte(char *keyStr , BYTE val);
void SetWord(char *keyStr , WORD val);
void SetDword(char *keyStr , DWORD val);
void SetFloat(char *keyStr , float val);
void SetStr(char *keyStr , char *valStr);
void SetValN(char *keyStr , BYTE *addr, DWORD size);
bool GetSetBool(char *keyStr, bool var);
BYTE GetSetByte(char *keyStr, BYTE var);
WORD GetSetWord(char *keyStr, WORD var);
DWORD GetSetDword(char *keyStr, DWORD var);
float GetSetFloat(char *keyStr, float var);
char *GetSetStr(char *keyStr, char *String);
int GetSetValN(char *keyStr, BYTE *defData, DWORD defSize, BYTE **dest);
HKEY regKey;
char *path;
};
#endif
|