IMDSPObject::Open method (mswmdm.h)

The Open method opens the associated object and prepares it for Read or Write operations. This operation is valid only if the storage object represents a file.

Syntax

HRESULT Open(
  [in] UINT fuMode
);

Parameters

[in] fuMode

Mode in which the file must be opened. It must be one of the following two values.

Value Description
MDSP_READ Query whether a subsequent call to Read would be allowed.
MDSP_WRITE Query whether a subsequent call to Insert would be allowed.

Return value

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 extensive list of possible error codes, see Error Codes.

Remarks

If the underlying file-system does not support opening of multiple files at the same time, the service provider should gracefully the return Win32 error code ERROR_TOO_MANY_OPEN_FILES, if the client attempts to open more than one file at a time.

This method must be implemented. It must not return WMDM_E_NOTSUPPORTED or E_NOTIMPL. For more information, see Mandatory and Optional Interfaces.

Requirements

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

See also

IMDSPObject Interface

IMDSPObject::Close

IMDSPObject::Read

IMDSPObject::Seek

IMDSPObject::Write