# WinStd: COM Object Management

Loading...
Searching...
No Matches
COM Object Management

## 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::safearray
| SAFEARRAY string wrapper. More...
class | winstd::safearray_accessor< T >
| Context scope automatic SAFEARRAY (un)access. 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.
template<class T >
static _Check_return_ HRESULT | CoGetObject (LPCWSTR pszName, BIND_OPTS *pBindOptions, REFIID riid, winstd::com_obj< T > &v)
| Converts a display name into a moniker that identifies the object named, and then binds to the object identified by the moniker.

## Detailed Description

## 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

## CoGetObject()

template<class T >

static _Check_return_ HRESULT CoGetObject | ( | LPCWSTR | pszName,
|  | BIND_OPTS * | pBindOptions,
|  | REFIID | riid,
|  | winstd::com_obj< T > & | v )

static

Converts a display name into a moniker that identifies the object named, and then binds to the object identified by the moniker.

See also
  CoGetObject function