简体   繁体   中英

how to use win 32 bit dll in 64 bit application

I have 32bit third party dll. I am using same dll in c# application. How can I run this application in 64bit evironment like windows 7. It is desktop application.

There are a couple of ways if you are using a Windows application. The easiest solution I've found is to put the 32-bit DLL in a COM+ Application. When a COM+ Application loads, it ensures that all libraries in the application have the same bitness. Granted, you will be required to call the DLL out of process.

That leads to another solution which is to create a 32-bit executable or service that hosts your application. It would mean that when your main application is running, that in fact two applications are running and you will incur marshaling costs but it would make it possible.

At the end of the day, the only way it is possible is for the 32-bit DLL to be hosted in a 32-bit process outside of your 64-bit process.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM