Re: Using strsafe.h and va_list
From: Tim (Tim_at_NoSpam)
Date: 05/26/04
- Next message: Nikolaos D. Bougalis: "Re: Using strsafe.h and va_list"
- Previous message: IUnkknown: "Re: Q on Windows resource in executables"
- In reply to: Nikolaos D. Bougalis: "Re: Using strsafe.h and va_list"
- Next in thread: Nikolaos D. Bougalis: "Re: Using strsafe.h and va_list"
- Reply: Nikolaos D. Bougalis: "Re: Using strsafe.h and va_list"
- Messages sorted by: [ date ] [ thread ]
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
- Next message: Nikolaos D. Bougalis: "Re: Using strsafe.h and va_list"
- Previous message: IUnkknown: "Re: Q on Windows resource in executables"
- In reply to: Nikolaos D. Bougalis: "Re: Using strsafe.h and va_list"
- Next in thread: Nikolaos D. Bougalis: "Re: Using strsafe.h and va_list"
- Reply: Nikolaos D. Bougalis: "Re: Using strsafe.h and va_list"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|