Ignore:
Timestamp:
Aug 14, 2006, 6:55:06 AM (19 years ago)
Author:
bird
Message:

hacking on keyboard stuff.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/synergy/lib/platform/CPMUtil.cpp

    r2761 r2765  
    33 * Copyright (C) 2004 Chris Schoeneman
    44 * Copyright (C) 2006 Knut St. Osmundsen
    5  * 
     5 *
    66 * This package is free software; you can redistribute it and/or
    77 * modify it under the terms of the GNU General Public License
    88 * found in the file COPYING that should have accompanied this file.
    9  * 
     9 *
    1010 * This package is distributed in the hope that it will be useful,
    1111 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     
    6767                return result;
    6868        }
    69 #endif 
     69#endif
    7070}
    7171
     
    8383}
    8484
     85
     86/** dynamic resolver */
     87USHORT APIENTRY WinTranslateChar2(USHORT  usCodePage,
     88                                  PUSHORT pusCharInOut,
     89                                  PULONG  pulDeadKeyInfo,
     90                                  WINTCOP enmOperation,
     91                                  PUSHORT pfShiftState)
     92{
     93    static USHORT (* APIENTRY pfnWinTranslateChar2)(USHORT, PUSHORT, PULONG, WINTCOP, PUSHORT) = NULL;
     94    if (!pfnWinTranslateChar2) {
     95        /* resolve it */
     96        HMODULE hmod;
     97        if (    DosLoadModule(NULL, 0, (PCSZ)"PMWIN", &hmod) != NO_ERROR
     98            ||  DosQueryProcAddr(hmod, 1070, NULL, (PPFN)&pfnWinTranslateChar2) != NO_ERROR) {
     99            asm("int3");
     100            *pusCharInOut = 0;
     101            return 0;
     102        }
     103        DosFreeModule(hmod);
     104    }
     105    return pfnWinTranslateChar2(usCodePage, pusCharInOut, pulDeadKeyInfo, enmOperation, pfShiftState);
     106}
     107
Note: See TracChangeset for help on using the changeset viewer.