What is the proper way for an activeX (COM) control to clean up when closed by its parent?
问题 I'm having problems with my .net controls not getting cleaned up properly when wrapped for activeX use. The default behavior leaves the SDK's test container app (TstCon32.exe) running as a GUIless process when I try and close it. The workaround I initially found via google was to override WndProc and call Environment.Exit(0) manually. This did get TstCon32.exe to shut down completely; however it's breaking the application where i need to have the control hosted. The App is MDI and WM_DESTROY