Changeset 122 for trunk/src/helpers/apps.c
- Timestamp:
- Dec 8, 2001, 11:14:27 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/apps.c
r113 r122 782 782 * 783 783 * -- starting ".CMD" and ".BAT" files as 784 * PROGDETAILS.pszExecutable. 784 * PROGDETAILS.pszExecutable; 785 * 786 * -- starting apps which are not fully qualified 787 * and therefore assumed to be on the PATH. 785 788 * 786 789 * Unless it is "*", PROGDETAILS.pszExecutable must … … 814 817 * -- To start a session minimized, set SWP_MINIMIZE. 815 818 * 816 * -- To start a VIO session auto-close disabled, set817 * the half-documented SWP_NOAUTOCLOSE flag (0x8000)819 * -- To start a VIO session with auto-close disabled, 820 * set the half-documented SWP_NOAUTOCLOSE flag (0x8000) 818 821 * This flag is now in the newer toolkit headers. 819 822 * … … 843 846 * WinStartApp completely hangs the session manager 844 847 * if a Win-OS/2 full-screen session is started from 845 * a thread that is NOT thread 1, this willfail846 * with anerror for safety (V0.9.16).848 * a thread that is NOT thread 1, this will now fail 849 * with this error for safety (V0.9.16). 847 850 * 848 851 * -- ERROR_INVALID_PARAMETER: pcProgDetails or … … 866 869 *@@changed V0.9.16 (2001-10-19) [umoeller]: added prototype to return APIRET 867 870 *@@changed V0.9.16 (2001-10-19) [umoeller]: added thread-1 check 871 *@@changed V0.9.16 (2001-12-06) [umoeller]: now using doshSearchPath for finding pszExecutable if not qualified 868 872 */ 869 873 … … 886 890 // all this only makes sense if this contains something... 887 891 // besides, this crashed on string comparisons V0.9.9 (2001-01-27) [umoeller] 888 if (!ProgDetails.pszExecutable) 892 if ( (!ProgDetails.pszExecutable) 893 || (!(*(ProgDetails.pszExecutable))) 894 ) 889 895 arc = ERROR_INVALID_PARAMETER; 890 896 else if (doshMyTID() != 1) // V0.9.16 (2001-10-19) [umoeller] … … 893 899 { 894 900 ULONG ulIsWinApp; 901 902 CHAR szFQExecutable[CCHMAXPATH]; 895 903 896 904 XSTRING strParamsPatched; … … 1010 1018 else 1011 1019 { 1012 // now check if the executable is valid1013 // V0.9.16 (2001-10-19) [umoeller]1014 ULONG ulAttr;1015 _Pmpf((" %d now, checking %s", arc, ProgDetails.pszExecutable));1016 if (!(arc = doshQueryPathAttr(ProgDetails.pszExecutable,1017 &ulAttr)))1018 {1019 // make sure startup dir is really a directory1020 if (ProgDetails.pszStartupDir)1020 // check if the executable is fully qualified; if so, 1021 // check if the executable file exists 1022 if ( (ProgDetails.pszExecutable[1] == ':') 1023 && (strchr(ProgDetails.pszExecutable, '\\')) 1024 ) 1025 { 1026 ULONG ulAttr; 1027 if (!(arc = doshQueryPathAttr(ProgDetails.pszExecutable, 1028 &ulAttr))) 1021 1029 { 1022 _Pmpf((" checking %s", ProgDetails.pszStartupDir)); 1023 if (!(arc = doshQueryPathAttr(ProgDetails.pszStartupDir, 1024 &ulAttr))) 1025 if (!(ulAttr & FILE_DIRECTORY)) 1026 arc = ERROR_PATH_NOT_FOUND; 1027 // @@todo 1030 // make sure startup dir is really a directory 1031 if (ProgDetails.pszStartupDir) 1032 { 1033 if (!(arc = doshQueryPathAttr(ProgDetails.pszStartupDir, 1034 &ulAttr))) 1035 if (!(ulAttr & FILE_DIRECTORY)) 1036 arc = ERROR_PATH_NOT_FOUND; 1037 } 1028 1038 } 1029 1039 } 1030 1031 _Pmpf((" after checking %d", arc)); 1040 else 1041 { 1042 // _not_ fully qualified: look it up on the PATH then 1043 // V0.9.16 (2001-12-06) [umoeller] 1044 if (!(arc = doshSearchPath("PATH", 1045 ProgDetails.pszExecutable, 1046 szFQExecutable, 1047 sizeof(szFQExecutable)))) 1048 // alright, found it: 1049 ProgDetails.pszExecutable = szFQExecutable; 1050 } 1032 1051 1033 1052 if (!arc)
Note:
See TracChangeset
for help on using the changeset viewer.