IDvdInfo2::GetState 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 GetState
method retrieves a bookmark containing the disc location and DVD Navigator state information.
Syntax
HRESULT GetState(
[out] IDvdState **pStateData
);
Parameters
[out] pStateData
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 code | Description |
---|---|
|
Success. |
|
Invalid argument. |
|
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
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 |