>When looking into different API's, the syntax of writing codes are most often in Visual C or Visual Basic. One of my problems is how to understand how to write code in Foxpro where the parameter in the API function consists of more than one element. In Visual Basic there is the TYPE STATEMENT.
>For example:
>Private Type NETRESOURCE
> dwScope As Long
> dwType As Long
> dwDisplayType As Long
> dwUsage As Long
> lpLocalName As String
> lpRemoteName As String
> lpComment As String
> lpProvider As String
>End Type
>
>What is the syntax in the Foxpro language?
In VFP unfortunately there isn't STRUCT/UNION etc styles. However you could build the whole struct as a string. ie : For this struct you need at least :
4*long(4bytes) + enough space for string buffers. As I sense you would get this as an output parameter. Then :
lpResponse = space(4*4+256*4) && Simply assumed 256 bytes buffer would be more than sufficient for strings
could be used. At return it's your responsibility to decode lpResponse to get returned values. However it's cumbersome and you might want to look Christof's STRUC class in files section. It provides a way to create and get back struc types.
Cetin