Post · 11 min read· pp. 2928–2936

The !dso Debugger Extension Command

The USEREXTS debugger extension as supplied with the Device Driver Kit (DDK) for both Windows NT 4.0 and Windows 2000 exports a dso function and thus supports a !dso command.

The !dso command is in some sense an early form of what Microsoft’s debuggers would soon offer as the built-in dt command. A key difference is that the dt command dumps from type information in whatever symbol files the debugger has handy (or can download) but the !dso command dumps only the debugger extension’s built-in knowledge.

The extension’s own description of the !dso command is variously:

text
dso <Struct> [Field] [Address]- Dumps Struct field(s)'s offset(s) and value(s).

or

text
dso <Struct> [Field] [addr [*n]]-Dumps Struct field(s)'s offsets(s) & value(s).

It is not this note’s purpose, however, to pick over the syntax of an old command. The point is instead to note that in the years before Microsoft built type information into public symbol files, the !dso command was often the most detailed public record (by far) that Microsoft left of undocumented Windows structures. Not all the structures that are known to the !dso command are undocumented, but many are, including some for which type information has hardly ever (and in some few cases never) turned up in public symbol files even through to Windows 10.

The large table that follows lists the structures whose offsets can be dumped by the !userexts.dso command. Please be aware that a different !dso command is implemented in another debugger extension, named USERKDX, which Microsoft at first distributed only with the Platform SDK from the time of Windows NT 4.0, not with the contemporaneous DDK. Inevitably, the same command in the other extension supports a different set of structures.

StructureVersions
ACCEL4.0 and 5.0
ADVISE_LINK5.0 only
ANIMATIONINFO4.0 and 5.0
ATTR_PAIR5.0 only
ATTR_ROW5.0 only
BITMAP4.0 and 5.0
BITMAPCOREHEADER4.0 and 5.0
BITMAPCOREINFO4.0 and 5.0
BITMAPFILEHEADER4.0 and 5.0
BITMAPINFO4.0 and 5.0
BITMAPINFOHEADER4.0 and 5.0
BITMAPV4HEADER4.0 and 5.0
BUTN5.0 only
BUTNWND5.0 only
CALLPROCDATA4.0 and 5.0
CANDIDATEFORM5.0 only
CANDIDATEINFO5.0 only
CANDIDATELIST5.0 only
CAPTUREBUF4.0 and 5.0
CARET4.0 and 5.0
CBOX4.0 and 5.0
CHAR_ROW5.0 only
CHWIDTHINFO5.0 only
CLIENTCREATESTRUCT4.0 and 5.0
CLIENTIMC5.0 only
CLIENTINFO4.0 and 5.0
CLIENTTHREADINFO4.0 and 5.0
CLS4.0 and 5.0
CLSMENUNAME4.0 and 5.0
CL_CONV_INFO5.0 only
CL_INSTANCE_INFO5.0 only
COMBOWND4.0 and 5.0
COMMCONFIG4.0 and 5.0
COMMON_WNDCLASS4.0 and 5.0
COMPOSITIONFORM5.0 only
COMPOSITIONSTRING5.0 only
CONSOLEDESKTOPCONSOLETHREAD4.0 and 5.0
CONSOLEWINDOWSTATIONPROCESS4.0 and 5.0
CONSOLE_CURSOR_INFO4.0 and 5.0
CONSOLE_FONT_INFO4.0 and 5.0
CONSOLE_GRAPHICS_BUFFER_INFO4.0 and 5.0
CONSOLE_INFORMATION5.0 only
CONSOLE_READCONSOLE_CONTROL4.0 and 5.0
CONSOLE_SCREEN_BUFFER_INFO4.0 and 5.0
CONSOLE_WRITECONSOLE_MSG5.0 only
CONV_INFO5.0 only
COPYDATASTRUCT5.0 only
CPINFO4.0 and 5.0
CPTABLEINFO4.0 and 5.0
CREATESTRUCTA4.0 and 5.0
CREATESTRUCTW4.0 and 5.0
CSR_API_MSG5.0 only
CSR_PROCESS5.0 only
CSR_THREAD5.0 only
CSR_WAIT_BLOCK5.0 only
CSTRING4.0 and 5.0
CTLCOLOR4.0 and 5.0
CURSORDATA4.0 and 5.0
CURSORFIND4.0 and 5.0
CURSORRESOURCE4.0 and 5.0
CURSORSHAPE4.0 and 5.0
CWPRETSTRUCT4.0 and 5.0
CWPSTRUCT4.0 and 5.0
DDEACK4.0 and 5.0
DDEADVISE4.0 and 5.0
DDEDATA4.0 and 5.0
DDELN4.0 and 5.0
DDEMLDATA4.0 and 5.0
DDEML_MSG_HOOK_DATA4.0 and 5.0
DDEPACK4.0 and 5.0
DDEPOKE4.0 and 5.0
DDEUP4.0 and 5.0
DDE_DATA4.0 and 5.0
DDE_MESSAGE_QUEUE4.0 and 5.0
DEADKEY4.0 and 5.0
DEBUGHOOKINFO4.0 and 5.0
DELETEITEMSTRUCT4.0 and 5.0
DESKTOPINFO4.0 and 5.0
DIALOG4.0 and 5.0
DISPLAYINFO4.0 and 5.0
DISPLAYRESOURCE4.0 only
DISPLAY_DEVICEA4.0 and 5.0
DISPLAY_DEVICEW4.0 and 5.0
DLG4.0 and 5.0
DLGENUMDATA4.0 and 5.0
DLGITEMTEMPLATE4.0 and 5.0
DLGITEMTEMPLATE24.0 and 5.0
DLGTEMPLATE4.0 and 5.0
DLGTEMPLATE24.0 and 5.0
DRAWICONEXDATA4.0 and 5.0
DRAWITEMSTRUCT4.0 and 5.0
DRAWTEXTPARMS4.0 and 5.0
DROPFILESTRUCT4.0 and 5.0
ED4.0 and 5.0
EDITWND4.0 and 5.0
ENABLE_ENUM_STRUCT5.0 only
ENDDLGPARAMS5.0 only
EPROCESS4.0 and 5.0
EPROCESS_QUOTA_BLOCK4.0 and 5.0
ERESOURCE4.0 and 5.0
ETHREAD4.0 and 5.0
EVENTMSG4.0 and 5.0
EXCEPTION_DEBUG_INFO4.0 and 5.0
EXCEPTION_POINTERS4.0 and 5.0
EXCEPTION_RECORD4.0 and 5.0
EXCEPTION_REGISTRATION_RECORD4.0 and 5.0
EX_DEBUG_LOG4.0 and 5.0
EX_DEBUG_LOG_EVENT4.0 and 5.0
EX_DEBUG_LOG_TAG4.0 and 5.0
FILEINFO4.0 and 5.0
GRAPHICS_BUFFER_INFO5.0 only
GUIDELINE5.0 only
HANDLEENTRY4.0 and 5.0
HANDLETABLE4.0 and 5.0
HANDLE_ENTRY4.0 only
HANDLE_TABLE4.0 and 5.0
HARDERRORINFO5.0 only
HARDERROR_MSG4.0 and 5.0
HARDWAREHOOKSTRUCT4.0 and 5.0
HARDWARE_PTE4.0 only
HEAD4.0 only
HEAP5.0 only
HEAP_ENTRY5.0 only
HEAP_FREE_ENTRY5.0 only
HEAP_SEGMENT5.0 only
HELPINFO4.0 and 5.0
HELPWININFOA4.0 and 5.0
HELPWININFOW4.0 and 5.0
HLP4.0 and 5.0
HOOK4.0 and 5.0
ICONINFO4.0 and 5.0
ICONMETRICSA4.0 and 5.0
ICONMETRICSW4.0 and 5.0
IMAGE_DEBUG_INFORMATION5.0 only
IMAGE_SECTION_HEADER5.0 only
IMC5.0 only
IMECHARPOSITION5.0 only
IMEDPI5.0 only
IMEINFO5.0 only
IMEINFOEX5.0 only
IMEMENUITEMINFOA5.0 only
IMEMENUITEMINFOW5.0 only
IMEMODESAVER5.0 only
IMEPRIVATEMODESAVER5.0 only
IMEUI5.0 only
IMEWND5.0 only
INPUTCONTEXT5.0 only
INPUT_INFORMATION5.0 only
IN_STRING4.0 and 5.0
ITEM4.0 and 5.0
KE4.0 and 5.0
KEY_EVENT_RECORD5.0 only
KTHREAD4.0 and 5.0
LARGE_ANSI_STRING4.0 and 5.0
LARGE_IN_STRING4.0 and 5.0
LARGE_STRING4.0 and 5.0
LARGE_UNICODE_STRING4.0 and 5.0
LBIV4.0 and 5.0
LBItem4.0 and 5.0
LBODItem4.0 and 5.0
LBWND4.0 and 5.0
LDR_DATA_TABLE_ENTRY4.0 and 5.0
LDR_ENUM_RESOURCE_ENTRY4.0 and 5.0
LINK_COUNT5.0 only
LOGFONTA5.0 only
LOGFONTW5.0 only
MDI4.0 and 5.0
MDICREATESTRUCTA4.0 and 5.0
MDICREATESTRUCTW4.0 and 5.0
MDINEXTMENU4.0 and 5.0
MDIWND4.0 and 5.0
MEASUREITEMSTRUCT4.0 and 5.0
MEASUREITEMSTRUCT_EX4.0 and 5.0
MENU4.0 and 5.0
MENUITEMINFOA4.0 and 5.0
MENUITEMINFOW4.0 and 5.0
MENUITEMTEMPLATE4.0 and 5.0
MENUITEMTEMPLATE24.0 and 5.0
MENUITEMTEMPLATEHEADER4.0 and 5.0
MENU_EVENT_RECORD4.0 and 5.0
MESSAGE_RESOURCE_BLOCK4.0 and 5.0
MESSAGE_RESOURCE_DATA4.0 and 5.0
MESSAGE_RESOURCE_ENTRY4.0 and 5.0
MINIMIZEDMETRICS4.0 and 5.0
MINMAXINFO4.0 and 5.0
MONITOR5.0 only
MOUSEHOOKSTRUCT4.0 and 5.0
MOUSEKEYS4.0 and 5.0
MOUSE_EVENT_RECORD4.0 and 5.0
MSG4.0 and 5.0
MSGBOXDATA4.0 and 5.0
MSGBOXPARAMSA4.0 and 5.0
MSGBOXPARAMSW4.0 and 5.0
NCCALCSIZE_PARAMS4.0 and 5.0
NEMODULESEG4.0 and 5.0
NLS_DATA_BLOCK4.0 and 5.0
NONCLIENTMETRICSA4.0 and 5.0
NONCLIENTMETRICSW4.0 and 5.0
OBJECT_ATTRIBUTES4.0 and 5.0
OBJECT_BASIC_INFORMATION4.0 and 5.0
OBJECT_CREATE_INFORMATION4.0 and 5.0
OBJECT_DIRECTORY4.0 and 5.0
OBJECT_DIRECTORY_ENTRY4.0 and 5.0
OBJECT_DIRECTORY_INFORMATION4.0 and 5.0
OBJECT_HANDLE_COUNT_DATABASE4.0 and 5.0
OBJECT_HANDLE_COUNT_ENTRY4.0 and 5.0
OBJECT_HANDLE_FLAG_INFORMATION4.0 and 5.0
OBJECT_HANDLE_INFORMATION4.0 and 5.0
OBJECT_HEADER4.0 and 5.0
OBJECT_HEADER_CREATOR_INFO4.0 and 5.0
OBJECT_HEADER_HANDLE_INFO4.0 and 5.0
OBJECT_HEADER_NAME_INFO4.0 and 5.0
OBJECT_HEADER_QUOTA_INFO4.0 and 5.0
OBJECT_NAME_INFORMATION4.0 and 5.0
OBJECT_SYMBOLIC_LINK4.0 and 5.0
OBJECT_TYPE4.0 and 5.0
OBJECT_TYPES_INFORMATION4.0 and 5.0
OBJECT_TYPE_INFORMATION4.0 and 5.0
OBJECT_TYPE_INITIALIZER4.0 and 5.0
PEB5.0 only
PENINPUTDATA5.0 only
PROCOBJHEAD4.0 and 5.0
PROP4.0 and 5.0
PROPSET4.0 and 5.0
RECONVERTSTRING5.0 only
RECTL4.0 and 5.0
REG_NOTIFY_INFORMATION4.0 and 5.0
REG_PROVIDER4.0 and 5.0
RTL_CRITICAL_SECTION5.0 only
RTL_CRITICAL_SECTION_DEBUG5.0 only
RTL_USER_PROCESS_PARAMETERS5.0 only
ROW5.0 only
SBCALC4.0 and 5.0
SBDATA4.0 and 5.0
SBINFO4.0 and 5.0
SBTRACK4.0 and 5.0
SBWND4.0 and 5.0
SCREEN_INFORMATION5.0 only
SCROLLINFO4.0 and 5.0
SCROLLPOS4.0 and 5.0
SERVERINFO4.0 and 5.0
TEB4.0 and 5.0
TEXTMETRICW5.0 only
TEXT_BUFFER_INFO5.0 only
THREAD_BASIC_INFORMATION4.0 and 5.0
THROBJHEAD4.0 and 5.0
TPMPARAMS4.0 and 5.0
TRACKMOUSEEVENT5.0 only
TRANSMSG5.0 only
TRANSMSGLIST5.0 only
USERCONNECT4.0 and 5.0
USEROBJECTFLAGS4.0 and 5.0
USERTHREAD_FLAGS4.0 and 5.0
USERTHREAD_SHUTDOWN_INFORMATION4.0 and 5.0
USERTHREAD_WOW_INFORMATION4.0 and 5.0
W32PROCESS4.0 and 5.0
W32THREAD4.0 and 5.0
WINDOWPLACEMENT4.0 and 5.0
WINDOWPOS4.0 and 5.0
WMCSDATA5.0 only
WND4.0 and 5.0
WNDCLASSA4.0 and 5.0
WNDCLASSEXA4.0 and 5.0
WNDCLASSEXW4.0 and 5.0
WNDCLASSW4.0 and 5.0
WNDMSG4.0 and 5.0
XACT_INFO5.0 only

What principle ever governed the selection of structures for presentation through the !dso command is not known. As fits the name, by far the most of the supported structures are creatures of user mode. Yet more than a few have no visibility except in kernel mode.

One influence on the selection may be that a structure was eligible only if it was thought stable. The USEREXTS debugger extension ships with the DDK which in turn is new for each Windows version but not for each build and not even for each formally released service pack. Even assuming that programmers (both Microsoft’s and not) use the debugger, including its extensions, from the DDK for the same version of Windows that they’re debugging, the !dso command would have greatly reduced worth if the structures it dumps change between builds.

Many structures were added to the !dso output for version 5.0. Some of these structures truly were new for version 5.0. Many were perhaps added simply because Microsoft’s own programmers had found the !dso command to be useful and sought to increase its coverage. Only four were withdrawn: DISPLAYRESOURCE, HANDLE_ENTRY, HARDWARE_PTE and HEAD.