Changeset 4117 for branches/GRACE/src/win32k/ldr/myldrOpen.cpp
- Timestamp:
- Aug 30, 2000, 6:11:33 AM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GRACE/src/win32k/ldr/myldrOpen.cpp
r4116 r4117 1 /* $Id: myldrOpen.cpp,v 1.10.4.1 0 2000-08-29 22:52:36bird Exp $1 /* $Id: myldrOpen.cpp,v 1.10.4.11 2000-08-30 04:11:31 bird Exp $ 2 2 * 3 3 * myldrOpen - ldrOpen. … … 19 19 #define INCL_OS2KRNL_TCB 20 20 #define INCL_OS2KRNL_SEM 21 #define INCL_OS2KRNL_SEC 21 22 22 23 /******************************************************************************* … … 295 296 if (isLdrStateExecPgm() && fTkExecPgm) 296 297 { 297 rc = AddArgsToFront(2, u1.pach, achTkExecPgmFilename);298 rc = AddArgsToFront(2, ldrpFileNameBuf, achTkExecPgmFilename); 298 299 if (rc == NO_ERROR) 299 300 { 300 rc = SetExecName( u1.pach);301 rc = SetExecName(ldrpFileNameBuf); 301 302 if (rc != NO_ERROR) 302 303 kprintf(("myldrOpen-%d: pe.exe - failed to set pe.exe as execname. rc=%d\n", cNesting)); … … 358 359 if (isLdrStateExecPgm() && fTkExecPgm) 359 360 { 360 cchName = strlen(ldrpFileNameBuf); 361 /* Ooops we had to get the file name from the MFT. ldrpFileNameBuf is allways uppercased... */ 362 /* MFT seems to hold uppercased filenames! ARG! But (by pure luck?) achTkExecPgmArguments is 363 * not uppercased (yet). Nothing could be simpler! 364 */ 365 #if 1 366 psz3 = achTkExecPgmArguments; 367 #elif 0 368 psz3 = SecPathFromSFN(*phFile); 369 if (psz3 == NULL) 370 psz3 = ldrpFileNameBuf; 371 #else 372 psz3 = ldrpFileNameBuf; 373 #endif 374 cchName = strlen(psz3); 361 375 pszName = (char*)rmalloc(cchName + 2); 362 376 if (pszName == NULL) … … 365 379 goto cleanup; 366 380 } 367 memcpy(pszName, ldrpFileNameBuf, cchName+1);381 memcpy(pszName, psz3, cchName+1); 368 382 369 383 psz = pszName + strlen(pszName) - 1; … … 380 394 if (psz - pszName == 2) 381 395 { 382 memmove(psz + 1, psz, cchName - 2);396 memmove(psz + 1, psz, cchName - 1); 383 397 *psz++ = '\\'; 384 398 } 385 399 } 386 *psz = ' '; //assume fully qualified path... 400 /* check if no path */ 401 if (psz == pszName) 402 memmove(pszName + 1, pszName, cchName + 1); 403 *psz = ' '; 387 404 } 388 405 … … 437 454 /* 438 455 * Add the class directory (as the last classpath entry) and the class name. 456 * (Note. I may happen that there is no directory, but that don't matter 457 * a space is allways preceding the class name.) 439 458 */ 440 459 *psz++ = ';'; … … 669 688 kprintf(("myldrOpen-%d: Found REXX script\n", cNesting)); 670 689 ldrClose(*phFile); 671 strcpy(u1.pach, "KRX.EXE");672 rc = ldrOpen(phFile, u1.pach, pfl);690 psz = "KRX.EXE"; 691 rc = ldrOpen(phFile, psz, pfl); 673 692 if (rc != NO_ERROR) 674 rc = OpenPATH(phFile, u1.pach, pfl);693 rc = OpenPATH(phFile, psz, pfl); 675 694 676 695 /** @sketch … … 683 702 if (rc == NO_ERROR && isLdrStateExecPgm()) 684 703 { 685 rc = AddArgsToFront(2, u1.pach, achTkExecPgmFilename);704 rc = AddArgsToFront(2, ldrpFileNameBuf, achTkExecPgmFilename); 686 705 if (rc != NO_ERROR) 687 706 { … … 689 708 goto cleanup_noerror; 690 709 } 691 rc = SetExecName( u1.pach);710 rc = SetExecName(ldrpFileNameBuf); 692 711 if (rc != NO_ERROR) 693 712 kprintf(("myldrOpen-%d: SetExecName failed with rc=%d\n", cNesting));
Note:
See TracChangeset
for help on using the changeset viewer.