IT Community - Software Programming, Web Development and Technical Support

How to control the webcam using C#?

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#?...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > C# Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 07-23-2007, 11:09 PM
kingmaker kingmaker is offline
D-Web Genius
 
Join Date: Jun 2007
Posts: 882
kingmaker is on a distinguished road
Send a message via Yahoo to kingmaker
Question How to control the webcam using C#?

How to control the webcam using C#?
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-29-2007, 11:18 PM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Thumbs up Re: How to control the webcam using C#?

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.
Attached Files
File Type: zip WebCamLib.zip (44.4 KB, 3487 views)
__________________
The OXYGEN
Delivers edgy, intelligent Technology to all...
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-07-2008, 01:20 AM
pathanzahir pathanzahir is offline
D-Web Trainee
 
Join Date: Apr 2008
Posts: 1
pathanzahir is on a distinguished road
Default Re: How to control the webcam using C#?

thanxxx for your answer but the code u have provided is not getting downloaded
i mean every time itry to download it it downloads a File of 0kb with nothing in it.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 09-25-2008, 08:01 PM
prabhuc# prabhuc# is offline
D-Web Trainee
 
Join Date: Sep 2008
Posts: 1
prabhuc# is on a distinguished road
Default How to update value in DataList using C#

can u give a solution how to add a value in dataList using C#
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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 03:13 AM
How can I control mediaplayer through my webservice? S.Vinothkumar ASP and ASP.NET Programming 6 09-27-2007 02:20 AM
Basic requirment to connect webcam? smani Computer Hardware 2 09-04-2007 05:08 AM
use of Custom Control and User Control? a.deeban ASP and ASP.NET Programming 1 08-20-2007 07:25 AM
How to set value text to a control in Win32 using VC++? itbarota Mobile Software Development 1 07-25-2007 10:37 PM


All times are GMT -7. The time now is 12:21 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0