Click here to Skip to main content
15,900,258 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Retrieving Regisrty Value Pin
Hamid_RT1-Sep-06 3:12
Hamid_RT1-Sep-06 3:12 
GeneralRe: Retrieving Regisrty Value Pin
Programm3r1-Sep-06 3:14
Programm3r1-Sep-06 3:14 
AnswerRe: Retrieving Regisrty Value Pin
prasad_som1-Sep-06 3:07
prasad_som1-Sep-06 3:07 
GeneralRe: Retrieving Regisrty Value Pin
Programm3r1-Sep-06 3:13
Programm3r1-Sep-06 3:13 
GeneralRe: Retrieving Regisrty Value Pin
prasad_som1-Sep-06 3:14
prasad_som1-Sep-06 3:14 
GeneralRe: Retrieving Regisrty Value Pin
Programm3r1-Sep-06 3:16
Programm3r1-Sep-06 3:16 
GeneralRe: Retrieving Regisrty Value Pin
Cedric Moonen1-Sep-06 3:16
Cedric Moonen1-Sep-06 3:16 
AnswerRe: Retrieving Regisrty Value Pin
Stephen Hewitt1-Sep-06 4:01
Stephen Hewitt1-Sep-06 4:01 
Try something like this (I haven't tested this):
-----

// Open the key.
HKEY hKey;
LONG res = RegOpenKeyEx(
HKEY_CURRENT_USER,
_T("Software\\My Company\\My Product"),
0,
KEY_READ,
&hKey
);
if (res==ERROR_SUCCESS)
{
// Now read a value in the key we opened.
DWORD Value; // Value to read.
DWORD Type;
res = RegQueryValueEx(
hKey,
_T("My value"),
NULL,
&Type,
reinterpret_cast<const BYTE*>(&Value),
sizeof(Value)
);
if (res==ERROR_SUCCESS)
{
if (Type==REG_DWORD)
{
// Access data in 'Value'.
}
}

// Close the key.
RegCloseKey(hKey);
}


Steve
QuestionGet Connection Requested System IP Pin
Kiran Pinjala1-Sep-06 2:42
Kiran Pinjala1-Sep-06 2:42 
AnswerRe: Get Connection Requested System IP Pin
_AnsHUMAN_ 1-Sep-06 2:46
_AnsHUMAN_ 1-Sep-06 2:46 
QuestionRe: Get Connection Requested System IP Pin
Kiran Pinjala1-Sep-06 3:01
Kiran Pinjala1-Sep-06 3:01 
QuestionRichEditControl Pin
muravi1-Sep-06 2:36
muravi1-Sep-06 2:36 
AnswerRe: RichEditControl Pin
_AnsHUMAN_ 1-Sep-06 2:39
_AnsHUMAN_ 1-Sep-06 2:39 
QuestionProgram aborts while adding setItemText to ListControl Pin
RajiRaghu1-Sep-06 2:26
RajiRaghu1-Sep-06 2:26 
AnswerRe: Program aborts while adding setItemText to ListControl Pin
prasad_som1-Sep-06 3:03
prasad_som1-Sep-06 3:03 
AnswerRe: Program aborts while adding setItemText to ListControl Pin
Hamid_RT2-Sep-06 9:29
Hamid_RT2-Sep-06 9:29 
QuestionRichEditControl Pin
muravi1-Sep-06 2:22
muravi1-Sep-06 2:22 
AnswerRe: RichEditControl Pin
_AnsHUMAN_ 1-Sep-06 2:38
_AnsHUMAN_ 1-Sep-06 2:38 
GeneralRe: RichEditControl Pin
muravi1-Sep-06 2:48
muravi1-Sep-06 2:48 
QuestionCommunication between client-server in TCP ...need help Pin
Yanshof1-Sep-06 2:07
Yanshof1-Sep-06 2:07 
GeneralRe: Communication between client-server in TCP ...need help Pin
Programm3r1-Sep-06 2:57
Programm3r1-Sep-06 2:57 
GeneralRe: Thanls ... but i still have problem in creation of new thread in any Pin
Yanshof1-Sep-06 3:50
Yanshof1-Sep-06 3:50 
GeneralRe: Thanls ... but i still have problem in creation of new thread in any Pin
Programm3r1-Sep-06 3:59
Programm3r1-Sep-06 3:59 
Questionopen a file in a mdi wihtout displaying the childframe Pin
yummi1-Sep-06 2:01
yummi1-Sep-06 2:01 
QuestionCommunication between app & display driver Pin
vikver1-Sep-06 1:54
vikver1-Sep-06 1:54 

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.