Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!helios!tamuts!n077dr From: n077dr@tamuts.tamu.edu (Xuejun Yang) Newsgroups: comp.windows.ms Subject: Re: SDK and Turbo C++ Keywords: Win3, SDK Message-ID: <8223@helios.TAMU.EDU> Date: 13 Sep 90 19:09:50 GMT References: <15962@thorin.cs.unc.edu> <3279@PEDEV.Columbia.NCR.COM> Sender: usenet@helios.TAMU.EDU Organization: Texas A&M University Lines: 60 Dear netters: I am trying to build a Windows interface to the PC VisionPlus frame grabber so that the images captured by the frame grabber can be transferred into Windows for display. I have successfully captured images by issuing window commands. The problem is as soon as I try to copy the digitized image from the frame grabber into Windows, I get a "Unrecoverable Application Error, Program Terminated!". The Window version is 3.0 and the frame grabber library is image tool by Werner Frei Associates. Everything works fine separately. My suspicion is that there is a resource conflict(mouse,curser,memory). Below is the code segment: -----------------------Cut Here------------------------- #include "d:\windev\include\windows.h" #include "imtool.h" void SnapInitial(hWnd) HWND hWnd; { int i,j,mode,x,y,dx,dy,value; HDC hDC; HDC hMemoryDC; HBITMAP hBitmap; HBITMAP hOldBitmap; init(); mode = 1; DIGITZ(&mode); /* snaps an image */ x = 0; y = 0; dx = 64; dy = 64; hDC = GetDC(hWnd); hMemoryDC = CreateCompatibleDC(hDC); hBitmap = CreateCompatibleBitmap(hDC,dx,dy); hOldBitmap = SelectObject(hMemoryDC,hBitmap); PatBlt(hMemoryDC,x,y,dx,dy,WHITENESS); for(i=x;i