How do I view the contents of WDFSTRING in WinDbg

I would like to view the contents of a WDFSTRING object in WinDbg. I can’t find a wdfkd command to display a string. I’ve tried !wdfobject, !wdfhandle, !wdfmemory and a few others. !wdfobject fails and !wdfhandle doesn’t help me get at a string. Does anyone know how I can find the actual unicode string?

!wdfhandle gives you the fx object type and underlying pointer. Once you have the underlying ptr,

dt FxString (pointer)

And one of the fields will be the UNICODE_STRING

d

Sent from my phone with no t9, all spilling mistakes are not intentional.

-----Original Message-----
From: xxxxx@xmission.com
Sent: Thursday, August 06, 2009 4:38 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] How do I view the contents of WDFSTRING in WinDbg

I would like to view the contents of a WDFSTRING object in WinDbg. I can’t find a wdfkd command to display a string. I’ve tried !wdfobject, !wdfhandle, !wdfmemory and a few others. !wdfobject fails and !wdfhandle doesn’t help me get at a string. Does anyone know how I can find the actual unicode string?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

I didn’t get an underlying pointer. This is the output of the !wdfhandle command:

0: kd> !wdfkd.wdfhandle 0x77757d50

Dumping WDFHANDLE 0x77757d50

Handle type is WDFSTRING
Refcount: 1
Contexts:


Parent: !wdfhandle 7768db38, type is WDFDEVICE

!wdfobject 0x888a82a8

Should I get more than this. I’m doing this on Windows 7 build 7229 with kmdf from the 7127 WDK. Is this a problem?

The !wdfobject command that !wdfhandle gives you will give you the underlying type

d

Sent from my phone with no t9, all spilling mistakes are not intentional.

-----Original Message-----
From: xxxxx@xmission.com
Sent: Friday, August 07, 2009 7:34 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] How do I view the contents of WDFSTRING in WinDbg

I didn’t get an underlying pointer. This is the output of the !wdfhandle command:

0: kd> !wdfkd.wdfhandle 0x77757d50

Dumping WDFHANDLE 0x77757d50
=============================
Handle type is WDFSTRING
Refcount: 1
Contexts:


Parent: !wdfhandle 7768db38, type is WDFDEVICE

!wdfobject 0x888a82a8

Should I get more than this. I’m doing this on Windows 7 build 7229 with kmdf from the 7127 WDK. Is this a problem?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

Thanks Doron. I missed that part.