PDA

Click to See Complete Forum and Search --> : Problems with Class


x-ice
Feb 7th, 2006, 04:19 AM
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.

vbcode1980
Feb 7th, 2006, 09:02 AM
p.s. The error is generated because the camera driver couldn't be successfully connected.

Does this mean the problem has been solved? :confused:

Rattlerr
Feb 7th, 2006, 11:32 AM
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:
[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::


[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..

x-ice
Feb 8th, 2006, 06:14 PM
Does this mean the problem has been solved? :confused:No, i dont know why the driver cannot be connected.