Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Registry Handling

Status
Not open for further replies.

RADM

Programmer
Dec 27, 2003
36
0
0
IT
Hi,

Can any one help me how to write DWORD type entries in Registry and to get value stored in DWORD type?

Radm
 
See REGISTRY.C sample in MSDN (it's large enough):
Code:
    DWORD   rc;
    DWORD   len;
    DWORD   dwType;
    DWORD   fValue;
    len = 4;
    rc = RegQueryValueEx( hkey, szSubKey, 0, &dwType,
                         (LPBYTE)&fValue, &len );
    if (rc != ERROR_SUCCESS) { ...
// and
    DWORD rc;
    rc = RegSetValueEx( hkey, szSubKey, 0, REG_DWORD,
                       (LPBYTE)&dwValue, 4 );
    if (rc != ERROR_SUCCESS) { ...
Use RegOpenKeyEx() to obtain the key handle...
 
Hi,

Thanks ArkM. Worked out.

Rgs,

RADM
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top