IWMDMOperation::GetObjectName method (mswmdm.h)

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(
  [out] LPWSTR pwszName,
  [in]  UINT   nMaxChars
);

Parameters

[out] pwszName

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.

[in] nMaxChars

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

Return value

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.

Remarks

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

Requirements

Requirement Value
Target Platform Windows
Header mswmdm.h
Library Mssachlp.lib

See also

Handling File Transfers Manually

IWMDMOperation Interface

IWMDMOperation::SetObjectName