One way to handle this is to write your own DLL to return a Byte type SAFEARRAY as the result of the function (VB arrays are OLE SafeArrays).
To do this, you need to read the SafeArray APIs and structures. I donβt know about it myself, but the main thing you need is the SAFEARRAYBOUND structure and the SafeArrayCreate API. What the API returns to you, you return to VBA. And you are done.
source
share