Results 1 to 12 of 12

Thread: exception at 0x65100c40 (QtGuid4.dll)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #8
    Join Date
    Jul 2007
    Posts
    166
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows
    Thanks
    25
    Thanked 1 Time in 1 Post

    Default Re: exception at 0x65100c40 (QtGuid4.dll)

    Hi,
    This is my code for capture the image from Web camera

    Qt Code:
    1. m_Palette = 0;
    2. // Open handle in an invisible window
    3. m_CapHandle = capCreateCaptureWindow((LPTSTR)"Capture Window",
    4. #if 1
    5. 0,
    6. 0, 0, 160, 120,
    7. #else
    8. WS_BORDER | WS_VISIBLE,
    9. 0, 0, 320, 240,
    10. #endif
    11. (HWND) 0, 0);
    12.  
    13.  
    14.  
    15. if (!m_CapHandle) {
    16. qWarning("Could not create capwindow handle.");
    17. }
    18. else {
    19. // Connect to capture device
    20. if (capDriverConnect(m_CapHandle, m_CapIndex)) {
    21.  
    22. // Register; this will make sure we are being callbacked (if you will excuse the grammar...)
    23. CVideoCollector::Instance((QWidget *) m_CapHandle)->RegisterDevice(m_CapHandle, this);
    24.  
    25. ret = true;
    26.  
    27. // Get the size of the video format structure & allocate memory
    28. m_BMISize = capGetVideoFormatSize(m_CapHandle);
    29. assert(m_BMISize > 0);
    30. m_pBMIBuf = new uchar[m_BMISize];
    31. m_pVideoInfo = (BITMAPINFO *)m_pBMIBuf;
    32.  
    33. // Get the actual format structure; It contains width, height, and
    34. // 'compression' info
    35. if (capGetVideoFormat(m_CapHandle, m_pBMIBuf, m_BMISize)) {
    36. qDebug("Got VideoFormat, struct size = %d", m_BMISize);
    37. DumpVideoFormat(m_pVideoInfo);
    38. }
    39. else
    40. qDebug("capGetVideoFormat failed.");
    41.  
    42. // Get initial capture status
    43. capGetStatus(m_CapHandle, &m_CaptureStatus, sizeof(m_CaptureStatus));
    44. m_ImageSize.setWidth(m_CaptureStatus.uiImageWidth);
    45. m_ImageSize.setHeight(m_CaptureStatus.uiImageHeight);
    46. }
    47. else {
    48. qWarning("Failed to connect to capDriver %d", m_CapIndex);
    49. DestroyWindow(m_CapHandle);
    50. m_CapHandle = 0;
    51. }
    52. }
    To copy to clipboard, switch view to plain text mode 

    With these date I need to create an image. How can I do it ?
    Please help me...
    Last edited by jpn; 21st December 2007 at 06:48. Reason: missing [code] tags

Similar Threads

  1. Exceptions and qApp->processEvents()
    By mcostalba in forum Qt Programming
    Replies: 3
    Last Post: 8th January 2006, 17:06

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.