Ignore:
Timestamp:
Nov 29, 2011, 7:09:34 PM (14 years ago)
Author:
dmik
Message:

Use correct thunk wrappers for 16-bit Win API calls under GCC.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/gcc-kmk/src/user32/oslibkbd.cpp

    r21811 r21834  
    2626#include "dbglocal.h"
    2727
    28 extern "C" {
     28#ifdef __EMX__
     29
     30USHORT _THUNK_FUNCTION (Win16GetScanState) ();
     31USHORT APIENTRY WinGetScanState (HWND hwnd, USHORT vk)
     32{
     33    return ((USHORT)
     34            (_THUNK_PROLOG (4+2);
     35             _THUNK_PASCAL_LONG ((ULONG) hwnd);
     36             _THUNK_PASCAL_SHORT (vk);
     37             _THUNK_PASCAL_CALL (Win16GetScanState)));
     38}
     39
     40USHORT _THUNK_FUNCTION (Win16SetScanStateTable) ();
     41USHORT APIENTRY WinSetScanStateTable (HWND hwnd, PUCHAR pTable, BOOL bFlag)
     42{
     43    return ((USHORT)
     44            (_THUNK_PROLOG (4+4+4);
     45            _THUNK_PASCAL_LONG ((ULONG) hwnd);
     46             _THUNK_PASCAL_FLAT ((void *) pTable);
     47             _THUNK_PASCAL_LONG (bFlag);
     48             _THUNK_PASCAL_CALL (Win16SetScanStateTable)));
     49}
     50
     51#else
    2952
    3053SHORT APIENTRY16 WinGetScanState( HWND, USHORT );
    3154BOOL  APIENTRY16 WinSetScanStateTable(HWND,unsigned char *,BOOL);
    3255
    33 } // extern "C"
     56#endif
    3457
    3558//******************************************************************************
Note: See TracChangeset for help on using the changeset viewer.