Kbase P103951: How to open Microsoft Internet Explorer using the windows Winexec API call?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  06/05/2005 |
|
Status: Unverified
GOAL:
How to open Microsoft Internet Explorer using the windows Winexec API call?
FIX:
Use code similar to the following:
DEFINE VARIABLE ReturnCode AS INTEGER NO-UNDO.
PROCEDURE WinExec EXTERNAL "KERNEL32.DLL":
DEFINE INPUT PARAMETER ProgramName AS CHARACTER.
DEFINE INPUT PARAMETER VisualStyle AS SHORT.
DEFINE RETURN PARAMETER StatusCode AS SHORT.
END PROCEDURE.
RUN WinExec (INPUT "C:\Program Files\Internet Explorer\iexplore.exe", INPUT 1, OUTPUT ReturnCode).
IF ReturnCode >= 32 THEN
MESSAGE "Application was Started" VIEW-AS ALERT-BOX.
ELSE
MESSAGE "Application Failed" VIEW-AS ALERT-BOX.