我用vb做摄像头视频流的捕捉,可是编译不成功,总说是用户自定义函数CAPDRIVERCAPS没有定义,位置是在Dim Caps As CAPDRIVERCAPS语句处,请问这是什么原因,要怎么改啊?请问有没有高手可以帮我把这程序调一下,谢谢啊!

解决方案 »

  1.   

    是函数吗?
    应该是“自定义类型没有定义”吧!你的 CAPDRIVERCAPS 没有定义。
      

  2.   

    给你个例子,里面有你需要的功能。
    http://download.csdn.net/source/356038
      

  3.   

    现在的人真是的,抄完代码都不知道是什么个原理,可能连代码都没看过就用上了,呵呵
    Public Type CAPDRIVERCAPS
        wDeviceIndex As Long '               // Driver index in system.ini
        fHasOverlay As Long '                // Can device overlay?
        fHasDlgVideoSource As Long '         // Has Video source dlg?
        fHasDlgVideoFormat As Long '         // Has Format dlg?
        fHasDlgVideoDisplay As Long '        // Has External out dlg?
        fCaptureInitialized As Long '        // Driver ready to capture?
        fDriverSuppliesPalettes As Long '    // Can driver make palettes?
        hVideoIn As Long '                   // Driver In channel
        hVideoOut As Long '                  // Driver Out channel
        hVideoExtIn As Long '                // Driver Ext In channel
        hVideoExtOut As Long '               // Driver Ext Out channel
    End Type