|Debugging Tools for Windows|
The engine calls the KnownStructOutput callback function once after the DLL is initialized to obtain a list of structures the DLL can print, and again each time the engine wants to print a summary of one of these structures.
IN ULONG Flag,
IN ULONG64 Address,
IN PSTR StructName,
OUT PSTR Buffer,
IN OUT PULONG BufferSize
|DEBUG_KNOWN_STRUCT_GET_NAMES||Get a list of names of known structures.|
|DEBUG_KNOWN_STRUCT_GET_SINGLE_LINE_OUTPUT||Format a structure for printing on a single line.|
When printing a structure: Specifies the location in the target's memory address space of the structure to be printed.
When printing a structure: Specifies the name of the structure to be printed. This is one of the names returned from the DEBUG_KNOWN_STRUCT_GET_NAMES query.
When printing a structure: Receives a representation of the structure, identified by StructName and Address, as a string.
In each case, the number of characters written to this buffer must not exceed the value of BufferSize.
When getting names: If the buffer is too small to contain the list of names, this should return the required size of the buffer.
All other return values indicate that the function failed. The engine will continue ignoring the contents of Buffer.
This function is optional. An extension DLL only needs to export KnownStructOutput if it has the ability to format special structures for printing on a single line. The engine looks for this function by name in the extension DLL.
After initializing the extension DLL, the engine calls this function to query the DLL for the list of structure names it knows how to print. Then, whenever the engine prints a summary of one of the structures whose name is in the list, it calls this function to format the structure for printing.
Headers: The function type is defined as PDEBUG_EXTENSION_KNOWNSTRUCT in dbgeng.h.