IDvdControl2::SetState method (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The SetState method saves the current disc position and state of the DVD Navigator filter.

Syntax

HRESULT SetState(
  [in]  IDvdState *pState,
  [in]  DWORD     dwFlags,
  [out] IDvdCmd   **ppCmd
);

Parameters

[in] pState

Pointer to the IDvdState interface on the object that contains the state information.

[in] dwFlags

Bitwise OR of one or more flags from the DVD_CMD_FLAGS enumeration, specifying how to synchronize the command.

[out] ppCmd

Receives a pointer to an IDvdCmd object that can be used to synchronize DVD commands. The caller must release the interface. This parameter can be NULL. For more information, see Synchronizing DVD Commands.

Return value

Returns S_OK if successful, or an HRESULT value otherwise.

Remarks

The DVD Navigator uses the location information in the given state object to restore the playback position to a specific location on the disc.

This method is demonstrated in the DVDSample application in CDvdCore::RestoreBookmark.

Requirements

Requirement Value
Minimum supported client Windows XP [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)
Library Strmiids.lib

See also

DVD Applications

Error and Success Codes

IDvdControl2 Interface