Changeset 6015 for trunk/src/kernel32/wprocess.cpp
- Timestamp:
- Jun 15, 2001, 11:42:49 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/wprocess.cpp
r5974 r6015 1 /* $Id: wprocess.cpp,v 1.12 4 2001-06-12 17:03:34 sandervlExp $ */1 /* $Id: wprocess.cpp,v 1.125 2001-06-15 09:42:49 bird Exp $ */ 2 2 3 3 /* … … 789 789 790 790 /** @sketch 791 * IF dwFlags == 0 && (!fPeLoader || !fPE) THEN791 * IF (!fPeLoader || fPE == failure) THEN 792 792 * Try load the executable using LoadLibrary 793 793 * IF successfully loaded THEN … … 802 802 */ 803 803 //only call OS/2 if LX binary or win32k process 804 if (!fPeLoader || fPE != ERROR_SUCCESS)804 if (!fPeLoader || fPE != ERROR_SUCCESS) 805 805 { 806 806 hDll = OSLibDosLoadModule(szModname); … … 808 808 { 809 809 /* OS/2 dll, system dll, converted dll or win32k took care of it. */ 810 pModule = (Win32DllBase *)Win32LxDll::findModuleByOS2Handle(hDll);811 if (pModule)810 pModule = Win32DllBase::findModuleByOS2Handle(hDll); 811 if (pModule) 812 812 { 813 if (pModule->isLxDll())813 if (pModule->isLxDll()) 814 814 { 815 816 if(fPeLoader)817 {818 if(pModule->AddRef() == -1) {//-1 -> load failed (attachProcess)819 dprintf(("Dll %s refused to be loaded; aborting", szModname));820 delete pModule;821 822 823 } 815 ((Win32LxDll *)pModule)->setDllHandleOS2(hDll); 816 if (fPeLoader && pModule->AddRef() == -1) 817 { //-1 -> load failed (attachProcess) 818 delete pModule; 819 SetLastError(ERROR_INVALID_EXE_SIGNATURE); 820 dprintf(("Dll %s refused to be loaded; aborting", szModname)); 821 return 0; 822 } 823 824 824 } 825 825 pModule->incDynamicLib(); 826 826 } 827 else 828 if(fExeStarted) { 827 else if (fExeStarted) { 829 828 OSLibDosFreeModule(hDll); 830 829 SetLastError(ERROR_INVALID_EXE_SIGNATURE); … … 1565 1564 #ifdef DEBUG 1566 1565 if(lpStartupInfo) { 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1566 dprintf(("lpStartupInfo->lpReserved %x", lpStartupInfo->lpReserved)); 1567 dprintf(("lpStartupInfo->lpDesktop %x", lpStartupInfo->lpDesktop)); 1568 dprintf(("lpStartupInfo->lpTitle %s", lpStartupInfo->lpTitle)); 1569 dprintf(("lpStartupInfo->dwX %x", lpStartupInfo->dwX)); 1570 dprintf(("lpStartupInfo->dwY %x", lpStartupInfo->dwY)); 1571 dprintf(("lpStartupInfo->dwXSize %x", lpStartupInfo->dwXSize)); 1572 dprintf(("lpStartupInfo->dwYSize %x", lpStartupInfo->dwYSize)); 1573 dprintf(("lpStartupInfo->dwXCountChars %x", lpStartupInfo->dwXCountChars)); 1574 dprintf(("lpStartupInfo->dwYCountChars %x", lpStartupInfo->dwYCountChars)); 1575 dprintf(("lpStartupInfo->dwFillAttribute %x", lpStartupInfo->dwFillAttribute)); 1576 dprintf(("lpStartupInfo->dwFlags %x", lpStartupInfo->dwFlags)); 1577 dprintf(("lpStartupInfo->wShowWindow %x", lpStartupInfo->wShowWindow)); 1578 dprintf(("lpStartupInfo->hStdInput %x", lpStartupInfo->hStdInput)); 1579 dprintf(("lpStartupInfo->hStdOutput %x", lpStartupInfo->hStdOutput)); 1580 dprintf(("lpStartupInfo->hStdError %x", lpStartupInfo->hStdError)); 1582 1581 } 1583 1582 #endif … … 1701 1700 1702 1701 dprintf(("KERNEL32: CreateProcess %s\n", cmdline)); 1703 1702 1704 1703 DWORD Characteristics, SubSystem, fNEExe; 1705 1704 if(Win32ImageBase::isPEImage(exename, &Characteristics, &SubSystem, &fNEExe) == 0) { … … 1709 1708 } 1710 1709 else lpszPE = "PE.EXE"; 1711 1710 1712 1711 //SvL: Allright. Before we call O32_CreateProcess, we must take care of 1713 1712 // lpCurrentDirectory ourselves. (Open32 ignores it!) 1714 1713 if(lpCurrentDirectory) { 1715 1714 char *newcmdline; 1716 1715 1717 1716 newcmdline = (char *)malloc(strlen(lpCurrentDirectory) + strlen(cmdline) + 32); 1718 1717 sprintf(newcmdline, "%s /OPT:[CURDIR=%s] %s", lpszPE, lpCurrentDirectory, cmdline); … … 1733 1732 lpProcessInfo); 1734 1733 } 1735 else 1734 else 1736 1735 if(fNEExe) {//16 bits windows app 1737 1736 char *newcmdline; 1738 1737 1739 1738 newcmdline = (char *)malloc(strlen(cmdline) + 16); 1740 1739 sprintf(newcmdline, "w16odin.exe %s", cmdline);
Note:
See TracChangeset
for help on using the changeset viewer.