I'm aware that it's not possible to load a 32-bit DLL into a 64-bit process. The DLL in question is a ODBC driver which is no longer supported (although it works fine) and no 64-bit version of it exists. I don't have access to the source code either.
There doesn't seem to be an off-the-shelf way of "thunking" between the two architectures - the only option I can think of is to write a 32-bit COM object and get it to wrap the 32-bit DLL, and then also write a 64-bit DLL which exposes the same API the 32-bit DLL exposes and then bridge the gap by serializing the parameters to the API call and utilising DCOM's data marshalling functionality to get across the 32-bit / 64-bit boundary. This is a pretty tedious approach though and it could be quite slow if the interface is "chatty".
So what I'm wondering is if there are any other ways of solving this problem?