Changeset 22039


Ignore:
Timestamp:
Oct 25, 2012, 10:36:15 AM (8 years ago)
Author:
dmik
Message:

kernel32: Add RegisterDummyExeEx?.

This differs from RegisterDummyExe? in that it also allows to specify a
resource tree to simulate the resource section of the real executable.

Location:
trunk
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/odinlx.h

    r21999 r22039  
    6464//******************************************************************************
    6565BOOL WIN32API RegisterDummyExe(LPSTR pszExeName);
     66BOOL WIN32API RegisterDummyExeEx(LPSTR pszExeName, PVOID pResData);
    6667BOOL WIN32API IsDummyExeLoaded();
    6768
  • trunk/src/kernel32/kernel32.def

    r22035 r22039  
    11141114    "_RegisterDummyExe@4"                                         @1249
    11151115    "_IsDummyExeLoaded@0"                                         @1250 NONAME
     1116    "_RegisterDummyExeEx@8"                                       @1257
    11161117
    11171118;version functions
  • trunk/src/kernel32/kernel32dbg.def

    r22035 r22039  
    11171117    "_RegisterDummyExe@4"                                         @1249
    11181118    "_IsDummyExeLoaded@0"                                         @1250 NONAME
     1119    "_RegisterDummyExeEx@8"                                       @1257
    11191120
    11201121;version functions
  • trunk/src/kernel32/winexedummy.cpp

    r21916 r22039  
    3434BOOL WIN32API RegisterDummyExe(LPSTR pszExeName)
    3535{
    36     if(WinExe != NULL)
     36    return RegisterDummyExeEx (pszExeName, NULL);
     37}
     38//******************************************************************************
     39//******************************************************************************
     40BOOL WIN32API RegisterDummyExeEx(LPSTR pszExeName, PVOID pResData)
     41{
     42    if(WinExe != NULL)
    3743        return TRUE;
    3844
    3945    Win32DummyExe *winexe;
    4046
    41     winexe = new Win32DummyExe(pszExeName);
     47    winexe = new Win32DummyExe(pszExeName, pResData);
    4248
    4349    if(winexe) {
     
    6167//******************************************************************************
    6268//******************************************************************************
    63 Win32DummyExe::Win32DummyExe(LPSTR pszExeName)
     69Win32DummyExe::Win32DummyExe(LPSTR pszExeName, PVOID pResData)
    6470                 : Win32ImageBase(-1),
    6571                   Win32ExeBase(-1), header(0)
     
    7076    strcpy(szFileName, pszExeName);
    7177    setFullPath(pszExeName);
     78
     79    //Pointer to PE resource tree generates by wrc (or NULL for system dlls)
     80    pResRootDir = (PIMAGE_RESOURCE_DIRECTORY)pResData;
    7281}
    7382//******************************************************************************
  • trunk/src/kernel32/winexedummy.h

    r21916 r22039  
    2121{
    2222public:
    23          Win32DummyExe(LPSTR pszExeName);
     23         Win32DummyExe(LPSTR pszExeName, PVOID pResData);
    2424virtual ~Win32DummyExe();
    2525
Note: See TracChangeset for help on using the changeset viewer.