Delphi: how to call ActiveX Functions that return an OleVariant containing a Byte Array
Some Chilkat ActiveX functions return binary data as a Variant containing a byte array. If the Chilkat function fails, it returns an OleVariant containing an empty byte array. The following code snippet is incorrect and will cause Delphi to raise an EVariantBadIndexError exception if an empty OleVariant is returned. // This is incorrect: mybuffer : array of byte; // … […]