Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

MyRegistry Class Reference

Lecture / Ecriture / Enumeration de clef et de valeur de registre. More...

#include <MyRegistry.H>

List of all members.

Public Member Functions

 MyRegistry (BOOL autoCreate=FALSE)
 Contructeur avec l'autocreate.

BOOL operator= (char *nameKey)
BOOL Open (char *nameKey)
 Affect un nom de clef.

void GetKeyName (MyString &result)
BOOL Create (char *nameKey)
 Creation d'une clef.

void SetAutoCreate (BOOL autoCreate)
 Active ou pas le mode de creation de clef si non existant quand on utilise.

BOOL IsAutoCreate ()
int GetValueType (char *param)
int GetValueSize (char *param)
 Place la valeur value dans le parametre param de la base de registre selectionner par nameKey.

BOOL GetValue (char *param, char *result, char *defValue=NULL)
BOOL GetValue (char *param, MyString &result, char *defValue=NULL)
BOOL GetValueMulti (char *param, MyList< MyString > &result, char *defValue=NULL)
BOOL GetValueExpand (char *param, char *result, char *defValue=NULL)
BOOL GetValueExpand (char *param, MyString &result, char *defValue=NULL)
BOOL GetValue (char *param, int *result, int defValue=0)
BOOL GetValue (char *param, DWORD *result, DWORD defValue=0)
BOOL GetValue (char *param, LONGLONG *result, LONGLONG defValue=0)
LPBYTE GetValue (char *param)
BOOL GetValue (char *param, float *result, float defValue=0)
BOOL GetValue (char *param, double *result, double defValue=0)
BOOL SetValue (char *param)
BOOL SetValue (char *param, int value)
BOOL SetValue (char *param, DWORD value)
BOOL SetValueLittleEndian (char *param, DWORD value)
BOOL SetValueBigEndian (char *param, DWORD value)
BOOL SetValue (char *param, LONGLONG value)
BOOL SetValueLittleEndian (char *param, LONGLONG value)
BOOL SetValue (char *param, char *value)
BOOL SetValueExpand (char *param, char *value)
BOOL SetValueMulti (char *param, MyList< MyString > &lString)
BOOL SetValueMulti (char *param, char *value)
BOOL SetValue (char *param, LPBYTE data, int size)
BOOL SetValue (char *param, float result)
BOOL SetValue (char *param, double result)
BOOL DeleteValue (char *param)
 Efface une valeur.

BOOL DeleteKey (char *nameKey=NULL)
 Efface une clef.

BOOL TestValue (char *param)
BOOL TestKey ()
 Teste si un valeur existe.

int GetLastError ()
void BeginEnumKey ()
BOOL NextEnumKey (char *result)
BOOL NextEnumKey (MyString &result)
void BeginEnumValue ()
BOOL NextEnumValue (char *result)
BOOL NextEnumValue (MyString &result)


Detailed Description

Lecture / Ecriture / Enumeration de clef et de valeur de registre.

Example:

MyRegistry reg(TRUE); // autoCreate= Yes MyString str1; char str2[4096]; MyList<MyString> lStr; int integer; LONGLONG linteger; BOOL r; r=reg="HKCU\\test"; r=reg.SetValue("boolean"); r=reg.SetValue("string1","hello word!"); r=reg.SetValueExpand("path","%windir%\\myFolder"); r=reg.SetValueMulti("listFriend","dudu\0grib\0cecile\0"); r=reg.SetValue("integer",-12); r=reg.SetValueLittleEndian("integer le",(DWORD)-12); r=reg.SetValueBigEndian("integer be",-12); r=reg.SetValue("linteger",(LONGLONG) -12); r=reg.SetValueLittleEndian("linteger le",(LONGLONG) -12); r=reg.SetValue("binary",(LPBYTE)"01234567890123456789",20); r= (BOOL)reg.GetValue("boolean"); // res = 1; r=reg.GetValue("string1",str1); // "hello word !" r=reg.GetValue("path",str1); // "%windir%\myFolder" r=reg.GetValueExpand("path",str1); // "c:\windows\myFolder" r=reg.GetValue("listFriend",str1); // "dudu grib cecile" r=reg.GetValue("string1",str2); // "hello word !" r=reg.GetValue("path",str2); // "%windir%\myFolder" r=reg.GetValueExpand("path",str2); // "c:\windows\myFolder" r=reg.GetValue("listFriend",str2); // "dudu grib cecile" r=reg.GetValueMulti("listFriend",lStr); // {"dudu","grib","cecile"}; r=reg.SetValueMulti("copy listFriend",lStr); r=reg.GetValue("integer",&integer); // -12 r=reg.GetValue("integer le",&integer); // -12 r=reg.GetValue("integer be",&integer); // -12 r=reg.GetValue("linteger",&linteger); // -12 r=reg.GetValue("linteger le",&linteger); // -12 LPVOID bin =reg.GetValue("binary"); delete bin;

Definition at line 77 of file MyRegistry.H.


Constructor & Destructor Documentation

MyRegistry::MyRegistry BOOL  autoCreate = FALSE  ) 
 

Contructeur avec l'autocreate.

Cf.: SetAutoCreate

Definition at line 108 of file MyRegistry.CPP.


Member Function Documentation

void MyRegistry::BeginEnumKey  )  [inline]
 

Definition at line 137 of file MyRegistry.H.

void MyRegistry::BeginEnumValue  )  [inline]
 

Definition at line 141 of file MyRegistry.H.

BOOL MyRegistry::Create char *  nameKey  ) 
 

Creation d'une clef.

Ex.:

key.Create("HKCU\\test1\\test2"); key.Create("\\test3"); // HKCU\test1\test2\test3

Definition at line 245 of file MyRegistry.CPP.

References BOOL().

Referenced by Open().

BOOL MyRegistry::DeleteKey char *  nameKey = NULL  ) 
 

Efface une clef.

Definition at line 263 of file MyRegistry.CPP.

References BOOL(), MyString::GetValue(), and TestKey().

Referenced by ControlEngine::ControlEngine().

BOOL MyRegistry::DeleteValue char *  param  ) 
 

Efface une valeur.

Definition at line 277 of file MyRegistry.CPP.

References BOOL(), and param.

void MyRegistry::GetKeyName MyString result  ) 
 

Definition at line 195 of file MyRegistry.CPP.

int MyRegistry::GetLastError  )  [inline]
 

Definition at line 135 of file MyRegistry.H.

BOOL MyRegistry::GetValue char *  param,
double *  result,
double  defValue = 0
 

Definition at line 524 of file MyRegistry.CPP.

References BOOL(), GetValue(), param, res, and MyString::ToDouble().

BOOL MyRegistry::GetValue char *  param,
float *  result,
float  defValue = 0
 

Definition at line 515 of file MyRegistry.CPP.

References BOOL(), GetValue(), param, res, and MyString::ToFloat().

LPBYTE MyRegistry::GetValue char *  param  ) 
 

BOOL MyRegistry::GetValue char *  param,
LONGLONG *  result,
LONGLONG  defValue = 0
 

Definition at line 500 of file MyRegistry.CPP.

References BOOL(), GetValue(), GetValueType(), param, res, and uType.

BOOL MyRegistry::GetValue char *  param,
DWORD *  result,
DWORD  defValue = 0
 

Definition at line 481 of file MyRegistry.CPP.

References BOOL(), GetValue(), GetValueType(), param, res, and uType.

BOOL MyRegistry::GetValue char *  param,
int *  result,
int  defValue = 0
 

Definition at line 476 of file MyRegistry.CPP.

References BOOL(), GetValue(), and param.

BOOL MyRegistry::GetValue char *  param,
MyString result,
char *  defValue = NULL
 

Definition at line 383 of file MyRegistry.CPP.

References BOOL(), MyString::Delete(), GetValue(), GetValueSize(), GetValueType(), param, res, and uType.

BOOL MyRegistry::GetValue char *  param,
char *  result,
char *  defValue = NULL
 

Definition at line 369 of file MyRegistry.CPP.

References BOOL(), MyString::GetSize(), MyString::GetValue(), and param.

Referenced by ControlEngine::ControlEngine(), GetValue(), GetValueExpand(), and GetValueMulti().

BOOL MyRegistry::GetValueExpand char *  param,
MyString result,
char *  defValue = NULL
 

Definition at line 458 of file MyRegistry.CPP.

References BOOL(), GetValue(), param, and res.

BOOL MyRegistry::GetValueExpand char *  param,
char *  result,
char *  defValue = NULL
 

Definition at line 450 of file MyRegistry.CPP.

References BOOL(), and param.

BOOL MyRegistry::GetValueMulti char *  param,
MyList< MyString > &  result,
char *  defValue = NULL
 

Definition at line 418 of file MyRegistry.CPP.

References BOOL(), GetValue(), GetValueSize(), MyList< T >::i, param, and res.

int MyRegistry::GetValueSize char *  param  ) 
 

Place la valeur value dans le parametre param de la base de registre selectionner par nameKey.

Definition at line 320 of file MyRegistry.CPP.

References dwSize, and param.

Referenced by GetValue(), and GetValueMulti().

int MyRegistry::GetValueType char *  param  ) 
 

Definition at line 333 of file MyRegistry.CPP.

References param, and uType.

Referenced by GetValue().

BOOL MyRegistry::IsAutoCreate  ) 
 

Definition at line 37 of file MyRegistry.CPP.

References BOOL().

BOOL MyRegistry::NextEnumKey MyString result  ) 
 

BOOL MyRegistry::NextEnumKey char *  result  ) 
 

BOOL MyRegistry::NextEnumValue MyString result  ) 
 

BOOL MyRegistry::NextEnumValue char *  result  ) 
 

BOOL MyRegistry::Open char *  nameKey  ) 
 

Affect un nom de clef.

Accept le chemin relatif

ex.: CMyRegistrie reg; reg="HKCU\\Sofware\\test"; reg=".."; // HKCU\Software reg="..\\Console"; // HKCU\Console

Definition at line 126 of file MyRegistry.CPP.

References BOOL(), and Create().

Referenced by operator=().

BOOL MyRegistry::operator= char *  nameKey  )  [inline]
 

Definition at line 81 of file MyRegistry.H.

References BOOL(), and Open().

void MyRegistry::SetAutoCreate BOOL  autoCreate  ) 
 

Active ou pas le mode de creation de clef si non existant quand on utilise.

Read()

  • ou - operateur=(char *) (affectation d'un string)

Definition at line 32 of file MyRegistry.CPP.

BOOL MyRegistry::SetValue char *  param,
double  result
 

BOOL MyRegistry::SetValue char *  param,
float  result
 

BOOL MyRegistry::SetValue char *  param,
LPBYTE  data,
int  size
 

BOOL MyRegistry::SetValue char *  param,
char *  value
 

BOOL MyRegistry::SetValue char *  param,
LONGLONG  value
 

BOOL MyRegistry::SetValue char *  param,
DWORD  value
 

BOOL MyRegistry::SetValue char *  param,
int  value
 

BOOL MyRegistry::SetValue char *  param  ) 
 

Referenced by ControlEngine::~ControlEngine().

BOOL MyRegistry::SetValueBigEndian char *  param,
DWORD  value
 

BOOL MyRegistry::SetValueExpand char *  param,
char *  value
 

BOOL MyRegistry::SetValueLittleEndian char *  param,
LONGLONG  value
 

BOOL MyRegistry::SetValueLittleEndian char *  param,
DWORD  value
 

BOOL MyRegistry::SetValueMulti char *  param,
char *  value
 

BOOL MyRegistry::SetValueMulti char *  param,
MyList< MyString > &  lString
 

BOOL MyRegistry::TestKey  ) 
 

Teste si un valeur existe.

Definition at line 290 of file MyRegistry.CPP.

References BOOL().

Referenced by ControlEngine::ControlEngine(), and DeleteKey().

BOOL MyRegistry::TestValue char *  param  ) 
 

Definition at line 304 of file MyRegistry.CPP.

References BOOL(), dwSize, param, and uType.


The documentation for this class was generated from the following files:
Generated on Fri Aug 20 19:21:27 2004 for 3d Controls by doxygen 1.3.6