Ignore:
Timestamp:
Jan 11, 2004, 1:12:34 PM (22 years ago)
Author:
sandervl
Message:

update

File:
1 edited

Legend:

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

    r10378 r10380  
    1 /* $Id: wprocess.cpp,v 1.189 2004-01-11 11:59:04 sandervl Exp $ */
     1/* $Id: wprocess.cpp,v 1.190 2004-01-11 12:12:34 sandervl Exp $ */
    22
    33/*
     
    24532453//******************************************************************************
    24542454//******************************************************************************
     2455UINT WIN32API GetProcModuleFileNameA(ULONG lpvAddress, LPSTR lpszFileName, UINT cchFileNameMax)
     2456{
     2457    LPSTR lpszModuleName;
     2458    Win32ImageBase *image = NULL;
     2459    int len;
     2460
     2461    dprintf(("GetProcModuleFileNameA %x %x %d", lpvAddress, lpszFileName, cchFileNameMax));
     2462
     2463    if(WinExe && WinExe->insideModule(lpvAddress) && WinExe->insideModuleCode(lpvAddress)) {
     2464        image = WinExe;
     2465    }
     2466    else {
     2467        Win32DllBase *dll = Win32DllBase::findModuleByAddr(lpvAddress);
     2468        if(dll && dll->insideModuleCode(lpvAddress)) {
     2469            image = dll;
     2470        }
     2471    }
     2472    if(image == NULL) {
     2473        dprintf(("GetProcModuleFileNameA: address not found!!"));
     2474        return 0;
     2475    }
     2476    len = strlen(image->getFullPath());
     2477    if(len < cchFileNameMax) {
     2478        strcpy(lpszFileName, image->getFullPath());
     2479        return len+1; //??
     2480    }
     2481    else {
     2482        dprintf(("GetProcModuleFileNameA: destination string too small!!"));
     2483        return 0;
     2484    }
     2485}
     2486//******************************************************************************
     2487//******************************************************************************
    24552488BOOL WIN32API DisableThreadLibraryCalls(HMODULE hModule)
    24562489{
Note: See TracChangeset for help on using the changeset viewer.