I have a global user defined type “foo”in a dll that is responible for the creation and deletion of a reference counted HINSTANCE. Problem is it needs to be initialised with a string by a function called on the dll.
What is my best option for doing this? How can a function create a “foo” that will be global and persist with a valid HINSTANCE over multiple function calls. Thanks
You can use a singleton: