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

# CoDisconnectObject(3w)

## NAME

**CoDisconnectObject** (OLE32.@)

## SYNOPSIS

HRESULT CoDisconnectObject\
  (\
   LPUNKNOWN *lpUnk*,\
   DWORD     *reserved*\
  )

## DESCRIPTION

Disconnects all connections to this object from remote processes. Dispatches pending RPCs while blocking new RPCs from occurring, and then calls

**IMarshal:**:DisconnectObject on the given object.

Typically called when the object server is forced to shut down, for instance by the user.

## PARAMS

*lpUnk* **\[In\]**  The object whose stub should be disconnected.

*reserved* **\[In\]**  Reserved. Should be set to **0.**

## RETURNS

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

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

## SEE ALSO

CoMarshalInterface, CoReleaseMarshalData, CoLockObjectExternal

## IMPLEMENTATION

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

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

Debug channel **"ole"**.
