RajaK

Hi,

I am working with win32 application. I want to read the registry key value. How can i read the key values from registry I using the below code for creating a key in registry.

HKEY hKey;
DWORD dwDisp = 0;
LPDWORD lpdwDisp = &dwDisp;
KString l_strExampleKey = key;
KString l_strStringSample = stringname, l_strStringSampleVal = stringvalue;;

LONG iSuccess = RegCreateKeyEx(rootHKEY, l_strExampleKey, 0L,NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey,lpdwDisp);


if(iSuccess == ERROR_SUCCESS)
{
RegSetValueEx(hKey, l_strStringSample, 0, REG_SZ, (LPBYTE) l_strStringSampleVal.GetBuffer(l_strStringSampleVal.GetLength()), l_strStringSampleVal.GetLength()+ 1);
}
plz , can anyone help me

Thanks in Advance!!!



Re: Visual C++ General How can i read registry value by win32 application?

Richard78

Hello,

Have you looked at RegGetValue

Richard