IDvdInfo2::GetCurrentAngle 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 GetCurrentAngle method retrieves the number of available angles in the current angle block and the currently selected angle number.

Syntax

HRESULT GetCurrentAngle(
  [out] ULONG *pulAnglesAvailable,
  [out] ULONG *pulCurrentAngle
);

Parameters

[out] pulAnglesAvailable

Receives the number of available angles. There are up to nine angles in an angle block, numbered 1 through 9. If the value equals 1, then the DVD Navigator is not in an angle block.

[out] pulCurrentAngle

Receives the current angle number.

Return value

Returns one of the following HRESULT values.

Return code Description
S_OK
Success.
E_POINTER
Invalid argument.
VFW_E_DVD_INVALIDDOMAIN
DVD Navigator is not initialized or not in a valid domain.

Remarks

Note that angle and menu button indexes are 1-based, while audio and subpicture stream indexes are 0-based. When the DVD Navigator is about to enter an angle block, it sends the application an EC_DVD_ANGLES_AVAILABLE event notification with the lParam set to 1. Applications will typically call GetCurrentAngle and IDvdControl2::SelectAngle within their event handler for EC_DVD_ANGLES_AVAILABLE.

This method is demonstrated in the DVDSample application in CAngleDlg::MakeAngleList.

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

See also

DVD Applications

EC_DVD_ANGLES_AVAILABLE

EC_DVD_ANGLE_CHANGE

Error and Success Codes

IDvdInfo2 Interface