tags:

views:

35

answers:

2

Does this command just soft links to x.dll,say if I delete x.dll things won't work?

+1  A: 

The regsvr32 program calls the DllRegisterServer entry point in the DLL.

SLaks
Does `regsvr32` save another copy of the `dll` ?
wamp
@wamp: No, it doesn't. The DLL itself might, but probably won't.
SLaks
So should leave `dll` where it was in order to make it work as a COM component,right?
wamp
@wamp: Correct.
SLaks
+2  A: 

Regsvr32 calls a well-known function exported by the dll, called DllRegisterServer. The purpose of this is to allow the dll to register in the registry any COM components implemented by the dll.

The exact impact of deleting the dll depends on whether there are any client apps that attempt to create and use an instance of COM objects implemented by the dll. If no app attempts to do it, nothing bad will happen. if an application attempts to do it, the bad effects will be limited to that application only and depend oh how well the application deals with the error code the COM API will return to it. If the application is well-behaved and the COM object is not crucial for it's functionality, the app will just continue working, albeit with a reduced functionality. If the app is badly written, it can crash. If the COM object is crucial, the app might choose to show an error to the user and exit, or just to fail fast.

Franci Penov