V
Vince Castellano
Hello,
What is the proper way to send byte arrays (or strings for that
matter), from a C DLL to VB? I have tried by prototyping the call in VB
with ByRef Byte[] as a parameter, then treating it in C as a pointer to
unsigned char, and then I tried a memcpy, as well as using pointer
arithmetic to copy over byte per byte.
However, everything I try causes a runtime error regarding the stack
being unbalanced. I am sure I am doing this all wrong, however there
has to be a way to get a piece of memory from C into VB, and I just
can't find it, nor any information on it.
If this is not the proper group, please point me in the right
direction.
Thanks for any help,
Vince
What is the proper way to send byte arrays (or strings for that
matter), from a C DLL to VB? I have tried by prototyping the call in VB
with ByRef Byte[] as a parameter, then treating it in C as a pointer to
unsigned char, and then I tried a memcpy, as well as using pointer
arithmetic to copy over byte per byte.
However, everything I try causes a runtime error regarding the stack
being unbalanced. I am sure I am doing this all wrong, however there
has to be a way to get a piece of memory from C into VB, and I just
can't find it, nor any information on it.
If this is not the proper group, please point me in the right
direction.
Thanks for any help,
Vince