Help registering a dll

W

William Cruz

Using: "regsvr32 expcg.dll" I get this error message: "expcg.dll was
loaded, but the DllRegisterServer entry point was not found. the file
can not be registered."

William Cruz
 
C

Carlos J. Quintero [VB MVP]

That means that the DLL is not not an ActiveX DLL...
--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com
 
C

Claes Bergefall

If you're trying to register a .NET assembly for use with COM use regasm.exe
instead

/claes
 
C

Carlos J. Quintero [VB MVP]

First you must decide if you want to create:

- A .NET assembly Dll: in this case the Dll can be registered for COM
Interop using regasm.exe. See COM Interop in the MSDN docs. For example:

Exposing .NET Framework Components to COM
http://msdn2.microsoft.com/en-us/library/zsfww439(VS.80).aspx

- A native ActiveX dll: in this case you can´t use a .NET language but you
can still use VS.NET to create a Visual C++ DLL, or use VB6, etc.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com
 
S

Sugan

You can just save the dll in the same folder where your application
exists. This would help, if your dll is not a activex dll.

-Sugan
 
W

William Cruz

I have done the first of your suggestions. I registered the DLL using
regasm.com in this manner: “regasm expcg.dll /tlb:expcg.tlb”. I then
went into VBA for AutoCAD and went to “add reference” and then “expcg”
to add as a reference, this all works fine. I then declare it this way:
“Dim Calcs As New ExpCG.ExpCG_Calcs” This also goes as planned. Now when
I try to use it, I get an error. I try to use it this by setting a value
withing the dll “Calcs.UnitWeight = 144” and I get this error.

Run-time error ‘-2147024894 (80070002)’:
The system cannot find the file specified.


Before using regasm.exe, I copied the dll file from the project
directory into the Windows\system32\ directory.


William Cruz
 
C

Carlos J. Quintero [VB MVP]

Hi,

Try registering the DLL with the codebase flag:

regasm.exe /codebase expgc.dll etc

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top