A program was developed (on Delphi XE), takes pictures from the camera in bmp-format and all this goes to the act of printing. Everything works perfectly.
Software was tested: on Win7 64bit PC, on WinXP 32bit PC, on WinXP 32bit laptop.
But it was worth launching at the customer’s site (far from modern PCs, platforms still on DDR1, OS WinXP). How did neocho happen!
They all began to take not pictures, but green rectangles.
What is it, why is this happening? And how to fix it (bypass)?
——————
The picture is taken as follows:
begin //открываем камеру hWndC := capCreateCaptureWindowA('My Own Capture Window', WS_CHILD or WS_VISIBLE, Image1.Left, Image1.Top, Image1.Width, Image1.Height, Form1.Handle, //Image1.Canvas.Handle, //тут белое //Image1.Picture.Bitmap.Canvas.Handle, // тут пусто 0); if hWndC <> 0 then begin SendMessage(hWndC, WM_CAP_DRIVER_CONNECT, 0, 0); // подключаемся к драйверу SendMessage(hWndC, WM_CAP_SAVEDIB, 0, longint(PAnsiChar(AnsiString('data\photo.bmp')))); // делаем снимок SendMessage(hWndC, WM_CAP_DRIVER_DISCONNECT, 0, 0); //отключаемся от драйвера hWndC := 0; end; end;