COM
Expand Minimize

CoUnmarshalHresult function

Unmarshals an HRESULT type from the specified stream.

Syntax


HRESULT CoUnmarshalHresult(
  _In_   LPSTREAM pstm,
  _Out_  HRESULT *phresult
);

Parameters

pstm [in]

A pointer to the stream from which the HRESULT is to be unmarshaled.

phresult [out]

A pointer to the unmarshaled HRESULT.

Return value

This function can return the standard return values E_OUTOFMEMORY and E_UNEXPECTED, as well as the following values.

Return codeDescription
S_OK

The HRESULT was unmarshaled successfully.

STG_E_INVALIDPOINTER

pStm is an invalid pointer.

 

Remarks

You do not explicitly call this function unless you are performing custom marshaling (that is, writing your own implementation of IMarshal), and your implementation needs to unmarshal an HRESULT.

You must use CoUnmarshalHresult to unmarshal HRESULT values previously marshaled by a call to the CoMarshalHresult function.

This function performs the following tasks:

  1. an HRESULT from a stream.

  2. Returns the HRESULT.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Objbase.h

Library

Ole32.lib

DLL

Ole32.dll

See also

CoMarshalHresult
IStream

 

 

Community Additions

ADD
Show:
© 2014 Microsoft