Jump to content
The simFlight Network Forums

KWB

Members
  • Posts

    9
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by KWB

  1. First of all thanks for the hints. Just to make sure, for my test I use a connection via "WideFS Client", for the code I use the SDK from here: http://www.schiratti.com/dowson.html The info is just to avoid that I use some wrong version or code base Here is where it fails in read, I have just placed a single line for test purposes in my read function. I open in my object's connect function, then I call my read function: FSUIPC_Read(0x0238, 3, localFsTimeRaw, &dwResult); ==> calls if (!m_pView) { *pdwResult = FSUIPC_ERR_NOTOPEN; <-- returns this value return FALSE; } Now I did a second test and try to open just before, then failing with FSUIPC_ERR_MAP, so this means m_pView is 0, but the connection still exists. No idea how I can get into that status. FSUIPC_Open(SIM_ANY, &dwResult); <== fails with ERR_MAP FSUIPC_Read(0x0238, 3, localFsTimeRaw, &dwResult); if ((m_hMap == 0) || (GetLastError() == ERROR_ALREADY_EXISTS)) { *pdwResult = FSUIPC_ERR_MAP; FSUIPC_Close(); 3rd version, I just close before I reopen and read. Everything works, even with my FSUIPC_Close(); FSUIPC_Open(SIM_ANY, &dwResult); FSUIPC_Read(0x0238, 3, localFsTimeRaw, &dwResult); Now my naive conclusion, my connection seems to get broken somewhere. If it was closed somewhere, example 2 would work. So somehow m_piew is 0, but still something is open. I am using an "all compiled" version, no libs. Compiling with VS2017, in this very case 32bit. Maybe there is any hint, but however expect this is some odd detail.
  2. Question: What is the scope of an FSUIPC_Open? Hint: Using the C version of FSUIPC SDK with FSX: FSUIPC 4.9.7.3 (FSX) 32 bit, my full code is attached as file. I have a small class wrapping my FSUIPC functionality. The FSUIPC_Open itself works (returns true, DWORD result is 0) I can also FSUIPC_READ in the same function, so far so good. bool CFsuipc::connect(bool force) { .... DWORD result; ... if (FSUIPC_Open(SIM_ANY, &result)) ... Now in another function (read) I rely on that opened FSUIPC connection. Still the same object in memory. bool CFsuipc::read(CSimulatedAircraft &aircraft, bool cockpit, bool situation, bool aircraftParts) { if ( FSUIPC_Read(0x0238, 3, localFsTimeRaw, &dwResult) && Now the read fails with "FSUIPC read error 'Call cannot execute, link not Open'` So somehow my open connection got lost. I can say for sure, the object is still the same. So where is the info of the open connection stored? Of course I could always open in the same step as I read, but I wonder why the state of the connection does not persist? fsuipcimpl.cpp
  3. Cool. Just to confirm the above, we are using also just a single point grid.
  4. I can not exactly say, but there are already question about the function back in 2012: http://prepar3d.com/forum/viewtopic.php?t=7290
  5. On P3D there is a function for that (SimConnect_RequestGroundInfo, not compatible with FSX), new P3D API. For FSX I create a bogus AI object and query the position at its position (kind of hack but working). For the later I still search a way to create an invisible AI object https://www.fsdeveloper.com/forum/threads/invisible-or-very-small-ai-object.442575/
  6. Moved to Main Forum. Please ask questions related to FSUIPC always in Main Forum! Is there a way to get the ground elevation for a given latitude/longitude position. I need to get the current ground elevation (representing the scenery) at a given position, which is NOT my own aircraft's position and NOT the position of another AI aircraft. I know how to do it with FSX and P3d/simConnect, but need a similar function for FS9. Any hint how I can do it (if possible)?
×
×
  • 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.