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 while using Windows Registry

Problem while using Windows Registry

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpc++dotnetvisual-studio
8 Posts 5 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.
  • H Offline
    H Offline
    harsh_2961
    wrote on last edited by
    #1

    hi, i found a code online regarding how to use windows registry and when i run it visual studio 2005 its running fine.. Now i tried to implement the samething implemented in the code in my application and i found and i am getting this folllowimg error. "fatal error C1190: managed targeted code requires a '/clr' option" In my .Cpp file i am using #using and in stdafx.h i am using #using #using using namespace System; using namespace System::Windows::Forms; using namespace Microsoft::Win32; #undef MessageBox please let me know the way to get over this error.. harsha

    P M T 3 Replies Last reply
    0
    • H harsh_2961

      hi, i found a code online regarding how to use windows registry and when i run it visual studio 2005 its running fine.. Now i tried to implement the samething implemented in the code in my application and i found and i am getting this folllowimg error. "fatal error C1190: managed targeted code requires a '/clr' option" In my .Cpp file i am using #using and in stdafx.h i am using #using #using using namespace System; using namespace System::Windows::Forms; using namespace Microsoft::Win32; #undef MessageBox please let me know the way to get over this error.. harsha

      P Offline
      P Offline
      prasad_som
      wrote on last edited by
      #2

      To use managed c++, you need to choose option Project-->Properties-->configuration properties-->c/c++-->General-->commaon language runtime support(/clr).

      Prasad Notifier using ATL | Operator new[],delete[][^]

      H 1 Reply Last reply
      0
      • H harsh_2961

        hi, i found a code online regarding how to use windows registry and when i run it visual studio 2005 its running fine.. Now i tried to implement the samething implemented in the code in my application and i found and i am getting this folllowimg error. "fatal error C1190: managed targeted code requires a '/clr' option" In my .Cpp file i am using #using and in stdafx.h i am using #using #using using namespace System; using namespace System::Windows::Forms; using namespace Microsoft::Win32; #undef MessageBox please let me know the way to get over this error.. harsha

        M Offline
        M Offline
        Mark Salsbery
        wrote on last edited by
        #3

        The code is using the CLR so you'll need to enable Common Language Runtime support in your project properties (Configuration Properties/General). Mark

        "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

        H 1 Reply Last reply
        0
        • M Mark Salsbery

          The code is using the CLR so you'll need to enable Common Language Runtime support in your project properties (Configuration Properties/General). Mark

          "Great job, team. Head back to base for debriefing and cocktails." (Spottswoode "Team America")

          H Offline
          H Offline
          harsh_2961
          wrote on last edited by
          #4

          Thanks a lot its working now:) harsha

          1 Reply Last reply
          0
          • P prasad_som

            To use managed c++, you need to choose option Project-->Properties-->configuration properties-->c/c++-->General-->commaon language runtime support(/clr).

            Prasad Notifier using ATL | Operator new[],delete[][^]

            H Offline
            H Offline
            harsh_2961
            wrote on last edited by
            #5

            Thanks a lot its working now:) harsha

            1 Reply Last reply
            0
            • H harsh_2961

              hi, i found a code online regarding how to use windows registry and when i run it visual studio 2005 its running fine.. Now i tried to implement the samething implemented in the code in my application and i found and i am getting this folllowimg error. "fatal error C1190: managed targeted code requires a '/clr' option" In my .Cpp file i am using #using and in stdafx.h i am using #using #using using namespace System; using namespace System::Windows::Forms; using namespace Microsoft::Win32; #undef MessageBox please let me know the way to get over this error.. harsha

              T Offline
              T Offline
              ThatsAlok
              wrote on last edited by
              #6

              harsh_2961 wrote:

              using namespace Microsoft::Win32;

              better ask you CLR based question in ManagedForum[^]

              "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

              cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

              H 1 Reply Last reply
              0
              • T ThatsAlok

                harsh_2961 wrote:

                using namespace Microsoft::Win32;

                better ask you CLR based question in ManagedForum[^]

                "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

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

                You said better ask on the ManagedForum but he said thanks its working now:-D:doh:


                WhiteSky


                T 1 Reply Last reply
                0
                • H Hamid Taebi

                  You said better ask on the ManagedForum but he said thanks its working now:-D:doh:


                  WhiteSky


                  T Offline
                  T Offline
                  ThatsAlok
                  wrote on last edited by
                  #8

                  WhiteSky wrote:

                  he said thanks its working no

                  he he he ;P

                  "Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow

                  cheers, Alok Gupta Global Interface Table: An Easy Way to Marshal an Interface Pointer[new] VC Forum Q&A :- I/ IV Support CRY- Child Relief and You

                  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