>#define SW_HIDE 0 >#define SW_NORMAL 1 >#define SW_SHOWMINIMIZED 2 >#define SW_SHOWMAXIMIZED 3 >#define SW_MAXIMIZE 3 >#define SW_SHOWNOACTIVATE 4 >#define SW_SHOW 5 >#define SW_MINIMIZE 6 > >* Error codes return from ShellExecute >**** regular WinExec() codes * >#define SE_ERR_FNF 2 && file not found >#define SE_ERR_PNF 3 && path not found >#define SE_ERR_ACCESSDENIED 5 && access denied >#define SE_ERR_OOM 8 && out of memory >#define SE_ERR_DLLNOTFOUND 32 > >* error values for ShellExecute() beyond the regular WinExec() codes >#define SE_ERR_SHARE 26 >#define SE_ERR_ASSOCINCOMPLETE 27 >#define SE_ERR_DDETIMEOUT 28 >#define SE_ERR_DDEFAIL 29 >#define SE_ERR_DDEBUSY 30 >#define SE_ERR_NOASSOC 31 > > > >DECLARE INTEGER ShellExecute IN SHELL32.DLL INTEGER nWinHandle,; > STRING cOperation,; > STRING cFileName,; > STRING cParameters,; > STRING cDirectory,; > INTEGER nShowWindow >******lRef= 'C:\Program Files\Utvonal\Utvhatar.exe ' + 'hamiTszt.txt' >result = ShellExecute(0, 'Open', [Utvhatar.exe] , [hamiTszt.txt], [C:\Program Files\Utvonal], SW_NORMAL) >IF result < 33 && Some Error happens >* check for errors see defines above > *** Some error happened >ENDIF >>