Поделиться через


IDvdInfo2::GetState

 
Microsoft DirectShow 9.0

IDvdInfo2::GetState

The GetState method retrieves a bookmark containing the disc location and DVD Navigator state information.

Syntax

  HRESULT GetState(
  IDvdState **pStateData
);

Parameters

pStateData

[out] Address of a pointer to the IDvdState interface of a DvdState object allocated by the DVD Navigator.

Return Values

Returns one of the following HRESULT values.

Return code Description
S_OK Success.
E_INVALIDARG Invalid argument.
E_UNEXPECTED DVD Navigator is not initialized.

Remarks

When this method is called, the DVD Navigator creates a new state object and saves the current location into it, as well as the current parental level and other state information. The DVDState object can be used to restore the DVD Navigator to the saved location at a later time through a call to IDvdControl2::SetState. This enables viewers to stop viewing in the middle of a disc, save the location, and come back at some later time to begin viewing where they left off, with all the internal settings restored as they were before.

The DVD Navigator calls AddRef on the DvdState object before returning it to the application. The application must call Release on the object when it is finished with it.

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