public CameraDriver(long hWnd) { // init our uc480 object m_Hwnd = hWnd; m_uc480 = new uc480(); // enable static messages ( no open camera is needed ) m_uc480.EnableMessage(uc480.IS_NEW_DEVICE, (int)hWnd); m_uc480.EnableMessage(uc480.IS_DEVICE_REMOVAL, (int)hWnd); // init our image struct and alloc marshall pointers for the uc480 memory m_Uc480Images = new UC480IMAGE[IMAGE_COUNT]; int nLoop = 0; for (nLoop = 0; nLoop < IMAGE_COUNT; nLoop++) { m_Uc480Images[nLoop].pMemory = Marshal.AllocCoTaskMem(4); // create marshal object pointers m_Uc480Images[nLoop].MemID = 0; m_Uc480Images[nLoop].nSeqNum = 0; } m_bDrawing = false; m_RenderMode = uc480.IS_RENDER_NORMAL; // default parameters expTime = Constants.DEF_EXP_TIME; // ms fps = Constants.DEF_FPS; // frame / s }
public CameraDriver(long hWnd) { // init our uc480 object m_Hwnd = hWnd; m_uc480 = new uc480(); // enable static messages ( no open camera is needed ) m_uc480.EnableMessage(uc480.IS_NEW_DEVICE, (int)hWnd); m_uc480.EnableMessage(uc480.IS_DEVICE_REMOVAL, (int)hWnd); // init our image struct and alloc marshall pointers for the uc480 memory m_Uc480Images = new UC480IMAGE[IMAGE_COUNT]; int nLoop = 0; for (nLoop = 0; nLoop < IMAGE_COUNT; nLoop++) { m_Uc480Images[nLoop].pMemory = Marshal.AllocCoTaskMem(4); // create marshal object pointers m_Uc480Images[nLoop].MemID = 0; m_Uc480Images[nLoop].nSeqNum = 0; } m_bDrawing = false; m_RenderMode = uc480.IS_RENDER_NORMAL; }