Jump to content
The simFlight Network Forums

KWB

Members
  • Posts

    9
  • Joined

  • Last visited

  • Days Won

    1

Posts 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. 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)?

  4. I have a very similar problem with FSC 9.2. I get the message "FSX flight plan folder unspecified! Choose <Flight Simulator X Files> manually." as well. Under load/save I do set it to the correct folder (path tab). Once I switch back to the "LOAD" tab and go back to "Paths" -> same issue. The path will always be reverted to c:\users\my name\Documents.

    This is how it looks in the .ini

    FPPATH09=

    FPPATH10=C:\Users\my name\Documents\

    FPPATH11=

    FSCPLANPATH=P:\FlightSimulatorAddOns\FSC9\Flightplan\FSC

    SQUAWKBOXPATH=P:\FlightSimulatorAddOns\FSC9\flightplan\SquawkBox

    IVAOPATH=P:\FlightSimulatorAddOns\FSC9\flightplan\IVAO

    FSINNPATH=P:\FlightSimulatorAddOns\FSC9\flightplan\FSInn

    I have changed it in the ini directly (P:\FlightSimulatorAddOns\FSC9\Flightplan\FSX) -> no effect. Whatever I do, after I close FSC it is always back to FPPATH10=C:\Users\my name\Documents\

    The want-have-path exists, checked several times. FSC runs on a secondary LAPTOP with no FSX on it. But there is a symbolic link to FSX, which is also set in the PATHs tab. I am not talking about a shortcut, is is a real symbolic link making the FSX folder appearing as it was locally installed.

×
×
  • 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.