GHD Posted January 23, 2010 Report Posted January 23, 2010 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
Pete Dowson Posted January 23, 2010 Report Posted January 23, 2010 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
GHD Posted January 23, 2010 Author Report Posted January 23, 2010 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
Pete Dowson Posted January 23, 2010 Report Posted January 23, 2010 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
GHD Posted January 23, 2010 Author Report Posted January 23, 2010 You shouldn't use data if there was an error. Of course you are correct, I was being lazy and not checking any of the return values :oops: George
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