VC C++ 2005 Error Create Register in clr form - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

VC C++ 2005 Error Create Register in clr form

ajaxswanajaxswan Posts: 2Member
hi ,

I'm New In C++ FORM crl Programing
I Want to Register Data to registry
I check Sample Code in MSDN
like this :

RegistryKey ^ regkey = Registry::LocalMachine->CreateSubKey("SOFTWAREMYSOFTWAREDATA");

And I got no error and 2 warning

11>------ Build started: Project: MULTINET_EXPLORER, Configuration: Debug Win32 ------
1>Compiling...
1>MULTINET_EXPLORER.cpp
1>d:multinet explorermultinet_explorerForm1.h(222) : warning C4129: 'M' : unrecognized character escape sequence
1>d:multinet explorermultinet_explorerForm1.h(222) : warning C4129: 'M' : unrecognized character escape sequence
1>Linking...
1>Embedding manifest...
1>Build log was saved at "file://d:MULTiNET EXPLORERMULTINET_EXPLORERDebugBuildLog.htm"
1>MULTINET_EXPLORER - 0 error(s), 2 warning(s)
========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========

but when the program runing it always gon error message

like this
An unhandled exception of type 'System.IO.IOException' occurred in mscorlib.dll

Additional information: The parameter is incorrect.

how can I solve this Problem ???

can anyone help me ???

Comments

  • anthrax11anthrax11 Posts: 511Member
    [code]
    CreateSubKey("SOFTWARE[color=Red]\[/color]MYSOFTWARE[color=Red]\[/color]DATA");
    [/code]
    '' followed by another character is a whitespace symbol. For example, you can define a tab(" ") and a new line("
    ") with it. To get a character, use the backslash twice - '\'.
  • ajaxswanajaxswan Posts: 2Member
    : [code]:
    : CreateSubKey("SOFTWARE[color=Red]\[/color]MYSOFTWARE[color=Red]\[/color]DATA");
    : [/code]:
    : '' followed by another character is a whitespace symbol. For
    : example, you can define a tab(" ") and a new line("
    ") with it. To
    : get a character, use the backslash twice - '\'.


    it follow an error :

    1>d:multinet explorermultinet_explorerForm1.h(224) : error C3861: 'CreateSubKey': identifier not found


    how to define CreateSubKey ??
    and how can I set n get reg value



  • anthrax11anthrax11 Posts: 511Member
    I made the command shorter to show more exactly where the problem is. Just use this:
    [code]RegistryKey ^ regkey = Registry::LocalMachine->CreateSubKey("SOFTWARE\MYSOFTWARE\DATA");[/code]
Sign In or Register to comment.