I decided to import the TLB and try using the Automation interface, with the
idea that it would be simpler.
Now I have to pass array parameters as SAFEARRAYS. These SAFEARRAYS are
terribly unwieldly!
Is there a class that encapsulates SAFEARRAY usage, or am I stuck with
SafeArrayCreate, SafeArrayPutElement, SafeArrayDestroy?
> I regularly use a COM server that usually I use the normal COM
> interfaces for. (CoCreate..., QueryInterface, etc)
> These interfaces have a lot of array parameters.
Raw arrays are not safe to use in COM.
> Now I have to pass array parameters as SAFEARRAYS.
That is the only way to use arrays in COM. Hense the name *SAFE*ARRAY, aka
an "Automation-safe array".
> These SAFEARRAYS are terribly unwieldly!
Not really.
> Is there a class that encapsulates SAFEARRAY usage
Look at the VCL's safearry.h header file.
Gambit