I'm using a c++ DLL, which takes as a parameter a structure from VB, like this:
Public Type ODATA
lReadError As Long
szData As String * 128
End Type

I have declared the function as ByRef pOData As ODATA).

The problem is that when c-function returns the filled structure, the string part is not as it should. The first bytes have been dissappeared. If that function is used from another c code it returns correctly everything but not if called from VB. For example calling from c it returns a string "abcdefg", but called from VB it gets only the value "efg". I think it has something to do with VB way of handling strings with two bytes for pointer and length in the beginning.

How should I use/declare variables to receive the whole string?
The C DLL is not made specially for VB. I use VB 5.

Thanks in advance.
/petri