C# 怎么样操作摄像头上面的硬件拍照按钮,希望各位给出demo. 各位看官是硬件按钮啦。
别给出一段什么在winfrom里面放按钮点击的。 

解决方案 »

  1.   

    估计有文档或者示例吧。
    P/INVOKE估计成吧。
      

  2.   

    有c++的sdk。 但是c++看不太懂。
      

  3.   

    摄像头 应该有相应的开发文档,你查一下,哪个是抓拍的方法调用就相当于,按了按钮了
    没有SDK文档,估计没有谁能给你DEMO了
      

  4.   

    /*--AVEO PC Camera SDKCopyright (C) 2005 AVEO, Inc., all rights reserved.PUBLIC DOMAIN LICENSE: AVEO, Inc.If you use or redistribute this software, you must agree to the following: 1) This SDK package is for developers who are the using AVEO Camera.
    It is licensed "as is". Permission is granted to use or redistribute
    unmodified copies of this software and documentaion without charge. 2) No warranty is given, either expressed or implied.  In no event shall
    the author(s) be liable to you or a third party for any special, incidental,
    consequential, or other damages, arising out of the use or inability to use
    the program for any purpose (or the loss of data), even if we have been
    advised of such possibilities. 3) Any public reference or advertisement of this SDK should refer to it as
    the AVEO PC Camera SDK.--*/#ifndef _AVEOCamSDK_H_
    #define _AVEOCamSDK_H_#include "resource.h" // main symbols#define AVEOCamSDK_EXPORTS#ifdef AVEOCamSDK_EXPORTS
    #define AVEOCamSDK_API  __declspec(dllexport)  
    #else
    #define AVEOCamSDK_API  __declspec(dllimport) 
    #endif/*
     * if you are willing to use CamDx.....() functions, you must intall 
     * latest MicroSoft DirectX SDK and enable 'USE_DIRECTX_COMPONENTS' macro
     */
    #define USE_DIRECTX_COMPONENTS#ifdef USE_DIRECTX_COMPONENTS
    #include <dshow.h> // make sure MS DX SDK has been installed
    #endif // USE_DIRECTX_COMPONENTS
    #ifdef __cplusplus
    extern "C" {
    #endif // __cplusplus  /*
     * CamOpen()
     *
     * Out:
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * initialize camera device, must be invoked before using any other functions
     * or else, the other interfaces will return false immediately
     */
    AVEOCamSDK_API BOOL WINAPI  CamOpen(void);/*
     * PCCam_CamOpen()
     *
     * Out:
     * HANDLE NULL fail , else successfully 
     *
     * Purpose:
     * initialize camera device, must be invoked before using any other functions
     * or else, the other interfaces will return false immediately
     */
    AVEOCamSDK_API HANDLE WINAPI  PCCam_CamOpen(LPTSTR strDevicePath);
    /*
     * CamClose()
     *
     * Out:
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * uninitialize camera device, must be invoked after using any other functions
     */
    AVEOCamSDK_API BOOL WINAPI  CamClose(void);
    /*   AVEOCamSDK_API BOOL  GetSensorType(WORD *value);*/
    AVEOCamSDK_API BOOL  WINAPI  GetSensorType(WORD *value);/*
     * CamGetUSBIsHighSpeed()
     *  Description:  To get If device works at high speed
        Var:
       pIsHighSpeed - To receive value, True: High speed, else usb1.1
     * Ret:
     * BOOL TRUE function successfully invoked, FALSE otherwise
              
     *
     * Purpose:
     * uninitialize camera device, must be invoked after using any other functions
     */
    AVEOCamSDK_API BOOL WINAPI  CamGetUSBIsHighSpeed(BOOL *pIsHighSpeed);
    /*/*
     * CamI2CGetRegValue()
     *
     * In:
     * UCHAR DevAddr unique identifier for sensor type used
     * WORD SubAddr I2C register address
     *
     * Out:
     * WORD *value register value gotten from specified address
     * WORD *usbVer USB version (2.0 or 1.1) to be retrieved
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * get I2C register value of specified address. The parameter (DevAddr) has 
     * been negotiated as following:
     * [SAMSUNG] 0x5A
     * [OV] 0x60
     * [SILICON] 0x40
     * [SANYO] 0x78
     * [Micron] 0x90
     */
    AVEOCamSDK_API BOOL WINAPI  CamI2CGetRegValue(UCHAR DevAddr,WORD SubAddr
      ,WORD *value/*,WORD *usbVer=NULL*/);
    /*
     * CamI2CSetRegValue()
     *
     * In:
     * UCHAR DevAddr unique identifier for sensor type used
     * WORD SubAddr I2C register address
     * WORD value register value to be set to specified address
     *
     * Out:
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * set I2C register value of specified address. The parameter (DevAddr) has 
     * been negotiated as following:
     * [SAMSUNG] 0x5A
     * [OV] 0x60
     * [SILICON] 0x40
     * [SANYO] 0x78
     * [Micron] 0x90
     */
    AVEOCamSDK_API BOOL WINAPI  CamI2CSetRegValue(UCHAR DevAddr,WORD SubAddr,WORD value);
    /*
     * CamCheetahGetRegValue()
     *
     * In:
     * WORD RegbAddr Cheetah register address
     *
     * Out:
     * WORD *value register value gotten from specified address
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * get Cheetah register value of specified address (0~255)
     */
    AVEOCamSDK_API BOOL WINAPI  CamCheetahGetRegValue(WORD RegbAddr,WORD *value);
    /*
     * CamCheetahSetRegValue()
     *
     * In:
     * WORD RegbAddr Cheetah register address
     * WORD value register value to be set to specified address
     *
     * Out:
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * set Cheetah register value of specified address (0~255)
     */
    AVEOCamSDK_API BOOL WINAPI  CamCheetahSetRegValue(WORD RegbAddr,WORD value);
    /*
     * CamUploadFirmware()
     *
     * In:
     * UCHAR *FWbuff point to the buffer of firmware
     * int nLen the buffer length
     * int bUploaded 0 -- firmware has never been uploaded before
     * 1 -- otherwise
     * NOTE: in most driver ver., it can be ignored
     *
     * Out:
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * upload firmware(BIN file) to register, since there is a 0x8000 offset of
     * the bin-file imported, using the second form will be safe.
     */
    AVEOCamSDK_API BOOL WINAPI  CamUploadFirmware(UCHAR *FWbuff,int nLen,int bUploaded=0);AVEOCamSDK_API BOOL WINAPI  CamWriteEEPROMBlock(UCHAR *FWbuff,int nBlockIndex,int nBlockLen);
    AVEOCamSDK_API BOOL WINAPI  CamWriteEEPROMBlockEnd(void);
    AVEOCamSDK_API BOOL WINAPI  CamReadEEPROMBlock(UCHAR *FWbuff,int nBlockIndex,int nBlockLen);
    AVEOCamSDK_API BOOL WINAPI  CamUploadFirmwareToE2PROM(UCHAR *FWbuff,int nLen,int bUploaded=0);AVEOCamSDK_API BOOL WINAPI  CamUploadFirmware_FromFile(LPCTSTR sFwFileName,BOOL bUploaded=FALSE);
    AVEOCamSDK_API BOOL WINAPI  CamUploadFirmwareToE2PROM_FromFile(LPCTSTR sFwFileName,BOOL bUploaded=FALSE);
    // 10:33 2006-4-21 new adding:/*
     * CamAutoFocusGet()
     *
     * In:
     * LONG lItem 1 -- item1: auto focus (enabled/disabled)
     * 2 -- item2: macroshot fast focus (enabled/disabled)
     *
     * Out:
     * LONG* plEnabled 1 -- currently enabled 
     * 0 -- otherwise
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * item1: check if AF func. is currently enabled/disabled 
     * item2: check if macroshot fast focus func. is currently 
     * enabled/disabled
     *
     *
     */
    AVEOCamSDK_API BOOL WINAPI  CamAutoFocusGet(LONG lItem,LONG* plEnabled);
    /*
     * CamAutoFocusSet()
     *
     * In:
     * LONG lItem 1 -- item1: auto focus (enable/disable)
     * 2 -- item2: macroshot fast focus (enable/disable)
     * 3 -- item3: fast focus (run)
     * 4 -- item4: set stepping moto to default position (set)
     * lEnable for item1 and item2, should be 1 -- enable, 0 -- disable
     * for item3 and item4, must be 0
     *
     * Out:
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * item1: enable/disable auto focus function
     * item2: enable/disable macroshot fast focus, it only impacts item3
     * item3: run fast focus function once
     * item4: set stepping moto to default position
     */
    AVEOCamSDK_API BOOL WINAPI  CamAutoFocusSet(LONG lItem,LONG lEnable);
    #ifdef USE_DIRECTX_COMPONENTS/*
     * CamDxBgnEnd()
     *
     * In:
     * BOOL bBgn TRUE -- initialize DirectX components
     * FALSE-- uninitialize DirectX components
     *
     * Out:
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * initialize(uninitialize) DirectX components, must be invoked before(after) using any 
     * other CamDx...() functions
     *
     * Time:
     * Created: 15:18 2006-4-24
     * Modified: 15:18 2006-4-24
     */
    AVEOCamSDK_API BOOL WINAPI  CamDxBgnEnd(BOOL bBgn);
    #ifndef DEF_MEDIATYPEINFO
    typedef struct 
    {
    AM_MEDIA_TYPE mediaType; //
    INT nImgRealWidth; // e.g. 640
    INT nImgRealHeight; // e.g. 480
    LPSTR strTypeDesc; // e.g. "640x480 (I420)"
    INT nMediaTypeIdx; // 0-based index
    }MEDIATYPEINFO,*PMEDIATYPEINFO;
    #define DEF_MEDIATYPEINFO
    #endif
    /*
     * CamDxVideoFormatsGet()
     *
     * Out:
     * MEDIATYPEINFO* accommodate(point to) media types to be retrieved
     * INT* (point to ) counts of media types
     *
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * retrieve supported media types, here is a sample, FYR:
     *
     * // ...
     * INT cnt = 0;
     * CamDxVideoFormatsGet(NULL,&cnt); // retrieve counts
     * MEDIATYPEINFO* MT = new MEDIATYPEINFO[cnt]; // alloc mem
     * CamDxVideoFormatsGet(MT,&cnt); // retrieve all media types
     * // ...
     *
     * Time:
     * Created: 15:18 2006-4-24
     * Modified: 15:18 2006-4-24
     */
    AVEOCamSDK_API BOOL WINAPI  CamDxVideoFormatsGet(MEDIATYPEINFO* MediaTypes/*=NULL*/
     ,INT* pMediaTypeCount);
      

  5.   

    /*
     * CamDxPreviewIni()
     *
     * In:
     * INT nMediaTypeIdx the index of media type to be used
        nPreviewType            //0: fast preview, 1: not fast preview
     *
     * Out:
     * IVideoWindow** video window for customization
     * IAveoTitle** interface designed to paint sth on preview image, more
     * detail please refer to "IAveoTitle.h"
     *
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * set the index of media type to be used, and retrieve video window for customization
     * , it MUST be invoked before CamDxPreviewBgnEnd(TRUE) as initialization. 
     * "IAveoTitle" is an interface of the filter designed to paint sth on preview image, 
     * please register "AveoTitle.ax" and refer to "IAveoTitle.h" for more detail. Here is 
     * a sample, FYR:
     *
     * // ...
     * IVideoWindow* pVideoWindow = NULL;
     * IAveoTitle* pAveoTitle = NULL;
     * CamDxPreviewIni(0,&pVideoWindow,&pAveoTitle);
     * // ...
     *
     * Time:
     * Created: 15:18 2006-4-24
     * Modified: 10:35 2006-5-25
     */
    //#include "IAveoTitle.h" // make sure it is existed to support "IAveoTitle"
    AVEOCamSDK_API BOOL WINAPI  CamDxPreviewIni(IN INT nMediaTypeIdx
    ,OUT IVideoWindow** ppVideoWindow=NULL,IN INT nPreviewType=0);
    // ,OUT IAveoTitle** ppIAveoTitle=NULL);
    /*
     * CamDxPreviewBgnEnd()
     *
     * In:
     * BOOL bBgn TRUE -- begin video preview
     * FALSE-- end video preview
     *
     * Out:
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * begin(end) video preview, it MUST be invoked after CamDxPreviewIni()
     */
    AVEOCamSDK_API BOOL WINAPI  CamDxPreviewBgnEnd(BOOL bBgn);
    /*
     * CamDxSnapshot()
     *
     * In:
     * char*  name(string) of bmp file to be snapshot
     * BOOL TRUE -- there will be a fast AF before snapshotting
     * FALSE-- otherwise
     *
     * Out:
     * CString& error message if fail to snapshot
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * snapshot current preview as a bmp file with(without) fast AF, it must be invoked
     * after CamDxPreviewBgnEnd(TRUE)
     */
    AVEOCamSDK_API BOOL WINAPI  CamDxSnapshot(char* sFileName,CString& sSnapshotErrMsg
      ,BOOL bWithFastAf);
    /*
     * SnapshotToBuff()
     *
     * In:
     * pBuff  buffer to receive the snapshot data
     * byte TRUE -- there will be a fast AF before snapshotting
     * byte-- otherwise
     *
     * Out:
     * CString& error message if fail to snapshot
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * SnapshotToBuff current preview as a bmp file with(without) fast AF, it must be invoked
     * after CamDxPreviewBgnEnd(TRUE)
     */
    AVEOCamSDK_API BOOL WINAPI  SnapshotToBuff(PUCHAR pBuff, CString& sSnapshotErr,BOOL bWithFastAf);
    /*
     * dx_GrabberSnapshotToBuff()
     *
     * In:
     * pBuff  buffer to receive the snapshot data
     * nInLen In buffer length
     * pWidth To receive the width
     *  pHeight                 To receive the height
     * 
     * Purpose:
     * Snapshot from grabber.
     *
     */
    BOOL dx_GrabberSnapshotToBuff(PUCHAR pBuff,int nInLen,int *pWidth,int *pHeight);
    /*
     * CamDxPropertyPage()
     *
     * In:
     * HWND The window to which property page shall attach 
     *
     * Out:
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * pop up property page attaching to specified window
     *
     * Time:
     * Created: 13:45 2006-5-18
     * Modified: 13:45 2006-5-18
     */
    AVEOCamSDK_API BOOL WINAPI  CamDxPropertyPage(HWND hwndFather);
      

  6.   


    /*
     * CamDxFrameRateGet()
     *
     * Out:
     * INT* actual frame rate to be retrieved
     * BOOL TRUE function successfully invoked, FALSE otherwise
     *
     * Purpose:
     * retrieve actual frame rate
     *
     * Time:
     * Created: 13:45 2006-5-18
     * Modified: 13:45 2006-5-18
     */
    AVEOCamSDK_API BOOL WINAPI  CamDxFrameRateGet(INT* pnActualFrameRate);
    #endif // USE_DIRECTX_COMPONENTS
    /*  
     * Function: CamGetHardButtonPressed()
     *  
     * Description: To get if the hard button for snapshot is pressed.
     *
     *  Parameters:
       pPressed  : To receive the value, TRUE if pressed, else FAlSE;
    Return :
     *     Ture if success, else False. 
     */
    AVEOCamSDK_API BOOL WINAPI  CamGetHardButtonPressed(BOOL *pPressed);/*  
     * Function: CamGetButtonStatus()
     *  
     * Description: For 4 button project, this button is used for snapshot and record.
     *
     *  Parameters:
       pShortPressed  : To receive the value, TRUE if button pressed for a short time;
       pLongPressed  : To receive the value, TRUE if button pressed for a long time;
       pAnyButtonPressed: To recive the vale, if TRUE, then at lest one button is pressed.
    Return :
     *     Ture if success, else False. 
     */
    AVEOCamSDK_API BOOL WINAPI  CamGetButtonStatus(BOOL *pShortPressed,BOOL *pLongPressed,BOOL *pAnyButtonPressed);/*item (InValue1) 0: auto or not 1: item1 2: item2 ... op (InValue2) 0: value value (InValue3) value set in */
    AVEOCamSDK_API STDMETHODIMP WINAPI  AveoSetProperty(long nPropertyId,long item
     ,long lValue);
    /*item (InValue1) 0: auto or not 1: item1 2: item2 ... op (InValue2) 0: value 1: range //范围和值 value (OutValue1) value_retrieved / value_range_min //最小
    (OutValue2) NULL / value_range_max

    */
    AVEOCamSDK_API STDMETHODIMP WINAPI  AveoGetProperty(long nPropertyId,long item,long op
     ,long* plValue1,long* plValue2);
    AVEOCamSDK_API STDMETHODIMP WINAPI  AveoSetProperty_New(HANDLE hCam,long nPropertyId,long item
     ,long lValue);
    AVEOCamSDK_API STDMETHODIMP WINAPI  AveoGetProperty_New(HANDLE hCam,long nPropertyId,long item,long op
     ,long* plValue1,long* plValue2);
    AVEOCamSDK_API STDMETHODIMP WINAPI  AveoGetPropertyN(long nPropertyId,long item,long op
     ,long* plValue1,long* plValue2);
    AVEOCamSDK_API STDMETHODIMP WINAPI  AveoSetPropertyN(long nPropertyId,long item
     ,long lValue);//封装
    AVEOCamSDK_API STDMETHODIMP WINAPI  AveoAFmoduleSet(long lValue);
    AVEOCamSDK_API STDMETHODIMP WINAPI  AveoAFmoduleGet(long *lValue);
    AVEOCamSDK_API STDMETHODIMP WINAPI  AveoAFmoduleGetRange(long* plValue1,long* plValue2);//AVEOCamSDK_API STDMETHODIMP AveoAdd();
    //AVEOCamSDK_API STDMETHODIMP AveoDel();AVEOCamSDK_API   BOOL WINAPI  AveoAFmoduleExist();
    // special index enum
    typedef enum
    {
    SpecialMode_None=0, //None
    SpecialMode_BlackAndWhite,  //Black and white
        SpecialMode_Sepia,          //Sepia 
    SpecialMode_Aqua, //Aqua
    SpecialMode_Green, //Green}SPECIALMODE_INDEX_PCCAM;/* 
     * Function: GetSpecialModeIndex
     * Description:  To get current special mode index.
     * Param:     pIndex -- to receive special mode index, refer to enum of SPECIALMODE_INDEX
     * return value: TRUE if success, otherwise FALSE.
     */
    AVEOCamSDK_API BOOL GetSpecialModeIndex(long *pIndex);
    /* 
     * Function:  SetSpecialModeIndex
     * Description:  To set special mode index.
     * Param:     nIndex -- special mode index, refer to enum of SPECIALMODE_INDEX
     * return value: TRUE if success, otherwise FALSE.
     */
    AVEOCamSDK_API BOOL SetSpecialModeIndex(long nIndex);
    /* 
     * Function: GetHighlightBadpixel
     * Description:  To get current Badpixel nNum.
     * Param:     pIndex -- to receive current Badpixel nNum, refer to Highlight enum of statistic when dark
     * return value: TRUE if success, otherwise FALSE.
     */
    AVEOCamSDK_API BOOL GetHighlightBadpixel(long *nNum);
    /* 
     * Function:  SetHighlightBadpixel
     * Description:  To set Highlight slide num.
     * Param:     nNum -- Highlight slide num, when dark mode
     * return value: TRUE if success, otherwise FALSE.
     */
    AVEOCamSDK_API BOOL SetHighlightBadpixel(long nNum);
    /* 
     * Function: GetDarkBadpixel
     * Description:  To get current Badpixel nNum.
     * Param:     pIndex -- to receive current Badpixel nNum, refer to Dark enum of statistic when highlight
     * return value: TRUE if success, otherwise FALSE.
     */
    AVEOCamSDK_API BOOL GetDarkBadpixel(long *nNum);
    /* 
     * Function:  SetDarkBadpixel
     * Description:  To set Dark slide num.
     * Param:     nNum -- Dark slide num, when highlight mode
     * return value: TRUE if success, otherwise FALSE.
     */
    AVEOCamSDK_API BOOL SetDarkBadpixel(long nNum);/*
     * Function: AveoGetExposureTimeRange()
     *  
     * Description: Get the exposure time range.
     *
     *  Parameters:
     *            pMin: To receive the range of min.
     *    pMax: To receive the range of max.
     *     Note: the range must translate to (1/pMax to 1/pMin),        
     *     for example, min =1, max=100, then the exposure time range is (1/100 to 1/1), and the max
     *     exposure time is 1s(because the min value of long is 1).
     *
     *
     * Return :
     *     Ture if success, else False. 
     *
     */
    AVEOCamSDK_API   BOOL WINAPI  AveoGetExposureTimeRange(long *pMin, long *pMax );/*
     * Function: AveoGetCurrentExposureTime()
     *  
     * Description: Get current exposure time.
     *
     *  Parameters:
     *            pExposureTime: To receive the value of exposure time.
     * Note: Also, the real exposure time must be translated to 1/(min +max -pExposureTime) s.
            Refer to AveoSetExposureTime;
     *    
     *
     * Return :
     *     Ture if success, else False. 
     *
     */
    AVEOCamSDK_API   BOOL WINAPI  AveoGetCurrentExposureTime(long *pExposureTime);/*
     * Function: AveoGetExposureAuto()
     *  
     * Description: Get if current exposure is auto.
     *
     *  Parameters:
     *            pAuto: To receive the value . TRUE: auto, FAlSE: manual.
     *     
     *
     * Return :
     *     Ture if success, else False. 
     *
     */
    AVEOCamSDK_API   BOOL WINAPI  AveoGetExposureAuto(BOOL *pAuto);/*
     * Function: AveoSetExposureAuto()
     *  
     * Description: set exposure to auto or manual.
     *
     *  Parameters:
     *            bAuto: value to set . TRUE- auto, FAlSE-manual.
     *     
     *
     * Return :
     *     Ture if success, else False. 
     *
     */
    AVEOCamSDK_API   BOOL WINAPI  AveoSetExposureAuto(BOOL bAuto);
      

  7.   

    这个你的用vc++开发个com组件给c#调用就完美解决了。
      

  8.   

    AVICAP32 怎么捕获硬件拍照件。
      

  9.   

    http://www.codeproject.com/KB/audio-video/cameraviewer.aspx?msg=2755415 这里有demo
      

  10.   

    你至少要告诉别人,那个是硬件按钮的函数,或者调用硬件按钮的示例代码是哪一段?
    这样,还可以给你做个翻译,变成C#的代码。
    你发了这么多api,没有几个人愿意帮你看的。
      

  11.   

       //消息常量 -------------------------------------------- 
            public const int WM_START = 0x400;    //此并非摄像头消息0x400表示的就是1024 
            public const int WS_CHILD = 0x40000000;
            public const int WS_VISIBLE = 0x10000000;
            public const int SWP_NOMOVE = 0x2;
            public const int SWP_NOZORDER = 0x4;
            public const int WM_CAP_GET_CAPSTREAMPTR = WM_START + 1;
            public const int WM_CAP_SET_CALLBACK_ERROR = WM_START + 2;//设置收回错误
            public const int WM_CAP_SET_CALLBACK_STATUS = WM_START + 3;//设置收回状态
            public const int WM_CAP_SET_CALLBACK_YIELD = WM_START + 4;//设置收回出产
            public const int WM_CAP_SET_CALLBACK_FRAME = WM_START + 5;//设置收回结构
            public const int WM_CAP_SET_CALLBACK_VIDEOSTREAM = WM_START + 6;//设置收回视频流
            public const int WM_CAP_SET_CALLBACK_WAVESTREAM = WM_START + 7;//设置收回视频波流
            public const int WM_CAP_GET_USER_DATA = WM_START + 8;//获得使用者数据
            public const int WM_CAP_SET_USER_DATA = WM_START + 9;//设置使用者数据
            public const int WM_CAP_DRIVER_CONNECT = WM_START + 10;//驱动程序连接
            public const int WM_CAP_DRIVER_DISCONNECT = WM_START + 11;//断开启动程序连接
            public const int WM_CAP_DRIVER_GET_NAME = WM_START + 12;//获得驱动程序名字
            public const int WM_CAP_DRIVER_GET_VERSION = WM_START + 13;//获得驱动程序版本
            public const int WM_CAP_DRIVER_GET_CAPS = WM_START + 14;//获得驱动程序帽子
            public const int WM_CAP_FILE_SET_CAPTURE_FILE = WM_START + 20;//设置捕获文件
            public const int WM_CAP_FILE_GET_CAPTURE_FILE = WM_START + 21;//获得捕获文件
            public const int WM_CAP_FILE_ALLOCATE = WM_START + 22;//分派文件
            public const int WM_CAP_FILE_SAVEAS = WM_START + 23;//另存文件为
            public const int WM_CAP_FILE_SET_INFOCHUNK = WM_START + 24;//设置开始文件
            public const int WM_CAP_FILE_SAVEDIB = WM_START + 25;//保存文件
            public const int WM_CAP_EDIT_COPY = WM_START + 30;//编辑复制
            public const int WM_CAP_SET_AUDIOFORMAT = WM_START + 35;//设置音频格式
            public const int WM_CAP_GET_AUDIOFORMAT = WM_START + 36;//捕获音频格式
            public const int WM_CAP_DLG_VIDEOFORMAT = WM_START + 41;//1065 打开视频格式设置对话框
            public const int WM_CAP_DLG_VIDEOSOURCE = WM_START + 42;//1066 打开属性设置对话框,设置对比度亮度等
            public const int WM_CAP_DLG_VIDEODISPLAY = WM_START + 43;//1067 打开视频显示
            public const int WM_CAP_GET_VIDEOFORMAT = WM_START + 44;//1068 获得视频格式
            public const int WM_CAP_SET_VIDEOFORMAT = WM_START + 45;//1069 设置视频格式
            public const int WM_CAP_DLG_VIDEOCOMPRESSION = WM_START + 46;//1070 打开压缩设置对话框
            public const int WM_CAP_SET_PREVIEW = WM_START + 50;//设置预览
            public const int WM_CAP_SET_OVERLAY = WM_START + 51;//设置覆盖
            public const int WM_CAP_SET_PREVIEWRATE = WM_START + 52;//设置预览比例
            public const int WM_CAP_SET_SCALE = WM_START + 53;//设置刻度
            public const int WM_CAP_GET_STATUS = WM_START + 54;//获得状态
            public const int WM_CAP_SET_SCROLL = WM_START + 55;//设置卷
            public const int WM_CAP_GRAB_FRAME = WM_START + 60;//逮捕结构
            public const int WM_CAP_GRAB_FRAME_NOSTOP = WM_START + 61;//停止逮捕结构
            public const int WM_CAP_SEQUENCE = WM_START + 62;//次序
            public const int WM_CAP_SEQUENCE_NOFILE = WM_START + 63;//使用WM_CAP_SEUENCE_NOFILE消息(capCaptureSequenceNoFile宏),可以不向磁盘文件写入数据。该消息仅在配合回调函数时有用,它允许你的应用程序直接使用音视频数据。
            public const int WM_CAP_SET_SEQUENCE_SETUP = WM_START + 64;//设置安装次序
            public const int WM_CAP_GET_SEQUENCE_SETUP = WM_START + 65;//获得安装次序
            public const int WM_CAP_SET_MCI_DEVICE = WM_START + 66;//设置媒体控制接口
            public const int WM_CAP_GET_MCI_DEVICE = WM_START + 67;//获得媒体控制接口
            public const int WM_CAP_STOP = WM_START + 68;//停止
            public const int WM_CAP_ABORT = WM_START + 69;//异常中断
            public const int WM_CAP_SINGLE_FRAME_OPEN = WM_START + 70;//打开单一的结构
            public const int WM_CAP_SINGLE_FRAME_CLOSE = WM_START + 71;//关闭单一的结构
            public const int WM_CAP_SINGLE_FRAME = WM_START + 72;//单一的结构
            public const int WM_CAP_PAL_OPEN = WM_START + 80;//打开视频
            public const int WM_CAP_PAL_SAVE = WM_START + 81;//保存视频
            public const int WM_CAP_PAL_PASTE = WM_START + 82;//粘贴视频
            public const int WM_CAP_PAL_AUTOCREATE = WM_START + 83; //自动创造
            public const int WM_CAP_PAL_MANUALCREATE = WM_START + 84;//手动创造
            public const int WM_CAP_SET_CALLBACK_CAPCONTROL = WM_START + 85;// 设置收回的错误
    哥们看下。   对应摄像头APi