Skip to content

Latest commit

 

History

History
130 lines (106 loc) · 3.29 KB

nf-combaseapi-comarshalhresult.md

File metadata and controls

130 lines (106 loc) · 3.29 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:combaseapi.CoMarshalHresult
CoMarshalHresult function (combaseapi.h)
Marshals an HRESULT to the specified stream, from which it can be unmarshaled using the CoUnmarshalHresult function.
CoMarshalHresult
CoMarshalHresult function [COM]
_com_CoMarshalHresult
com.comarshalhresult
combaseapi/CoMarshalHresult
com\comarshalhresult.htm
com
37aaf404-49ca-4881-a369-44c5288abf1d
12/05/2018
CoMarshalHresult, CoMarshalHresult function [COM], _com_CoMarshalHresult, com.comarshalhresult, combaseapi/CoMarshalHresult
combaseapi.h
Objbase.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Ole32.lib
Ole32.dll
Windows
19H1
CoMarshalHresult
combaseapi/CoMarshalHresult
c++
APIRef
kbSyntax
DllExport
Ole32.dll
API-MS-Win-Core-Com-l1-1-0.dll
ComBase.dll
API-MS-Win-Core-Com-l1-1-1.dll
API-MS-Win-DownLevel-Ole32-l1-1-1.dll
CoMarshalHresult

CoMarshalHresult function

-description

Marshals an HRESULT to the specified stream, from which it can be unmarshaled using the CoUnmarshalHresult function.

-parameters

-param pstm [in]

A pointer to the marshaling stream. See IStream.

-param hresult [in]

The HRESULT in the originating process.

-returns

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

Return code Description
S_OK
The HRESULT was marshaled successfully.
STG_E_INVALIDPOINTER
A bad pointer was specified for pstm.
STG_E_MEDIUMFULL
The medium is full.

-remarks

An HRESULT is process-specific, so an HRESULT that is valid in one process might not be valid in another. If you are writing your own implementation of IMarshal and need to marshal an HRESULT from one process to another, either as a parameter or a return code, you must call this function. In other circumstances, you will have no need to call this function.

This function performs the following tasks:

  1. Writes an HRESULT to a stream.
  2. Returns an IStream pointer to that stream.

-see-also

CoUnmarshalHresult

IStream