Problem with the Registry Wrapper Class (CRegistry)
-
I'm trying to execute my program that uses the -Registry Wrapper Class (CRegistry)- object. I included the Registry.h file. But it gives me an error which you can see on the picture below: http://img92.imageshack.us/img92/2469/untitledbu8.jpg[^] You can see the article about the class if you need:http://www.codeproject.com/system/CRegistry.asp[^] How can I fix it? Thank you all for your answers!
SnaidiS(Semion)
-
I'm trying to execute my program that uses the -Registry Wrapper Class (CRegistry)- object. I included the Registry.h file. But it gives me an error which you can see on the picture below: http://img92.imageshack.us/img92/2469/untitledbu8.jpg[^] You can see the article about the class if you need:http://www.codeproject.com/system/CRegistry.asp[^] How can I fix it? Thank you all for your answers!
SnaidiS(Semion)
IMHO , #include "stdafx.h" at the top would fix the problem
Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_
-
I'm trying to execute my program that uses the -Registry Wrapper Class (CRegistry)- object. I included the Registry.h file. But it gives me an error which you can see on the picture below: http://img92.imageshack.us/img92/2469/untitledbu8.jpg[^] You can see the article about the class if you need:http://www.codeproject.com/system/CRegistry.asp[^] How can I fix it? Thank you all for your answers!
SnaidiS(Semion)
Is it possible to write your error?
_**
**_
WhiteSky
-
I'm trying to execute my program that uses the -Registry Wrapper Class (CRegistry)- object. I included the Registry.h file. But it gives me an error which you can see on the picture below: http://img92.imageshack.us/img92/2469/untitledbu8.jpg[^] You can see the article about the class if you need:http://www.codeproject.com/system/CRegistry.asp[^] How can I fix it? Thank you all for your answers!
SnaidiS(Semion)
I tried another registry class ;P(because I found it easier to use) but I have another problem there: I'm writing this:
CRegistry Reg(); CString string = "Software\\MyApp\\key"; Reg.SetRootKey(HKEY_LOCAL_MACHINE); Reg.SetKey(string,TRUE);
and it gives me the error: error C2228: left of '.SetKey' must have class/struct/union type article: http://www.codeproject.com/system/registry.asp[^] What is the problem?:confused: -- modified at 9:28 Thursday 27th July, 2006 -
Is it possible to write your error?
_**
**_
WhiteSky
-
I tried another registry class ;P(because I found it easier to use) but I have another problem there: I'm writing this:
CRegistry Reg(); CString string = "Software\\MyApp\\key"; Reg.SetRootKey(HKEY_LOCAL_MACHINE); Reg.SetKey(string,TRUE);
and it gives me the error: error C2228: left of '.SetKey' must have class/struct/union type article: http://www.codeproject.com/system/registry.asp[^] What is the problem?:confused: -- modified at 9:28 Thursday 27th July, 2006What problem with this code
CRegistry Reg; CString string2 = "Software\\MyApp\\key"; Reg.SetRootKey(HKEY_LOCAL_MACHINE); Reg.SetKey(string2,TRUE);
_**
**_
WhiteSky
-
What problem with this code
CRegistry Reg; CString string2 = "Software\\MyApp\\key"; Reg.SetRootKey(HKEY_LOCAL_MACHINE); Reg.SetKey(string2,TRUE);
_**
**_
WhiteSky
If I remove the ( ) it gives me a lot of errors: MyReg error LNK2019: unresolved external symbol "public: __thiscall CRegistry::~CRegistry(void)" (??1CRegistry@@QAE@XZ) referenced in function "protected: virtual int __thiscall CMyRegDlg::OnInitDialog(void)" (?OnInitDialog@CMyRegDlg@@MAEHXZ) MyReg error LNK2019: unresolved external symbol "public: __thiscall CRegistry::CRegistry(void)" (??0CRegistry@@QAE@XZ) referenced in function "protected: virtual int __thiscall CMyRegDlg::OnInitDialog(void)" (?OnInitDialog@CMyRegDlg@@MAEHXZ) MyReg error LNK2019: unresolved external symbol "public: int __thiscall CRegistry::SetKey(class ATL::CStringT > >,int)" (?SetKey@CRegistry@@QAEHV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@H@Z) referenced in function "protected: virtual int __thiscall CMyRegDlg::OnInitDialog(void)" (?OnInitDialog@CMyRegDlg@@MAEHXZ) MyReg error LNK2019: unresolved external symbol "public: int __thiscall CRegistry::SetRootKey(struct HKEY__ *)" (?SetRootKey@CRegistry@@QAEHPAUHKEY__@@@Z) referenced in function "protected: virtual int __thiscall CMyRegDlg::OnInitDialog(void)" (?OnInitDialog@CMyRegDlg@@MAEHXZ) MyReg fatal error LNK1120: 4 unresolved externals
SnaidiS(Semion)
-
If I remove the ( ) it gives me a lot of errors: MyReg error LNK2019: unresolved external symbol "public: __thiscall CRegistry::~CRegistry(void)" (??1CRegistry@@QAE@XZ) referenced in function "protected: virtual int __thiscall CMyRegDlg::OnInitDialog(void)" (?OnInitDialog@CMyRegDlg@@MAEHXZ) MyReg error LNK2019: unresolved external symbol "public: __thiscall CRegistry::CRegistry(void)" (??0CRegistry@@QAE@XZ) referenced in function "protected: virtual int __thiscall CMyRegDlg::OnInitDialog(void)" (?OnInitDialog@CMyRegDlg@@MAEHXZ) MyReg error LNK2019: unresolved external symbol "public: int __thiscall CRegistry::SetKey(class ATL::CStringT > >,int)" (?SetKey@CRegistry@@QAEHV?$CStringT@DV?$StrTraitMFC_DLL@DV?$ChTraitsCRT@D@ATL@@@@@ATL@@H@Z) referenced in function "protected: virtual int __thiscall CMyRegDlg::OnInitDialog(void)" (?OnInitDialog@CMyRegDlg@@MAEHXZ) MyReg error LNK2019: unresolved external symbol "public: int __thiscall CRegistry::SetRootKey(struct HKEY__ *)" (?SetRootKey@CRegistry@@QAEHPAUHKEY__@@@Z) referenced in function "protected: virtual int __thiscall CMyRegDlg::OnInitDialog(void)" (?OnInitDialog@CMyRegDlg@@MAEHXZ) MyReg fatal error LNK1120: 4 unresolved externals
SnaidiS(Semion)
-
I see this article and when you run these functions you have a reg key in registry (MyApp) but i dont know how do you use this article that you have these errors can you explain how do you use from this article,please
_**
**_
WhiteSky