Jump to content
The simFlight Network Forums

send massage???


Recommended Posts

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

  • 1 year later...
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

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.