Re: "Error in loading dll" when Making ActiveX DLL



"Matt Diephouse" <mddiep@xxxxxxxxx> wrote in message
news:1120846919.570072.174190@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I'm working on a VB6 COM addin. After some modifications and a few
> weeks time, I tried to remake the DLL using VS. This resulted in a
> "Error in loading dll" dialog box.
>

You get this during the compile process? hmmm... Error 48's are usually due
to a missing or mismatched dependency. Does your add-in use any external
DLLs/OCXs/Other that may've changed (Windows Update).

If you take your entire project, change its name and reset compatibility to
None (as an experiment), does it still raise that error? VB's raising the
error... right? Are you using Binary Compatibility? If not, your registry's
probably corrupt (left over entries from previous builds).

Since it won't register using Regsvr32, there's obviously something going on
under the sheets. If VB itself is raising that error, it may be silently
skipping a step during the compile process. I can't recall seeing this
happen before but anything's possible. Are you using any other add-ins? Some
add-ins, like vbAdvance, intercept the compile process and "do things" to
your component. vbAdvance is a good add-in though so I doubt it's that
specific one.

Try unloading all add-ins except source safe and compile the project "as
is". If that doesn't help, try copying everything to another folder,
changing the name (the component name... not the project's file name) and
recompile. That should be exactly like compiling a brand new project so
things that may be wrong with the original shouldn't effect the newly named
component.

If changing the name works, you might want to run RegClean to get rid of all
traces of previous builds. Then, in theory, you should be able to go back to
the original project and compile.... btw... have you tried compiling from
the command line? It may be worth a try.

--
Ken Halter - MS-MVP-VB - http://www.vbsight.com
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Please keep all discussions in the groups..


.


Loading