IWpdSerializer::GetBufferFromIPortableDeviceValues method
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(
[in] IPortableDeviceValues *pSource,
[out] BYTE **ppBuffer,
[out] 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 value
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
Return code | Description |
---|---|
|
The method succeeded. |
|
A required pointer argument was NULL. |
|
There was not enough memory available to create the buffer. |
Requirements
Requirement | Value |
---|---|
Header |
|
Library |
|