DbgPrint() format specifiers!

Hi,

Can anyone tell me where the format specifiers are defined for DbgPrint()
for example the unicode (%C, %S, %lc, %ls, %wc, %ws, and %wZ). I have looked
on the internet and in the DDK documentation and found a mention of them but
no descriptions as to what types they are for.

Regards FarmerJo

Try the ‘printf’ documentation in MSDN. Rough guessses:

%C - prints a wide character with DbgPrint
%S - prints a wide string (PWSTR) with DbgPrint
%lc - prints a wide character with DbgPrint. The difference between
this one and the first is that, if the first were used with printf, it
would display a wide character, but if it were used with wprintf, it
would display a narrow character; this one always displays a wide
character, but as DbgPrint is always narrow (that is, there is no
wDbgPrint), it doesn’t apply.
%ws - prints a wide string; same deal as the previous one, but strings
instead of characters
%wZ - display a UNICODE_STRING.

Good luck,

mm

FarmerJo wrote:

Hi,

Can anyone tell me where the format specifiers are defined for DbgPrint()
for example the unicode (%C, %S, %lc, %ls, %wc, %ws, and %wZ). I have looked
on the internet and in the DDK documentation and found a mention of them but
no descriptions as to what types they are for.

Regards FarmerJo

Many thanks for your help.
Regards FarmerJo

“Martin O’Brien” wrote in message
news:xxxxx@windbg…
> Try the ‘printf’ documentation in MSDN. Rough guessses:
>
> %C - prints a wide character with DbgPrint
> %S - prints a wide string (PWSTR) with DbgPrint
> %lc - prints a wide character with DbgPrint. The difference between this
> one and the first is that, if the first were used with printf, it would
> display a wide character, but if it were used with wprintf, it would
> display a narrow character; this one always displays a wide character, but
> as DbgPrint is always narrow (that is, there is no wDbgPrint), it doesn’t
> apply.
> %ws - prints a wide string; same deal as the previous one, but strings
> instead of characters
> %wZ - display a UNICODE_STRING.
>
> Good luck,
>
> mm
>
> FarmerJo wrote:
>> Hi,
>>
>> Can anyone tell me where the format specifiers are defined for DbgPrint()
>> for example the unicode (%C, %S, %lc, %ls, %wc, %ws, and %wZ). I have
>> looked on the internet and in the DDK documentation and found a mention
>> of them but no descriptions as to what types they are for.
>>
>> Regards FarmerJo
>

Look at the Visual Studio definition of printf.


The personal opinion of
Gary G. Little

“FarmerJo” wrote in message news:xxxxx@windbg…
> Hi,
>
> Can anyone tell me where the format specifiers are defined for DbgPrint()
> for example the unicode (%C, %S, %lc, %ls, %wc, %ws, and %wZ). I have
> looked on the internet and in the DDK documentation and found a mention of
> them but no descriptions as to what types they are for.
>
> Regards FarmerJo
>
>