- Timestamp:
- Oct 5, 1999, 12:25:02 AM (26 years ago)
- Location:
- trunk/src/kernel32
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kernel32/KERNEL32.CPP
r1009 r1134 1 /* $Id: KERNEL32.CPP,v 1.2 0 1999-09-22 11:27:48 sandervlExp $ */1 /* $Id: KERNEL32.CPP,v 1.21 1999-10-04 22:25:01 phaller Exp $ */ 2 2 3 3 /* … … 654 654 } 655 655 //****************************************************************************** 656 //TODO:What does this do exactly??657 // @@@OPH -> see WINE658 //******************************************************************************659 BOOL WIN32API DisableThreadLibraryCalls(HMODULE hLibModule)660 {661 dprintf(("KERNEL32: (NI!)OS2DisableThreadLibraryCalls of %X\n", hLibModule));662 return(TRUE);663 }664 //******************************************************************************665 656 //****************************************************************************** 666 657 //TODO: Query processor info to complete this api -
trunk/src/kernel32/windllbase.cpp
r956 r1134 1 /* $Id: windllbase.cpp,v 1. 1 1999-09-15 23:39:07 sandervlExp $ */1 /* $Id: windllbase.cpp,v 1.2 1999-10-04 22:25:02 phaller Exp $ */ 2 2 3 3 /* … … 38 38 //****************************************************************************** 39 39 //****************************************************************************** 40 Win32DllBase::Win32DllBase(HINSTANCE hinstance, WIN32DLLENTRY DllEntryPoint) 40 Win32DllBase::Win32DllBase(HINSTANCE hinstance, WIN32DLLENTRY DllEntryPoint) 41 41 : Win32ImageBase(hinstance), 42 referenced(0), fSkipEntryCalls(FALSE), 42 referenced(0), fSkipEntryCalls(FALSE), 43 43 fAttachedToProcess(FALSE), fUnloaded(FALSE) 44 44 { … … 60 60 dprintf(("Win32DllBase::~Win32DllBase %s", szModule)); 61 61 62 if(errorState == NO_ERROR && !fUnloaded) 62 if(errorState == NO_ERROR && !fUnloaded) 63 63 { 64 64 detachProcess(); … … 86 86 //****************************************************************************** 87 87 ULONG Win32DllBase::Release() 88 { 88 { 89 89 ULONG ret = --referenced; 90 90 … … 105 105 if(fAttachedToProcess) 106 106 return TRUE; 107 107 108 108 fAttachedToProcess = TRUE; 109 109 … … 341 341 //****************************************************************************** 342 342 //****************************************************************************** 343 void Win32DllBase::setThreadLibraryCalls(BOOL fEnable) 344 { 345 // if fEnable == true, do call the ATTACH_THREAD, DETACH_THREAD functions 346 // if fEnable == false, do not call the ATTACH_THREAD, DETACH_THREAD functions 347 fSkipEntryCalls = !fEnable; 348 } 349 350 //****************************************************************************** 351 //****************************************************************************** 343 352 Win32DllBase *Win32DllBase::head = NULL; -
trunk/src/kernel32/wprocess.cpp
r1118 r1134 1 /* $Id: wprocess.cpp,v 1.3 4 1999-10-04 09:55:57 sandervlExp $ */1 /* $Id: wprocess.cpp,v 1.35 1999-10-04 22:25:01 phaller Exp $ */ 2 2 3 3 /* … … 10 10 * 11 11 */ 12 #include <odin.h> 13 #include <odinwrap.h> 12 14 #include <os2win.h> 13 15 #include <stdio.h> … … 33 35 #include "mmap.h" 34 36 37 38 ODINDEBUGCHANNEL(KERNEL32-WPROCESS) 39 40 41 //****************************************************************************** 42 //****************************************************************************** 35 43 BOOL fFreeLibrary = FALSE; 36 44 … … 299 307 } 300 308 301 if(Win32ImageBase::isPEImage((char *)modname)) 309 if(Win32ImageBase::isPEImage((char *)modname)) 302 310 { 303 311 module = Win32DllBase::findModule((char *)modname); … … 499 507 } 500 508 //****************************************************************************** 501 //NOTE: GetModuleHandleA does NOT support files with multiple dots (i.e. 509 //NOTE: GetModuleHandleA does NOT support files with multiple dots (i.e. 502 510 // very.weird.exe) 503 511 //****************************************************************************** … … 522 530 else { 523 531 if(!strstr(szModule, ".")) { 524 //if there's no extension or trainling dot, we 532 //if there's no extension or trainling dot, we 525 533 //assume it's a dll (see Win32 SDK docs) 526 534 fDllModule = TRUE; … … 702 710 } 703 711 712 //****************************************************************************** 713 //TODO:What does this do exactly?? 714 //****************************************************************************** 715 ODINFUNCTION1(BOOL,DisableThreadLibraryCalls,HMODULE,hModule) 716 { 717 Win32DllBase *winmod; 718 FARPROC proc; 719 ULONG ulAPIOrdinal; 720 721 winmod = Win32DllBase::findModule((HINSTANCE)hModule); 722 if(winmod) 723 { 724 // don't call ATTACH/DETACH thread functions in DLL 725 winmod->setThreadLibraryCalls(FALSE); 726 return TRUE; 727 } 728 else 729 { 730 // raise error condition 731 SetLastError(ERROR_INVALID_HANDLE); 732 return FALSE; 733 } 734 } 735
Note:
See TracChangeset
for help on using the changeset viewer.