Todd said:
Hello,
How do I register and non .net dll(with the OS) in a .net enviroment?
I have a third party dll I need to register(REGSVR32.EXE). What is
the best approach to this in a .Net enviroment. I appreciate any
help.
We need more information.
You say that it is a non-.NET DLL, so that means it may be a COM server,
or it may be a DLL. If it is a COM server then regsvr32 will register it
with the system and if you have a type library for this server
(typically it is bound as a resource to the DLL) you'll be able to use
COM interop to call it from .NET.
If the DLL is not a COM server then you cannot 'register' it. Instead
you have to put it in the PATH, or better, put it in your application's
folder. To call the functions in such a DLL you have to use platform
invoke in .NET.
To tell if it is a COM server use dumpbin /exports or depends to see if
the DLL exports the GetClassObject function. If it doesn't, then it is
not a COM server.
Richard