Registry Access (Write Access)

  • Thread starter Thread starter Newbie Coder
  • Start date Start date
Newbie Coder said:
Brian,

The function prototype is already defined in the RegisterEx.h file which
if
you see a few of my posts back the full header/cpp files I am using

I just want to be able to use that class in my MFC application like I
wrote
before in VB.NET:

Dim clsReg As New RegisterEx
clsReg.SetSomeValue("bla", "bla", "bla")

Cheers,

I might be getting lost here. If your class is defined as:

class CRegisterEx
{
public:
CRegisterEx(CString path);
~CRegisterEx(void);

void WriteString(CString str, CString subPath = "", CString Key = "");
};

Simply add the new function as a member function of the class, as in:

class CRegisterEx
{
public:
CRegisterEx(CString path);
~CRegisterEx(void);

void WriteString(CString str, CString subPath = "", CString Key = "");
void RemoveSomeValue (_TCHAR *sValue);
};

The client code calling this function might look like:

CRegisterEx r ("F:\Mypath");
r.RemoveSomeValue (_T("MyKey"));

Brian
 
Back
Top