Skip to main content

Working with IUnknown pointers in an OLESafeArray

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

Working with IUnknown pointers in an OLESafeArray.

If you have an instance of OLESafeArray which contains the OLE type (determined by invoking "getVarType" on the safe array object) VT-UNKNOWN (value 13 in olesafea.cpy copy file), you can use the OLESafeArray "getElement" method to retrieve the pointer value. You can then use the pointer value as a parameter to the olesup "getCOBOLObject" method to return an object reference which you can then work with.

Resolution:

Working with IUnknown pointers in an OLESafeArray.

If you have an instance of OLESafeArray which contains the OLE type (determined by invoking "getVarType" on the safe array object) VT-UNKNOWN (value 13 in olesafea.cpy copy file), you can use the OLESafeArray "getElement" method to retrieve the pointer value. You can then use the pointer value as a parameter to the olesup "getCOBOLObject" method to return an object reference which you can then work with.

Old KB# 5792

0 replies

Be the first to reply!