Launching an External Program

RD_Man

Member
Hello All,

I have found code to launch an external program, ie Notepad.exe, but it appears I need the files listed below. Does anyone know where I can get a copy of these?

windows.p
windows.i
winfunc.p
winfunc.i

Mike
 
Hi,

Sometimes we use the routine as described below.

Hope that helps.

Mike


&GLOB A A
/* data types */
&Glob HWND long
&Glob BOOL long
&Glob HINSTANCE long
&Glob INT long
&GLOB INTSIZE 4
/* libraries */
&GLOB USER "user32"
&GLOB KERNEL "kernel32"
&GLOB SHELL "shell32"
&GLOB MAPI "mapi32"
&GLOB GDI "gdi32"
&GLOB MMEDIA "winmm"
&GLOB WINSPOOL "winspool.drv"
&GLOB ADVAPI "advapi32"
&GLOB A A
PROCEDURE ShellExecuteA EXTERNAL "shell32":
DEFINE INPUT PARAMETER HWND AS LONG.
DEFINE INPUT PARAMETER lpOperation AS CHAR.
DEFINE INPUT PARAMETER lpFile AS CHAR.
DEFINE INPUT PARAMETER lpParameters AS CHAR.
DEFINE INPUT PARAMETER lpDirectory AS CHAR.
DEFINE INPUT PARAMETER nShowCmd AS LONG.
DEFINE RETURN PARAMETER hInstance AS LONG.
END PROCEDURE.


def var hInstance as INT no-undo.
FILE-INFO:File-NAME = ".". /* Current directory */
run ShellExecuteA
(0,
"open",
"notepad.exe",
"",
FILE-INFO:FULL-PATHNAME,
1,
output hInstance).
 
Back
Top