Click here to Skip to main content
16,005,552 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Problem with ODBC connection Pin
Jackson8615-Jan-07 2:55
Jackson8615-Jan-07 2:55 
GeneralRe: Problem with ODBC connection Pin
David Crow15-Jan-07 3:12
David Crow15-Jan-07 3:12 
AnswerRe: Problem with ODBC connection Pin
Jackson8617-Jan-07 2:30
Jackson8617-Jan-07 2:30 
QuestionHow to pass array to function? Pin
Ming Luo11-Jan-07 5:48
Ming Luo11-Jan-07 5:48 
AnswerRe: How to pass array to function? Pin
Nemanja Trifunovic11-Jan-07 6:04
Nemanja Trifunovic11-Jan-07 6:04 
AnswerRe: How to pass array to function? Pin
Mark Salsbery11-Jan-07 6:10
Mark Salsbery11-Jan-07 6:10 
AnswerRe: How to pass array to function? Pin
Cedric Moonen11-Jan-07 7:43
Cedric Moonen11-Jan-07 7:43 
QuestionInsert value from GUI CString into Registry Pin
trumper11-Jan-07 5:46
trumper11-Jan-07 5:46 
Hi,

So I have this code to open a handle hKey which works fine.
RegCreateKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\MyProgram", 0L, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, NULL);

Then I try to set a value from a GUI CString member variable m_license_key into registry.
RegSetValueEx(hKey, "PROGRAM_KEY", 0L, REG_DWORD,(LPBYTE)&m_license_key, sizeof(DWORD));

The set function also works fine other than the fact that "rubbish" gets inserted as value for my registry key. In other words, HKEY_LOCAL_MACHINE\\SOFTWARE\\MyProgram\\PROGRAM_KEY is added, but the value is not what I keyed into m_license_key (it is just some strange text or some 0xHex numbers)

To be honest, I do not know what to specify for parameters 4, 5, 6 of RegSetValueEx. Any help would be greatly appreciated. Thanks.
AnswerRe: Insert value from GUI CString into Registry Pin
Joan M11-Jan-07 6:17
professionalJoan M11-Jan-07 6:17 
AnswerRe: Insert value from GUI CString into Registry Pin
Mark Salsbery11-Jan-07 6:18
Mark Salsbery11-Jan-07 6:18 
AnswerRe: Insert value from GUI CString into Registry Pin
led mike11-Jan-07 6:18
led mike11-Jan-07 6:18 
GeneralRe: Insert value from GUI CString into Registry Pin
Mark Salsbery11-Jan-07 6:26
Mark Salsbery11-Jan-07 6:26 
GeneralRe: Insert value from GUI CString into Registry Pin
trumper11-Jan-07 14:46
trumper11-Jan-07 14:46 
JokeRe: Insert value from GUI CString into Registry Pin
Rajesh R Subramanian11-Jan-07 20:47
professionalRajesh R Subramanian11-Jan-07 20:47 
QuestionMFC Grid - GVN_ENDLABELEDIT message not firing [SOLVED] Pin
#realJSOP11-Jan-07 4:43
professional#realJSOP11-Jan-07 4:43 
QuestionWhat is the handle count for a process in windows? Pin
Gupta Suraj11-Jan-07 2:40
Gupta Suraj11-Jan-07 2:40 
AnswerRe: What is the handle count for a process in windows? Pin
Rajesh R Subramanian11-Jan-07 2:49
professionalRajesh R Subramanian11-Jan-07 2:49 
GeneralRe: What is the handle count for a process in windows? Pin
Gupta Suraj11-Jan-07 2:50
Gupta Suraj11-Jan-07 2:50 
GeneralRe: What is the handle count for a process in windows? Pin
Rajesh R Subramanian11-Jan-07 2:57
professionalRajesh R Subramanian11-Jan-07 2:57 
GeneralRe: What is the handle count for a process in windows? Pin
Maximilien11-Jan-07 3:41
Maximilien11-Jan-07 3:41 
GeneralRe: What is the handle count for a process in windows? Pin
Rajesh R Subramanian11-Jan-07 17:57
professionalRajesh R Subramanian11-Jan-07 17:57 
AnswerRe: What is the handle count for a process in windows? Pin
David Leyva11-Jan-07 10:24
David Leyva11-Jan-07 10:24 
AnswerRe: What is the handle count for a process in windows? Pin
Hamid_RT11-Jan-07 20:58
Hamid_RT11-Jan-07 20:58 
GeneralRe: What is the handle count for a process in windows? Pin
Gupta Suraj11-Jan-07 22:33
Gupta Suraj11-Jan-07 22:33 
QuestionCreating .ico file from HICON Pin
neilsolent11-Jan-07 2:22
neilsolent11-Jan-07 2:22 

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.