I'm trying to close the first Internet Explorer instance.
Everything works fine, but when finally executing the quit method, the program exits with a GPF.
What am I doing wrong?
Heinz Salomon
Everything works fine, but when finally executing the quit method, the program exits with a GPF.
What am I doing wrong?
Heinz Salomon
Code:
#INCLUDE "SHDOCVW.INC" FUNCTION PBMAIN() AS LONG DIM objIE AS IWebBrowserApp DIM objShellWins AS IShellWindows objShellWins = NEWCOM CLSID $CLSID_SHDocVw_ShellWindows IF ISOBJECT(objShellWins) THEN PRINT STR$(objShellWins.Count) ' = 1 when tested with 1 IE instance open --> OK objIE = objShellWins.ITEM(0) IF ISOBJECT(objIE) THEN objIE.Quit END IF END IF objIE = NOTHING objShellWins = NOTHING END FUNCTION
Comment