Show quoted text 33 lines
First of all, a newer version of importtl and typelib is commited in fpc trunk. Some other bug-fixes where submitted in
http://bugs.freepascal.org/view.php?id=21077.
The PSafeArray warning is only for dispinterface. Most typelibs have both interface and dispinterface definitions for the same interface. Dispinterface is using late binding and can use only automatable types. Using the interface definitions, you have all the advantages of early binding and you can use PSafeArray directly.
The warning doesn't mean it isn't working. It only means that you have a "generic" olevariant without any "sub-type" information. The warning is there to give you what is exactly expected in the olevariant. You can simply assign a VarArray created with VarArrayCreate to the olevariant.
In freepascal, to use PSafeArray you use the function VarArrayAsPSafeArray. Despite the name, this returns a PVarArray which you can cast to PSafeArray (structures are the same).
Ludo
