C dlls & VB
Posted on 1998-12-12
A C dll has to be called from a VB application. The dll expects a certain structure which has an array of doubles as one of it's members. We create an instance of the structure in VB.
Eg: Let someStruct be the structure
redim someStructure.arrDoubles( 10 )
//then we fill up this structure
someStructure.arrDoubles( 0 ) = 123.123
someStructure.arrDoubles( 1 ) = 0.99
someStructure.arrDoubles( 9 ) = 1111
When we pass this structure to the dll, the dll is unable to read the elements of this double array.
Is there a special way of passing structures with arrays as members to C dlls. We are using VB6.