I need to access a x86 dll (3rd party, no access to source) from x64 code. My research indicated putting the dll in a COM+ wrapper and accessing as an OOP service was the most suitable approach.
So far so good.
So following a guide from "NET 2.0 Interoperability Recipes - A Problem Solution Approach" (although I am running VS2010, and .NET4). I built a proof of concept Service(dll) and test Client(exe), the service running as a server application to be OOP. They both work, and disabling the service through Component Services kills it, so it appears to be using the correct route.
This is all in x86.
When I change the client to x64 I get a 'BadImageFormatException', which I would expect if it were simply loading an x86 dll, but this should be running OOP.
I know I am missing something, and it is probably quite obvious.
Other Notes:
1) I run regsvcs post build, and regsvcs /u prebuild 2) The problem dll is stuck as is, and my main codebase has to be x64