Hi.
I try to use RtlStringCbVPrintfA funciton.

my code:
RtlStringCbVPrintfA(pszBUFF, nPathSize, "%s\\%s", szVolume, szFolder);

But the code is 'too many parameter'.
So I made next code:
void printfA(PCHAR szDest, int nDestSize, PCHAR Format, ...)
{
va_list va;
NTSTATUS status;

va_start(va, Format);
status = RtlStringCbVPrintfA(szDest, nDestSize, Format, va);
va_end(va);
}


But the code doesn't work also.

How do I use the function?

RE: Please example of RtlStringCbVPrintfA...! by pavel_a

pavel_a
Tue Nov 14 02:07:01 CST 2006

Hi,

Maybe you will be interested in this article
http://www.microsoft.com/whdc/driver/wdf/KMintro_appdevs.mspx

<quote> Some important advice as you get started: read the documentation.
Many application developers approach a new technology by going directly to
the samples and then straight into writing code. Opinions vary on the
effectiveness of this approach for applications. When it comes to drivers,
though, thereâ??s no disagreement: spend some time with the documentation and
get a good solid understanding of how drivers work before you even think
about trying to implement one. </quote>

and a bunch of advice for starters here:
http://blogs.msdn.com/iliast/default.aspx

Good luck,
--PA



Re: Please example of RtlStringCbVPrintfA...! by Tim

Tim
Wed Nov 15 02:28:00 CST 2006

"keandi" <keandi@lycos.co.kr> wrote:
>Hi.
>I try to use RtlStringCbVPrintfA funciton.
>
>my code:
>RtlStringCbVPrintfA(pszBUFF, nPathSize, "%s\\%s", szVolume, szFolder);
>
>But the code is 'too many parameter'.

Of course, as the documentation shows. In this example, you want
RtlStringCbPrintfA without the V.

What are you going to do with this? There are few cases in the DDK where
you need an ANSI string.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.