UnicodeString is unusable with DispInvoke
Original Reporter info from Mantis: Gorelkin
-
Reporter name: Sergei Gorelkin
Original Reporter info from Mantis: Gorelkin
- Reporter name: Sergei Gorelkin
Description:
Calls to Variant methods with UnicodeString argument do not compile (error message is "Type UnicodeString is not automatable") (case 1). As a consequence, in non-Windows, where WideString = UnicodeString, literal arguments also cannot be used (case 2). Typecasting a literal to AnsiString doesn't compile either (case 3).
var
us: UnicodeString;
v: Variant;
begin
v.foo(us); // case 1
{$ifndef WINDOWS}
v.foo('something'); // case 2
v.foo(ansistring('something')); // case 3
{$endif}
end.