View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
tom tom is offline
external usenet poster
 
Posts: 570
Default Passing Byte array to DLL

I'm trying to pass an 8 bit array with 80 elements from Excel VBA to a C++
DLL that is a wrapper for National Instruments functions. I get a 'Type
Mismatch' when I compile. I've tried 2 ways to define the array in the DLL:
BYTE and uInt8 (both may be aliases to 'char'). I've tried Byte and Variant
in the VBA with the same results.

If I create a loop in VBA and pass 1 element at a time it works. Does anyone
know why I get the Type Mismatch when I try to pass the whole array?