|
@@ -27,7 +27,7 @@ procedure ShortStrToNTStr(aStr: ShortString; var aNTStr: UNICODE_STRING);
|
|
|
procedure AnsiStrToNTStr(const aStr: RawByteString; var aNTStr: UNICODE_STRING);
|
|
|
procedure UnicodeStrToNtStr(const aStr: UnicodeString;
|
|
|
var aNTStr: UNICODE_STRING);
|
|
|
-procedure PCharToNTStr(aStr: PChar; aLen: Cardinal; var aNTStr: UNICODE_STRING);
|
|
|
+procedure PCharToNTStr(aStr: PAnsiChar; aLen: Cardinal; var aNTStr: UNICODE_STRING);
|
|
|
procedure FreeNTStr(var aNTStr: UNICODE_STRING);
|
|
|
|
|
|
// Wraps NtDisplayString for use with Write(Ln)
|
|
@@ -81,7 +81,7 @@ begin
|
|
|
aNTStr.MaximumLength := aNTStr.Length;
|
|
|
end;
|
|
|
|
|
|
-procedure PCharToNTStr(aStr: PChar; aLen: Cardinal; var aNTStr: UNICODE_STRING);
|
|
|
+procedure PCharToNTStr(aStr: PAnsiChar; aLen: Cardinal; var aNTStr: UNICODE_STRING);
|
|
|
var
|
|
|
i: Integer;
|
|
|
begin
|
|
@@ -111,14 +111,14 @@ begin
|
|
|
if (BufPos>0) then begin
|
|
|
if Boolean(UserData[1]) then begin
|
|
|
{ TODO : check why UTF8 prints garbage }
|
|
|
- {len := Utf8ToUnicode(Nil, 0, PChar(BufPtr), BufPos);
|
|
|
+ {len := Utf8ToUnicode(Nil, 0, PAnsiChar(BufPtr), BufPos);
|
|
|
ntstr.Length := len * 2;
|
|
|
ntstr.MaximumLength := ntstr.Length;
|
|
|
ntstr.Buffer := GetMem(ntstr.Length);
|
|
|
- Utf8ToUnicode(ntstr.Buffer, len, PChar(BufPtr), BufPos);}
|
|
|
- PCharToNtStr(PChar(BufPtr), BufPos, ntstr);
|
|
|
+ Utf8ToUnicode(ntstr.Buffer, len, PAnsiChar(BufPtr), BufPos);}
|
|
|
+ PCharToNtStr(PAnsiChar(BufPtr), BufPos, ntstr);
|
|
|
end else
|
|
|
- PCharToNtStr(PChar(BufPtr), BufPos, ntstr);
|
|
|
+ PCharToNtStr(PAnsiChar(BufPtr), BufPos, ntstr);
|
|
|
NtDisplayString(@ntstr);
|
|
|
// FreeNTStr uses FreeMem, so we don't need an If here
|
|
|
FreeNtStr(ntstr);
|