
Passing arrays from VB to a DLL written in VC++
What does you call from VB look like ?
I've done this with a long array and it works
fine . Make sure you are not you aren't passing
the array by Val in your VB dll declaration .
I can send you some sample code that I
tested with VB 6 and C++ 6 if you still need
it . (email me)
Good Luck ,Bri
Quote:
>I have a problem with VB:s arrays. I haven't been able to figure out
>how they work in terms of pointers and so on. I'm writing a DLL in
>VisualC++ 5.0 that I'm calling from VisualBasic 5.0.
> After messing a bit I found out that strings come as char** to C++,
>but I can't get the arrays to work. I've been trying to catch a byte
>array as char**, char* and an integer array as short* and short**.
>These all give totally messed up values though (and the single pointer
>variants leaving me with a page fault....).
>Does anyone know how it works?
>Thanks,
> Erik