USBDeviceDetect
Supported Hardware Devices: USB Capture devices
Contents Demonstrated in the Sample:
- Monitoring hot-plugging events of USB capture devices
Call Logic:
- Obtain version information, initialize, and enumerate devices: MWGetVersion, MWCaptureInitInstance, MWRefreshDevice, MWGetChannelCount
- Declare hot-plug callback function: LPFN_HOT_PLUG_CALLBACK
- Register hot-plug monitoring: MWUSBRegisterHotPlug
- When device connection is detected:
- Open channel: MWOpenChannelByPath
- Retrieve channel information: MWGetChannelInfo
- Close channel
- When device disconnection is detected
- When device connection is detected:
- Unregister hot-plug monitoring: MWUSBUnRegisterHotPlug
- Release resources: MWCloseChannel, MWCaptureExitInstance
Result:

Flowchart:
