IMDSPDevice3::SetProperty
The SetProperty method sets a specific device property that is writable.
Syntax
HRESULT SetProperty(LPCWSTRpwszPropName,PROPVARIANT*pValue);
Parameters
pwszPropName
[in] Name of device property being set.
pValue
[in] Value of device property being set.
Return Values
The method returns an HRESULT. All the interface methods in Windows Media Device Manager can return any of the following classes of error codes:
- Standard COM error codes
- Windows error codes converted to HRESULT values
- Windows Media Device Manager error codes
For an extenstive list of possible error codes, see Error Codes.
Possible values include, but are not limited to, those in the following table.
Return code | Description |
S_OK | The method succeeded. |
E_INVALIDARG | A parameter is an invalid or NULL pointer. |
WMDM_E_NOTSUPPORTED | The property is not supported by the device, or this property cannot be set, or the device returned an error. |
Remarks
This method sets the specified device property.
For a list of device property names, see Metadata Constants.
This method is similar to the SetMetadata method for storages, but this method can set only one property at a time.
Requirements
Header: Defined in mswmdm.h.
Library: mssachlp.lib
See Also