Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IPortableDeviceValues::GetBufferValue method

The GetBufferValue method retrieves a byte array value (type VT_VECTOR | VT_UI1) specified by a key.

Syntax


HRESULT GetBufferValue(
  [in]  REFPROPERTYKEY key,
  [out] BYTE           **ppValue,
  [out] DWORD          *pcbValue
);

Parameters

key [in]

A REFPROPERTYKEY key that specifies the item to retrieve.

ppValue [out]

Pointer to the retrieved BYTE* value. The caller is responsible for freeing the memory by calling CoTaskMemFree.

pcbValue [out]

Pointer to the size of ppValue, in bytes.

Return value

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

Return codeDescription
S_OK

The method succeeded.

DISP_E_TYPEMISMATCH

The property specified by key is not a BYTE* type.

HRESULT_FROM_WIN32(ERROR_NOT_FOUND)

The property specified by key is not in the collection.

 

Remarks

Retrieving a NULL buffer or a zero-sized buffer is not supported.

Requirements

Header

PortableDeviceTypes.h

Library

PortableDeviceGUIDs.lib

See also

IPortableDeviceValues Interface
IPortableDeviceValues::SetBufferValue

 

 

Community Additions

Show:
© 2017 Microsoft