Changeset 3404 for trunk/src/kernel32/wprocess.cpp
- Timestamp:
- Apr 16, 2000, 12:42:13 PM (25 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/wprocess.cpp
r3402 r3404 1 /* $Id: wprocess.cpp,v 1.7 8 2000-04-16 07:07:01 birdExp $ */1 /* $Id: wprocess.cpp,v 1.79 2000-04-16 10:42:13 sandervl Exp $ */ 2 2 3 3 /* … … 12 12 * 13 13 */ 14 15 16 17 /*******************************************************************************18 * Header Files *19 *******************************************************************************/20 14 #include <odin.h> 21 15 #include <odinwrap.h> … … 55 49 56 50 57 /****************************************************************************** 58 * Global Variables * 59 ******************************************************************************/ 51 //****************************************************************************** 52 //****************************************************************************** 60 53 BOOL fFreeLibrary = FALSE; 61 54 BOOL fIsOS2Image = FALSE; //TRUE -> Odin32 OS/2 application (not converted!) … … 69 62 static THDB *threadList = 0; 70 63 static VMutex threadListMutex; 71 72 73 74 64 //****************************************************************************** 75 65 //****************************************************************************** … … 365 355 VOID WIN32API ExitProcess(DWORD exitcode) 366 356 { 367 dprintf(("KERNEL32: ExitProcess %d\n", exitcode));368 dprintf(("KERNEL32: ExitProcess FS = %x\n", GetFS()));357 dprintf(("KERNEL32: ExitProcess %d\n", exitcode)); 358 dprintf(("KERNEL32: ExitProcess FS = %x\n", GetFS())); 369 359 370 360 SetOS2ExceptionChain(-1); … … 425 415 } 426 416 /******************************************************************************/ 427 //****************************************************************************** 428 HINSTANCE16 WIN32API LoadLibrary16(LPCTSTR lpszLibFile) 429 { 430 dprintf(("ERROR: LoadLibrary16 %s, not implemented", lpszLibFile)); 431 return 0; 432 } 433 //****************************************************************************** 434 //****************************************************************************** 435 VOID WIN32API FreeLibrary16(HINSTANCE16 hinstance) 436 { 437 dprintf(("ERROR: FreeLibrary16 %x, not implemented", hinstance)); 438 } 439 //****************************************************************************** 440 //****************************************************************************** 441 FARPROC WIN32API GetProcAddress16(HMODULE hModule, LPCSTR lpszProc) 442 { 443 dprintf(("ERROR: GetProcAddress16 %x %x, not implemented", hModule, lpszProc)); 444 return 0; 445 } 446 //****************************************************************************** 447 417 /******************************************************************************/ 448 418 /** 449 419 * LoadLibraryA can be used to map a DLL module into the calling process's … … 676 646 lpszLibFile, hFile, dwFlags)); 677 647 SetLastError(ERROR_INVALID_PARAMETER); 648 return NULL; 678 649 } 679 650 … … 990 961 //****************************************************************************** 991 962 //****************************************************************************** 963 HINSTANCE16 WIN32API LoadLibrary16(LPCTSTR lpszLibFile) 964 { 965 dprintf(("ERROR: LoadLibrary16 %s, not implemented", lpszLibFile)); 966 return 0; 967 } 968 //****************************************************************************** 969 //****************************************************************************** 970 VOID WIN32API FreeLibrary16(HINSTANCE16 hinstance) 971 { 972 dprintf(("ERROR: FreeLibrary16 %x, not implemented", hinstance)); 973 } 974 //****************************************************************************** 975 //****************************************************************************** 976 FARPROC WIN32API GetProcAddress16(HMODULE hModule, LPCSTR lpszProc) 977 { 978 dprintf(("ERROR: GetProcAddress16 %x %x, not implemented", hModule, lpszProc)); 979 return 0; 980 } 981 //****************************************************************************** 982 //****************************************************************************** 992 983 LPCSTR WIN32API GetCommandLineA() 993 984 { … … 1000 991 cmdline = O32_GetCommandLine(); 1001 992 1002 dprintf(("KERNEL32: GetCommandLine %s\n", cmdline));1003 dprintf(("KERNEL32: FS = %x\n", GetFS()));993 dprintf(("KERNEL32: GetCommandLine %s\n", cmdline)); 994 dprintf(("KERNEL32: FS = %x\n", GetFS())); 1004 995 return(cmdline); 1005 996 } … … 1011 1002 char *asciicmdline = NULL; 1012 1003 1013 dprintf(("KERNEL32: FS = %x\n", GetFS()));1004 dprintf(("KERNEL32: FS = %x\n", GetFS())); 1014 1005 1015 1006 if(UnicodeCmdLine) … … 1026 1017 UnicodeCmdLine = (WCHAR *)malloc(strlen(asciicmdline)*2 + 2); 1027 1018 AsciiToUnicode(asciicmdline, UnicodeCmdLine); 1028 dprintf(("KERNEL32: OS2GetCommandLineW: %s\n", asciicmdline));1019 dprintf(("KERNEL32: OS2GetCommandLineW: %s\n", asciicmdline)); 1029 1020 return(UnicodeCmdLine); 1030 1021 } 1031 dprintf(("KERNEL32: OS2GetCommandLineW: asciicmdline == NULL\n"));1022 dprintf(("KERNEL32: OS2GetCommandLineW: asciicmdline == NULL\n")); 1032 1023 return NULL; 1033 1024 } … … 1070 1061 DWORD rc; 1071 1062 1072 dprintf(("KERNEL32: OSLibGetModuleFileNameW\n"));1063 dprintf(("KERNEL32: OSLibGetModuleFileNameW\n")); 1073 1064 rc = GetModuleFileNameA(hModule, asciifilename, nSize); 1074 1065 if(rc) AsciiToUnicode(asciifilename, lpFileName); … … 1121 1112 } 1122 1113 1123 dprintf(("KERNEL32: GetModuleHandle %s returned %X\n", lpszModule, hMod));1114 dprintf(("KERNEL32: GetModuleHandle %s returned %X\n", lpszModule, hMod)); 1124 1115 return(hMod); 1125 1116 } … … 1133 1124 astring = UnicodeToAsciiString((LPWSTR)arg1); 1134 1125 rc = GetModuleHandleA(astring); 1135 dprintf(("KERNEL32: OS2GetModuleHandleW %s returned %X\n", astring, rc));1126 dprintf(("KERNEL32: OS2GetModuleHandleW %s returned %X\n", astring, rc)); 1136 1127 FreeAsciiString(astring); 1137 1128 return(rc); … … 1203 1194 sprintf(cmdline, "PE.EXE %s", lpCommandLine); 1204 1195 } 1205 dprintf(("KERNEL32: CreateProcess %s\n", cmdline));1196 dprintf(("KERNEL32: CreateProcess %s\n", cmdline)); 1206 1197 rc = O32_CreateProcess("PE.EXE", (LPCSTR)cmdline,lpProcessAttributes, 1207 1198 lpThreadAttributes, bInheritHandles, dwCreationFlags, … … 1229 1220 1230 1221 if(lpProcessInfo) 1231 dprintf(("KERNEL32: CreateProcess returned %d hPro:%x hThr:%x pid:%x tid:%x\n",1222 dprintf(("KERNEL32: CreateProcess returned %d hPro:%x hThr:%x pid:%x tid:%x\n", 1232 1223 rc, lpProcessInfo->hProcess, lpProcessInfo->hThread, 1233 1224 lpProcessInfo->dwProcessId,lpProcessInfo->dwThreadId)); 1234 1225 else 1235 dprintf(("KERNEL32: CreateProcess returned %d\n", rc));1226 dprintf(("KERNEL32: CreateProcess returned %d\n", rc)); 1236 1227 return(rc); 1237 1228 } … … 1296 1287 ULONG ulAPIOrdinal; 1297 1288 1298 winmod = Win32ImageBase::findModule(hModule); 1289 if(hModule == 0 || hModule == -1 || (WinExe && hModule == WinExe->getInstanceHandle())) { 1290 winmod = WinExe; 1291 } 1292 else winmod = (Win32ImageBase *)Win32DllBase::findModule((HINSTANCE)hModule); 1293 1299 1294 if(winmod) { 1300 1295 ulAPIOrdinal = (ULONG)lpszProc; … … 1310 1305 proc = O32_GetProcAddress(hModule, lpszProc); 1311 1306 if(HIWORD(lpszProc)) 1312 dprintf(("KERNEL32: GetProcAddress %s from %X returned %X\n", lpszProc, hModule, proc));1313 else dprintf(("KERNEL32: GetProcAddress %x from %X returned %X\n", lpszProc, hModule, proc));1307 dprintf(("KERNEL32: GetProcAddress %s from %X returned %X\n", lpszProc, hModule, proc)); 1308 else dprintf(("KERNEL32: GetProcAddress %x from %X returned %X\n", lpszProc, hModule, proc)); 1314 1309 return(proc); 1315 1310 }
Note:
See TracChangeset
for help on using the changeset viewer.