Click here to Skip to main content
15,889,858 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,
I am trying to build context menu extension dll for 64-bit system on 32-bit machine.
The output dll file has correct header:
File Type: DLL

FILE HEADER VALUES
            8664 machine (x64)


but regsvr32 says:

The module ContextMenuExtension.dll may not compatible with the version of Windows that you're running. Check if the module is compatible with an x86 (32-bit) or x64 (64-bit) version of regsvr32.exe.


Than I check my dll using Dependency Walker and found that it referencing to 32-bit versions of system libraries (USER32.DLL, SHELL32.DLL, ATL100.DLL, e.t.c).
screenshot[^]

The question is: can I configure VS2010 to build DLL which using 64-bit dependencies or I can build 64-bit DLL only on 64-bit machine?
Posted

1 solution

I work mostly off VS2008 (takes me a while to want to change) but in that version...

When compiling for 64bit, it's easiest to do it from the command line, the compiler is there, but from what I can tell, there's no simple way of getting to it from the IDE. The compiled code works fine in 64bit, but you can't really test it in your 32bit environment.

Here's an article on setting up for 64bit builds from MSDN.
http://msdn.microsoft.com/en-us/library/h2k70f3s(v=vs.100).aspx[^]

edit: One more thing... there's no point in using dependency walker on a 64bit dll while using a 32bit system. DLL's are mostly loaded based on the name of the dependency, unless the name of the 64 and 32bit versions is different, you can't tell if it's really trying to load the right one (when Windows went to 64bit, they horrendously kept a lot of the same names for files).
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900