Ignore:
Timestamp:
Oct 5, 1999, 12:25:02 AM (26 years ago)
Author:
phaller
Message:

Fix: DisableThreadLibraryCalls added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/wprocess.cpp

    r1118 r1134  
    1 /* $Id: wprocess.cpp,v 1.34 1999-10-04 09:55:57 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.35 1999-10-04 22:25:01 phaller Exp $ */
    22
    33/*
     
    1010 *
    1111 */
     12#include <odin.h>
     13#include <odinwrap.h>
    1214#include <os2win.h>
    1315#include <stdio.h>
     
    3335#include "mmap.h"
    3436
     37
     38ODINDEBUGCHANNEL(KERNEL32-WPROCESS)
     39
     40
     41//******************************************************************************
     42//******************************************************************************
    3543BOOL      fFreeLibrary = FALSE;
    3644
     
    299307  }
    300308
    301   if(Win32ImageBase::isPEImage((char *)modname)) 
     309  if(Win32ImageBase::isPEImage((char *)modname))
    302310  {
    303311        module = Win32DllBase::findModule((char *)modname);
     
    499507}
    500508//******************************************************************************
    501 //NOTE: GetModuleHandleA does NOT support files with multiple dots (i.e. 
     509//NOTE: GetModuleHandleA does NOT support files with multiple dots (i.e.
    502510//      very.weird.exe)
    503511//******************************************************************************
     
    522530        else {
    523531                if(!strstr(szModule, ".")) {
    524                         //if there's no extension or trainling dot, we 
     532                        //if there's no extension or trainling dot, we
    525533                        //assume it's a dll (see Win32 SDK docs)
    526534                        fDllModule = TRUE;
     
    702710}
    703711
     712//******************************************************************************
     713//TODO:What does this do exactly??
     714//******************************************************************************
     715ODINFUNCTION1(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.