Changeset 21953 for trunk/src/kernel32


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/kernel32
Files:
4 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//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.