IDvdInfo2::GetState method

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

Syntax


HRESULT GetState(
  [out] IDvdState **pStateData
);

Parameters

pStateData [out]

Receives a pointer to the IDvdState interface of a DvdState object allocated by the DVD Navigator.

Return value

Returns one of the following HRESULT values.

Return codeDescription
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

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Strmif.h (include Dshow.h)

Library

Strmiids.lib

See also

DVD Applications
Error and Success Codes
IDvdInfo2 Interface

 

 

Show: