WinStd
Additional templates and function helpers for Microsoft Windows using Standard C++ classes
Classes | Functions
COM object management

Provides helper templates for Windows COM object manipulation. More...

Classes

struct  winstd::CoTaskMemFree_delete
 Deleter for unique_ptr using CoTaskMemFree. More...
 
class  winstd::com_obj< T >
 COM object wrapper template. More...
 
class  winstd::bstr
 BSTR string wrapper. More...
 
class  winstd::variant
 VARIANT struct wrapper. More...
 
class  winstd::com_initializer
 Context scope automatic COM (un)initialization. More...
 

Functions

template<class T >
static _Check_return_ HRESULT CoCreateInstance (REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, winstd::com_obj< T > &v)
 Creates and default-initializes a single object of the class associated with a specified CLSID. More...
 

Detailed Description

Provides helper templates for Windows COM object manipulation.

Function Documentation

◆ CoCreateInstance()

template<class T >
static _Check_return_ HRESULT CoCreateInstance ( REFCLSID  rclsid,
LPUNKNOWN  pUnkOuter,
DWORD  dwClsContext,
winstd::com_obj< T > &  v 
)
static

Creates and default-initializes a single object of the class associated with a specified CLSID.

See also
CoCreateInstance function