I'm having a problem with getting arrays populated with functions that are called from a dll. A quick example is:
Then, I call it as such:
And then try to display the array like so:
Each element of the array is 0, regardless of what I do, and it does this for any time I try and use an array. I can run it in C++ and it will print the correct values, so I know it isn't the dll. Is there something special needed for using arrays?
Code:
Private Declare Function MHL200_GetDLLVersion Lib "dll path" (ByRef pulDllVersion() As Long) As MHL200_ErrorEnum
Then, I call it as such:
Code:
Dim ulaVersion(2) As Long
ulMHL200Error = MHL200_GetDLLVersion(ulaVersion)
And then try to display the array like so:
Code:
MsgBox "dll version " & ulaversion(0) & "." & ulaversion(1)
Cells(23, 2) = ulaversion(0)
Each element of the array is 0, regardless of what I do, and it does this for any time I try and use an array. I can run it in C++ and it will print the correct values, so I know it isn't the dll. Is there something special needed for using arrays?