Changeset 483 for trunk/server/source3/lib/os2helper.c
- Timestamp:
- Aug 16, 2010, 1:18:20 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/server/source3/lib/os2helper.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/server/source3/lib/os2helper.c
r463 r483 96 96 } 97 97 98 // we search the path of the .exe and return it99 int os2_GetExePath(char *buff)98 // 99 ) 100 100 { 101 101 APIRET rc = NO_ERROR; 102 PPIB ppib = NULL; 103 char sExePath [_MAX_PATH]; 104 char sDrive [_MAX_PATH], sDir [_MAX_DIR]; 102 PPIB ppib = NULL; 105 103 106 104 // we search for the infoblock to get the module name … … 108 106 if (rc != NO_ERROR) 109 107 { 110 return -1;108 return ; 111 109 } 112 110 113 111 // with the module name we get the path (including the exe name) 114 rc = DosQueryModuleName(ppib->pib_hmte, sizeof(sExe Path), sExePath);112 rc = DosQueryModuleName(ppib->pib_hmte, sizeof(sExe); 115 113 if (rc != NO_ERROR) 116 114 { 117 return -1; 118 } 115 return false; 116 } 117 return true; 118 } 119 120 // we search the path of the .exe and return it 121 int os2_GetExePath(char *buff) 122 { 123 char sExeName [_MAX_PATH]; 124 char sDrive [_MAX_PATH], sDir [_MAX_DIR]; 125 126 if (!os2_GetExeName(sExeName)) 127 return false; 119 128 120 129 // we split to the different values 121 _splitpath(sExe Path, sDrive, sDir, NULL, NULL);130 _splitpath(sExe, sDrive, sDir, NULL, NULL); 122 131 // strcat(sDrive, sDir); 123 132 strncat(sDrive, sDir, strlen(sDir) -1); … … 125 134 126 135 return 0; 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 127 155 } 128 156
Note:
See TracChangeset
for help on using the changeset viewer.
