|
<p>我用vb写了个小软件,开始能正常运行,但运行30分钟左右,就出现了</p>
<p><strong><span id="topicsubject" chaojimenid="topic_subject">vb 运行时错误 '-2147024882 (8007000e)'</span></strong></p>
<p>这样的错误,说是内存溢出,不知道怎么解决?</p>
<p>我用到的api有:</p>
<p> </p>
<p><font face="Verdana">Private Declare Function GetCursorPos Lib "User32" (lpPoint As POINTAPI) As Long<br/>Private Declare Function GetDC Lib "User32" (ByVal hwnd As Long) As Long<br/>Private Declare Function ReleaseDC Lib "User32" (ByVal hwnd As Long, ByVal hdc As Long) As Long<br/>Private Declare Function GetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long) As Long<br/>Private Declare Function SetCursorPos Lib "User32" (ByVal x As Long, ByVal y As Long) As Long<br/>Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)<br/>Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long<br/>Private Declare Function SetCapture Lib "User32" (ByVal hwnd As Long) As Long<br/>Private Declare Function SetPixel Lib "gdi32" (ByVal hdc As Long, ByVal x As Long, ByVal y As Long, ByVal crColor As Long) As Long<br/>Private Declare Sub mouse_event Lib "User32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)<br/>Private Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down<br/>Private Const MOUSEEVENTF_LEFTUP = &H4 ' left button up<br/>Private Declare Function GetWindowDC Lib "User32" (ByVal hwnd As Long) As Long<br/>Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long<br/>Private Declare Function SetWindowPos Lib "User32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long<br/>Private Declare Function GetLastInputInfo Lib "User32" (plii As LASTINPUTINFO) As Boolean<br/>Private Declare Function GetTickCount Lib "kernel32" () As Long</font></p> |
|