IDebugDataSpaces4::ReadMultiByteStringVirtualWide method (dbgeng.h)
The ReadMultiByteStringVirtualWide method reads a null-terminated, multibyte string from the target and converts it to Unicode.
Syntax
HRESULT ReadMultiByteStringVirtualWide(
[in] ULONG64 Offset,
[in] ULONG MaxBytes,
[in] ULONG CodePage,
[out, optional] PWSTR Buffer,
[in] ULONG BufferSize,
[out, optional] PULONG StringBytes
);
Parameters
[in] Offset
Specifies the location of the string in the process's virtual address space.
[in] MaxBytes
Specifies the maximum number of bytes to read from the target.
[in] CodePage
Specifies the code page to use to convert the multibyte string read from the target into a Unicode string. For example, CP_ACP is the ANSI code page.
[out, optional] Buffer
Receives the string from the target. If Buffer is NULL, this information is not returned.
[in] BufferSize
Specifies the size, in characters, of the Buffer buffer.
[out, optional] StringBytes
Receives the size, in bytes, of the string in the target. If StringBytes is NULL, this information is not returned.
Return value
Return code | Description |
---|---|
|
The method was successful. |
|
The method was not successful. |
|
A null-terminator was not found after reading MaxBytes from the target. |
This method can also return error values. See Return Values for more details.
Remarks
The engine will read up to MaxBytes from the target, looking for a null-terminator. If the string has more than BufferSize characters, the string will be truncated to fit in Buffer.
Note that even if S_OK is returned, the buffer may not have been large enough to store the string. In this case the string is truncated to fit in Buffer. The truncated string is null-terminated if Buffer has space for at least one character. After the call returns, check to see if *StringBytes is bigger than BufferSize.
Requirements
Requirement | Value |
---|---|
Target Platform | Desktop |
Header | dbgeng.h (include Dbgeng.h, Winnls.h) |