Ignore:
Timestamp:
Mar 28, 2007, 10:29:58 AM (18 years ago)
Author:
イグトランス (egtra)
Message:

Currencyを追加、その他修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • Include/system/string.sbp

    r177 r192  
    3636Function GetStr(psz As PSTR, len As SIZE_T, ByRef wcs As PWSTR) As SIZE_T
    3737    If psz = 0 Then Return 0
    38     Dim sizeWCS = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len, 0, 0) + 1
    39     wcs = _System_AllocForConvertedString(SizeOf (WCHAR) * sizeWCS) As PWSTR
    40     GetStr = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len, wcs, sizeWCS)
     38    Dim lenWCS = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len, 0, 0)
     39    wcs = _System_AllocForConvertedString(SizeOf (WCHAR) * (lenWCS + 1)) As PWSTR
     40    GetStr = MultiByteToWideChar(CP_THREAD_ACP, 0, psz, len, wcs, lenWCS)
    4141    wcs[GetStr] = 0
    4242End Function
     
    7070Function GetStr(psz As PWSTR, len As SIZE_T, ByRef mbs As PSTR) As SIZE_T
    7171    If psz = 0 Then Return 0
    72     Dim sizeMBS = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len, 0, 0, 0, 0)
    73     mbs = _System_AllocForConvertedString(SizeOf (SByte) * (sizeMBS + 1)) As PSTR
    74     GetStr = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len, mbs, sizeMBS, 0, 0) As SIZE_T
     72    Dim lenMBS = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len, 0, 0, 0, 0)
     73    mbs = _System_AllocForConvertedString(SizeOf (SByte) * (lenMBS + 1)) As PSTR
     74    GetStr = WideCharToMultiByte(CP_THREAD_ACP, 0, psz, len, mbs, lenMBS, 0, 0) As SIZE_T
    7575    mbs[GetStr] = 0
    7676End Function
Note: See TracChangeset for help on using the changeset viewer.