PDA

View Full Version : Using C DLL in VB. Function has argument with pointer to array


stmoong
12-26-03, 03:21 AM
I am trying to convert a function in C DLL to be used in VB. I only have the header files and not the source code.

Anyway, I am trying to convert the following function declaration to VB.


int theFunctionName(
BOOL readc,
unsigned char blockNb,
unsigned char firstPage,
unsigned char nbPages,
unsigned char pages[][CONSTANT_NUMBER],
unsigned char *cmdStatus)


The "pages" is a pointer to a bidimensional array to be filled with the pages. pages[i][0] is the Most-Significant Byte of page i, pages[i][7] is the Least-Significant Byte.

Should the pointer be converted to long in VB? How would I retrieve the pages after that?

Thanks in advance.