简体   繁体   中英

C++: Unable to register my DLL using regsvr32, but via IDE works

I have created a COM ATL DLL in VS2012.

When I let the IDE compile it, it will automatically be registered, and I can use it on my developer machine.

I tried registering the DLL on a clean XP machine, and regsvr32.exe returned

"LoadLibrary("MyDll.dll") failed. The module was not found."

I thought I created a normal COM DLL, not a managed DLL, so I thought I could register it using regsv32.exe, not REGASM.

I have compiled the DLL with the option "Multithreaded (/MT)", so I guess I don't need to have the C++ runtimes installed, right?

Using ProcMon I saw that regsvr32.exe looks for "atl110.DLL". Do I need to distribute it, although I selected "Multithreaded (/MT)"?

Does anybody have any ideas what I might have done wrong?

Thank you for the help.

Edit: Sorry, I mistyped the error message first.

I have changed the project properties from

Configuration -> Common -> Usage of ATL: "Dynamic link to ATL" to "Static link to ATL".

This did the job.

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