microsoft / Windows-classic-samples

This repo contains samples that demonstrate the API used in Windows classic desktop applications.
Other
5.1k stars 3.24k forks source link

Bug with COM DLL reference counting - Credential Provider and a few other samples #248

Open wmjdgla opened 2 years ago

wmjdgla commented 2 years ago

No dll reference counting is in done in the constructor: https://github.com/microsoft/Windows-classic-samples/blob/7cbd99ac1d2b4a0beffbaba29ea63d024ceff700/Samples/CredentialProvider/cpp/Dll.cpp#L25-L27

https://github.com/microsoft/Windows-classic-samples/blob/7cbd99ac1d2b4a0beffbaba29ea63d024ceff700/Samples/IME/cpp/SampleIME/Server.cpp#L76-L81

https://github.com/microsoft/Windows-classic-samples/blob/7cbd99ac1d2b4a0beffbaba29ea63d024ceff700/Samples/Win7Samples/winui/input/tsf/textservice/propertytextservice/Server.cpp#L84-L89

Whereas in other samples: https://github.com/microsoft/Windows-classic-samples/blob/7cbd99ac1d2b4a0beffbaba29ea63d024ceff700/Samples/Win7Samples/winbase/DeviceFoundation/FunctionDiscovery/Provider/FDProviderSample/ComServer.cpp#L71-L75

https://github.com/microsoft/Windows-classic-samples/blob/7cbd99ac1d2b4a0beffbaba29ea63d024ceff700/Samples/Win7Samples/winui/WindowsSearch/IFilterSample/Dll.cpp#L36-L38

https://github.com/microsoft/Windows-driver-samples/blob/620f8786481c7bdb5c762a43102eafcb6f9c812d/avstream/avscamera/mft0/dllmain.cpp#L142-L145