InetReceiveRsp Example for Visual Basic
Private Sub LEADNet1_InetReceiveRsp(ByVal
iComputer As Integer, ByVal InetCommand As Integer, ByVal nCommandID As
Long, ByVal nError As Integer, ByVal nStatus As Integer, ByVal Params
As LEADRasterInetLib.ILEADRasterInetPacket, ByVal nExtraDataSize As Long,
ByVal ExtraData As LEADRasterVariant)
Dim nRet As Integer
Dim szOut$
Dim i As Integer
Dim pszData As String
szOut$ = "Command " & CStr(InetCommand)
& " id=" & CStr(nCommandID) & ", nError="
& CStr(nError) & " nStatus=" & CStr(nStatus) &
" nParams=" & CStr(Params.ParamCount) & " received"
If (nExtraDataSize > 0) Then
szOut$ = szOut$ & ", nExtraDataSize="
& CStr(nExtraDataSize)
End If
Debug.Print (szOut$)
If (nExtraDataSize > 0) Then
' convert to a string
pszData = ExtraData.StringValue
Debug.Print "ExtraData: "
& pszData
End If
If (nError <> 0) Then Exit Sub
Select Case InetCommand
Case INETCMD_LOAD
If
((nStatus = 0) Or (nStatus = 1)) Then
If
((Params.ParamCount = 1) And (Params.ParamType(0) = PARAM_TYPE_UINT32))
Then
Debug.Print
"Load SUCCEEDED!"
Else
Debug.Print
"Load failed with error code " & CStr(nStatus)
End
If
End
If
End Select
End Sub