PortAudio  2.0
Data Structures | Typedefs | Functions
pa_win_coinitialize.h File Reference

Microsoft COM initialization routines. More...

Go to the source code of this file.

Data Structures

struct  PaWinUtilComInitializationResult
 Data type used to hold the result of an attempt to initialize COM using PaWinUtil_CoInitialize. Must be retained between a call to PaWinUtil_CoInitialize and a matching call to PaWinUtil_CoUninitialize. More...
 

Typedefs

typedef struct
PaWinUtilComInitializationResult 
PaWinUtilComInitializationResult
 Data type used to hold the result of an attempt to initialize COM using PaWinUtil_CoInitialize. Must be retained between a call to PaWinUtil_CoInitialize and a matching call to PaWinUtil_CoUninitialize. More...
 

Functions

PaError PaWinUtil_CoInitialize (PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult)
 Initialize Microsoft COM subsystem on the current thread. More...
 
void PaWinUtil_CoUninitialize (PaHostApiTypeId hostApiType, PaWinUtilComInitializationResult *comInitializationResult)
 Uninitialize the Microsoft COM subsystem on the current thread using the result of a previous call to PaWinUtil_CoInitialize. Must be called on the same thread as PaWinUtil_CoInitialize. More...
 

Detailed Description

Microsoft COM initialization routines.

Typedef Documentation

Data type used to hold the result of an attempt to initialize COM using PaWinUtil_CoInitialize. Must be retained between a call to PaWinUtil_CoInitialize and a matching call to PaWinUtil_CoUninitialize.

Function Documentation

PaError PaWinUtil_CoInitialize ( PaHostApiTypeId  hostApiType,
PaWinUtilComInitializationResult comInitializationResult 
)

Initialize Microsoft COM subsystem on the current thread.

Parameters
hostApiTypethe host API type id of the caller. Used for error reporting.
comInitializationResultAn output parameter. The value pointed to by this parameter stores information required by PaWinUtil_CoUninitialize to correctly uninitialize COM. The value should be retained and later passed to PaWinUtil_CoUninitialize.

If PaWinUtil_CoInitialize returns paNoError, the caller must later call PaWinUtil_CoUninitialize once.

References PaWinUtilComInitializationResult::initializingThreadId, PA_DEBUG, paInsufficientMemory, paNoError, paUnanticipatedHostError, PaUtil_SetLastHostErrorInfo(), PAWINUTIL_COM_INITIALIZED, PAWINUTIL_COM_NOT_INITIALIZED, and PaWinUtilComInitializationResult::state.

Referenced by PaAsio_Initialize(), PaAsio_ShowControlPanel(), PaWasapi_Initialize(), and PaWinDs_Initialize().

void PaWinUtil_CoUninitialize ( PaHostApiTypeId  hostApiType,
PaWinUtilComInitializationResult comInitializationResult 
)

Uninitialize the Microsoft COM subsystem on the current thread using the result of a previous call to PaWinUtil_CoInitialize. Must be called on the same thread as PaWinUtil_CoInitialize.

Parameters
hostApiTypethe host API type id of the caller. Used for error reporting.
comInitializationResultAn input parameter. A pointer to a value previously initialized by a call to PaWinUtil_CoInitialize.

References PaWinUtilComInitializationResult::initializingThreadId, PA_DEBUG, PAWINUTIL_COM_INITIALIZED, PAWINUTIL_COM_NOT_INITIALIZED, and PaWinUtilComInitializationResult::state.

Referenced by PaAsio_Initialize(), and PaAsio_ShowControlPanel().