2

I need to compile a DLL in Managed C++ in Visual Studio 2005.

I want it with 32Bit corflag on. See http://illuminatedcomputing.com/blog/?p=117 for reference.

By default, I choose Win32 platform and set the /MACHINE:X86 option in the liker, but the DLL generated has the 32bit corflag off. You can see it by executing from command line

corflags MyDll.dll

I have problems when running that dll in a Windows 64 bit. So I need to force the dll to 32 bit.

Any idea on how to configure the Visual Studio 2005 compiler?

Drew Gaynor
  • 8,292
  • 5
  • 40
  • 53
Robert
  • 21
  • 2

1 Answers1

0

You can actually use CorFlags.exe to set this. In the command line:

corflags MyDll.dll /32BIT+

This will set the 32 bit flag for MyDll.dll.

For more information see the corflags tag wiki.

Community
  • 1
  • 1
Drew Gaynor
  • 8,292
  • 5
  • 40
  • 53