Share via


IWMDMOperation::GetObjectName

banner art

Windows Media Device Manager calls GetObjectName before an object is written to the device in order to know what it should be named on the device.

Syntax

HRESULT GetObjectName(LPWSTRpwszName,UINTnMaxChars);

Parameters

pwszName

[out]  Pointer to a wide-character null-terminated string that specifies the object name. The name should include a file extension, if required. Windows Media Device Manager allocates and releases this buffer. nMaxChars specifies the maximum number of characters, including the terminating null character.

nMaxChars

[in]  Integer specifying the number of characters in pwszName, including the terminating null character.

Return Values

The application should return one of the following HRESULT values.

Return code Description
S_OK The read operation should continue.
WMDM_E_USER_CANCELLED The read operation should be cancelled without finishing.
E_FAIL An unspecified error occurred, and the read operation should be cancelled without finishing.

If the application returns 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 that error to the application.

Remarks

This method is only called if the application did not specify the name as a parameter in the Insert method.

Requirements

Header: Defined in mswmdm.h.

Library: mssachlp.lib

See Also