Suppose I am declare following functions:
function FuncA (cText: Char): Boolean; external 'somelib.dll' name 'FuncA';
function FuncW (wText: WChar): Boolean; external 'somelib.dll' name 'FuncW';
and
function Func (tText: TCHAR): Boolean;
Now, I want to use Func under ANSI or UNICODE declaration.
How can I do it?
Something like this:
function Func (tText: TCHAR): Boolean;
begin
{$IFDEF UNICODE}
Result:=FuncW(tText);
{$ELSE}
Result:=FuncA(tText);
{$ENDIF}
end;
Is there more elegant solution?