Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Problem with the Registry Wrapper Class (CRegistry)

Problem with the Registry Wrapper Class (CRegistry)

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestioncomwindows-admin
9 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Semion_N
    wrote on last edited by
    #1

    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)

    _ H S 3 Replies Last reply
    0
    • S Semion_N

      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)

      _ Offline
      _ Offline
      _AnsHUMAN_
      wrote on last edited by
      #2

      IMHO , #include "stdafx.h" at the top would fix the problem

      Somethings seem HARD to do, until we know how to do them. ;-)_AnShUmAn_

      1 Reply Last reply
      0
      • S Semion_N

        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)

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        Is it possible to write your error?

        _**


        **_

        WhiteSky


        S 1 Reply Last reply
        0
        • S Semion_N

          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)

          S Offline
          S Offline
          Semion_N
          wrote on last edited by
          #4

          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

          H 1 Reply Last reply
          0
          • H Hamid Taebi

            Is it possible to write your error?

            _**


            **_

            WhiteSky


            S Offline
            S Offline
            Semion_N
            wrote on last edited by
            #5

            Please read my next message :-D

            SnaidiS(Semion)

            1 Reply Last reply
            0
            • S Semion_N

              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

              H Offline
              H Offline
              Hamid Taebi
              wrote on last edited by
              #6

              What problem with this code CRegistry Reg; CString string2 = "Software\\MyApp\\key"; Reg.SetRootKey(HKEY_LOCAL_MACHINE); Reg.SetKey(string2,TRUE);

              _**


              **_

              WhiteSky


              S 1 Reply Last reply
              0
              • H Hamid Taebi

                What problem with this code CRegistry Reg; CString string2 = "Software\\MyApp\\key"; Reg.SetRootKey(HKEY_LOCAL_MACHINE); Reg.SetKey(string2,TRUE);

                _**


                **_

                WhiteSky


                S Offline
                S Offline
                Semion_N
                wrote on last edited by
                #7

                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)

                S 1 Reply Last reply
                0
                • S Semion_N

                  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)

                  S Offline
                  S Offline
                  Semion_N
                  wrote on last edited by
                  #8

                  please help me :|

                  SnaidiS(Semion)

                  H 1 Reply Last reply
                  0
                  • S Semion_N

                    please help me :|

                    SnaidiS(Semion)

                    H Offline
                    H Offline
                    Hamid Taebi
                    wrote on last edited by
                    #9

                    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


                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups