Share via


IWpdSerializer::GetBufferFromIPortableDeviceValues

banner art

Previous Next

IWpdSerializer::GetBufferFromIPortableDeviceValues

The GetBufferFromIPortableDeviceValues method serializes a submitted IPortableDeviceValues interface to an allocated byte array. The byte array returned is allocated for the caller and should be freed by the caller using CoTaskMemFree.

Syntax

  HRESULT GetBufferFromIPortableDeviceValues(
  IPortableDeviceValues*  pSource,
  BYTE**  ppBuffer,
  DWORD*  pdwBufferSize
);

Parameters

pSource

[in]  Pointer to an IPortableDeviceValues interface to serialize.

ppBuffer

[out]  Pointer to a BYTE* that contains the serialized data. Windows Portable Devices allocates this memory; the caller must free it by calling CoTaskMemFree.

pdwBufferSize

[out]  Pointer to a DWORD that specifies the size of allocated buffer, in bytes.

Return Values

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return code Description
S_OK The method succeeded.
E_POINTER A required pointer argument was NULL.
E_OUTOFMEMORY There was not enough memory available to create the buffer.

Requirements

Header: Defined in PortableDeviceTypes.h

Library: PortableDeviceGUIDs.lib

See Also

Previous Next