HKEY hKey;
char RegKey[100];
DWORD dwType, dwSize, dwName, dwResult = 0;
sprintf (RegKey, "Software\\My Company\\Key name");
LONG lRet = ::RegCreateKeyEx (HKEY_CURRENT_USER, RegKey, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_ALL_ACCESS, NULL, &hKey, &dwResult);
if (lRet == ERROR_SUCCESS)
{
RegQueryValueEx (hKey, "Name of value goes here", 0, &dwType, (LPBYTE)&dwName, &dwSize);
}
Main Topics
Browse All Topics





by: nonubikPosted on 2005-07-12 at 00:07:04ID: 14418986
You can use the registry API (http://msdn.microsoft.com /library/d efault.asp ?url=/libr ary/ en-us/ sysinfo/ba se/registr y_function s.asp) or the CRegKey ATL/MFC class (http://msdn.microsoft.com /library/e n-us/vclib /html/ _atl _cregkey.a sp).
Depending on what you want to achieve, I can show some sample code.