dlh6ah Posted June 11, 2008 Report Posted June 11, 2008 Hi, I build a home cockpit http://jetvision.de/flightdeck.shtml and use a registered FSUIPC V3.65. The interface between the hardware and FSUIPC is my own Delphi code, using the libraries provided with the module. When I started I used the external EXE method and I was able to write and read variables without any problem. I have no converted the EXE type to an internal DLL (no code changes other than an OPEN2 call now and the array definition as described in the docs) that works well except - I am not able to read variables through FSUIPC anymore. All values are ZERO. I still can write values though. Am I missing something here? From my understanding of the doc I do not need to get an application key even for a DLL as long as the client is registered? By the way, thank you for providing all your support to the community. Andy
Pete Dowson Posted June 11, 2008 Report Posted June 11, 2008 I build a home cockpit http://jetvision.de/flightdeck.shtml and use a registered FSUIPC V3.65. Sorry, old versions are not supported. Please refer to the Announcements above. 3.65 is very old. Am I missing something here? Use the latest version then re-ask your question, but first of all please try using the facilities provided for you to check things yourself. Look in the FSUIPC Options and you will see a "Logging" tab. Go there and check IPC read logging. See if your requests are being logged correctly. Logging is provided to help developers. Pete
AirFlo737 Posted June 11, 2008 Report Posted June 11, 2008 Maybe I can help you, I have managed to create a DLL using Delphi... Make sure you have done the following things: - create a buffer variable e.g. as an array [0..65534] of byte (let's call it fsuipc_buffer for now), and make sure that it is globally accessible for all following code - use fpcinternal instead of fpcuser - use open2 instead of open. as additional parameters, pass on info about your buffer, e.g. FSUIPC_Open2(SIM_FS2K4, dwResult, @fsuipc_buffer[0], sizeof(fsuipc_buffer)); the @ and the [0] are important, as this will result in a pointer to the first element of the array All other things should be the same. It sounds to me that maybe you just forgot to make the variable accessible globally. Keep me posted, maybe I can help you if this doesn't work. And by the way, since some time, you don't need to have a registered version of FSUIPC if you only use the data I/O functions. Greetings Florian
AirFlo737 Posted June 22, 2008 Report Posted June 22, 2008 Why did I even write this? Did you even read this? Well, I think you might sometimes feel the same, Pete. By the way, is there maybe some space in the manual for the SDK to include the above checklist for the Delphi version of the interface? It would make a transition from external to internal usage easier. Greetings Florian
Pete Dowson Posted June 22, 2008 Report Posted June 22, 2008 Pete. By the way, is there maybe some space in the manual for the SDK to include the above checklist for the Delphi version of the interface? It would make a transition from external to internal usage easier. Do you mean this? - create a buffer variable e.g. as an array [0..65534] of byte (let's call it fsuipc_buffer for now), and make sure that it is globally accessible for all following code- use fpcinternal instead of fpcuser - use open2 instead of open. as additional parameters, pass on info about your buffer, e.g. FSUIPC_Open2(SIM_FS2K4, dwResult, @fsuipc_buffer[0], sizeof(fsuipc_buffer)); the @ and the [0] are important, as this will result in a pointer to the first element of the array I'm not at all familiar with the Delphi section, it is supplied as I received it. Is the are place for it in there? Best Regards Pete
AirFlo737 Posted June 22, 2008 Report Posted June 22, 2008 Hey Pete, thanks for your reply, there is a zip file called "Library for FS Internal Users" in the SDK, which includes a Delphi Unit for the internal interface to FSUIPC (if you coded a module for FS). There is a readme file that you wrote in 2006 ("Important Read Me"), but it does not tell how to use the unit. Maybe that would be a nice place for the info. Greetings Florian
Pete Dowson Posted June 22, 2008 Report Posted June 22, 2008 There is a readme file that you wrote in 2006 ("Important Read Me"), but it does not tell how to use the unit. Maybe that would be a nice place for the info. Oh, right. Okay. Thanks. 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