---
name: "CoGetObjectContext"
section: "3w"
platform: "linux"
package: "libwine-dev"
version: "1.4.1-4"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/CoGetObjectContext"
---

# CoGetObjectContext(3w)

## NAME

**CoGetObjectContext** (OLE32.@)

## SYNOPSIS

HRESULT CoGetObjectContext\
  (\
   REFIID *riid*,\
   void\*\* *ppv*\
  )

## DESCRIPTION

Retrieves an object associated with the current context (i.e. apartment).

## PARAMS

*riid* **\[In\]**  Id of the interface of the object to retrieve.

*ppv* **\[Out\]**  Address where object will be stored on return.

## RETURNS

**Success:** **S\_OK**.

**Failure:** **HRESULT** code.

## IMPLEMENTATION

Declared in **"objbase.h"**.

Implemented in **"dlls/ole32/compobj.c"**.

Debug channel **"ole"**.
