IE及IE内存释放

2010-03-02  陈灵华 

Sub OpenUrl(URL)
        Set objIE = wscript.CreateObject("internetexplorer.application","event_")
        objIE.visible=0
        objIE.Navigate URL
        WScript.sleep 10000
        set objIE=nothing
End Sub

   Public Function QTP_Release_Memory(hwnd)
        Extern.Declare micVoid ,"SendMessageA","user32.dll","SendMessageA",micHwnd,micInteger,micInteger,micInteger
        SC_MINIMIZE = &HF020&
        SC_MAXIMIZE = &HF030&
        WM_SYSCOMMAND = &H112
        Extern.SendMessageA hwnd,WM_SYSCOMMAND,SC_MINIMIZE,0
        wait 1
        Extern.SendMessageA hwnd,WM_SYSCOMMAND,SC_MAXIMIZE,0
   End Function

Extern.Declare micHwnd,"GetMenu","user32.dll","GetMenu",micHwnd
                |           |          |                  |          |
                返回值   方法       DLL         方法     输入值

184°/1849 人阅读/0 条评论 发表评论

登录 后发表评论
陈灵华
访客 1190
陈灵华 的其他博文 更多