Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The WriteIPortableDeviceValuesToBuffer method serializes an IPortableDeviceValues interface to a caller-allocated byte array.
Syntax
HRESULT WriteIPortableDeviceValuesToBuffer(
[in] DWORD dwOutputBufferLength,
[in] IPortableDeviceValues *pResults,
[out] BYTE *pBuffer,
[out] DWORD *pdwBytesWritten
);
Parameters
-
dwOutputBufferLength [in]
-
DWORD that specifies the size of pBuffer, in bytes.
-
pResults [in]
-
Pointer to an IPortableDeviceValues interface to serialize.
-
pBuffer [out]
-
Pointer to a caller-allocated buffer. To learn the size of the required buffer, call GetSerializedSize.
-
pdwBytesWritten [out]
-
Pointer to a DWORD that indicates the number of bytes that was actually written to the caller-allocated buffer.
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. |
|
The caller-provided buffer was not big enough. |
Remarks
This method copies an IPortableDeviceValues interface into an existing buffer. If you want to allocate a new buffer, use GetBufferFromIPortableDeviceValues.
Requirements
| Requirement | Value |
|---|---|
| Header |
|
| Library |
|