16 static LPWSTR A2WHelper(LPWSTR lpw, LPCSTR lpa,
int nChars, UINT acp);
17 static LPSTR W2AHelper(LPSTR lpa, LPCWSTR lpw,
int nChars, UINT acp);
18 static size_t LStrLenW(STRSAFE_LPCWSTR lpw);
25 #define NPT_WINRT_USE_CHAR_CONVERSION int _convert = 0; LPCWSTR _lpw = NULL; LPCSTR _lpa = NULL 27 #define NPT_WINRT_A2W(lpa) (\ 28 ((_lpa = lpa) == NULL) ? NULL : (\ 29 _convert = (int)(strlen(_lpa)+1),\ 30 (INT_MAX/2<_convert)? NULL : \ 31 NPT_WinRtUtils::A2WHelper((LPWSTR) alloca(_convert*sizeof(WCHAR)), _lpa, _convert, CP_UTF8))) 34 #define NPT_WINRT_W2A(lpw) (\ 35 ((_lpw = lpw) == NULL) ? NULL : (\ 36 (_convert = (NPT_WinRtUtils::LStrLenW(_lpw)+2), \ 37 (_convert>INT_MAX/2) ? NULL : \ 38 NPT_WinRtUtils::W2AHelper((LPSTR) alloca(_convert*sizeof(WCHAR)), _lpw, _convert*sizeof(WCHAR), CP_UTF8)))) Definition: NptWinRtUtils.h:13