Ignore:
Timestamp:
Jul 29, 2001, 9:02:35 PM (24 years ago)
Author:
sandervl
Message:

custom build updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/custombuild/guid.c

    r6374 r6401  
    1 /* $Id: guid.c,v 1.1 2001-07-20 15:41:43 sandervl Exp $ */
     1/* $Id: guid.c,v 1.2 2001-07-29 19:02:35 sandervl Exp $ */
    22#define ICOM_CINTERFACE 1
    33#include <odin.h>
     
    5151    return towupper(*str1) - towupper(*str2);
    5252}
     53
     54/*********************************************************************
     55 *           wcstombs    (NTDLL.@)
     56 */
     57INT __cdecl NTDLL_wcstombs( LPSTR dst, LPCWSTR src, INT n )
     58{
     59    INT ret;
     60    if (n <= 0) return 0;
     61    ret = WideCharToMultiByte( CP_ACP, 0, src, -1, dst, dst ? n : 0, NULL, NULL );
     62    if (!ret) return n;  /* overflow */
     63    return ret - 1;  /* do not count terminating NULL */
     64}
     65
     66/*********************************************************************
     67 *           _wtol    (NTDLL.@)
     68 * Like atol, but for wide character strings.
     69 */
     70LONG __cdecl _wtol(LPWSTR string)
     71{
     72    char buffer[30];
     73    NTDLL_wcstombs( buffer, string, sizeof(buffer) );
     74    return atol( buffer );
     75}
     76
     77/*********************************************************************
     78 *           _wtoi    (NTDLL.@)
     79 */
     80INT __cdecl _wtoi(LPWSTR string)
     81{
     82    return _wtol(string);
     83}
Note: See TracChangeset for help on using the changeset viewer.