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

# CoGetPSClsid(3w)

## NAME

**CoGetPSClsid** (OLE32.@)

## SYNOPSIS

HRESULT CoGetPSClsid\
  (\
   REFIID *riid*,\
   CLSID\* *pclsid*\
  )

## DESCRIPTION

Retrieves the **CLSID** of the proxy/stub factory that implements IPSFactoryBuffer for the specified interface.

## PARAMS

*riid* **\[In\]**  Interface whose proxy/stub **CLSID** is to be returned.

*pclsid* **\[Out\]**  Where to store returned proxy/stub **CLSID**.

## RETURNS

**S\_OK** **E\_OUTOFMEMORY** **REGDB\_E\_IIDNOTREG** if no PSFactoryBuffer is associated with the **IID**, or it could not be parsed.

## NOTES

The standard marshaller activates the object with the **CLSID** returned and uses the CreateProxy and CreateStub methods on its IPSFactoryBuffer interface to construct the proxies and stubs for a given object.

CoGetPSClsid determines this **CLSID** by searching the HKEY\_CLASSES\_ROOTInterface{string form of riid}ProxyStubClsid32 in the registry and any interface Id registered by CoRegisterPSClsid within the current process.

## BUGS

Native returns **S\_OK** for interfaces with a key in HKCRInterface, but without a ProxyStubClsid32 key and leaves garbage in *pclsid*. This should be considered a bug in native unless an application depends on this (unlikely).

## SEE ALSO

CoRegisterPSClsid.

## IMPLEMENTATION

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

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

Debug channel **"ole"**.
