How can you tell if a DLL file has been registered?

junfanbl

Member
Joined
Feb 18, 2016
Messages
18
Programming Experience
1-3
How can you tell if a DLL file has been registered? I am looking at registering a DLL for use in Excel. It is a third party DLL created for a CAD application. As it is, Excel cannot reference the DLL so my guess is that means it isn't registered. Also, can any .NET Class library (DLL) be registered for use in Excel? IF not, what is the criteria?
 
How can you tell if a DLL file has been registered?
Regasm output will tell that it successfully registered it or not. Can also be seen in COM tab in Add Reference dialog in VS.
Also, can any .NET Class library (DLL) be registered for use in Excel? IF not, what is the criteria?
No, you have to decorate it for COM export as shown in article HOW TO: Call a Visual Basic .NET Class Library from Visual Basic for Applications in Microsoft Office
"Register for COM Interop" as I explained in your other thread involves decorating with ComVisible attribute.
It is a third party DLL created for a CAD application
If it is a .Net non-COM library you have to write a class library yourself that consumes that dll (references it), and functions as a COM wrapper and exposes the functionality for consume in VBA.
If it is a native library you may Declare the functions to use in VBA as you can also do in VB.Net. Details for working in pure VBA you must ask in VBA forums for, because this is a VB.Net forum.
 
Back
Top