DPA_LoadStream function (dpa_dsa.h)

[DPA_LoadStream is available in Windows Vista. It might be altered or unavailable in subsequent versions. ]

Loads the dynamic pointer array (DPA) from a stream by calling the specified callback function to read each element.

Syntax

HRESULT DPA_LoadStream(
  [out] HDPA         *phdpa,
  [in]  PFNDPASTREAM pfn,
  [in]  IStream      *pstream,
  [in]  void         *pvInstData
);

Parameters

[out] phdpa

Type: HDPA*

A handle to a DPA.

[in] pfn

Type: PFNDPASTREAM

The callback function. See PFNDPASTREAM for the callback function prototype.

[in] pstream

Type: IStream*

An IStream object.

[in] pvInstData

Type: void*

A pointer to callback data. pvInstData is passed as a parameter to pfn.

Return value

Type: HRESULT

Returns one of the following values.

Return code Description
S_OK
Indicates that the callback function was successful and the element was loaded.
S_FALSE
Indicates that the callback function was unsuccessful in loading the element; however, the process should continue.
E_INVALIDARG
Indicates that one or more of the parameters is invalid.
E_FAIL
Indicates that the stream object could not be read.
E_OUTOFMEMORY
The buffer length is invalid or there was insufficient memory to complete the operation.

Remarks

This function must be called directly from ComCtl32.dll. It is ordinal 9.

The callback is responsible for writing the pvInstData data to the stream.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header dpa_dsa.h
DLL ComCtl32.dll