Thanks Peter.
I was thinking that each byte needed to be passed to FSUIPC_Write seperately, probably because the VB example show reading the time into an array:
Dim auiTime() As Byte
ReDim auiTime(3)
If FSUIPC_Read(&H238, 3, VarPtr(auiTime(1)), dwResult) Then
If FSUIPC_Process(dwResult) Then
' "Process" proceeded without any problems
lblClock.Caption = Format(auiTime(1), "00") & ":" & _
Format(auiTime(2), "00") & ":" & _
Format(auiTime(3), "00")
Just a oversite on my part. I was making this more complicated that it needs to be.
I used your suggestions and streamlined the code below and it works great (there is no error handling yet). Can you comment on if this is the proper way to use the SDK. Not the VB code, just the process of calling the Write function and them the Process function. Thanks Pete.
Private Sub cmdLandingGearDown_Click()
Dim gearDown As Integer
gearDown = 16383
Call FSUIPC_Write(&HBE8, 4, VarPtr(gearDown), dwResult)
Call FSUIPC_Process(dwResult)
End Sub
Private Sub cmdLandingGearUp_Click()
Dim gearUp As Integer
gearUp = 0
Call FSUIPC_Write(&HBE8, 4, VarPtr(gearUp), dwResult)
Call FSUIPC_Process((dwResult))
End Sub