InetSendGetMagGlassDataRsp2 Example for Visual Basic
Private Sub LEADNet1_InetReceiveCmd2(ByVal
iComputer As Integer, ByVal InetCommand As Integer, ByVal nCommandID As
Long, ByVal nError As Integer, ByVal Params As LEADRasterInetLib.ILEADRasterInetPacket,
ByVal nExtraDataSize As Long, ByVal ExtraData As Variant)
Dim nRet As Integer
Dim nStatus As Integer
Dim nBitmapIndex As Long
Dim vColorBuffer As Variant
If (nError <> 0) Then
nStatus = ERROR_TRANSFER_ABORTED
Else
Select Case InetCommand
Case INETCMD_GET_MAGGLASS_DATA
'
check the validity of the parameters
If
((Params.ParamCount = 5) And (Params.ParamType(0) = PARAM_TYPE_UINT32)
_
And (Params.ParamType(1) = PARAM_TYPE_UINT32) And (Params.ParamType(2)
= PARAM_TYPE_USTRING) _
And (Params.ParamType(3) = PARAM_TYPE_INT32) And (Params.ParamType(4) =
PARAM_TYPE_INT32)) Then
nBitmapIndex
= CLng(Params.ParamValue(0))
'Note:
Assume that gBitmaps is array that holds all bitmaps that clients loaded
on server
nStatus
= LEADNet1.InetGetMagGlassData2(gBitmaps(nBitmapIndex).Raster,
vColorBuffer, CVar(Params.ParamValue(2)), Params.ParamValue(3), Params.ParamValue(4))
LEADNet1.InetSendGetMagGlassDataRsp2
nCommandID, CVar(vColorBuffer), CVar(Params.ParamValue(2)), Params.ParamValue(3),
Params.ParamValue(4), 0, Null, nStatus
Exit
Sub
End
If
End Select
End If
'return an error response
LEADNet1.InetSendRsp2
InetCommand, nCommandID, Nothing, 0, Null, nStatus
End Sub