Hi,
For various reasons I use CORBA interfaces. In my code I also use Variants, to support different types of value in a variable. This may include an interface value.
At some point I need to check if a Variable (of type Variant) is a (CORBA) interface. I use the following code for that:
isSymTabEntry := VarSupports(Value, StringToGUID(ISymTabEntry_GUID), SymTabEntry);
Here, Value is a variable of type Variant,
ISymTabEntry_GUID, is a string constant, such as:
'{DCD95BA9-90CB-9AA2-0090-DBA0749AF179}'
and SymTabEntry is a CORBA interface ISymTabEntry, defined as :
ISymTabEntry = interface
[ISymTabEntry_GUID]
function getName: String;
//etc…
end;
It doesn’t seem to work. Function getName produces the GUID string constant instead of the name of the SymTabEntry…
Could it be that only COM interfaces can be used with VarSupports?
Is there maybe another way of retrieving an Interface value/variable from a Variant value?
Any suggestion is appreciated.
Regards, J
------------------------------
I use trunk Lazarus and FPC on MacOS Sonoma