Quantcast
Channel: Visual C forum
Viewing all articles
Browse latest Browse all 15302

RegOpenKeyEx / RegQueryValueEx returning the wrong value

$
0
0

I have ran into a very strange issue.  On some computers, not all, I am getting an unusual value from the registry that does not match the location I am querying from.  I should be getting the location of the Internet Explorer binary, iexplore.  However, one some computers, it gives me a path to "ielowutil.exe", which is not what they have in their registry.  I think this is a defect, but I am wanting confirmation.  Yes, I have verified their registry many many times.  Here is a code snippet:

constint nPathSize =256;wchar_t szPath[nPathSize];int nDataSize =sizeof(szPath);
    DWORD dwType = REG_EXPAND_SZ;
    HKEY hkLocation = NULL;if(RegOpenKeyEx(HKEY_CLASSES_ROOT, L"CLSID\\{0002DF01-0000-0000-C000-000000000046}\\LocalServer32",0, KEY_QUERY_VALUE,&hkLocation)== ERROR_SUCCESS){if(RegQueryValueEx(hkLocation, NULL, NULL,&dwType,(LPBYTE)szPath,(LPDWORD)&nDataSize)== ERROR_SUCCESS){
		    sPath = std::wstring(szPath);}}

Any advice?


Viewing all articles
Browse latest Browse all 15302

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>