I cannot create a library that needs the WOW64 Api

I am fixing a Windows Vista 64-bit application bug with a 64-bit application, when I try to use the Wow64DisableWow64FsRedirection (...) function, the compiler says "undeclared identifier ...".

I include the Windows.h header file and set _WIN32_WINNT to 0x0501.

Any ideas?

Thanks.

EDIT: we are using MS Visual Studio 2003

+1


a source to share


3 answers


Can you see this API in the header file? Maybe the Visual Studio you are using does not have an updated header file, in which case you need to do LoadLibrary for Kernel32.dll and then GetProcAddress for the function you want.



+2


a source


Your platform SDK files are probably too old to have this feature. This feature first appeared in the SDK with the 64-bit XP platform. You can get the latest SDK here: http://www.microsoft.com/downloads/details.aspx?FamilyID=e6e1c3df-a74f-4207-8586-711ebe331cdc&displaylang=en

Although he says this is the "Windows SDK for Windows Server® 2008", it is just the latest SDK and will have all backward compatible files.



After installing it, depending on your compiler, you may have to point the include directory to it.

+3


a source


If your application needs to run on 32-bit or Windows 2000 Windows XP, you should use LoadLibrary()

and GetProcAddress()

as Canopus suggested, because Wow64DisableWow64FsRedirection()

both Wow64RevertWow64FsRedirection()

weren't added until Windows XP 64-bit and Server 2003 SP1 (according to the documentation ).

+1


a source







All Articles