Ignore:
Timestamp:
Jul 3, 2001, 8:33:28 PM (24 years ago)
Author:
sandervl
Message:

ToAscii fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/user32/user32.cpp

    r6082 r6156  
    1 /* $Id: user32.cpp,v 1.103 2001-06-23 09:14:06 sandervl Exp $ */
     1/* $Id: user32.cpp,v 1.104 2001-07-03 18:33:27 sandervl Exp $ */
    22
    33/*
     
    10361036    nlen = 0;
    10371037  size = sizeof(WINHELP) + nlen + dsize;
    1038   hwh = GlobalAlloc(0,size);
     1038#if 1
     1039  hwh = GlobalAlloc(GMEM_SHARE,size);
    10391040  lpwh = (WINHELP*)GlobalLock(hwh);
     1041#else
     1042  hwh  = (HANDLE)_smalloc(size);
     1043  lpwh = (WINHELP*)hwh;
     1044#endif
    10401045  lpwh->size = size;
    10411046  lpwh->command = uCommand;
     
    13221327}
    13231328/*****************************************************************************
    1324  * Name      : int WIN32API ToUnicode
    1325  * Purpose   : The ToUnicode function translates the specified virtual-key code
    1326  *             and keyboard state to the corresponding Unicode character or characters.
    1327  * Parameters: UINT   wVirtKey   virtual-key code
    1328  *             UINT   wScanCode  scan code
    1329  *             PBYTE  lpKeyState address of key-state array
    1330  *             LPWSTR pwszBuff   buffer for translated key
    1331  *             int    cchBuff    size of translated key buffer
    1332  *             UINT   wFlags     set of function-conditioning flags
    1333  * Variables :
    1334  * Result    : - 1 The specified virtual key is a dead-key character (accent or
    1335  *                 diacritic). This value is returned regardless of the keyboard
    1336  *                 layout, even if several characters have been typed and are
    1337  *                 stored in the keyboard state. If possible, even with Unicode
    1338  *                 keyboard layouts, the function has written a spacing version of
    1339  *                 the dead-key character to the buffer specified by pwszBuffer.
    1340  *                 For example, the function writes the character SPACING ACUTE
    1341  *                 (0x00B4), rather than the character NON_SPACING ACUTE (0x0301).
    1342  *               0 The specified virtual key has no translation for the current
    1343  *                 state of the keyboard. Nothing was written to the buffer
    1344  *                 specified by pwszBuffer.
    1345  *               1 One character was written to the buffer specified by pwszBuffer.
    1346  *       2 or more Two or more characters were written to the buffer specified by
    1347  *                 pwszBuff. The most common cause for this is that a dead-key
    1348  *                 character (accent or diacritic) stored in the keyboard layout
    1349  *                 could not be combined with the specified virtual key to form a
    1350  *                 single character.
    1351  * Remark    :
    1352  * Status    : UNTESTED STUB
    1353  *
    1354  * Author    : Patrick Haller [Thu, 1998/02/26 11:55]
    1355  *****************************************************************************/
    1356 int WIN32API ToUnicode(UINT   uVirtKey,
    1357                           UINT   uScanCode,
    1358                           PBYTE  lpKeyState,
    1359                           LPWSTR pwszBuff,
    1360                           int    cchBuff,
    1361                           UINT   wFlags)
    1362 {
    1363   dprintf(("USER32:ToUnicode (%u,%u,%08xh,%08xh,%u,%08x) not implemented.\n",
    1364          uVirtKey,
    1365          uScanCode,
    1366          lpKeyState,
    1367          pwszBuff,
    1368          cchBuff,
    1369          wFlags));
    1370 
    1371   return (0);
    1372 }
    1373 /*****************************************************************************
    13741329 * Name      : BOOL WIN32API UnloadKeyboardLayout
    13751330 * Purpose   : The UnloadKeyboardLayout function removes a keyboard layout.
Note: See TracChangeset for help on using the changeset viewer.