IDebugDataSpaces4::ReadUnicodeStringVirtualWide method (dbgeng.h)

The ReadUnicodeStringVirtualWide method reads a null-terminated, Unicode string from the target.

Syntax

HRESULT ReadUnicodeStringVirtualWide(
  [in]            ULONG64 Offset,
  [in]            ULONG   MaxBytes,
  [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.

[out, optional] Buffer

Receives the string from the target. If Buffer is NULL, this information is not returned.

Note   The remainder of the buffer, following the returned string, might be overwritten by this method.
 

[in] BufferSize

Specifies the size, in characters, of the Buffer buffer.

[out, optional] StringBytes

Receives the size, in bytes, of the string. If StringBytes is NULL, this information is not returned.

Return value

This method can also return error values. See Return Values for more details.

Return code Description
S_OK
S_FALSE
The method was successful. However Buffer was not large enough to hold the string and the string was truncated to fit in Buffer. The truncated string is null-terminated if Buffer has space for at least one character.
E_INVALIDARG
A null-terminator was not found after reading MaxBytes from the target.
 

The method was successful.

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.

Requirements

Requirement Value
Target Platform Desktop
Header dbgeng.h (include Dbgeng.h)

See also

IDebugDataSpaces4

ReadMultiByteStringVirtualWide

ReadUnicodeStringVirtual