_vstprintf is the TCHAR version of vsprintf resp. vswprintf in VC
int _vstprintf(TCHAR *buffer, const TCHAR *format, va_list argptr);
and has 3 parameters.
The Pelles C replacements are
int _vsnwprintf(wchar_t * restrict dst, size_t max, const char * restrict format, va_list arg);
int vsnprintf(char * restrict dst, size_t max, const char * restrict format, va_list argptr);
with 4 parameters.
Example:
#include <windows.h>
#include <stdio.h>
#include <tchar.h>
void Msg(LPCTSTR pszFormat, ...)
{
va_list argList;
va_start(argList, pszFormat);
TCHAR sz[1024];
_vstprintf(sz, pszFormat, argList);
va_end(argList);
MessageBox(NULL, sz, _T("Pop Msg"), MB_OK);
}
int tmain(int argc, char *argv[])
{
Msg(_T("%d\n"), 5);
return 0;
}