Registry Access (Write Access)

B

Brian Muth

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top