Re: Using strsafe.h and va_list

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Nikolaos D. Bougalis (nikb_at_webmaster.com)
Date: 05/26/04


Date: Tue, 25 May 2004 19:57:13 -0700

newscorrespondent@charter.net wrote:

> Does this mean there is no way to do this without first putting these in
> some type of function? I don't understand why this kind of effort
> contributes to security?
>
> Tom G.

        Sure there is -- just not with the function you used. Try
StringCchPrintf. From the MSDN docs:

HRESULT StringCchPrintf(
     LPTSTR pszDest,
     size_t cchDest,
     LPCTSTR pszFormat,
     ...
);

        -n