Reputation: 61
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?
Upvotes: 6
Views: 15723
Reputation: 677
In 2019, got same error on my old xp laptop in a project being migrated from Excel VBA to VB6. I read all above answers and could not solve the issue (No Missing references to start with and there are not many changes done on the default libraries' locations). What actually solved my problem is kind of strange. I double-clicked and opened each and every form and Designer modules (essentially loading it components to memory) and voila, the error is gone its own. I tried to reproduce the error and it does comeback when I launch the IDE once again. Finally figured out, there is one such bulky userform with lot of control is the culprit. I couldn't figure out exactly which control is causing the dll error but for now the job is done.
Upvotes: 0
Reputation: 5031
In Project -> References, double-check the Location of all your references. Your reference might have the right name but could be pointing to another instance of the same DLL.
Upvotes: 0
Reputation: 11991
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.
Upvotes: 2
Reputation: 7196
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.
Upvotes: 1
Reputation: 19842
It's been a while but from the top menu - "Project" -> "References" and the missing ones are usually highlighed or say missing next to them.
Upvotes: 0
Reputation: 13377
Under Project -> References.
Look for the word MISSING: in front of the dll's that aren't there.
Upvotes: 2