Click here to Skip to main content
15,902,189 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
QuestionC++/CLI: Formatting outputs (decimal places, hexadecimal, case notation) Pin
J_E_D_I20-Dec-08 10:22
J_E_D_I20-Dec-08 10:22 
AnswerRe: C++/CLI: Formatting outputs (decimal places, hexadecimal, case notation) Pin
Luc Pattyn20-Dec-08 11:00
sitebuilderLuc Pattyn20-Dec-08 11:00 
GeneralRe: C++/CLI: Formatting outputs (decimal places, hexadecimal, case notation) Pin
J_E_D_I20-Dec-08 22:53
J_E_D_I20-Dec-08 22:53 
GeneralRe: C++/CLI: Formatting outputs (decimal places, hexadecimal, case notation) Pin
Rob Graham21-Dec-08 3:54
Rob Graham21-Dec-08 3:54 
AnswerRe: C++/CLI: Formatting outputs (decimal places, hexadecimal, case notation) Pin
J_E_D_I21-Dec-08 6:11
J_E_D_I21-Dec-08 6:11 
GeneralRe: C++/CLI: Formatting outputs (decimal places, hexadecimal, case notation) Pin
TigerNinja_24-Dec-08 19:04
TigerNinja_24-Dec-08 19:04 
QuestionConverting COM object to actual unmanaged type pointer Pin
sajanemmanuel14-Dec-08 18:50
sajanemmanuel14-Dec-08 18:50 
QuestionCreating a Registry Value in C++/CLI environment Pin
J_E_D_I13-Dec-08 8:36
J_E_D_I13-Dec-08 8:36 
I was wondering if anybody could give me hand solving this problem. I need to save a DWORD value (DesiredValue) in a registry key and this was the syntax I was using (successfully) in console environment.

DWORD DesiredValue;

// Creates Desired Registry Key 
	HKEY Xtmpkey;
	DWORD dwDisp = 0;
	LPDWORD xlpdwDisposition = &dwDisp;
	DWORD dwVal = DesiredValue; 
	// Desired Path for the Registry Key 
	RegCreateKeyEx(HKEY_CURRENT_USER, L"SOFTWARE\\MyPath", 0L,NULL, REG_OPTION_NON_VOLATILE,    KEY_ALL_ACCESS, NULL, &Xtmpkey,xlpdwDisposition);

// Creates Desired Value
RegSetValueEx (Xtmpkey, L"Desired_Value_Name", 0L, REG_DWORD,(CONST BYTE*) &dwVal, sizeof(DWORD));


Now that I am porting the software into C++/CLI environment it returns the following errors:

Error 1 error LNK2001: unresolved external symbol "extern "C" long __stdcall RegCreateKeyExW(struct HKEY__ *,wchar_t const *,unsigned long,wchar_t *,unsigned long,unsigned long,struct _SECURITY_ATTRIBUTES * const,struct HKEY__ * *,unsigned long *)" (?RegCreateKeyExW@@$$J236YGJPAUHKEY__@@PB_WKPA_WKKQAU_SECURITY_ATTRIBUTES@@PAPAU1@PAK@Z)

Error 2 error LNK2001: unresolved external symbol "extern "C" long __stdcall RegSetValueExW(struct HKEY__ *,wchar_t const *,unsigned long,unsigned long,unsigned char const *,unsigned long)" (?RegSetValueExW@@$$J224YGJPAUHKEY__@@PB_WKKPBEK@Z)

Error 3 fatal error LNK1120: 2 unresolved externals

What am I doing wrong?

Thanks in advance.
AnswerRe: Creating a Registry Value in C++/CLI environment Pin
Mark Salsbery13-Dec-08 10:01
Mark Salsbery13-Dec-08 10:01 
GeneralRe: Creating a Registry Value in C++/CLI environment Pin
J_E_D_I13-Dec-08 17:33
J_E_D_I13-Dec-08 17:33 
GeneralRe: Creating a Registry Value in C++/CLI environment Pin
Mark Salsbery14-Dec-08 9:40
Mark Salsbery14-Dec-08 9:40 
AnswerRe: Creating a Registry Value in C++/CLI environment Pin
leonigah18-Dec-08 23:04
leonigah18-Dec-08 23:04 
QuestionHow to check availability of internet connection Pin
anveshvm11-Dec-08 3:00
anveshvm11-Dec-08 3:00 
GeneralRe: How to check availability of internet connection Pin
Luc Pattyn11-Dec-08 3:16
sitebuilderLuc Pattyn11-Dec-08 3:16 
GeneralRe: How to check availability of internet connection Pin
anveshvm11-Dec-08 4:12
anveshvm11-Dec-08 4:12 
GeneralRe: How to check availability of internet connection Pin
Luc Pattyn11-Dec-08 4:36
sitebuilderLuc Pattyn11-Dec-08 4:36 
GeneralRe: How to check availability of internet connection Pin
anveshvm11-Dec-08 4:42
anveshvm11-Dec-08 4:42 
GeneralRe: How to check availability of internet connection Pin
Luc Pattyn11-Dec-08 13:29
sitebuilderLuc Pattyn11-Dec-08 13:29 
QuestionHow to check the return value of a messagebox Pin
anveshvm11-Dec-08 2:52
anveshvm11-Dec-08 2:52 
GeneralRe: How to check the return value of a messagebox Pin
Luc Pattyn11-Dec-08 3:10
sitebuilderLuc Pattyn11-Dec-08 3:10 
GeneralRe: How to check the return value of a messagebox Pin
anveshvm11-Dec-08 3:31
anveshvm11-Dec-08 3:31 
GeneralRe: How to check the return value of a messagebox Pin
Luc Pattyn11-Dec-08 3:43
sitebuilderLuc Pattyn11-Dec-08 3:43 
QuestionHow to call base class method Pin
s196675m8-Dec-08 8:54
s196675m8-Dec-08 8:54 
AnswerRe: How to call base class method Pin
Mark Salsbery8-Dec-08 9:51
Mark Salsbery8-Dec-08 9:51 
GeneralRe: How to call base class method Pin
Eytukan12-Dec-08 19:49
Eytukan12-Dec-08 19:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.