formatting for localization (uses FormatMessage API) formatting (using FormatMessage style formatting)
| 1969 | // formatting for localization (uses FormatMessage API) |
| 1970 | // formatting (using FormatMessage style formatting) |
| 1971 | BOOL __cdecl FormatMessage(LPCTSTR lpszFormat, ...) |
| 1972 | { |
| 1973 | // format message into temporary buffer lpszTemp |
| 1974 | va_list argList; |
| 1975 | va_start(argList, lpszFormat); |
| 1976 | LPTSTR lpszTemp; |
| 1977 | BOOL bRet = TRUE; |
| 1978 | |
| 1979 | if (::FormatMessage(FORMAT_MESSAGE_FROM_STRING | FORMAT_MESSAGE_ALLOCATE_BUFFER, |
| 1980 | lpszFormat, 0, 0, (LPTSTR)&lpszTemp, 0, &argList) == 0 || lpszTemp == NULL) |
| 1981 | bRet = FALSE; |
| 1982 | |
| 1983 | // assign lpszTemp into the resulting string and free the temporary |
| 1984 | *this = lpszTemp; |
| 1985 | LocalFree(lpszTemp); |
| 1986 | va_end(argList); |
| 1987 | return bRet; |
| 1988 | } |
| 1989 | |
| 1990 | BOOL __cdecl FormatMessage(UINT nFormatID, ...) |
| 1991 | { |
nothing calls this directly
no test coverage detected