在Win32 SDK有怎样访问AVI文件格式的API,自己去查去吧!

解决方案 »

  1.   

    我是要实时读取视频口输入的动态图像,而不是直接打开AVI文件.您有办法吗?
      

  2.   

    调用Windows Media Player控件或一些MCI控件及API函数。
      

  3.   

    1)用capCreateCaptureWindow创建视频捕捉窗口。
    2)用capDriverConnect()连接摄像头驱动
    3)用capPreview()开始预览
    ok~'// The two functions exported by AVICap
    Declare Function capCreateCaptureWindowA Lib "avicap32.dll" ( _
        ByVal lpszWindowName As String, _
        ByVal dwStyle As Long, _
        ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Integer, _
        ByVal hWndParent As Long, ByVal nID As Long) As LongFunction capDriverConnect(ByVal lwnd As Long, ByVal i As Integer) As Boolean
      capDriverConnect = SendMessage(lwnd, WM_CAP_DRIVER_CONNECT, i, 0)
    End FunctionFunction capPreview(ByVal lwnd As Long, ByVal f As Boolean) As Boolean
      capPreview = SendMessage(lwnd, WM_CAP_SET_PREVIEW, f, 0)
    End Function
      

  4.   

    1)用capCreateCaptureWindow创建视频捕捉窗口。
    2)用capDriverConnect()连接摄像头驱动
    3)用capPreview()开始预览
    ok~'// The two functions exported by AVICap
    Declare Function capCreateCaptureWindowA Lib "avicap32.dll" ( _
        ByVal lpszWindowName As String, _
        ByVal dwStyle As Long, _
        ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Integer, _
        ByVal hWndParent As Long, ByVal nID As Long) As LongFunction capDriverConnect(ByVal lwnd As Long, ByVal i As Integer) As Boolean
      capDriverConnect = SendMessage(lwnd, WM_CAP_DRIVER_CONNECT, i, 0)
    End FunctionFunction capPreview(ByVal lwnd As Long, ByVal f As Boolean) As Boolean
      capPreview = SendMessage(lwnd, WM_CAP_SET_PREVIEW, f, 0)
    End Function
      

  5.   

    1)用capCreateCaptureWindow创建视频捕捉窗口。
    2)用capDriverConnect()连接摄像头驱动
    3)用capPreview()开始预览
    ok~'// The two functions exported by AVICap
    Declare Function capCreateCaptureWindowA Lib "avicap32.dll" ( _
        ByVal lpszWindowName As String, _
        ByVal dwStyle As Long, _
        ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Integer, _
        ByVal hWndParent As Long, ByVal nID As Long) As LongFunction capDriverConnect(ByVal lwnd As Long, ByVal i As Integer) As Boolean
      capDriverConnect = SendMessage(lwnd, WM_CAP_DRIVER_CONNECT, i, 0)
    End FunctionFunction capPreview(ByVal lwnd As Long, ByVal f As Boolean) As Boolean
      capPreview = SendMessage(lwnd, WM_CAP_SET_PREVIEW, f, 0)
    End Function
      

  6.   

    1)用capCreateCaptureWindow创建视频捕捉窗口。
    2)用capDriverConnect()连接摄像头驱动
    3)用capPreview()开始预览
    ok~'// The two functions exported by AVICap
    Declare Function capCreateCaptureWindowA Lib "avicap32.dll" ( _
        ByVal lpszWindowName As String, _
        ByVal dwStyle As Long, _
        ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Integer, _
        ByVal hWndParent As Long, ByVal nID As Long) As LongFunction capDriverConnect(ByVal lwnd As Long, ByVal i As Integer) As Boolean
      capDriverConnect = SendMessage(lwnd, WM_CAP_DRIVER_CONNECT, i, 0)
    End FunctionFunction capPreview(ByVal lwnd As Long, ByVal f As Boolean) As Boolean
      capPreview = SendMessage(lwnd, WM_CAP_SET_PREVIEW, f, 0)
    End Function
      

  7.   

    谢谢shyguy大侠,我试试看,如有不明,还望不吝指教,我已给您加了满分!
      

  8.   

    http://www.banasoft.com/DownLoad/AVPhone.exe