COM
Expand Minimize

CoGetContextToken function

Returns a pointer to an implementation of IObjContext for the current context.

Syntax


HRESULT CoGetContextToken(
  _Out_  ULONG_PTR *pToken
);

Parameters

pToken [out]

A pointer to an implementation of IObjContext for the current context.

Return value

This function can return the following values.

Return codeDescription
S_OK

The token was retrieved successfully.

E_POINTER

The caller did not pass a valid token pointer variable.

CO_E_NOTINITIALIZED

The caller is not in an initialized apartment.

 

Remarks

Windows Phone 8: This API is supported.

Windows Phone 8.1: This API is supported.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps | Windows Store apps]

Minimum supported server

Windows 2000 Server [desktop apps | Windows Store apps]

Header

Objbase.h

Library

Ole32.lib

DLL

Ole32.dll

See also

IContext
IObjContext

 

 

Community Additions

ADD
Show:
© 2014 Microsoft