Wednesday, April 16, 2008

file separation on Windows Server 2003 x64

PROBLEM:
You want to use a tool, that requires a 32. Bit dll or executable within the system32 folder. You want to use this tool on a x64 system.

RESOLUTION:
Not supported.
32 bit files MUST always reside in syswow64 folder!
64 bit files MUST always reside in system32 folder!

You could maybe change the application:
http://msdn2.microsoft.com/en-us/library/aa365743.aspx
BOOL bRet = Wow64DisableWow64FsRedirection (&OldValue);
if (bRet == TRUE)
{
// Open a file

hFile = CreateFile(TEXT("C:\\Windows\\System32\\Notepad.exe"),
GENERIC_READ,
FILE_SHARE_READ,
NULL,
OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,
NULL);

// Restore the previous WOW64 file system redirection value.

Wow64RevertWow64FsRedirection (OldValue);
}

or, as a 2nd possibility use the sysnative folder:
A 32-bit application cannot access the System32 folder on a computer that is running a 64-bit version of Windows Server 2003
http://support.microsoft.com/kb/942589/en-us

No comments: