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



Ken Halter wrote:
> Matt Diephouse" <mdd...@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).

I don't believe so. It uses several Visual Basic DLLs, some Office 11.0
DLLs, and Microsoft XML, OLE Automation, and Microsoft Add-in Designer
DLLs.

> If you take your entire project, change its name and reset compatibility to
> None (as an experiment), does it still raise that error?

Yes

> VB's raising the error... right?

Correct. The addin works if I run it (Run > Start), but I get the
"Error in loading DLL" error when I click File > Make xxxPlugin.dll. I
sometimes get the error just running it, but restarting always fixes
the issue.

> Are you using Binary Compatibility? If not, your registry's
> probably corrupt (left over entries from previous builds).

Nope.

> 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?

Two of them:
Component Services Add-In for VB 5.0/6.0
Visual Component Manager 6.0

Removing them doesn't help.

> 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.

It doesn't help to change any of its names.

> 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.

RegClean didn't help.

By the way, I should have mentioned that the old version of the add-in
that I compiled a few weeks ago no longer compiles. It gives the same
error.

--
matt

.


Loading