Jump to content
The simFlight Network Forums

HOT KEYs


Recommended Posts

This is the fist time I have attempted to use this feature but I am having a problem with the table size.

This is the code:

  DWORD TableSize;
  FSConnection.ReadAndProcess(0x320C, 4, &TableSize);

but the returned value is 0xcccccccc, rather than 56 as specified in the "FSUIPC for Programmers" document

I am using FSX/Acceleration with FSUIPC4 Version 4.5.7.5

Can anyone tell me what I am doing wrong?

George

Link to comment
Share on other sites

but the returned value is 0xcccccccc, rather than 56 as specified in the "FSUIPC for Programmers" document

0xcccccccc is the default initialisation most Microsoft compilers do for variable initialisation, so it really indicates that whatever your code is supposed to do, it certainly isn't setting any value into that variable.

I don't know that way of interfacing to FSUIPC. If it is via the Client DLL for .NET interface provided by Paul Henty, then you might be better posting in the sticky thread above which Mr. Henty checks. Otherwise post again but with the reference to the DLL clear in the title.

For seeing what happens at the FSUIPC end, which is where I can help, please use the FSUIPC Logging facilities. You will find the IPC read and write logging very useful.

Regards

Pete

Link to comment
Share on other sites

Thanks Pete.

I am using C++ from Visual Studio .Net 2003.

Would you believe it :shock:

I restarted FSX and set IPC Reads and IPC Writes for logging and the program received the correct value of 56 :?

It is also reading my key presses, so everything is working correctly.

Sorry to have troubled you, I will use logging if I have any further problems.

George

Link to comment
Share on other sites

I restarted FSX and set IPC Reads and IPC Writes for logging and the program received the correct value of 56 :?

Maybe in your earlier test your call "FSConnection.ReadAndProcess" failed -- perhaps you asked before the interface was ready. Doesn't it return a result saying whether it was okay or not? In the C/C++ direct interface I provided you get a TRUE or FALSE result and an error number stored in a "Result" variable. You shouldn't use data if there was an error.

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.