COM
Expand Minimize
This topic has not yet been rated - Rate this topic

CoGetApplicationThreadReference function

Gets a reference to the current ASTA thread to participate in ASTA cooperative lifetime management.

Syntax


HRESULT WINOLEAPI CoGetApplicationThreadReference(
  _Out_  IUnknown **ppThreadReference
);

Parameters

ppThreadReference [out]

Receives the IUnknown interface for the thread lifetime object.

Return value

This function can return one of these values.

Return codeDescription
S_OK

The call was successful.

CO_E_NOTSUPPORTED

The CoGetApplicationThreadReference function was called from an MTA or classic STA thread.

 

Remarks

This function is supported only in an ASTA, where it supports the ASTA lifetime pattern.

The thread reference object returned by this function should be stored as a field in an STA object. It can't be marshaled or stored in the Global Interface Table, and it fails quickly if called from the wrong thread.

Requirements

Header

Combaseapi.h

DLL

Combase.dll

 

 

Send comments about this topic to Microsoft

Build date: 10/27/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.