CheckVideoInfo2Type function
[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 CheckVideoInfo2Type
function checks a media type that contains a VIDEOINFOHEADER2 format structure for certain common errors that can cause buffer overruns or integer overflows.
Note
This function does not guarantee that the media type is valid or that code using the structure is secure.
Syntax
HRESULT CheckVideoInfo2Type(
const AM_MEDIA_TYPE *pmt
);
Parameters
-
pmt
-
Pointer to the AM_MEDIA_TYPE structure to validate.
Return value
Returns one of the following HRESULT values.
Return code | Description |
---|---|
|
Success |
|
NULL pointer value |
|
Invalid media type |
Remarks
This function calls ValidateBitmapInfoHeader to validate the BITMAPINFOHEADER structure in the media type. If the format type is not FORMAT_VideoInfo2, the function returns VFW_E_TYPE_NOT_ACCEPTED.
Requirements
Requirement | Value |
---|---|
Header |
|