ExtRemoteData::GetString(PSTR,ULONG,ULONG,bool,PULONG) method (engextcpp.hpp)

The GetString method reads a null-terminated string from the target's memory. The string is located in the beginning of the region represented by the ExtRemoteData object.

Syntax

PSTR GetString(
  [out] PSTR   Buffer,
  [in]  ULONG  BufferChars,
  [in]  ULONG  MaxChars,
  [in]  bool   MustFit,
        PULONG NeedChars
);

Parameters

[out] Buffer

Receives the null-terminated string read from the target. The type of Buffer must be the same as the type of the string on the target. If the string is a Unicode string, the type of Buffer must be PWSTR. If the string is a multibyte string, the type of Buffer must be PSTR.

Note   the remainder of the Buffer buffer, after the string, can be overwritten by this method.
 

[in] BufferChars

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

[in] MaxChars

Specifies the maximum number of characters to read from the target.

[in] MustFit

Specifies what happens if the string is larger than BufferChars characters. If MustFit is true and the string is larger than BufferChars characters, an ExtRemoteException will be thrown. If MustFit is false and the string is larger than BufferChars characters, the string will be truncated and null-terminated to fit inside the Buffer buffer.

NeedChars

Return value

GetString returns the null-terminated string that was read from the target. This is Buffer.

Remarks

This method can only be used if the region represented by the ExtRemoteData object is in virtual memory. It will not work if the region specifies physical memory.

Requirements

Requirement Value
Target Platform Desktop
Header engextcpp.hpp (include Engextcpp.hpp)

See also

ExtRemoteData

ExtRemoteData::ReadBuffer