> DWORD dwCUBufLen;
> HKEY hkCUKey;
> char szScadRelCUser[_MAX_PATH];
> ::RegOpenKeyEx(HKEY_CURRENT_USER, (LPCTSTR) strSubKey, 0,
> KEY_QUERY_VALUE, &hkCUKey);
> if(::RegQueryValueEx(hkCUKey, "CurVer", NULL, NULL, (LPBYTE)
> szScadRelCUser, &dwCUBufLen) != ERROR_SUCCESS)
> {
> ::AfxMessageBox("error Current User");
> ReportRegistryErrorMsg();
> ::RegCloseKey(hkCUKey);
> }
Have you tried KEY_READ instead of KEY_QUERY_VALUE?
Also, if you plan to write to it you should use KEY_READ|KEY_WRITE.
--
|
----+----------------------------------------------
| Byron Blattel
| CADwerx---Applications for AutoCAD
| Autodesk Registered Developer
| email: byron@cadwerx.net
| web site: http://www.cadwerx.net
|