Microsoft DirectX 8.0 |
The IDvdState interface is implemented by a DvdState object, which is created by the DVD Navigator filter when an application calls IDvdInfo2::GetState to save the state of the user's session to disk, including playback location, parental level, and region. An application can use the IDvdState methods to query for this information, which is saved in a DvdState object.
The DvdState objects implement IPersist to enable saving to disk. For sample code showing how to save bookmarks, see Saving and Restoring DvdState Objects.
The DVD Navigator initializes the DvdState object with the current playback location on the DVD, the user's parental level, and the DVD region. An alternative approach is for the application to create the state object by calling CoCreateInstance:
CoCreateInstance( CLSID_DVDState, NULL, CLSCTX_INPROC_SERVER, IID_IDvdState, (void **) ppState );
Call IDvdControl2::SetState to resume playback at a later time from the point where it left off when GetState was called, with the restored parental and region settings.
Methods in Vtable Order
IUnknown methods Description QueryInterface Retrieves pointers to supported interfaces. AddRef Increments the reference count. Release Decrements the reference count. IDvdState methods Description GetDiscID Retrieves the unique identifier (ID) of the disc from which the bookmark was made. GetParentalLevel Retrieves the user's parental level as saved in the DvdState object. GetRegion Retrieves the DVD region as saved in the DvdState object.
Retrieves the unique ID of the disc from which the bookmark was made.
Syntax
HRESULT GetDiscID( ULONGLONG *pullUniqueID );
Parameters
- pullUniqueID
- [out] Pointer to a variable of type ULONGLONG that receives the ID.
Return Value
Returns one of the values shown in the following table.
S_OK Success E_POINTER Invalid argument
Retrieves the user's parental level as saved in the DvdState object.
Syntax
HRESULT GetParentalLevel( ULONG *pulParentalLevel );
Parameters
- pulParentalLevel
- [out] Pointer to a variable of type ULONG that receives the parental level.
Return Value
Returns one of the following values.
S_OK Success E_POINTER Invalid argument
Retrieves the DVD region as saved in the DvdState object.
Syntax
HRESULT GetRegion( ULONG *pulRegion );
Parameters
- pulRegion
- [out] Pointer to a variable of type ULONG that receives the region value.
Return Value
Returns one of the following values.
S_OK Success. E_UNEXPECTED DVD Navigator is not initialized. E_POINTER Invalid argument.