May 26, 200224 yr Hi all,Does someone know how the write command has to be regarding writing values to FSUIPC from Visual basic ????I,am using the Visual basic SDK from PD,Eksamples would be greatAny help is highly appreciated,JSDK.
May 29, 200224 yr Hi JSDK,I sent you a relpy in response to your private message.Incase anyone else wants to know and so this info is in the forum i'll repeat is here...The example assumes you've already logged onto the sim. This proceedure runs from a check box on a form. The checkbox writes the value of the pitot heat (on/off). --------------------------------------------Private Sub chkPitot_Click() ' Write Pitot On/Off up to FS2002 ' Dim variables Dim bytPitotValue As Byte Dim dwResult As Long Dim bolOK As Boolean ' Set the correct value of the intPitotValue variable (1 or 0) If chkPitot.Value = vbChecked Then bytPitotValue = 1 Else bytPitotValue = 0 End If ' Do the write and get the return value to check write was OK bolOK = FSUIPC_Write(&H29C, 1, VarPtr(bytPitotValue), dwResult) ' If return value was not 'true' then something went wrong ' so print the error number from dwResult If Not bolOK Then MsgBox "Error writing - result is " & dwResult End IfEnd Sub---------------------------------------------- To write to offsets with different sizes change the second parameter of the FSUIPC_Write() function AND change the type (size) of the variable holding the source data (bytPitotValue in the above example).For offsets of size 1 dim as bytefor size 2 dim as integerfor size 4 dim as longPaulEGJJ
Create an account or sign in to comment