Opening Video Channels

A client must independently open each video channel that it intends to use. Therefore, a user-mode video capture driver receives a separate DRV_OPEN message for each channel. When a driver receives a DRV_OPEN message, it must check the dwFlags member of the accompanying VIDEO_OPEN_PARMS structure to determine which video channel to open. The member's value can be one of the following constants, which are defined in msvideo.h:

·VIDEO_EXTERNALIN

·VIDEO_IN

·VIDEO_OUT

·VIDEO_EXTERNALOUT

Besides testing for these constants, the driver must also return the detected constant as the return value for DriverProc, as illustrated in the vidOpen function within each sample user-mode driver. This constant then becomes the value passed to the driver as the dwDriverID parameter, when a client makes subsequent calls to DriverProc to send the driver user-mode video capture driver messages.