probably a c 101 question
i am trying to use the function
DebugClient::Request with DEBUG_REQUEST_GET_TEXT_COMPLETIONS_WIDE
whose inbuffer and outbuffer needs to be a struct
// InBuffer - DEBUG_GET_TEXT_COMPLETIONS_IN.
// OutBuffer - DEBUG_GET_TEXT_COMPLETIONS_OUT.
#define DEBUG_REQUEST_GET_TEXT_COMPLETIONS_WIDE 14
and the struct is defined like this
typedef struct _DEBUG_GET_TEXT_COMPLETIONS_IN
{
ULONG Flags;
ULONG MatchCountLimit;
ULONG64 Reserved[3];
// Input text string follows.
} DEBUG_GET_TEXT_COMPLETIONS_IN, *PDEBUG_GET_TEXT_COMPLETIONS_IN;
how do i make the input text string to follow ? is this api exposed to use ?
as a hack i redefined the struct to have a wchar_t buffer at end
typedef struct _MYDGTCIN
{
ULONG Flags;
ULONG MatchCountLimit;
ULONG64 Reserved[3];
wchar_t InputText[0x28];
} DGTCIN, *PDGTCIN;
declare
DGTCIN dbgcompin;
and fill it with swprintf_s() like
swprintf_s(dbgcompin.InputText,25,L"!du");
and call the request
if( ( status = g_Advanced2->Request(
DEBUG_REQUEST_GET_TEXT_COMPLETIONS_WIDE,
&dbgcompin,
0x28,
and it seems i am able to successfully get past dbgeng!GetTextCompletions
also how is __in ULONG InBufferSize, defined ?
it seems this plays a role in some error conditions posted below
GetDbgPrint.exe !ca
total completions available 4
first completion can_write_kdump
GetDbgPrint.exe !ba <---------- should say no command available or keep mumb
some error go check g_Advanced2->Request(
GetDbgPrint.exe !be <---------- should say no command available or keep mumb
some error go check g_Advanced2->Request(
GetDbgPrint.exe !ad
total completions available 3
first completion addrbias
GetDbgPrint.exe !du
total completions available 3
first completion dumpfa
GetDbgPrint.exe !b <--------------------------- should work but fails
some error go check g_Advanced2->Request(
GetDbgPrint.exe !bf
total completions available 1
first completion bft
GetDbgPrint.exe !bi
total completions available 2
first completion bitcount