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

# CoGetState(3w)

## NAME

**CoGetState** (OLE32.@)

## SYNOPSIS

HRESULT CoGetState\
  (\
   IUnknown\*\* *ppv*\
  )

## DESCRIPTION

Retrieves the thread state object previously stored by **[CoSetState(3w)](/CoSetState/3w.md)**.

## PARAMS

*ppv* **\[In\]**  Address where pointer to object will be stored.

## RETURNS

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

**Failure:** **E\_OUTOFMEMORY**.

## NOTES

Crashes on all invalid *ppv* addresses, including **NULL**. If the function returns a non-NULL object then the caller must release its reference on the object when the object is no longer required.

## SEE ALSO

CoSetState().

## IMPLEMENTATION

Not declared in a Wine header. The function is either undocumented, or missing from Wine.

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

Debug channel **"ole"**.
