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

Managed C++/CLI

 
AnswerRe: Getting HDD serial No in C++/CLI environment Pin
Mark Salsbery6-Dec-08 6:12
Mark Salsbery6-Dec-08 6:12 
GeneralRe: Getting HDD serial No in C++/CLI environment Pin
J_E_D_I6-Dec-08 9:07
J_E_D_I6-Dec-08 9:07 
GeneralRe: Getting HDD serial No in C++/CLI environment Pin
Mark Salsbery6-Dec-08 9:36
Mark Salsbery6-Dec-08 9:36 
GeneralRe: Getting HDD serial No in C++/CLI environment Pin
J_E_D_I6-Dec-08 19:58
J_E_D_I6-Dec-08 19:58 
GeneralRe: Getting HDD serial No in C++/CLI environment Pin
Luc Pattyn7-Dec-08 1:14
sitebuilderLuc Pattyn7-Dec-08 1:14 
GeneralRe: Getting HDD serial No in C++/CLI environment Pin
J_E_D_I7-Dec-08 19:21
J_E_D_I7-Dec-08 19:21 
GeneralRe: Getting HDD serial No in C++/CLI environment Pin
Luc Pattyn7-Dec-08 23:06
sitebuilderLuc Pattyn7-Dec-08 23:06 
QuestionRe: Creating Registry Key Values in C++/CLI environment Pin
J_E_D_I13-Dec-08 7:56
J_E_D_I13-Dec-08 7:56 
Hi again Luc, I was wondering if you had any hint on how to solve this problem which is somehow linked to the previous one. I need to save the value obtained with the previous code (which is a DWORD: 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?

I thank you in advance.
GeneralRe: Creating Registry Key Values in C++/CLI environment Pin
Luc Pattyn13-Dec-08 8:26
sitebuilderLuc Pattyn13-Dec-08 8:26 
GeneralRe: Getting HDD serial No in C++/CLI environment Pin
Mark Salsbery7-Dec-08 6:12
Mark Salsbery7-Dec-08 6:12 
GeneralRe: Getting HDD serial No in C++/CLI environment Pin
J_E_D_I7-Dec-08 19:24
J_E_D_I7-Dec-08 19:24 
AnswerRe: Getting HDD serial No in C++/CLI environment Pin
adi099016-Apr-11 0:27
adi099016-Apr-11 0:27 
QuestionUnmanged library printing to debug and then killing application Pin
coder2555-Dec-08 18:59
coder2555-Dec-08 18:59 
Questioni need client to server chat Pin
Member 39837645-Dec-08 6:35
Member 39837645-Dec-08 6:35 
AnswerRe: i need client to server chat Pin
Richard Andrew x6413-Dec-08 10:36
professionalRichard Andrew x6413-Dec-08 10:36 
QuestionFatal error C1902 Pin
Manfr3d3-Dec-08 12:51
Manfr3d3-Dec-08 12:51 
AnswerRe: Fatal error C1902 Pin
Manfr3d4-Dec-08 11:32
Manfr3d4-Dec-08 11:32 
QuestionInfragistics ultraGrid Pin
mikobi3-Dec-08 2:44
mikobi3-Dec-08 2:44 
QuestionDestroying controls created by CWinFormControl Pin
astibich230-Nov-08 11:43
astibich230-Nov-08 11:43 
QuestionRe: Destroying controls created by CWinFormControl Pin
led mike1-Dec-08 5:17
led mike1-Dec-08 5:17 
Questionspace in a string ! Pin
sajjy30-Nov-08 10:19
sajjy30-Nov-08 10:19 
AnswerRe: space in a string ! Pin
Mark Salsbery30-Nov-08 14:31
Mark Salsbery30-Nov-08 14:31 
GeneralRe: space in a string ! Pin
led mike2-Dec-08 4:31
led mike2-Dec-08 4:31 
GeneralRe: space in a string ! Pin
Mark Salsbery2-Dec-08 6:16
Mark Salsbery2-Dec-08 6:16 
GeneralRe: space in a string ! Pin
led mike2-Dec-08 6:49
led mike2-Dec-08 6: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.