Strange. Is your system supported? Have you a modern compiler?
I've just compiled the example found in StringCchPrintf documentation, namely
#include <Windows.h>
#include <strsafe.h>
int main()
{
TCHAR pszDest[30];
size_t cchDest = 30;
LPCTSTR pszFormat = TEXT("%s %d + %d = %d.");
TCHAR* pszTxt = TEXT("The answer is");
HRESULT hr = StringCchPrintf(pszDest, cchDest, pszFormat, pszTxt, 1, 2, 3);
}
without problems on my Windows 8, 64 bit system, using Visual Studio 2012.