C#怎么实现摄像头调用?

来源:百度知道 编辑:UC知道 时间:2024/05/15 07:25:30
C#怎么实现摄像头调用?

这个简单那 我做过一个 连截图的提供了 呵呵
不懂问我 我的邮箱:aying996@163.com

using System;
using System.Runtime.InteropServices;
using System.Drawing.Imaging;
using System.Windows.Forms;
using System.Drawing;
namespace YHhotel.YHhotelWindows
{
/// <summary>
/// Class1 的摘要说明。
/// </summary>
public class video
{
//5个传入参数
private IntPtr myHand;
private int myWidth;
private short myHeight;
private int myLeft;
private int myTop;
//调用avicap32.dll
public struct videohdr_tag
{
public byte[] lpData;
public int dwBufferLength;
public int dwBytesUsed;
public int dwTimeCaptured;
public int dwUser;
public int dwFlags;
public int[] dwReserved;

}
[DllImport("avicap32.dll",CharSet=CharSet.Ansi, SetLastError=true, ExactSpelling=true)]
public st