>Hi,
>I'm trying to call a DLL routine that uses the following data structure (in VB) as one of the parameters:
>
>
>Type WSADATA
> wversion As Integer
> wHighVersion As Integer
> szDescription(0 To 256) As Byte
> szSystemStatus(0 To 128) As Byte
> iMaxSockets As Integer
> iMaxUpdDg As Integer
> lpszVendorInfo As Long
>End Type
>
>
>When I look through the VFP8 documentation, I see that I must convert this structure to the equivalent string value. Okay, that makes sense. However, I'm not sure of the lengths of the values. How long is the string equivalent of an Integer value? How long is the string equivalent of a Long value? I'm assuming that the szDescription and szSystemStatus values would simply be regular strings with lengths of 256 and 128 respectively. Can anyone help me out with this?
>
>John
John,
From windows SDK aspect an integer and long are both 32 bits signed values (4 bytes). However if your structure is from VBA then VBA uses integer for short ( 16 bits - 2 bytes) and long for integer (32 bits - 4 bytes).
I'd simply set both as 4 bytes and check results.
Cetin