This is a discussion on How to control the webcam using C#? within the C# Programming forums, part of the Software Development category; How to control the webcam using C#?...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| Hi buddy, I looked for the resources and found a couple of different ways of doing this. 1) Using WIA SDK: This is the easier of the two methods to control the webcam by using the COM wrapper. This COM API is provided as part of the WIA SDK. Although most of the webcams do work by this method but if you get an exception "Exception from HRESULT: Ox80210015", chances are that you can't use this API. Otherwise, this is a much better option. For more information, check Scott's article on MSDN. 2) Using "avicap32.dll": The second method is to invoke the API's inside "avicap32.dll" to interact with the webcam device. This is a bit harder as you have to manually create signatures for the methods inside the dll. So, for this project I wrote a simple class to wrap the basic functionality exposed by the dll. By using that, you will be able to get all the attached devices and can also see the preview of webcam inside a control (such as picturebox). It is a very small project but will save someone a little time. I have atached a sample project. Find the Zip file. There are two projects inside the zip file. WebCamLib: This contains the wrapper around a couple of API's in "avicap32.dll". Qurtaba: A Test project which uses the WebCamLib to show webcam preview. Hope usefull.
__________________ The OXYGEN Delivers edgy, intelligent Technology to all... |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How do I get the value of a form control? | itbarota | HTML, CSS and Javascript Coding Techniques | 2 | 10-26-2007 04:13 AM |
| How can I control mediaplayer through my webservice? | S.Vinothkumar | ASP and ASP.NET Programming | 6 | 09-27-2007 03:20 AM |
| Basic requirment to connect webcam? | smani | Computer Hardware | 2 | 09-04-2007 06:08 AM |
| use of Custom Control and User Control? | a.deeban | ASP and ASP.NET Programming | 1 | 08-20-2007 08:25 AM |
| How to set value text to a control in Win32 using VC++? | itbarota | Mobile Software Development | 1 | 07-25-2007 11:37 PM |