Re: Using strsafe.h and va_list

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Tim (Tim_at_NoSpam)
Date: 05/26/04


Date: Wed, 26 May 2004 17:13:40 +1200


>From the documentation: "Size of the destination buffer, in characters".

Is sizeof(WorkBuffer) correct for Unicode builds, or is it a new feature?

- Tim

"Nikolaos D. Bougalis" <nikb@webmaster.com> wrote in message
news:AJTsc.26790$wa.16921@fed1read07...
> Tim wrote:
>
>> Hi,
>>
>> Its not a good idea to use sizeof(WorkBuffer) for obvious reasons.
>>
>> HRESULT hr = ::StringCchVPrintf (WorkBuffer, sizeof(WorkBuffer), "%04d
>> %04d %s", FirstInteger, SecondInteger, SomeString);
>>
>> - Tim
>
> Actually, it's not a bad idea at all. Using sizeof(<buffer>) provided that
> buffer is not a pointer is the best way to determine the size of the
> buffer in question.
>
> -n



Relevant Pages

  • Re: Strange difference between XP and win2k driver
    ... You need to set MaximumTransferSize in your USBD_PIPE_INFORMATION before ... Thanks for the tip Tim. ... think about that though if i cant increase the buffer size. ... Im am currently "porting" a XP driver to Win2k and during the process i ...
    (microsoft.public.development.device.drivers)
  • Re: Double Buffering ListView Control
    ... Even if you did implement a double buffer method, then, depending on how ... off updating, add the items in the storage buffer to the control, and then ... Tim Wilson ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Strange difference between XP and win2k driver
    ... Thanks for the tip Tim. ... think about that though if i cant increase the buffer size. ... Im am currently "porting" a XP driver to Win2k and during the process i ... got stuk on a wierd problem when trying to read from the USB. ...
    (microsoft.public.development.device.drivers)
  • Re: Waxing an RV
    ... 303 on the vinyl decals and cleaner wax on the fiberglass. ... I remembered I had a buffer. ... Tim fm CT with arms now ... My little Coleman may have to do for now. ...
    (rec.outdoors.rv-travel)
  • Re: Waxing an RV
    ... I'm putting 303 on the vinyl decals and cleaner wax on the fiberglass. ... I remembered I had a buffer. ... Tim fm CT with arms now like jelly ... Old T shirts give a clean hand buff even on lacquer. ...
    (rec.outdoors.rv-travel)