From: Hrdina Pavel [paul@COMPELSON.COM]
Sent: Wednesday, September 13, 2000 4:15 AM
To: NT Developers Interest List
Subject: [ntdev] RE: DriverEntry

There are four types of string:
1. NULL-terminated string (ANSI, OEM)
    type PCHAR
2. NULL-terminated UNICODE string
    type PWCHAR
3. Counted string (ANSI, OEM)
    type STRING
4. Counted UNICODE string
    type UNICODE_STRING

For DbgPrint (or macro KdPrint) - which is like printf - the following
formats should be used (expected type of argument):

1. %s (PCHAR)
2. %ws (PWCHAR)
3. %Z (PSTRING)
4. %wZ (PUNICODE_STRING)

In fact %Z and %wZ are not documented in the official documentation,
but you can find them in CRT source file for _output().
Microsoft uses them for eg. in NTOSKRNL for both debug prints and
buffer prints ([v]s[n]printf) when some of the argument is counted string.

Paul

-----Original Message-----
From: bounce-ntdev-2577@lists.osr.com [mailto:bounce-ntdev-2577@lists.osr.com]On Behalf Of Barila, Phil
Sent: Friday, September 08, 2000 1:51 AM
To: NT Developers Interest List
Subject: [ntdev] RE: DriverEntry


Use "%ws".  It's a UNICODE_STRING, which means it's WCHARs.

Phil
*       Philip D. Barila          | (503) 264-8386

*       Intel Corp.                 | Not speaking for Intel


-----Original Message-----
From: zhongsheng.wang@exgate.tek.com
[mailto:zhongsheng.wang@exgate.tek.com]
Sent: Thursday, September 07, 2000 5:21 PM
To: NT Developers Interest List
Subject: [ntdev] DriverEntry


Hi, I am a little confused about 2 parameters in DriverEntry routine. Does
somebody know what exactly these parameters refer to? For example, which
file or directory does RegistryPath point to? I try to print it out using
KdPrint(("%s",RegistryPath->Buffer). I just get a slash symbol "\". So I am
not sure if this is the true value of RegistryPath. Can anybody explain that
for me? Thanks.

Z.S.Wang
==================================
Zhongsheng Wang
P. O. Box 500, M/S 50-480
Beaverton, OR 97077
Email: zhongsheng.wang@tek.com
Phone: (503) 627-5260
==================================


---
You are currently subscribed to ntdev as: phil.barila@intel.com
To unsubscribe send a blank email to leave-ntdev-2577Q@lists.osr.com



---
You are currently subscribed to ntdev as: paul@compelson.com
To unsubscribe send a blank email to leave-ntdev-247T@lists.osr.com