Archive: Getting CSID from DLL


Getting CSID from DLL
Hi,

I would like to check if a certain dll is already registered on the computer.
I think this would go best by having the GUID of the file as the files to check may vary from time to time.
Is there a way to check the GUID by code?

any help would be appreciated,
thanks in advance,
OC.


There's no standard way of doing this that I could think of. You can simply always register to be sure, or register one time on your computer and check which CLSID it used using RegMon.


You should just call a function of the ActiveX DLL and handle the response code. If you try to access an DLL that is not installed on the system Windows give this in an errorcode.

Going straight to GUID's is not futureproof since an new version of an ActiveX DLL can have any value.


thanks for your fast replies!
in my case it's not good to register them everytime because I would like the things to be portable
If a dll is registered I would just run the app, if the dll isn't registered I would register it on the usb stick without copying it to the system
afterwards I would unregister it

when I register it while it is registered on the system it will stop the program from working when it isn't running from usb stick.

also, I don't always know the dll's that will be used so can't call any functions to test it.

the only thing I will always know is the filename of the dll.
is there a way of checking if it is registered?
sorry for the difficult explanation ;)