 <p>One of the ways to handle this is to write your DLL to return a SAFEARRAY of type Byte as the function result (VB arrays are OLE SafeArrays).</p> <p>To do this you have to read up on the SafeArray APIs and structures. I don't know of it myself, but the main things you'll need are the SAFEARRAYBOUND structure and the SafeArrayCreate API. What the API returns to you, you return to VBA. And you'll be done.</p>