MotoxX Posted December 5, 2004 Report Posted December 5, 2004 Hi, I need some help. I tried to send a massage from my program to the FS using the offset 3380 and 32FA but nothing happens. I'm able to read out the the FS Version and so on but I don't know how to send a massage. Maybe someone could send me the structure to send a massage. Thanks a lot MotoxX
Pete Dowson Posted December 6, 2004 Report Posted December 6, 2004 I need some help. I tried to send a massage from my program to the FS using the offset 3380 and 32FA but nothing happens. I'm able to read out the the FS Version and so on but I don't know how to send a massage. Maybe someone could send me the structure to send a massage. There's no "structure" involved, but the code obviously would depend upon what language you are using. I can help with C. Others with VB. Use the FSUIPC Looging options for IPC writes to see what FSUIPC actually makes of what you are doing. Regards, Pete
MotoxX Posted December 6, 2004 Author Report Posted December 6, 2004 Oh, I'm sorry. I'm using VB. Maybe someone knows what to do. Thanks MotoxX
Pete Dowson Posted December 6, 2004 Report Posted December 6, 2004 Oh, I'm sorry. I'm using VB.Maybe someone knows what to do. All I know is that you write strings with the variant "FSUIPC_WriteS". The 2-byte value at 32FA will be written from a normal FSUIPC_Write, that is just the reverse of the Reads you've already sorted out. I think the complication with strings in VB is something to do with the fact that they are passed by value not by pointer and the declaration of the Write procedure had to be changed to deal with this. Another possible complication is that your program is using Unicode or Wide Characters (16-bit character codes) instead of the standard 8-bit (single byte) ASCII which is used by FS and most standard Windows APIs. I hope someone knowing VB will jump in and help, but it might be a good idea if you showed an extract of your code and explain what you see happening at present. Don't forget to use FSUIPC's Write logging (Logging options page, IPC writes) to see what FSUIPC makes of it, as I suggested. Regards, Pete
MotoxX Posted December 6, 2004 Author Report Posted December 6, 2004 Thanks for your help. Now it's working! By the way is theere an offset I can use to play wav files within the FS? Thanks MotoxX
Pete Dowson Posted December 6, 2004 Report Posted December 6, 2004 Thanks for your help. Now it's working!By the way is theere an offset I can use to play wav files within the FS? No. But I think you can just play waves from your program and they'll mix with FS sounds if it has focus. At least, there are several programs which achieve this with no special facilities. Regards, Pete
MattWise Posted July 9, 2006 Report Posted July 9, 2006 Did anyone get this working. I am doing this: Call FSUIPC_WriteS(&H3380, 1, "Test", dwResult) Call FSUIPC_Process(dwResult) Call FSUIPC_Write(&H32FA, 2, 1, dwResult) Call FSUIPC_Process(dwResult) And VB is crashing on me.
Pete Dowson Posted July 9, 2006 Report Posted July 9, 2006 Did anyone get this working. I am doing this: Call FSUIPC_WriteS(&H3380, 1, "Test", dwResult) Call FSUIPC_Process(dwResult) Call FSUIPC_Write(&H32FA, 2, 1, dwResult) Call FSUIPC_Process(dwResult) And VB is crashing on me. I don't know why VB is crashing (I don't know VB) but why are you setting the length of the write to 3380 to 1 when the string you want to write must be at least 4 bytes (5 with the needed terminating null, which I think you may need to add explicitly when using VB). Does VB come with a debugger? You should be able to use it to work out what is wrong. Pete
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now