Jump to content
The simFlight Network Forums

BlueLiquidCell

Members
  • Posts

    13
  • Joined

  • Last visited

BlueLiquidCell's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hey Pete Thanks for your answer. Performance is allways important ;-) I'll take a look at it, and probably going to re-design it if it isn't too much work. Thanks again! Christoph
  2. Hey Pete Sorry but I don't really understand. I need a Process call after a Read Call before I can display the data oder do whatever. Is that correct? Now when I need the airspeed for example. I do a Read Call for airspeed and then a Process Call. And when I need the Altitude I do a Read Call for altitude and then a Process Call. Sure I could do both Read calls and after both of them 1 Process Call but then I would need to save the data until I really need it?! Right now I have a function ReadAirspeed and ReadAltitude which return the Value and exported them into a dll. Christoph
  3. Hey Yes I have many asynchronous "FSUIPC_Process" calls, because I "exported" all procedures reading or writing from fsx into a dll to get the source code out of my programm. I really need a lot of items and don't know if i can realize that all in one FSUIPC_Process routine. But maybe I'll try. Is there any other possible way? I would need own variables for every fsuipc item and update them every 50ms or how ever often i need it. Is that what you mean? Thanks Christoph
  4. Hey Pete I found the "Problem": FPCuser.pas Lines 245 ff // send the request (allow up to 9 tries) while (i < 10) and ((SendMessageTimeout( m_hWnd, // FS6 window handle m_msg, // our registered message id m_atom, // wParam: name of file-mapping object 0, // lParam: offset of request into file-mapping obj SMTO_BLOCK, // halt this thread until we get a response 2000, // time out interval dwError)) = 0) do begin // return value Inc(i); Sleep(100); // Allow for things to happen end; if (i >= 10) then begin // Failed all tries if GetLastError = 0 then dwResult := FSUIPC_ERR_TIMEOUT else dwResult := FSUIPC_ERR_SENDMSG; Result := FALSE; Exit; end; The Programm didn't freeze, but I had so many Request that it seemed so. With a sleep time of 100ms and 10 retries every failed request makes up 1 sec. I modified these lines a little but and my programm too. I had many timers requesting data every 500ms or so. With many timers that "freeze time" add up pretty quick. Now I check at the beginning of each timer and exit the function if not connected any more. I changed the lines mentioned above to the following: // send the request (allow up to 9 tries) while (i < 1) and ((SendMessageTimeout( m_hWnd, // FS6 window handle m_msg, // our registered message id m_atom, // wParam: name of file-mapping object 0, // lParam: offset of request into file-mapping obj SMTO_BLOCK, // halt this thread until we get a response 50, // time out interval dwError)) = 0) do begin // return value Inc(i); end; if (i >= 1) then begin // Failed all tries if GetLastError = 0 then dwResult := FSUIPC_ERR_TIMEOUT else dwResult := FSUIPC_ERR_SENDMSG; Result := FALSE; Exit; end; Do you think that could be a problem? I didn't find any problems while testing it. Hope others having same problems can solve them too! Thanks again Christoph
  5. Hey Pete, thanks I'll take a closer look at it! Sorry for posting twice, please delete one of the topics. Christoph
  6. Hello Pete and everyone else, I have a Problem with my Programm which I write in Delphi (don't know if that matters) I start FSX, then the Programm and everything works fine. But when I close FSX before closing the programm, the programm just feezes completely when running on the same PC. When I run it on another PC via WideFS it slows down quit a bit but at least it doesn't freeze completely. Probably has something to do with WideFS saving the last data it got from the FS. Is there anyway to work around that? I tried to stop all Read or Writes to/from FS when it isn't responding but that doesn't work when the programm feezes completely. Thanks Christoph
  7. Hey Pete Works Great! Thanks for the effort!!! Great Program! Christoph
  8. Hi Pete Ok that'll be great! Hope you can recover all of your data! And I hope you still had a nice holiday :-) Christoph
  9. Hey Pete Thanks for the answer! Would be great if you could change that byte in the future! That way users could find out if there is no connection or FS has stopped (meaning they could find out witch of those) I'm using Offset 337E right now to check, couldn't find a big difference between that and 3374. If there is please let me know. Meanwhile I wrote some code to read out the Title Bar of WideFS and to check for the connection. If anyone interested in that let me know and I'll post that. Chris
  10. Hey Guys I want to check if Wide FS has a connection or not. I tried using offset 333C It works fine the first time, when WideFS is open and connected it shows "3" which is ok, but when I stop the connection (by plugging out the LAN Cable) its still "3" even though the WideFS Titel Bar shows "waiting for a connection" Any one an idea? Or is there a better way to check the WideFS status? Thought about reading the Title bar of the Wide FS window, but that wouldn't be nice ;-) PS: Maybe a Moderator can add something like "Check FS Status" to the Topic Title, forgot that, sorry!
  11. Hey Putting all in the external dll worked. Thanks for the help! Great programm by the way ;-) Christoph
  12. Hey Pete Thanks for the fast reply. I'll try to make it a little bit clearer. I have a large main programm, which starts the FSUIPC Link on startup. I wanted to organize the programm and all the functions. Therefore I wantet to put all functions writing or reading from the FSUIPC Link in an external dll. So I just have to open functions from the main programm and get values from the FS. For example a function called "WriteCom" It gets a 5 digit frequency, converts it to the bdcfreq used in FS and writes it into the FSUIPC Offset. The function works fine execpt for the FSUIPC_Write and FSUIPC_Process parts. :-( Hope it gets a little bit clearer now.
  13. Hey Guys I'm making a programm in Delphi and want to have some function in an dll. In that case the programm should write an frequency to Com1. Something like "WriteCom(12345);" The function includes FSUIPC_Write and FSUIPC_Process. When I have the function in the main programm everything works fine. But when I put it in an dll the FSUIPC_Write returns the Error: "Call cannot execute, link not Open" Anyone who knows the problem and can help me? Thanks
×
×
  • 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.