"Error in loading DLL" when compiling DLL in VB6
Solution 1
Under Project -> References.
Look for the word MISSING: in front of the dll's that aren't there.
Solution 2
I've seen this error occur when referenced components are recompiled with no compatibility but the previous versions of the dlls are not unregistered beforehand, so the registry keys for the typelibs are not removed and these bogus registry entries point to the new dlls.
Usually I deal with these with an internal registry cleaner tool that can remove typelibs/clsid/interfaces registration based on typelib disk location. You can try moving physical files of the referenced projets to different location on disk and regsvr32
them there, manually remove references from the project file, restart the IDE and reopen project, finally add references and check that dll location in add reference dialog points to the new files location.
Solution 3
If you have no MISSING references then try compiling the libraries of the project using project compatibility instead of binary compatibility. VB6 can get confused with Binary compatibility when there are multiple libraries being reference in a hierarchy of libraries.
Ivan
Updated on June 07, 2022Comments
-
Ivan almost 2 years
I have a visual basic 6 ".dll project" that uses references and when "File->Make dll" option is clicked, it should generate a dll file. Well, when clicked "File->Make dll", I get error "Error in loading DLL".
How can I see which references are missing?
-
Ivan over 12 yearsthere are no "MISSING" labeled references, but when build, I get the mentioned error :(
-
Lynn Crumbling over 12 yearsDo you have vs6 service pack 6 installed? If not, install it, and try one more time.
-
Ivan over 12 yearsalready tried, but without any success. Can you provide a link where you have downloaded it, please?
-
Lynn Crumbling over 12 yearsHere's microsoft's download link: microsoft.com/download/en/details.aspx?id=9183
-
Ivan over 12 yearsTried with this one too, but without success. The problem still persists.
-
ishmaelMakitla over 7 yearsFor a question as old as this, you really need to make effort to explain why your suggestion solution should work - this is especially important for a question that already has a number of answers.