IDvdInfo2::GetCmdFromEvent 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 GetCmdFromEvent
method retrieves an IDvdCmd object from an EC_DVD_CMD_START or EC_DVD_CMD_END event.
Syntax
HRESULT GetCmdFromEvent(
[in] LONG_PTR lParam1,
[out] IDvdCmd **pCmdObj
);
Parameters
[in] lParam1
Event notification's lParam1 parameter.
[out] pCmdObj
Receives a pointer to the IDvdCmd interface that is associated with the command that fired the event.
Return value
Returns one of the following HRESULT values.
Return code | Description |
---|---|
|
Success. |
|
The command no longer exists. |
|
Invalid argument. |
Remarks
This method maps the lParam1 parameter of an EC_DVD_CMD_START or EC_DVD_CMD_END event into an IDvdCmd object that is associated with the command that fired the event. You can then call WaitForStart or WaitForEnd to control the blocking behavior of the DVD Navigator with respect to that command. The IDvdCmd object is created by the DVD Navigator and the returned pointer has already had its reference count incremented, so you must release it after WaitForStart or WaitForEnd returns.
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 |