Previous | Next |
The SetObjectName method assigns a name to the content being read or written.
Syntax
HRESULT SetObjectName(
LPWSTR pwszName,
UINT nMaxChars
);
Parameters
pwszName
[out] Pointer to a (Unicode) wide character NULL-terminated string containing the object name.
nMaxChars
[in] Integer containing the maximum number of characters that this string can hold.
Return Values
If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.
Return code | Description |
WMDM_E_USER_CANCELLED | The application instructs Windows Media Device Manager to cancel the current operation without waiting for it to finish. |
E_FAIL | An unspecified error occurred. |
Remarks
This method is called after BeginRead is called.
If either E_FAIL or WMDM_E_USER_CANCELLED is returned from this call, the operation is cancelled and the End method is called. If the application is using block mode and returns WMDM_E_USER_CANCELLED, then Windows Media Device Manager will return this same error to the application.
See Also
Previous | Next |