The two sizes you specified for your buffer are most probably equivalent. The sizeof() function in C simply returns the number of bytes of certain datatype, and most PC's today define an unsigned short's size as 2 bytes. To create this buffer in LabVIEW, use the Initialize Array.vi with a numeric of type U16 connected to the "element" input and a value of A*B*N connected to the "dimension size" input. Connect the output of the Initialize Array.vi to the buffer pointer input of the Call Library Function node, and configure that input as follows:
Type: Array
Data Type: Unsigned 16-bit Integer
Dimensions: 1
Array Format: Array Data Pointer
That should successfully pass a pre-allocated buffer from LabVIEW to your DLL!
E. Sulzer
Applications Engineer
National Instruments