x64

How can I turn off registry redirection on Python?

My program is trying to create an key on the HKLM\Software\Microsoft\Shared Tools\MSCONFIG\startupreg\test\ but instead the key is created on the HKLM\Wow6432node\Software\Microsoft\Shared Tools\MSCONFIG\startupreg\test\ and don't work properly... Why? How can I solve it? ...

Is a COMException of 0x80040154 always 'Class not registered'?

Does a System.Runtime.InteropServices.COMException of 0x80040154 always mean that the class isn't registered? I'm getting a COMException which says "Retrieving the COM class factory for component with CLSID {29131539-2EED-1069-BF5D-00DD011186B7} failed due to the following error: 80040154." It's trying to load Interop.Domino.dll which ...

How write C# code being safe both under x86 and x64 when accessing COM? Typical traps?

We use an open source library written in C# wrapping Windows BITS COM component. However, the code is only safe to run it in x86 mode. I would like to contribute to the library by making it safe for both x86 and x64, however I have no deep knowledge in this field. Could you please list here good/bad practices, typical issues, maybe pri...

GetDC() DllImport for x64 apps

If you make a little research on the internet you'll see many DLLImport styles for this user32.dll function: HDC GetDC(HWND hWnd); The question is: what type is more appropriate for .NET x64 apps (either compiled with the Platform target as AnyCPU on a x64 machine or specifically as x64)? IntPtr for example grows to a size of 8 on a x...

error A2070: invalid instruction operands IN SSE MASM64

when compiling this in ml64.exe 64bit (masm64) the SSE command give me an error what do i need to do to include the SSE commands in 64 bit? .code foo PROC movlps [rdx], xmm7 ;;error A2070: invalid instruction operands movhlps xmm6, xmm7 movss [rdx+8], xmm6 ;;rror A2070: invalid instruction operands ret foo ENDP end i get t...

P/Invoke on 32 bit and 64 bit systems

Let us pick the following Win API call as an example: BOOL MessageBeep(UINT uType); // from User32.dll The input parameter is UINT to specify the beep type, which is can be both 32bit and 64bit integer, depending on which Windows version we call it on (or am I wrong?). If I want to P/Invoke message beep from C#, so I apply the DllImp...

How can I increase my application memory, till using the VirtualAlloc function, with the WOW64?

I have application that runs on x86 32Win and we use 1.2Gbyte memory which allocated from the function VirtualAlloc(to prevent page faults). I really want to increase my application memory so I recompiled my project under MSDVE 2008 with wow64 (OS Exp 64Bit). I tried to allocate more than 2Gbyte and the function VirtualAlloc return err...

Windows development: x86 to x64 transition

Hi everybody. Are there any guidelines how to transit to x64 with as little pain as possible? Suppose, I have a windows native x86 executable written in C++. The EXE works fine by itself, but there is also DLL that is hosted by both, the former EXE and an outside x64 process. With setup like this, what parts would I need to rewrite? I...

MapViewOfFile shared between 32bit and 64bit processes

Hi, I'm trying to use MapViewOfFile in a 64 bit process on a file that is already mapped to memory of another 32 bit process. It fails and gives me an "access denied" error. Is this a known Windows limitation or am I doing something wrong? Same code works fine with 2 32bit processes. The code sort of looks like this: hMapFile = Open...

Installing drivers from NSIS installer in x64 system.

I want to add support for x64 OSes to my NSIS installer. One of the installer's task is drivers installation. I've written a special NSIS plugin for this task. This plugin uses Driver Install Frameworks API (DIFxAPI) to install drivers. The problem is that this API does not work in WOW64. Is there any way to create x64 installer appli...

DDK/WDM developing problem ... driver won't load on x64 windows platform

Hi there! I am a beginner at DDK/WDM driver developing field. I have a task which involves porting a virtual device driver from x86 to x64 (intel). I got the source code, I modified it a bit and compiled it succesfuly with DDK (build environments). But when I tried to load it on a ia64 Windows7 machine it didn't want to load. Then I tri...

Calling LoadLibrary on a 64-bit dll from a 32-bit process

I have a 32-bit exe that needs to dynamically load a 64-bit dll when it detects that the operating system is 64-bit. Is this possible through LoadLibrary? If not, is there another way to accomplish the same goal? ...

Will the Windows service be 64-bit if installed from 64-bit process?

Hi, Just wondering, if I install a Windows service from 64-bit process (service code embedded in the process), is the service itself Win32 service or can services be 64-bit as well? I need to know this since my service would inject code (DLL-injection) to Win32-process, so due to WOW64 restrictions the service-process itself cannot be ...

devIL causes program to be unable to start correctly

I just tried to use devIL and ULIT to help me with opengl texture loading. However, whenever the program starts, I get the error: "The application was unable to start correctly (0xc000007b). Click OK to close the application." What happened? I'm using the Visual C++ 2010 RC, windows 7 64-bit. ...

InstallUtil Publishing WMI Schema to 64 Bit Directory Instead of 32 Bit Directory

This is similar to this question, but it doesn't look like a good solution was ever determined, so I'm opening a new one with clarified details. We wrote a .NET service, which among other things, publishes some of the class hierarchy using WMI. On a 64-Bit machine (running Windows 2008 R2 Server), we are running the 32-bit version of In...

I've built a Windows service as "Any CPU". Why does it run in 32-bit mode on my 64 bit machine?

I've built a Windows service as "Any CPU". However, when I run it on my 64 bit machine it runs in 32 bit. How can I fix it? I'm using .NET and C#, and my operating system is Windows 2008 R2. If I build it in x64 it correctly loads in 64 bit mode. However, "Any Cpu" -- which is what I want -- loads in 32 bit, even though the machine it's...

How to build a x64, Windows 7 compatible application?

We have an legacy application that accesses the registry. Because it is a 32bit application it accesses the registry in Windows 7 through Registry Virtualization when referencing HKEY_LOCAL_MACHINE\Software. My question is what setting(s) in Visual Studio do we need to modify to compile our applications where they access the registry "...

Visual Studio 2008 Build question x64 vs x86

Hi Everyone, I have written an application on my x64 machine in Visual Studio 2008. The application will be sent to someone, and I have two questions that I need answers to. What requirements will they need to have installed. I am assuming the .NET 3.5 redistributable. Are there anything else though? (The application does not call a...

Having problems building Cairo on x64 CentOS

I've done this many times on 32 bit CentOS and everything went ok without a hitch. But now, on x64 CentOS, I can't get cairo to find pixman. Pixman 0.18.0 is installed in /usr/local/lib (which I believe is the usual location). Configure for Cairo 1.8.10 can't find it: checking for cairo's image surface backend feature... checking for ...

Efficiently check string for one of several hundred possible suffixes

I need to write a C/C++ function that would quickly check if string ends with one of ~1000 predefined suffixes. Specifically the string is a hostname and I need to check if it belongs to one of several hundred predefined second-level domains. This function will be called a lot so it needs to be written as efficiently as possible. Bitwis...