Results 1 to 4 of 4

Thread: Problems with Class

  1. #1

    Thread Starter
    Fanatic Member x-ice's Avatar
    Join Date
    Mar 2004
    Location
    UK
    Posts
    671

    Problems with Class

    I have made a class that you can view video through a web camera with.

    I keep getting the error 'Unable to initialise camera' when i go to start the camera. But i can't see whats wrong with the class itself. Its attached.

    Any ideas what the problem is?

    p.s. The error is generated because the camera driver couldn't be successfully connected.
    Attached Files Attached Files

  2. #2
    Hyperactive Member vbcode1980's Avatar
    Join Date
    Nov 2005
    Location
    Anywhere the wind blows
    Posts
    365

    Re: Problems with Class

    Quote Originally Posted by x-ice
    p.s. The error is generated because the camera driver couldn't be successfully connected.
    Does this mean the problem has been solved?
    I code C#....

  3. #3
    Hyperactive Member Rattlerr's Avatar
    Join Date
    Jul 2005
    Location
    FloralCity,Florida
    Posts
    269

    Re: Problems with Class

    Quote Originally Posted by x-ice
    I have made a class that you can view video through a web camera with.

    I keep getting the error 'Unable to initialise camera' when i go to start the camera. But i can't see whats wrong with the class itself. Its attached.

    Any ideas what the problem is?

    p.s. The error is generated because the camera driver couldn't be successfully connected.
    1st I only see this as your API:
    Code:
     [DllImport("user32.dll", EntryPoint = "SendMessageA")]
            static extern int SendMessage(IntPtr hwnd, int wMsg, int wParam, int lParam);
            [DllImport("avicap32.dll", EntryPoint = "capCreateCaptureWindowA")]
            static extern int capCreateCaptureWindow(string lpszWindowName, int dwStyle, int x, int y, int nWidth,
                int nHeight,
                IntPtr hWndParent,
                int nID);
    
            [DllImport("avicap32.dll", EntryPoint = "capGetDriverDescriptionA")]
            static extern int capGetDriverDescription(int wDriverIndex, string lpszName, int cbName, string lpszVer,
                int cbVer);
    Ok i dont see a Reference to the Actually Drivers your trying too Call up...If its a logitech Cam call up the Logitech Drivers....Because every cam has to have its own Drivers because Windows dosnt supply a Universal Driver that will allow a cam to work with the Manufactures Driver version..I could be wrong..lol
    Still dont see where your Pointing to the Camera Drivers , Call up the Camera Drivers that are installed and see if that helps...

    I dont know what kind of cam your using so here is an example::
    Code:
    [Dllimport("LQCaptur.dll",EntryPoint = "capGetDriverDescriptionA")]
            static extern int capGetDriverDescription(int wDriverIndex, string lpszName, int cbName, string lpszVer,
                int cbVer);
    A DLL from my Logitech Cam probably isnt the right one but this should give you an idea..

  4. #4

    Thread Starter
    Fanatic Member x-ice's Avatar
    Join Date
    Mar 2004
    Location
    UK
    Posts
    671

    Re: Problems with Class

    Quote Originally Posted by vbcode1980
    Does this mean the problem has been solved?
    No, i dont know why the driver cannot be connected.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width