Click here to Skip to main content
15,907,000 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to play Windows Media Player in VC++.NET Pin
Cool_Dev15-Jun-10 19:47
Cool_Dev15-Jun-10 19:47 
GeneralRe: How to play Windows Media Player in VC++.NET [modified] Pin
Destiny7775-Apr-11 9:06
Destiny7775-Apr-11 9:06 
Questioncopy a registry value to another value Pin
pubis15-Jun-10 16:07
pubis15-Jun-10 16:07 
AnswerRe: copy a registry value to another value Pin
«_Superman_»15-Jun-10 18:26
professional«_Superman_»15-Jun-10 18:26 
GeneralRe: copy a registry value to another value Pin
pubis16-Jun-10 4:26
pubis16-Jun-10 4:26 
GeneralRe: copy a registry value to another value Pin
«_Superman_»16-Jun-10 18:50
professional«_Superman_»16-Jun-10 18:50 
GeneralRe: copy a registry value to another value Pin
pubis17-Jun-10 4:00
pubis17-Jun-10 4:00 
AnswerRe: copy a registry value to another value Pin
pubis16-Jun-10 7:58
pubis16-Jun-10 7:58 
Here's a code I use (ignored error checking)

unsigned long type=REG_SZ, size=1024;
char iLike[1024]="";
char Apples[1024]="";
char iLikeApples[1024]="";
LONG rV;
HKEY hKey = NULL;

// reading the first value
rV = RegOpenKeyEx(HKEY_CURRENT_USER, "SOFTWARE\\FARM\\ValueName1", 0, KEY_ALL_ACCESS, hKey);
rV = RegQueryValueEx(hKey, "Value1", NULL, type, (LPBYTE)iLike, size);
RegCloseKey(hKey);

// reading the second value
rV = RegOpenKeyEx(HKEY_CURRENT_USER, "SOFTWARE\\FARM\\ValueName2", 0, KEY_ALL_ACCESS, hKey);
rV = RegQueryValueEx(hKey, "Value2", NULL, type, (LPBYTE)Apples, size);
RegCloseKey(hKey);

// combining values
[code?]

// writing the third value
rV = RegOpenKeyEx(HKEY_CURRENT_USER, "SOFTWARE\\FARM\\ValueName3", 0, KEY_ALL_ACCESS, hKey);
rV = RegSetValueEx(hKey, "Value3", 0, type, [parameter1?], [parameter2?]);
RegCloseKey(hKey);

Please tell me what I should put in the the place of [code?], [parameter1?] and [parameter2?]
please do not advice me to use this or use that, if you want to help me just complete the code above.

Thank you VERY much for your help
QuestionLarge Object Creation Pin
Baltoro15-Jun-10 13:06
Baltoro15-Jun-10 13:06 
AnswerRe: Large Object Creation Pin
Stephen Hewitt15-Jun-10 14:05
Stephen Hewitt15-Jun-10 14:05 
AnswerRe: Large Object Creation Pin
T210215-Jun-10 21:36
T210215-Jun-10 21:36 
AnswerRe: Large Object Creation Pin
Aescleal16-Jun-10 6:35
Aescleal16-Jun-10 6:35 
AnswerThanks for Information Pin
Baltoro16-Jun-10 13:53
Baltoro16-Jun-10 13:53 
QuestionMSMQ Events in 64 Bit Windows 2003 Server Pin
Hariharan.T15-Jun-10 11:13
Hariharan.T15-Jun-10 11:13 
QuestionDrawing a polygon onto a DIB? Pin
Kiran Satish15-Jun-10 6:47
Kiran Satish15-Jun-10 6:47 
AnswerRe: Drawing a polygon onto a DIB? PinPopular
CPallini15-Jun-10 7:15
mveCPallini15-Jun-10 7:15 
Questionplotting in vc++ [modified] Pin
b-rad31115-Jun-10 5:03
b-rad31115-Jun-10 5:03 
AnswerRe: plotting in vc++ Pin
Maximilien15-Jun-10 6:40
Maximilien15-Jun-10 6:40 
GeneralRe: plotting in vc++ Pin
b-rad31115-Jun-10 7:12
b-rad31115-Jun-10 7:12 
Questionsynchronization of variables Pin
Sakhalean15-Jun-10 3:08
Sakhalean15-Jun-10 3:08 
AnswerRe: synchronization of variables Pin
Cedric Moonen15-Jun-10 3:14
Cedric Moonen15-Jun-10 3:14 
GeneralRe: synchronization of variables Pin
Joe Woodbury15-Jun-10 6:15
professionalJoe Woodbury15-Jun-10 6:15 
GeneralRe: synchronization of variables Pin
Aescleal15-Jun-10 8:58
Aescleal15-Jun-10 8:58 
AnswerRe: synchronization of variables Pin
Maximilien15-Jun-10 3:24
Maximilien15-Jun-10 3:24 
GeneralRe: synchronization of variables Pin
Niklas L15-Jun-10 3:32
Niklas L15-Jun-10 3:32 

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.