#466 OLEObject can not create an empty SafeArray

v4.0
closed
Lee Peedin
Classes (182)
5
2012-08-14
2007-11-21
Mark Miesfeld
No
0 up votes | 0 down votes | 0%
1 comment

OLE Automation objects can require that an argument to IDispatch::Invoke be VT_ARRAY | VT_ This variant type is constructed using a SafeArray.

It is perfectly valid for the array to be empty and there are definitely times, using OLE Automation, when an empty array should be used.

The current OLEObject code does not take this into consideration and reports an OLE error instead of constructing an empty array:

Error 92 running xx line yy: OLE error
Error 92.909: One or more of the parameters could not be coerced to the desired type. The first parameter with incorrect type is argument z.

Discussion

  • Mark Miesfeld
    Mark Miesfeld
    2007-11-21

    Logged In: YES
    user_id=191588
    Originator: YES

    Committed revision 1286.

    This code change checks for an empty ooRexx array. If an empty ooRexx array is detected, an empty SafeArray is constructed and used for the IDispatch::Invoke argument.

     


Anonymous


Cancel   Add attachments