Is OleVariant applicable for the out parameter in proc proc?

I want to create an interface, but I don’t know anything.

Is OleVariant “standard” to mean “standard” string - pass and return?

 function Any(Input : OleVariant; out Output : OleVariant) : integer; stdcall; 

The other side can be .NET, C # or C ++ or Delphi.

So can they return some kind of "string" result in OleVariant if I don't get a predefined size buffer for the result?

+6
source share
1 answer

Yes, OleVariant absolutely safe. You will see that it is used in all COM modules related to Delphi, such as ActiveX, ComSvcs, and MSXML. Windows API building blocks use it, so you can too.

If you always expect a string, then you should prefer WideString . This is equivalent to the Windows BSTR type.

+11
source

Source: https://habr.com/ru/post/903378/


All Articles