I know I don't spend much time in the CP forums talking or maybe even not at all I do allot of browsing here, I recently found a tut from RegistryKey. After adding the code to my project it had said that the namespace did not exist, for example 'Microsoft': class or namespace does not exist. I don't know what to do im completely lost as to where to go from here, I have the most recent as far as i know its recent, SDK 2.0 installed along with VS .NET '03. For this project I am using C++/CLi.
// DevLdr.cpp : Defines the entry point for the console application.<br />//<br />
#include "stdafx.h"<br />
usingnamespace Microsoft::Win32;<br />
int _tmain(int argc, _TCHAR* argv)<br />
rkey = Registry.CurrentUser;<br />
//The second parameter tells it to open the key as writable<br />
rkey1 = rkey.OpenSubKey("Software",true);<br />
// Now we create our sub key [assuming you have enough <br />// rights to edit this area of the registry]<br />
RegistryKey rkey2 = rkey1.CreateSubKey("Tweety");<br />
//Setting the various values is done using SetValue()<br />//I couldn't figure out how to set the value type yet <br />
Oh dear ! you are not using managed C++, I fear.
If you want to use this code in unmanaged c++, go to project properties-->configuration properties-->Project defaults-->common language runtime support and set it to commong language runtime support(/clr).
Or better of starting new project with type VC++-->CLR-->CLR console application.
it wasn't giving me that option, although I did notice what you were talking about. so im just removed all of my sdk components and reinstalled my sdk. but also i do want to thank you and you helped allot.
It would be better, if know what project type you have used for creating this console application, If you had selected VC++-->CLR , error you have mentioned should not come at all. If its VC++-->win32 application , you need to select option I mentioned earlier.
for each (String ^tempStr in arrTableUsers_NORMAL)
if (firstColumn == true)
sql += tempStr;
sql += ", "+tempStr;
case USER_POWER: // Errors, get here
If i have enabled for each block in a switch statment, i get errors:
Warning 1 The type initializer for '<Module>' threw an exception. 0 0
Warning 2 The variable 'lstListUsers' is either undeclared or was never assigned. 0 0
Error 3 error C2360: initialization of '$S3' is skipped by 'case' label c:\projects\cddvdorganizer\cddvdorganizer\syntaxBuilder.h 379
In my solution i added a project(dll) with name ListViewFlickerFree.
declared as lstListUsers.
When i had it inside my main project. Sometimes my Design View printed out a an error, instead form. Even if source code didn't change. Sometimes to get it back i had to manualy delete all autogenerated files. Not yust using clean. but also delete .ncb, .suo files
I am developing an application, and in mine solution there are 3 projects. One of them is MySql Connector 5.02, Witch is build in c#.
I am developing in c++/cli. mysql connector uses Mysql.data.dll
But i wan't to publish my project as opensource, and is server/client based, so i used a lot of #define dirrective to compile with password and other setting, needet to connect to server. When someone woud see a code, he coud get an idea to modify yust mysql connector, to get password, so i came here to ask a specific question. Is it possible to use seperate project to include in another project without using dll, but to include directly to exe? And without any special port to my project. (like inserting with asm or modify to c++/cli)