Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

windows x64 Registry key operation


1 reply to this topic

rakeshkr

rakeshkr
  • Full Members
  • 14 posts

Posted 08 June 2006 - 12:55

Hi All,

I have set the Registry value in the windows x64 machine at a location say
HKey_LOCAL_MACHINE\\SOFTWARE\\Rakesh\\Test
at the upgrade time when i want to open the Registry at this location using the RegOpenKey method (in a customAction) then it does not return error success.
When i see the message description then it only say
Operation completed successfully.
here is the code snippet that i am using...

static char* szKey = "SOFTWARE\\Rakesh\\Test";
HKEY hKey;
if(RegOpenKey(HKEY_LOCAL_MACHINE, szKey, &hKey) == ERROR_SUCCESS)
{
......
....
}else{
LPVOID lpMsgBuf;
FormatMessage(
FORMAT_MESSAGE_ALLOCATE_BUFFER |
FORMAT_MESSAGE_FROM_SYSTEM |
FORMAT_MESSAGE_IGNORE_INSERTS,
NULL,
GetLastError(),
0, // Default language
(LPTSTR) &lpMsgBuf,
0,
NULL
);
// Process any inserts in lpMsgBuf.
// Display the string.
MessageBox( NULL, (LPCTSTR)lpMsgBuf, LError, MB_OK | MB_ICONINFORMATION );
// Free the buffer.
LocalFree( lpMsgBuf );
}

Same code is workin fine on windows 32 bit platforms..

Any body have any idea please advice me...

Thanks in advance.

Regards,
Rakesh

amitsgupte

amitsgupte
  • Full Members
  • 10 posts

Posted 17 April 2007 - 08:57

Not sure if you got the solution already, just if not ... WOW64 performs redirection on the filesystem as well as the registry. This redirection is done when a 32bit app calls an API reffering to either the filesystem or registry of the 64bit machine.

For more details lookup http://msdn2.microso...y/ms724072.aspx

Hope that helps.