wow64

How to optimize compiling a 32 bit application in Visual C++ 2005 on a 64 bit windows sever 2008

I have just installed a build server with a 64 bit windows server 2008 for continuous integration. The reason I choose a 64 bit server was to have more than ~3Gb of RAM. I had hopes that this machine would provide blazing fast builds. Unfortunately, the result are lacking greatly to say the least. My desktop provides faster builds tha...

Why is RegOpenKeyEx() returning error code 2 on Vista 64bit?

I was making the following call: result = RegOpenKeyEx(key, s, 0, KEY_READ, &key); (C++, Visual Studio 5, Vista 64bit). It is failing with error code 2 ("File not found") even though "regedit" shows that the key exists. This code has always worked on 32bit XP. Why is it "file not found" when it clearly is there? ...

Launching Shell Links (LNKs) from WOW64

Our 32-Bit application launches Windows LNK files (Shell Links) via ShellExecute. When it tries to "launch" a link to a 64-Bit binary (such as the "Internet Explorer (64-Bit)" shortcut in Start Menu) it always ends up launching the 32-Bit binary. Internally, ShellExecute incorrectly resolves the link target: There's a hidden field inside...

How much memory can a 32 bit process access on a 64 bit operating system?

This is a windows question. I know under normal circumstances a 32 bit process can only access 2GB of RAM (or 3GB with a special switch in the boot.ini file). When running a 32 bit process on a 64 bit operating system, how much memory is available? Are there any special switches or settings that can change this? How about a Common Langu...

64/32 bit standard driver translation in Windows

The question is basically a follow up to this thread: http://stackoverflow.com/questions/602587/using-a-64-bit-driver-in-a-32-bit-program-windows As I learned when I have a 64 bit driver, which is used over a set of 64 bit DLLs I cannot have a 32 bit process calling the DLLs. We now use some funny interpocess communication to workaround...

Developing and debugging mem-hogging C# apps

I have a C# app that must link with a 32-bit library and also needs to use the maximum amount of memory possible (imaging app); we run the app on XP64 desktops, thus we are using WOW64, targeting builds in Visual Studio for x86 (and doing an editbin /largeaddressaware post-build). We're encountering a few problems: In the Visual Stud...

I can't build a library that needs WOW64 Api

Hi, I'm fixing a bug with Windows Vista 64 bits of a 32bit application, when I try to use the function Wow64DisableWow64FsRedirection(...) the compiler says 'undeclared identifier...'. I'm including the Windows.h header file and set _WIN32_WINNT to 0x0501. Any ideas? Thanks. EDIT: We're using MS Visual Studio 2003 ...

Translating 32-bit paths to their WOW64 equivalents

Is there any function that I can call to in a 32-bit app that would convert the paths that it thinks it's using to and from the paths that it's actually using? (For instance, call it to convert the path for a folder in Program Files to a path in Program Files (x86) or vice versa when running on a 64-bit system.) I need to do this so that...

How can I maintain separate PATH variables for 32 and 64 bit applications?

I am moving to a 64 bit Windows workstation, and will be developing both 32 and 64 bit applications. I will need to maintain different PATH environment variables when running a 32 vs. 64 bit version of my application. What is the best way to do this? It seems like it should be possible with all of the registry redirection that goes on...

How to open a WOW64 registry key from a 64-bit .NET application

My .NET application (any-CPU) needs to read a registry value created by a 32-bit program. On 64-bit Windows this goes under the Wow6432Node key in the registry. I have read that you shouldn't hard-code to the Wow6432Node, so what's the right way to access it with .NET? ...

PostMessage params from 32-bit C# to 64-bit C++

I am having problem with the contents of a pointer passed as the wParam from a 32-bit C# application is changing along the way to a 64-bit C++ process. There are two processes 32.exe (in C#) and 64.exe (in C++). 64.exe is started as a child process of 32.exe. 32.exe post window message for 64.exe, one of which has a wParam that is a poi...

How to uninstall IIS 7 under WOW64?

In a Web server installer that I'm maintaining, we keep track of whether or not the installer had installed IIS 7 and/or ASP (under Vista or later) and save an appropriate value to the Registry if so. During an uninstall, if that value is there and no other Web sites are using IIS on that machine, the user is asked whether or not IIS/ASP...

SHGetSpecialFolderPath, how to access 64bit CSIDL from 32bit application

Is there a way from a 32bit application running on a 64bit system to have access to the default folders for 64bit applications? For example, using SHGetSpecialFolderPath with CSIDL_PROGRAM_FILES from a 32bit application returns "C:\Program Files (x86)' If the same call was used from a 64bit application, I would get "C:\Program Files"....

How do I delete a registry entry in Windows x64 in the 64 bit tree without using RegDeleteKeyEx in C++?

I'm working on an 32 installer that has to run on environments ranging from Win XP upwards. We have a problem where we have to remove a registry entry on the x64 section of the registry under Windows 2k3 x64. That's easy enough with RegDeleteKeyEx, but I can't distribute an executable that might call that function because it won't run ...

Getting executable file name from handle in Windows x64

I have a c# application that is compiled as x86 so it runs as a 32bit application on Windows 7 x64. While the application is running, I need to detect the executable name of the active window. On Winodws XP the following code worked fine (getting the process filename from the active window handle). On x64 it reports the name of only the ...

32-bit cluster.exe on 64 bit Windows 2008

We have an installation program that runs in Perl 32-bit. This program needs to get information on cluster resources, so it runs cluster.exe (using backticks) and parse its output. On Windows Server 2003 this went well, as a 32-bit version of cluster.exe existed under syswow64. However, such a 32-bit version does not exist on Windows Se...

How can I share HWND between 32 and 64 bit applications in Win x64?

MSDN tells me that handles to windows (HWND) can be shared between 32- and 64-bit applications, in Interprocess Communication (MSDN). However, in Win32 a HWND is 32 bits, whereas in 64 bit Windows it is 64 bits. So how can the handles be shared? I guess the same question applies to handles to named objects such as mutexes, semaphores ...

Writting settings to the registry, shared by x64 and x86 apps (bypassing registry redirection)

I want to write application settings in the registry, that are shared by x86 and x64 applications running on Windows 7 x64. The best practice is to save them in HKEY_LOCAL_MACHINE\Software\Company\Product, but that gets redirected when in WOW64. Can I write them in HKEY_LOCAL_MACHINE\System.. instead? Or System is reserved for other th...

How do I prevent my Win32 process starting on WOW64?

I've got a Win32 process that is compiled and packaged in both 32-bit (x86) and 64-bit (x64) variants. I'd like the x86 variant to refuse to run on a 64-bit version of Windows (i.e. WOW64). Is there any way to do this by setting linker flags? If not, what do I need to do? ...

Create 64 bit registry key (non-WOW64) from a 32 bit application

I have a Visual Studio installer that is creating some registry keys: HKEY_LOCAL_MACHINE\SOFTWARE\MyApp but the registry keys it is creating are automatically appearing under Wow6432Node: HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\MyApp How do I ignore the Wow6432Node when creating registry keys in my C# code being executed by the msi...