Answer the question
In order to leave comments, you need to log in
System.OverflowException: Arithmetic operation resulted in an overflow?
string desktop = Environment.GetFolderPath(Environment.SpecialFolder.DesktopDirectory);
String dName = "".PadRight(100);
String dVersion = "".PadRight(100);
IntPtr hWndC = capCreateCaptureWindowA("VFW Capture", WS_POPUP | WS_CHILD, 0, 0, 320, 240, 0, 0); // узнать дескриптор камеры
SendMessage(hWndC, WM_CAP_DRIVER_CONNECT, 0, 0); //подключиться к камере
string path = [email protected]"\ВАЖН0\text\" + "1" + ".jpg";
IntPtr hBmp = Marshal.StringToHGlobalAnsi(path);
SendMessage(hWndC, WM_CAP_SAVEDIB, 0, hBmp.ToInt32()); // сохранить скриншот
SendMessage(hWndC, WM_CAP_DRIVER_DISCONNECT, 0, 0); //отключить камеру
Unhandled exception. System.OverflowException: Arithmetic operation resulted in an overflow.
at System.IntPtr.ToInt32()
at cheatchecker.Program.Photo() in D:\code\c#-saves\cheatchecker\Program.cs:line 132
at cheatchecker.Program.Main(String[] args) in D:\code\c#-saves\cheatchecker\Program.cs:line 44
Answer the question
In order to leave comments, you need to log in
And what is the connection between the camera and the screenshot?
the first search result: https://habr.com/ru/post/316012/
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question