I want to make an interface, but I don’t know something.
Is OleVariant a “standard” for containing “standard” string – to pass and return?
function Any(Input : OleVariant; out Output : OleVariant) : integer; stdcall;
The another side is maybe .NET, C#, or C++ or Delphi.
So can they back some “string” result in OleVariant without I pass a predefined sized buffer for result?
Yes,
OleVariantis perfectly safe. You’ll see it used throughout the COM-related units distributed with Delphi, such as ActiveX, ComSvcs, and MSXML. Standard Windows API units use it, so you can, too.If you’re always expecting a string, though, then you should prefer
WideStringinstead. It’s equivalent to the WindowsBSTRtype.