From: john.puzzled on
Hi,

I would like to access my webcam directly using CreateFile(). I have a
Intel Webcam connected directly to one of my USB 1.1 ports on my
computer.

I have tried to enumerate all the USB devices on my computer using the
SetupDiXXX functions but it has not worked very well for me. I also
used QueryDosDevice() to find the USB camera. I found the camera and
tried to open it using CreateFile() but it always failed (not found).

Is this possible to do in an application with a web cam that has
drivers installed?

Does anyone have a fully working example (V)C++ function that

1. Finds a web cam connected to the USB
2. Opens a file handle to the web cam found

Thanks!

From: The March Hare [MVP] on
On 14 Aug 2005 12:17:09 -0700, john.puzzled(a)gmail.com wrote:

> Does anyone have a fully working example (V)C++ function that
>
> 1. Finds a web cam connected to the USB
> 2. Opens a file handle to the web cam found

I'm not aware of how to do this the way you have suggested. However, I can
recommend the use of DirectShow. Search for DirectShow on MSDN (now part
of the Platform SDK). The AMCap sample that is included in the SDK shows
how to capture from supported cameras including web cams. You can also
check out my site for links to useful dshow sites.
From: The March Hare [MVP] on
On Sun, 14 Aug 2005 15:53:46 -0600, The March Hare [MVP] wrote:

> You can also
> check out my site for links to useful dshow sites.

Forgot that this ng doesn't have my dshow sig. The site is:
http://tmhare.mvps.org
From: john.puzzled on
Hi,

I was hoping to access the USB webcam directly without having to go
through DirectX....

From: The March Hare [MVP] on
On 14 Aug 2005 20:44:54 -0700, john.puzzled(a)gmail.com wrote:

> I was hoping to access the USB webcam directly without having to go
> through DirectX....

I suppose it may be possible to get the raw data but there is a lot of
functionality built into dshow that you would be missing.
 |  Next  |  Last
Pages: 1 2
Prev: Converting String to Time
Next: CreateFile() for USB