dotnet / samples

Sample code referenced by the .NET documentation
https://docs.microsoft.com/samples/browse
Creative Commons Attribution 4.0 International
3.4k stars 5.08k forks source link

[OutOfProcCOM] COMRegistration.LocalServer.Unregister does not fully delete the COM class from registry #5960

Open forderud opened 1 year ago

forderud commented 1 year ago

The ExeServer project in the OutOfProcCOM sample doesn't fully unregister itself when starting with /unregserver. This seem to be caused by the COMRegistration.LocalServer.Unregister function only deleting the content inside the HKCR\CLSID\{class-id} folder, but not the folder itself.

Steps to reproduce:

ElDuderinoBerlin commented 6 months ago

That's correct! You have to change the source code to use DeleteSubKeyTree.

Regards

forderud commented 6 months ago

That's correct! You have to change the source code to use DeleteSubKeyTree.

Project maintainers: Is there an interest in receiving a PR for addressing this issue?