Microsoft DirectX 9.0 |
The Get method retrieves a property identified by a property set GUID and a property ID.
Syntax
HRESULT Get(
REFGUID guidPropSet,
DWORD dwPropID,
LPVOID pInstanceData,
DWORD cbInstanceData,
LPVOID pPropData,
DWORD cbPropData,
DWORD *pcbReturned
);
Parameters
guidPropSet
[in] Specifies the GUID of the property set .
dwPropID
[in] Specifies the identifier of the property within the property set.
pInstanceData
[in] Pointer to an array of bytes that contains instance data for the property.
cbInstanceData
[in] Specifies the size of the array given in pInstanceData.
pPropData
[out] Pointer to an array of bytes that receives the property data.
cbPropData
[in] Specifies the size of the array given in pPropData.
pcbReturned
[out] Pointer to a variable that receives the number of bytes the method returned in the pPropData array.
Return Value
Returns an HRESULT value. Possible values include the following.
Value | Description |
S_OK | Success. |
E_PROP_SET_UNSUPPORTED | The property set is not supported. |
E_PROP_ID_UNSUPPORTED | The property ID is not supported for the specified property set. |
Remarks
Note Another interface by this name exists in the dsound.h header file. The two interfaces are not compatible. The IKsControl interface, documented in the DirectShow DDK, is now the recommended interface for passing property sets between WDM drivers and user mode components.
To retrieve a property, allocate a buffer which this method will then fill in. To determine the necessary buffer size, specify NULL for pPropData and zero (0) for cbPropData. This method returns the necessary buffer size in pcbReturned.
Example Code
The following example queries a pin for its pin category, by retrieving the AMPROPERTY_PIN_CATEGORY property. (See Pin Property Set.)
IKsPropertySet *pKs;
GUID guid;
DWORD cbBytes;
/* Query the pin for IKsProperty Set (not shown.) */
pKs->Get(AMPROPSETID_Pin, AMPROPERTY_PIN_CATEGORY, NULL, 0, &guid,
sizeof(GUID), &cbBytes);
pKs->Release();
See Also