* Windows WinExec sample code; * Richard A. DeVenezia; * http://www.devenezia.com; filename SASCBTBL CATALOG 'work.example.winexec.source'; data _null_; file SASCBTBL; input; put _infile_; cards4; ROUTINE WinExec minarg=2 maxarg=2 stackpop=called returns=ushort module=Kernel32; arg 1 char input byaddr format=$CSTR200.; * LPCSTR lpCmdLine, // address of command line ; arg 2 num input byvalue format=pib4.; * UINT uCmdShow // window style for new application ; * SW_HIDE 0 ; * SW_SHOWNORMAL 1 ; * SW_NORMAL 1 ; * SW_SHOWMINIMIZED 2 ; * SW_SHOWMAXIMIZED 3 ; * SW_MAXIMIZE 3 ; * SW_SHOWNOACTIVATE 4 ; * SW_SHOW 5 ; * SW_MINIMIZE 6 ; * SW_SHOWMINNOACTIVE 7 ; * SW_SHOWNA 8 ; * SW_RESTORE 9 ; * SW_SHOWDEFAULT 10 ; * SW_MAX 10 ; ;;;; data _null_; rc = modulen ('WinExec', 'Explorer', 6); run;