Changeset 21953 for trunk/src


Ignore:
Timestamp:
Jan 31, 2012, 10:16:33 PM (14 years ago)
Author:
dmik
Message:

Add a bunch of Win32 API stubs needed for Flash above 10.0.45.

This is mainly to prevent the plugin from hitting the breakpoints in
the debug version of Odin. These APIs seem to be only referenced
by some of the libraries built in to the Win32 plugin DLL but never
actually called at runtime. This is why the release version of Odin
does not complain and Flash actually works w/o them at all.

Location:
trunk/src
Files:
8 edited

Legend:

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

    r21916 r21953  
    1818#include <dbgwrap.h>
    1919
    20 extern "C" {
    21 
    2220BOOL WINAPI TryEnterCriticalSection( CRITICAL_SECTION *crit );
    2321void WINAPI ReinitializeCriticalSection( CRITICAL_SECTION *crit );
     
    2624BOOL WINAPI CloseProfileUserMapping(void);
    2725BOOL WINAPI OpenProfileUserMapping(void);
     26
     27HANDLE WIN32API OpenThread(DWORD dwDesiredAccess,
     28                           BOOL bInheritHandle,
     29                           DWORD dwThreadId);
    2830
    2931LPVOID WIN32API CreateFiber( DWORD dwStackSize,
     
    687689DEBUGWRAP28(CreateRemoteThread);
    688690DEBUGWRAP24(CreateThread);
     691DEBUGWRAP12(OpenThread);
    689692DEBUGWRAP4(ExitThread);
    690693DEBUGWRAP_LVL2_0(GetCurrentThread);
     
    702705DEBUGWRAP8(SetThreadPriority);
    703706DEBUGWRAP8(SetThreadPriorityBoost);
     707DEBUGWRAP12(QueueUserAPC);
    704708DEBUGWRAP4(SuspendThread);
    705709DEBUGWRAP8(TerminateThread);
     
    951955DEBUGWRAP_LVL2_12(OemToCharBuffW)
    952956DEBUGWRAP_LVL2_8(OemToCharW)
    953 
    954 } // extern "C"
  • trunk/src/kernel32/kernel32.def

    r21919 r21953  
    257257     CreateTapePartition        = "_CreateTapePartition@16"        @177
    258258     CreateThread               = "_CreateThread@24"               @178
     259     OpenThread                 = "_OpenThread@12"                 @1049
    259260;;;;     CreateToolhelp32Snapshot   = _CreateToolhelp32Snapshot@8      @179  ;W95
    260261;    CreateVirtualBuffer        = _CreateVirtualBuffer@??          @68   ;NT
     
    701702    QueryPerformanceFrequency  = "_QueryPerformanceFrequency@4" @565
    702703;   QueryWin31IniFilesMappedToRegistry = _QueryWin31IniFilesMappedToRegistry@?? ;NT
    703 ;   QueueUserAPC               = _QueueUserAPC@??            @566
     704    QueueUserAPC               = "_QueueUserAPC@12"          @566
    704705    RaiseException             = "_RaiseException@16"        @567
    705706    ReadConsoleA               = "_ReadConsoleA@20"          @568
  • trunk/src/kernel32/kernel32dbg.def

    r21916 r21953  
    257257     CreateTapePartition        = "_DbgCreateTapePartition@16"        @177
    258258     CreateThread               = "_DbgCreateThread@24"               @178
     259     OpenThread                 = "_DbgOpenThread@12"                 @1049
    259260;;;;     CreateToolhelp32Snapshot   = _DbgCreateToolhelp32Snapshot@8      @179  ;W95
    260261;    CreateVirtualBuffer        = _DbgCreateVirtualBuffer@??          @68   ;NT
     
    701702    QueryPerformanceFrequency  = "_DbgQueryPerformanceFrequency@4" @565
    702703;   QueryWin31IniFilesMappedToRegistry = _DbgQueryWin31IniFilesMappedToRegistry@?? ;NT
    703 ;   QueueUserAPC               = _DbgQueueUserAPC@??            @566
     704    QueueUserAPC               = "_DbgQueueUserAPC@12"          @566
    704705    RaiseException             = "_DbgRaiseException@16"        @567
    705706    ReadConsoleA               = "_DbgReadConsoleA@20"          @568
  • trunk/src/kernel32/thread.cpp

    r21932 r21953  
    5353
    5454// borrowed from ntddk.h
    55 extern "C"
    5655void WINAPI RtlUnwind(
    5756        PEXCEPTION_FRAME,
     
    6160//******************************************************************************
    6261//******************************************************************************
    63 extern "C"
    6462HANDLE WIN32API CreateThread(LPSECURITY_ATTRIBUTES  lpsa,
    6563                             DWORD                  cbStack,
     
    116114  return pHandle->hmHandleData.hWin32Handle;
    117115}
    118 
    119 extern "C" {
    120 
     116/*****************************************************************************
     117 *****************************************************************************/
     118HANDLE WIN32API OpenThread(DWORD dwDesiredAccess, BOOL bInheritHandle, DWORD dwThreadId)
     119{
     120    dprintf(("KERNEL32: OpenThread(%08xh, %08xh, %08xh) not implemented\n",
     121             dwDesiredAccess, bInheritHandle, dwThreadId));
     122    return NULL;
     123}
    121124/*****************************************************************************
    122125 * Name      : HMGetThreadPriority
     
    375378}
    376379
    377 } // extern "C"
    378 
    379380/*****************************************************************************
    380381 * Name      : HMSetThreadTerminated
     
    404405  return (lpResult);                                  /* deliver return code */
    405406}
    406 
    407 extern "C" {
    408407
    409408//******************************************************************************
     
    664663  return FALSE;
    665664}
    666 
    667 } // extern "C"
     665//******************************************************************************
     666//******************************************************************************
     667DWORD WIN32API QueueUserAPC(PAPCFUNC func, HANDLE hthread, ULONG_PTR data)
     668{
     669    dprintf(("KERNEL32: QueueUserAPC(%08xh, %08xh, %08xh) not implemented\n",
     670             func, hthread, data));
     671    return 0;
     672}
    668673
    669674//******************************************************************************
  • trunk/src/user32/dbgwrap.cpp

    r21916 r21953  
    146146LRESULT WINAPI EditWndProcA( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam );
    147147
     148BOOL WIN32API UpdateLayeredWindow(HWND hwnd, HDC hdcDst, POINT *pptDst,SIZE *psize,
     149                                  HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend,
     150                                  DWORD dwFlags);
     151
    148152
    149153DEBUGWRAP12(AttachThreadInput)
     
    258262DEBUGWRAP4(WINNLSGetIMEHotkey)
    259263
     264DEBUGWRAP36(UpdateLayeredWindow)
    260265
    261266
  • trunk/src/user32/user32.def

    r21949 r21953  
    767767    "_GetOS2Icon@4"                                              @2045 NONAME
    768768
    769 ; used for Flash plugin
    770769    GetWindowInfo = "_GetWindowInfo@8"                           @2046
    771770    _HPSToHDC                                                    @2047
     
    773772    "_RunOnAuxThread@20"                                         @2048 NONAME
    774773    "_RunOnAuxThreadAndWait@24"                                  @2049 NONAME
     774
     775    UpdateLayeredWindow = "_UpdateLayeredWindow@36"              @2050
  • trunk/src/user32/user32dbg.def

    r21949 r21953  
    763763    "_GetOS2Icon@4"                                              @2045 NONAME
    764764
    765 ; used for Flash plugin
    766765    GetWindowInfo = "_GetWindowInfo@8"                           @2046
    767766    _HPSToHDC                                                    @2047
     
    769768    "_RunOnAuxThread@20"                                         @2048 NONAME
    770769    "_RunOnAuxThreadAndWait@24"                                  @2049 NONAME
     770
     771    UpdateLayeredWindow = "_DbgUpdateLayeredWindow@36"           @2050
     772
  • trunk/src/user32/window.cpp

    r21916 r21953  
    467467
    468468    return TRUE;
     469}
     470/*****************************************************************************
     471 *              UpdateLayeredWindow (USER32.@)
     472 */
     473BOOL WIN32API UpdateLayeredWindow(HWND hwnd, HDC hdcDst, POINT *pptDst,SIZE *psize,
     474                                  HDC hdcSrc, POINT *pptSrc, COLORREF crKey, BLENDFUNCTION *pblend,
     475                                  DWORD dwFlags)
     476{
     477    dprintf(("USER32: UpdateLayeredWindow(%08xh, %08xh, %08xh, %08xh, %08xh, "
     478             "%08xh, %08xh, %08xh, %08xh) not implemented\n",
     479             hwnd, hdcDst, pptDst, psize, hdcSrc, pptSrc, crKey, pblend, dwFlags));
     480    return FALSE;
    469481}
    470482
Note: See TracChangeset for help on using the changeset viewer.