COM initialization

Single-threaded and multiple-threaded EXE modules that use COM can leave PowerBASIC to handle all initialization and uninitialization requirements for each thread.  This also applies to DLL's created with the PowerBASIC for Windows compiler.

However, in some instances, it may be necessary to explicitly uninitialize the COM subsystem for a given thread.  For example to force a COM Object to unload from memory when it is no longer in use.  In such cases, an application may explicitly call the CoUninitialize API function within that thread.  However, if COM services are subsequently required again by that same thread, the COM subsystem must be reinitialized by a call to CoInitialize.

 

See Also

COM Programming Introduction

The PowerBASIC COM Browser