运行图像在两个界面显示,进程中观察这一句造成内存不断增加。DC1:=getdc(form1.panel1.handle);
直到出现这个错误 ‘Out of memory’.代码如下
function FrameCallBack(hWnd:HWND;lpVHdr:PVIDEOHDR):LongInt;stdcall;var
hd,dc,dc1:Thandle; i:integer;  bo1:boolean;
begin
 EnterCriticalSection(bmpinfo1);
try
hd:= DrawDibOpen;
 dc1:=getdc(form1.Panel2.Handle);
DrawDibDraw(hd,dc1,0,0,BMPINFO.BmiHeader.biwidth,BMPINFO.bmiHeader.biHeight,@BMPINFO.bmiHeader,lpVHdr^.lpData,0,0,500,420,0);
DrawDibClose(hd) ;
if dc1<>0 then
 begin
releasedc(form1.Panel2.Handle,dc1);
deletedc(dc1);
// dc1:=0;
End;
finally
        LeaveCriticalSection(BMPINFO1);    
end;
End;