Link to home
Start Free TrialLog in
Avatar of jdcoburn
jdcoburn

asked on

I'm getting "An attempt was made to load a program with an incorrect format. (Exception from HRESULT: 0x8007000B)"

hi -- I've recently tried to port my 32bit application to a windows 7 64 bit target. my development environment is on a 32 bit Vista system. after thrashing around with some other problems, this is the latest error i get. I think the error is coming from a dll that was written in c and compiled under an older version of VS. I use a p/invoke interface to unmanaged code to use it (it's a driver for a usb device.) I would rather not have to sort out whether i have the source code, etc for the dll. is there a "simple" way around this? I'm also using some assemblies from National Instrument that will not run without using their 64 bit merge modules, so the installer needs to declare it a 64 bit app.
I tried using CorFlags but it expects assemblies, not unmanaged code.
I'm using .net 4.0 and vs 2010.
thanks.
ASKER CERTIFIED SOLUTION
Avatar of AndyAinscow
AndyAinscow
Flag of Switzerland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jdcoburn
jdcoburn

ASKER

hi -- the situation was more complicated. i eventually had to recompile a dll that linked to my app, plus pull through some other dll's that were 64bit only. anyway the solution got me started along an eventually successful path.
thanks,
Jim