Compare commits

...

1 Commits

View File

@ -26,22 +26,14 @@ exports
function Externalize (const Str: AnsiString): {O} pointer; overload; function Externalize (const Str: AnsiString): {O} pointer; overload;
begin begin
result := nil;
if Str <> '' then begin
GetMem(result, Length(Str) + 1); GetMem(result, Length(Str) + 1);
Utils.CopyMem(Length(Str) + 1, pointer(Str), result); Utils.CopyMem(Length(Str) + 1, pchar(Str), result);
end;
end; end;
function Externalize (const Str: WideString): {O} pointer; overload; function Externalize (const Str: WideString): {O} pointer; overload;
begin begin
result := nil;
if Str <> '' then begin
GetMem(result, (Length(Str) + 1) * sizeof(WideChar)); GetMem(result, (Length(Str) + 1) * sizeof(WideChar));
Utils.CopyMem((Length(Str) + 1) * sizeof(WideChar), pointer(Str), result); Utils.CopyMem((Length(Str) + 1) * sizeof(WideChar), PWideChar(Str), result);
end;
end; end;
function MapDir (const VirtPath, RealPath: PWideChar; OverwriteExisting: boolean; Flags: integer = 0): LONGBOOL; stdcall; function MapDir (const VirtPath, RealPath: PWideChar; OverwriteExisting: boolean; Flags: integer = 0): LONGBOOL; stdcall;