C++.NET

Moderators: Lundin
Number of threads: 99
Number of posts: 163

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
VC C++ 2005 Error Create Register in clr form Posted by ajaxswan on 27 Dec 2009 at 7:58 PM
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("SOFTWARE\MYSOFTWARE\DATA");

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 explorer\multinet_explorer\Form1.h(222) : warning C4129: 'M' : unrecognized character escape sequence
1>d:\multinet explorer\multinet_explorer\Form1.h(222) : warning C4129: 'M' : unrecognized character escape sequence
1>Linking...
1>Embedding manifest...
1>Build log was saved at "file://d:\MULTiNET EXPLORER\MULTINET_EXPLORER\Debug\BuildLog.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 ???
Report
Re: VC C++ 2005 Error Create Register in clr form Posted by anthrax11 on 27 Dec 2009 at 8:09 PM
CreateSubKey("SOFTWARE\\MYSOFTWARE\\DATA");

'\' followed by another character is a whitespace symbol. For example, you can define a tab("\t") and a new line("\n") with it. To get a \ character, use the backslash twice - '\\'.
Report
Re: VC C++ 2005 Error Create Register in clr form Posted by ajaxswan on 27 Dec 2009 at 8:20 PM
:
: 
: CreateSubKey("SOFTWARE\\MYSOFTWARE\\DATA");
: 
:
: '\' followed by another character is a whitespace symbol. For
: example, you can define a tab("\t") and a new line("\n") with it. To
: get a \ character, use the backslash twice - '\\'.


it follow an error :

1>d:\multinet explorer\multinet_explorer\Form1.h(224) : error C3861: 'CreateSubKey': identifier not found


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



Report
Re: VC C++ 2005 Error Create Register in clr form Posted by anthrax11 on 28 Dec 2009 at 4:56 AM
I made the command shorter to show more exactly where the problem is. Just use this:
RegistryKey ^ regkey = Registry::LocalMachine->CreateSubKey("SOFTWARE\\MYSOFTWARE\\DATA");



 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.