0

I have an application that has to be installed in COM+. Installation via RegSvcs works fine, however when I try to uninstall the application a number of DLLs are locked and remain in the install folder. Note that this only happens after I make a call to the COM+ application; otherwise the uninstall runs smoothly.

My application requires a clean install and backout, but I'm having difficulty identifying why these DLLs are getting locked. A screenshot of the locked third-party DLLs is found below; the two corresponding to my application are not shown.

My assembly is marked as non-ComVisible, with a single class deriving from ServicedComponent exposed to COM+. I've tried forcing garbage collection after the call completes, but it doesn't seem to make any difference. So, some questions:

  • Is it safe to assume this is happening due to improper implementation of IDisposable somewhere, or could it be something else?
  • Should I assume there is a separate problem pertaining to each locked DLL, or is it possible that there is a problem with a single class that is resulting in a lock on all these DLLs?
  • Any suggestions how I might go about debugging this?

Any assistance would be greatly appreciated - feeling completely lost on this one.

Locked DLLs

ket
  • 636
  • 6
  • 19
  • 1
    You can try to use [`handle`](https://docs.microsoft.com/en-us/sysinternals/downloads/handle) utility to check what is blocking your files actually. Then proceed for further investigation of the root case. Are you sure, that your application is closed properly? – Pavel Anikhouski Jan 20 '20 at 20:01

1 Answers1

1

I got it ... I needed the following attributes:

[assembly: ApplicationAccessControl(Value=false, AccessChecksLevel=AccessChecksLevelOption.ApplicationComponent)]
[assembly: ApplicationActivation(ActivationOption.Server)]

Calls get routed into my application from a system account, but without the second attribute it was apparently activated under the creator process.

ket
  • 636
  • 6
  • 19