***** * Load the FoxTools Library if necessary ***** if _WINDOWS and not "FOXTOOLS" $ set('LIBRARY') set library to ("foxtools") additive endif ***** * Define the Library functions if this is in Windows ***** if _WINDOWS public snWNetGetUser m.snWNetGetUser = RegFn("WNetGetUser","@C@I","I") public snGetProfile, snWriteProfile m.snGetProfile = RegFn("GetProfileString","CCC@CI","I") m.snWriteProfile = RegFn("WriteProfileString","CCC","I") public snPostMessage m.snPostMessage = RegFn("PostMessage","IICC","I") public snWinExec m.snWinExec = RegFn("WinExec","CI","I") endif ***** * PAR 12-Mar-97 - If a file exists called WINEXEC.FIL, then the WinExec * function will be used. Otherwise, the regular RUN * function will be used. ***** m.lnWinExec = 1000 if file("WINEXEC.FIL") m.lnWinExec = &CallFn(m.snWinExec,"PRINTFIL.BAT "+m.lpFile,2) else run printfil.bat &lpFile endif * erase &lpFile if not m.slDebug erase &lpFile1 erase &lpFile2 endif ***** * PAR 26-Sep-96 - Setup the application to save additional error information ***** if m.lnWinExec < 32 ***** * Setup the Error information ***** m.lcWinExec = "Unknown Error" do case case m.lnWinExec = 0 m.lcWinExec = "Out of memory or Corrupt File" case m.lnWinExec = 2 m.lcWinExec = "File Not Found" case m.lnWinExec = 3 m.lcWinExec = "Path Not Found" case m.lnWinExec = 5 m.lcWinExec = "Dynamic Link Error or Sharing Error" case m.lnWinExec = 6 m.lcWinExec = "Separate Data Segments Required" case m.lnWinExec = 8 m.lcWinExec = "Insufficient Memory" case m.lnWinExec = 10 m.lcWinExec = "Incorrect Windows Version" case m.lnWinExec = 11 m.lcWinExec = "Invalid Executable File" case m.lnWinExec = 12 m.lcWinExec = "Incorrect Operating System" case m.lnWinExec = 13 m.lcWinExec = "Designed for MS-DOS 4.0" case m.lnWinExec = 14 m.lcWinExec = "Unknown Executable File Type" case m.lnWinExec = 15 m.lcWinExec = "Real-Mode Application" case m.lnWinExec = 16 m.lcWinExec = "Attempted to load Second Instance" case m.lnWinExec = 19 m.lcWinExec = "Attempted to load Compressed EXE" case m.lnWinExec = 20 m.lcWinExec = "Invalid DLL" case m.lnWinExec = 21 m.lcWinExec = "32-bit extensions required" endcase ***** * Generate an error. * This will call the regular error handler. ***** m.lnRoot = sqrt(-1) endif