Jump to content
The simFlight Network Forums

Writing to user vars


Recommended Posts

I'm a bit new to this. I want to write Scenery BGL variable ―usrvr2 and I did a C code module, but in BOOL FSUIPC_Write(DWORD dwOffset, DWORD dwSize, void *pSrce, DWORD *pdwResult); what type should void *pSrce be for that case? Also if I try to test to set the variable from FS-Interrogate2 it stays always 0 (I guess it gets overwritten ), what I'm doing wrong there?

Link to comment
Share on other sites

I'm a bit new to this. I want to write Scenery BGL variable ―usrvr2 and I did a C code module, but in BOOL FSUIPC_Write(DWORD dwOffset, DWORD dwSize, void *pSrce, DWORD *pdwResult); what type should void *pSrce be for that case? Also if I try to test to set the variable from FS-Interrogate2 it stays always 0 (I guess it gets overwritten ), what I'm doing wrong there?

What version of FS? I'm pretty certain the BGL variables aren't accessible in FSX, and only one set is usable in FS9.

The types of variables are irrelevant to the FSUIPC interface at the "FSUIPC_Write" level, because all the interface actually deals in is bytes -- or unsigned characters if you like. If the variable is a 2-byte value then your source could be a WORD or a short or simply the lower 16 bits of a 32-bit integer, and so on. Up to you really.

Regards

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.