In the camera, there is a declaration, not my original, lest someone to get gossip using system; use system.Runtime.InteropServices; namespace wuyin.shoesManager {////
/// vediocapture's summary description.
/// public class VedioCapture {private int hCaptureM; private bool isUnLoad = false; public VedioCapture () {} [DllImport ( "avicap32.dll")] private static extern int capCreateCaptureWindow (string strWindowName, int dwStyle, int x, int y , int Width, int Height, int hwdparent, int NID; [DLLIMPORT ("User32.dll")] Private static extern int sendMessage (int in, int wmsg, int wparam, int lparam); [DLLIMPORT ("User32.dll ")] private static extern int SendMessage (int hwnd, int wMsg, int wParam, string lParam); [DllImport (" Kernel32.dll ")] private static extern bool CloseHandle (int hObject); public bool Initialize (System.Windows. Forms.Control aContainer, int intWidth, int intHeight) {hCaptureM = capCreateCaptureWindow ( "", 0x40000000 | 0x10000000, 0,0, intWidth, intHeight, aContainer.Handle.ToInt32 (), 1); if (hCaptureM == 0) return False; int RET = SendMessage (Hcapturem, 1034, 0); if (RET == 0) {CloseHandle (HcApturem); Return False;} // WM_CAP_SET_PREVIEW RET = SendMessage (Hcapturem, 1074, 1, 0); if (RET == 0) {this.unload (); returnaf (} // wm_cap_set_scale ret = sendMessage (Hcapturem, 1077, 1, 0); if (Ret == 0 ) {this.unload (); return false;} // WM_CAP_SET_PREVIEWRATE RET = SendMessage (hcapturem, 1076, 66, 0); if (RET == 0) {this.unload (); returnif;} return true; public void SingleFrameBegin () {// int ret = SendMessage (hCaptureM, 1094, 0, 0);} public void SingleFrameEnd () {// int ret = SendMessage (hCaptureM, 1095, 0, 0);} public void SingleFrameMode ( ) {// WM_CAP_GRAB_FRAME INT RET = SendMessage (Hcapturem, 1084, 0, 0); // WM_CAP_SET_PREVIEW // Int Ret =