end2endzone / ShellAnything

ShellAnything is a C++ open-source software which allow one to easily customize and add new options to *Windows Explorer* context menu. Define specific actions when a user right-click on a file or a directory.
MIT License
183 stars 27 forks source link

Create COM unit tests based on CoCreateInstance() function. #122

Open end2endzone opened 1 year ago

end2endzone commented 1 year ago

Is your feature request related to a problem? Please describe. The application has unit test for the shell extension's entry point. These tests connects to the dll directly using LoadLibrary(), FreeLibrary() and GetProcAddress() to test the expected behavior's of the shell extension entry points.

For stronger reliability, test that forces the library to be loaded as a COM object should also be added. That is, the library should be loaded through CoCreateInstance() function.

Describe the solution you'd like Refer to https://stackoverflow.com/questions/43010172/addref-and-release-in-iunknown-what-do-they-actually-do for examples of code that is able to instantiate the library.

Describe alternatives you've considered N/A

Additional context N/A