From: Essie on
Can someone help to print a UNICODE_STRING to the debig window?
The string is in POBJECT_ATTRIBUTES ObjectAttributes
ObjectAttributes->ObjectName

I believe this is correct so far?

But how can I print it, can I use DbgPrint ?

DbgPrint(("message %s \n", buffer ));

but buffer is normally ansi

Thanks


From: Don Burn on
Use %wZ this is the format specifier for a UNICODE_STRING.


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply



<Essie> wrote in message news:OcCWCPF0FHA.3660(a)TK2MSFTNGP15.phx.gbl...
> Can someone help to print a UNICODE_STRING to the debig window?
> The string is in POBJECT_ATTRIBUTES ObjectAttributes
> ObjectAttributes->ObjectName
>
> I believe this is correct so far?
>
> But how can I print it, can I use DbgPrint ?
>
> DbgPrint(("message %s \n", buffer ));
>
> but buffer is normally ansi
>
> Thanks
>
>


From: Thomas F. Divine [DDK MVP] on

"Don Burn" <burn(a)stopspam.acm.org> wrote in message
news:uR70hfF0FHA.1256(a)TK2MSFTNGP09.phx.gbl...
> Use %wZ this is the format specifier for a UNICODE_STRING.
>

Don,

Did you mean %ws, or have I overlooked one more new thing?

Thos

>
> --
> Don Burn (MVP, Windows DDK)
> Windows 2k/XP/2k3 Filesystem and Driver Consulting
> Remove StopSpam from the email to reply
>
>
>
> <Essie> wrote in message news:OcCWCPF0FHA.3660(a)TK2MSFTNGP15.phx.gbl...
>> Can someone help to print a UNICODE_STRING to the debig window?
>> The string is in POBJECT_ATTRIBUTES ObjectAttributes
>> ObjectAttributes->ObjectName
>>
>> I believe this is correct so far?
>>
>> But how can I print it, can I use DbgPrint ?
>>
>> DbgPrint(("message %s \n", buffer ));
>>
>> but buffer is normally ansi
>>
>> Thanks
>>
>>
>
>

From: Bill McKenzie on
He meant %wZ and it isn't new, but it didn't used to be documented. Several
of the DDK samples use it.

Now it is documented with KdPrint(Ex) and DbgPrint(Ex) and the following
quote is interesting:

"The Format string supports all the printf-style formatting codes. However,
the Unicode format codes (%C, %S, %lc, %ls, %wc, %ws, and %wZ) can only be
used with IRQL = PASSIVE_LEVEL."

Bill M.


"Thomas F. Divine [DDK MVP]" <tdivine(a)NOpcausaSPAM.com> wrote in message
news:OmRSylF0FHA.1028(a)TK2MSFTNGP12.phx.gbl...
>
> "Don Burn" <burn(a)stopspam.acm.org> wrote in message
> news:uR70hfF0FHA.1256(a)TK2MSFTNGP09.phx.gbl...
>> Use %wZ this is the format specifier for a UNICODE_STRING.
>>
>
> Don,
>
> Did you mean %ws, or have I overlooked one more new thing?
>
> Thos
>
>>
>> --
>> Don Burn (MVP, Windows DDK)
>> Windows 2k/XP/2k3 Filesystem and Driver Consulting
>> Remove StopSpam from the email to reply
>>
>>
>>
>> <Essie> wrote in message news:OcCWCPF0FHA.3660(a)TK2MSFTNGP15.phx.gbl...
>>> Can someone help to print a UNICODE_STRING to the debig window?
>>> The string is in POBJECT_ATTRIBUTES ObjectAttributes
>>> ObjectAttributes->ObjectName
>>>
>>> I believe this is correct so far?
>>>
>>> But how can I print it, can I use DbgPrint ?
>>>
>>> DbgPrint(("message %s \n", buffer ));
>>>
>>> but buffer is normally ansi
>>>
>>> Thanks
>>>
>>>
>>
>>
>


From: Essie on

> He meant %wZ and it isn't new, but it didn't used to be documented.
Several
> of the DDK samples use it.

> Now it is documented with KdPrint(Ex) and DbgPrint(Ex) and the following
> quote is interesting:

It is still undocumented as far as I can see. They say we are allowed to use
%wZ but they don't say what it does.


 |  Next  |  Last
Pages: 1 2 3 4
Prev: Storage spti example problems
Next: MSVAD Simple Sample