Changeset 705 for trunk/src/kernel32/wprocess.cpp
- Timestamp:
- Aug 26, 1999, 2:56:02 PM (26 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/wprocess.cpp
r678 r705 1 /* $Id: wprocess.cpp,v 1.2 8 1999-08-25 10:28:41sandervl Exp $ */1 /* $Id: wprocess.cpp,v 1.29 1999-08-26 12:55:38 sandervl Exp $ */ 2 2 3 3 /* … … 24 24 25 25 #include "exceptutil.h" 26 #include "os 2util.h"26 #include "oslibmisc.h" 27 27 28 28 #include "console.h" … … 75 75 76 76 //Allocate one dword to store the flat address of our TEB 77 TIBFlatPtr = (DWORD *)OS 2AllocThreadLocalMemory(1);77 TIBFlatPtr = (DWORD *)OSLibAllocThreadLocalMemory(1); 78 78 if(TIBFlatPtr == 0) { 79 79 dprintf(("InitializeTIB: local thread memory alloc failed!!")); … … 81 81 return NULL; 82 82 } 83 if(OS 2AllocSel(PAGE_SIZE, &tibsel) == FALSE)83 if(OSLibAllocSel(PAGE_SIZE, &tibsel) == FALSE) 84 84 { 85 85 dprintf(("InitializeTIB: selector alloc failed!!")); … … 87 87 return NULL; 88 88 } 89 winteb = (TEB *)OS 2SelToFlat(tibsel);89 winteb = (TEB *)OSLibSelToFlat(tibsel); 90 90 if(winteb == NULL) 91 91 { … … 99 99 100 100 winteb->except = (PVOID)-1; /* 00 Head of exception handling chain */ 101 winteb->stack_top = (PVOID)OS 2GetTIB(TIB_STACKTOP); /* 04 Top of thread stack */102 winteb->stack_low = (PVOID)OS 2GetTIB(TIB_STACKLOW); /* 08 Stack low-water mark */103 winteb->htask16 = (USHORT)OS 2GetPIB(PIB_TASKHNDL); /* 0c Win16 task handle */101 winteb->stack_top = (PVOID)OSLibGetTIB(TIB_STACKTOP); /* 04 Top of thread stack */ 102 winteb->stack_low = (PVOID)OSLibGetTIB(TIB_STACKLOW); /* 08 Stack low-water mark */ 103 winteb->htask16 = (USHORT)OSLibGetPIB(PIB_TASKHNDL); /* 0c Win16 task handle */ 104 104 winteb->stack_sel = getSS(); /* 0e 16-bit stack selector */ 105 105 winteb->self = winteb; /* 18 Pointer to this structure */ … … 115 115 thdb->OrgTIBSel = GetFS(); 116 116 117 if(OS 2GetPIB(PIB_TASKTYPE) == TASKTYPE_PM)117 if(OSLibGetPIB(PIB_TASKTYPE) == TASKTYPE_PM) 118 118 { 119 119 thdb->flags = 0; //todo gui … … 153 153 154 154 //And free our own 155 OS 2FreeSel(thdb->teb_sel);155 OSLibFreeSel(thdb->teb_sel); 156 156 } 157 157 else dprintf(("Already destroyed TIB")); … … 210 210 delete(WinExe); 211 211 212 CheckVersion(Pe2lxVersion, OS 2GetDllName(hinstance));212 CheckVersion(Pe2lxVersion, OSLibGetDllName(hinstance)); 213 213 214 214 if(getenv("WIN32_IOPL2")) { … … 265 265 io_init1(); 266 266 } 267 name = OS 2GetDllName(hinstance);267 name = OSLibGetDllName(hinstance); 268 268 CheckVersion(Pe2lxVersion, name); 269 269 … … 362 362 return(TRUE); 363 363 } 364 dprintf(("KERNEL32: FreeLibrary %s %X\n", OS 2GetDllName(hinstance), hinstance));364 dprintf(("KERNEL32: FreeLibrary %s %X\n", OSLibGetDllName(hinstance), hinstance)); 365 365 366 366 //TODO: Not thread safe … … 435 435 if (hDll == 0) 436 436 { 437 PSZpszName;437 char * pszName; 438 438 439 439 // remove path from the image name 440 pszName = strrchr(( PSZ)lpszLibFile,440 pszName = strrchr((char *)lpszLibFile, 441 441 '\\'); 442 442 if (pszName != NULL) … … 602 602 DWORD rc; 603 603 604 dprintf(("KERNEL32: OS 2GetModuleFileNameW\n"));604 dprintf(("KERNEL32: OSLibGetModuleFileNameW\n")); 605 605 rc = GetModuleFileNameA(hModule, asciifilename, nSize); 606 606 if(rc) AsciiToUnicode(asciifilename, lpFileName); … … 623 623 } 624 624 else { 625 strcpy(szModule, StripPath((char *)lpszModule));625 strcpy(szModule, OSLibStripPath((char *)lpszModule)); 626 626 strupr(szModule); 627 627 if(strstr(szModule, ".DLL")) { … … 647 647 hMod = windll->getInstanceHandle(); 648 648 } 649 else hMod = OS 2iGetModuleHandleA( (PSZ)lpszModule);649 else hMod = OSLibiGetModuleHandleA((char *)lpszModule); 650 650 } 651 651 } … … 754 754 755 755 dprintf(("GetVersionStruct")); 756 hinstance = OS 2QueryModuleHandle(modname);756 hinstance = OSLibQueryModuleHandle(modname); 757 757 if(hinstance == 0) { 758 758 dprintf(("GetVersionStruct can't find handle for %s\n", modname)); … … 773 773 return(FALSE); 774 774 } 775 return OS 2GetResource(hinstance, winimage->getVersionId(), verstruct, bufLength);775 return OSLibGetResource(hinstance, winimage->getVersionId(), verstruct, bufLength); 776 776 } 777 777 //****************************************************************************** … … 783 783 784 784 dprintf(("GetVersionSize of %s\n", modname)); 785 hinstance = OS 2QueryModuleHandle(modname);785 hinstance = OSLibQueryModuleHandle(modname); 786 786 if(hinstance == 0) { 787 787 dprintf(("GetVersionSize can't find handle for %s\n", modname)); … … 803 803 return(FALSE); 804 804 } 805 ULONG size = OS 2GetResourceSize(hinstance, winimage->getVersionId());805 ULONG size = OSLibGetResourceSize(hinstance, winimage->getVersionId()); 806 806 807 807 dprintf(("Version resource size = %d, id %d\n", size, winimage->getVersionId()));
Note:
See TracChangeset
for help on using the changeset viewer.