Hi Mappers
I have a custom DLL I call from MapBasic. It returns some information as a
TYPE structure. I can't seem to get hold of the values set by the DLL call:
Example:
Type MyReturnInfo
Attribute1 as String
Attribute2 as Integer
Attribute3 as String
End Type
Declare Function DllFunction Lib "A_DLL" (Byval ID as Integer, ReturnValues
as MyReturnInfo) as Integer
Declare Sub Main
Sub Main
Dim ResOK as Integer
Dim MyLoocalReturnValues as MyReturnInfo
ResOK=DllFunction(12223,MyLoocalReturnValues)
If ResOK=0 Then
Print "Attribute1="+MyLoocalReturnValues.Attribute1
Print "Attribute2="+Str$(MyLoocalReturnValues.Attribute2)
Print "Attribute3="+MyLoocalReturnValues.Attribute3
End If
End Sub
I can't get it to work so the question really is: Is MapBasic in anyway
capable in handling return values from DLLs if they are Type structures?
PS: When I declare the DLL as ......MyReturnInfo as STRING...... I do get an
attribute, but only the first (Attribute1)!
Please adwice, Its really bugging me!
Regards
Thomas Brix Lyng
Frederikshavn Municipal Administration
Denmark
---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 10512