在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
http://www.delphi2007.net/DelphiNetwork/html/delphi_20061218101640102.html 用Delphi和wincap包中PacketReceivePacket函数接包时出现内存泄漏。 这是扫描什么原因? var recvbuf: array[0..1024*250 - 1] of char; if not PacketSetBuff(lpAdapter,250*1024) then begin ShowMessage(Format('PacketSetBuff Error: %d',[GetLastError()])); exit; end; if not PacketSetReadTimeout(lpAdapter,1) then ShowMessage('Warning: Unable to set the timeout'); lppacketr := PacketAllocatePacket(); if lppacketr = nil then begin ShowMessage(Format('PacketAllocatePacket receive Error: %d',[GetLastError()])); exit; end; PacketInitPacket(lppacketr,@recvbuf,sizeof(recvbuf)); while true do begin if not PacketReceivePacket(lpAdapter,lppacketr,true) then exit; end; 用Delphi和wincap包中PacketReceivePacket函数接包时出现内存泄漏。 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论