locked
MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK differs from dbcc_name in DEV_BROADCAST_DEVICEINTERFACE RRS feed

  • Question

  • I am using WMF video device in my application.

    As WMF does not behave the same under Windows 7 and Windows 10, it seems that MEVideoCaptureDeviceRemoved is never sent to the application under Windows 7.

    To solve this issue, I configured a window message handler that detects USB disconnect, as stated by the following sample code provided by Microsoft:

    https://msdn.microsoft.com/en-us/library/windows/desktop/dd940328%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396

    This work very well under Windows 7.

    However under Windows10, it seems that the symbolic link given by MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK is different at the end from the one provided by the dbcc_name in DEV_BROADCAST_DEVICEINTERFACE. The GUID at the end of each symbolic links are different, preventing _wcsicmp in the sample code to return true. Is it a bug?.

    e.g:Windows 10:

    DEV_BROADCAST_DEVICEINTERFACE: \\?\usb#vid_06f8&pid_300d&mi_00#7&2a44964d&0&0000#{65e8773d-8f56-11d0-a3b9-00a0c9223196}\global

    MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK: \\?\usb#vid_06f8&pid_300d&mi_00#7&2a44964d&0&0000#{d288359f-6d1c-4148-b54b-d998e2b8f7f1}\global

    Tuesday, March 27, 2018 9:36 AM

All replies

  • I figured this out. On Windows 10, the `MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK` call is giving a KSCATEGORY_VIDEO_CAMERA event, not a KSCATEGORY_CAPTURE event. I switched my program to listen for both, and it worked perfectly.
    Saturday, October 27, 2018 6:19 AM