91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 5KB
    文件類型: .zip
    金幣: 2
    下載: 0 次
    發布日期: 2021-05-24
  • 語言: C#
  • 標簽: 攝像頭C#??

資源簡介

VFW全稱為Video for Windows,是微軟提供的,內嵌windows系統。用C#封裝的視頻類和控件。簡單,方便使用。

資源截圖

代碼片段和文件信息

using?System;
using?System.Collections.Generic;
using?System.Text;
using?System.Runtime.InteropServices;

namespace?MyWebcam
{
????public?class?VideoAPI
????{
????????//視頻調用API
????????[DllImport(“avicap32.dll“)]
????????public?static?extern?IntPtr?capCreateCaptureWindow(byte[]?strWindowName?int?dwstyle?int?x?int?y?int?width?int?height?IntPtr?hwdParent?int?nID);

????????[DllImport(“avicap32.dll“)]
????????public?static?extern?bool?capGetDriverDescription(short?wDriver?byte[]?lpszName?int?cbName?byte[]?lpszVer?int?cbVer);

????????[DllImport(“User32.dll“)]
????????public?static?extern?bool?SendMessage(IntPtr?hWnd?int?wMsg?bool?wParam?int?lParam);

????????[DllImport(“User32.dll“)]
????????public?static?extern?bool?SendMessage(IntPtr?hWnd?int?wMsg?short?wParam?int?lParam);

????????[DllImport(“User32.dll“)]
????????public?static?extern?bool?SendMessage(IntPtr?hWnd?int?wMsg?int?wParam?string?lParam);

????????[DllImport(“Kernel32.dll“)]
????????public?static?extern?bool?CloseHandle(IntPtr?hobject);

????????//常量
????????public?const?int?WM_USER?=?0x400;?
????????public?const?int?WS_CHILD?=?0x40000000;?
????????public?const?int?WS_VISIBLE?=?0x10000000;?
????????public?const?int?SWP_NOMOVE?=?0x2;?
????????public?const?int?SWP_NOZORDER?=?0x4;??
????????public?const?int?WM_CAP_DRIVER_CONNECT?=?WM_USER?+?10;?
????????public?const?int?WM_CAP_DRIVER_DISCONNECT?=?WM_USER?+?11;?
????????public?const?int?WM_CAP_SET_CALLBACK_frame?=?WM_USER?+?5;?
????????public?const?int?WM_CAP_SET_PREVIEW?=?WM_USER?+?50;?
????????public?const?int?WM_CAP_SET_PREVIEWRATE?=?WM_USER?+?52;?
????????public?const?int?WM_CAP_SET_VIDEOFORMAT?=?WM_USER?+?45;?
????????public?const?int?WM_CAP_START?=?WM_USER;??
????????public?const?int?WM_CAP_SAVEDIB?=?WM_CAP_START?+?25;
????????public?const?int?WM_CAP_SET_SCALE?=?WM_USER?+?53;
????????public?const?int?WM_COPYTOCLIPBORAD?=?WM_USER?+?30;
????????public?const?int?WM_CAP_SEQUENCE?=?WM_USER?+?62;
????????public?const?int?WM_CAP_FILE_SET_CAPTURE_FILE?=?WM_USER?+?20;
????????public?const?int?WM_CAP_STOP?=?WM_USER?+?68;

????}

????public?class?VideoClass
????{
????????private?IntPtr?caphwnd;
????????private?IntPtr?controlhwnd;
????????private?int?height;
????????private?int?width;
????????private?bool?isstart?=?false;

????????public?VideoClass()
????????{
????????????
????????}

????????public?void?Initialize(IntPtr?controlhwnd?int?width?int?height)
????????{
????????????this.controlhwnd?=?controlhwnd;
????????????this.width?=?width;
????????????this.height?=?height;
????????}

????????~VideoClass()
????????{
????????????if?(isstart)
????????????{
????????????????this.StopWebcam();
????????????}
????????}

????????///?
????????///?檢查是否有視頻設備
????????///?

????????///?
????????public?bool?CheckWebcamExist()
????????{
????????????byte[]?lpszName?=?new?byte[100];
????????????byte[]?lpszVer?=?new?byte[100

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????7883??2013-09-22?09:22??VideoClass.cs
?????文件????????2471??2013-08-20?15:55??WebCam.cs
?????文件????????6464??2013-08-20?15:07??WebCam.Designer.cs
?????文件????????5817??2013-08-20?15:07??WebCam.resx

評論

共有 條評論