共用方式為


IDvdControl2::SetState

 
Microsoft DirectShow 9.0

IDvdControl2::SetState

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

Syntax

  HRESULT SetState(
  IDvdState *pState,
  DWORD    dwFlags,
  IDvdCmd  **ppCmd
);

Parameters

pState

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

dwFlags

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

ppCmd

[out] 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 Values

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

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also