+ few com helpers added

git-svn-id: trunk@5144 -
This commit is contained in:
florian 2006-11-01 09:42:40 +00:00
parent f0e8ef9e2a
commit 4fb0d13138
2 changed files with 23 additions and 0 deletions

View File

@ -302,3 +302,22 @@ threadvar
end;
errno:=0;
end;
function OleStrToString(source: PWideChar) : ansistring;inline;
begin
OleStrToStrVar(source,result);
end;
procedure OleStrToStrVar(source : PWideChar;var dest : ansistring);inline;
begin
WideCharLenToStrVar(source,length(WideString(pointer(source))),dest);
end;
function StringToOleStr(const source : ansistring) : PWideChar;inline;
begin
result:=nil;
widestringmanager.Ansi2WideMoveProc(pchar(pointer(source)),widestring(pointer(result)),length(source));
end;

View File

@ -57,3 +57,7 @@ const
KernelDLL = 'kernel32';
ApiSuffix = 'A';
{$endif WINCE}
function OleStrToString(source: PWideChar) : ansistring;inline;
procedure OleStrToStrVar(source : PWideChar;var dest : ansistring);inline;
function StringToOleStr(const source : ansistring) : PWideChar;inline;