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

# CoGetInterfaceAndReleaseStream(3w)

## NAME

**CoGetInterfaceAndReleaseStream** (OLE32.@)

## SYNOPSIS

HRESULT CoGetInterfaceAndReleaseStream\
  (\
   LPSTREAM *pStm*,\
   REFIID   *riid*,\
   LPVOID\*  *ppv*\
  )

## DESCRIPTION

Unmarshalls an interface from a stream and then releases the stream.

## PARAMS

*pStm* **\[In\]**  Stream that contains the marshalled interface.

*riid* **\[In\]**  Interface identifier of the object to unmarshall.

*ppv* **\[Out\]**  Address of pointer where the requested interface object will be stored.

## RETURNS

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

**Failure:** A **COM** error code.

## SEE ALSO

CoMarshalInterThreadInterfaceInStream() and **[CoUnmarshalInterface(3w)](/CoUnmarshalInterface/3w.md)**

## IMPLEMENTATION

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

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

Debug channel **"ole"**.
