Sign in to follow this  
Ray Proudfoot

Load order of SimConnect, FSX and related software

Recommended Posts

I have been introduced to SimConnect over the weekend and it's quite a learning curve. Only as a end user I hasten to add - not as a programmer!Could someone please explain the loading order when FSX is started. This is related to my GoFlight problem and I find it helps to have an understanding of what's going on. I'm guessing it's something like this...1. FSX EXE is launched.2. During the loading FSX executes the contents of EXE.XML. If a 3rd party program has created an entry in this file and it's not in the TRUSTED section of FSX.CFG the user is prompted whether they want to load that application. Assuming they choose Yes the 3rd party program is launched and an entry is created in the TRUSTED section of FSX.CFG.3. FSX continues to load and presents the user with the main menu. At this point I assume the contents of FSX.CFG, EXE.XML and SIMCONNECT.XML have been executed.What I don't understand is when SIMCONNECT.XML is executed. Probably during the FSX load?? And if I get a message warning of an initialization fail then does it happens when EXE.XML is executed?The bottom line is... what causes the initialization fail and what code is causing it? Microsoft's or a third party executable?Thanks.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Ray,I think there's a couple of components here, in that what happens on the FSX side, and what happens on the client side.I'm going to go on a limb here based on my own observations debugging my code and looking at what's in memory. This is what I think is going on in terms of the load order.1) FSX.EXE loads, and loads all its internal modules first. This includes the simconnect server functionality. I'd have to look at filemon to see if SIMCONNECT.XML is touched then, but I'm sure it gets read when the server portion loads as it needs to know about protocols and security setups.2) FSX parses and loads DLL.XML, then EXE.XML.The SIMCONNECT.XML config is parsed when simconnect.dll is loaded, this time for client parameters. In step 2, any code loaded (dll or exe) will check for a digital code signing signature. If the code is not signed, you always get prompted. If the code is signed, and the signing certificate is not issued by a CA in your local computer's trusted CA, you will get prompted. If you click yes, it will store the certificate signature in the trusted section and no longer bother you at startup.When the main menu has loaded, all the DLL.XML and EXE.XML listed modules have been loaded. FSX has also loaded the default situation meaning that the panels and associated gauges have also been loaded.FSX also background loads scenery for the default situation to decrease load times when you click the fly now button. That behavior is configurable somewhere in the FSX.CFG file.I'm not familiar with the goflight modules, but I assume the module is loaded as a dll in DLL.XML. It may also be an exe, but in either case, it should logically get loaded before the menu shows up. If the goflight software is a simconnect client, or indirectly, an FSUIPC client, simconnect.dll will be loaded and the SIMCONNECT.XML file read.Again, all of this is on a limb...Hope this helps,Etienne

Share this post


Link to post
Share on other sites

Hi Etienne,Thank you for that explanation. How you describe the loading process matches with events I see on the screen.When I was installing ASX on my laptop the instructions talked about a simconnect.xml file that sits in Doc&SettingsMyNameAppDataMicrosoftFSX. When I looked on my FS PC (not the one where ASX sits) I couldn't find one. At this point the GoFlight executable GFDevFSX.exe was running fine.I did have a folder in C:WindowsWinSxS that contained the name FlightSimulator and it contained simconnect.dll but I couldn't honestly say what version.But reading this message from Pete Dowson I do know I had a folder with exactly the same name so following Pete's advice I deleted it. http://forums.simflight.com/viewtopic.php?...41fbc6660b7c6fdNow this is significant because from this point onwards the GoFlight program failed to load. It's almost as if GoFlight was looking for a folder with a specific name and anything different would cause the exe to fail.Does that sound feasible? If you read this reply from someone who has the GoFlight modules you'll notice he has the same folder name as Pete suggests deleting and GoFlight works fine for him even though he also has a second FlightSimulator folder. http://forums.simflight.com/viewtopic.php?p=390253#390253I think if I create a folder with that name and place simconnect.dll in it then GoFlight will work. My only concern about doing this is that ASX will fail to work.But why would Pete advise deleting a folder that appears necessary for GoFlight to work? Unfortunately he's on holiday at present. I'll have a chat to him on his return.Cheers,

Share this post


Link to post
Share on other sites

SUCCESS!!!I've created a new folder with the same name as that in Pete's message, copied my SIMCONNECT.DLL to it and FSX starts and so does the GoFlight executable.I have no idea why this has worked. It's almost as though the folder name is hardcoded into the GoFlight executable. I'll write to GoFlight and let them know.Oh, and ASX on my laptop still works :-)I'm so relieved! :-beerchug

Share this post


Link to post
Share on other sites

Glad you got it resolved, good information. How do you like the GoFlight modules?Etienne

Share this post


Link to post
Share on other sites

Thanks for the recommendation, I'll look into it.Etienne

Share this post


Link to post
Share on other sites

>But reading this message from Pete Dowson I do know I had a>folder with exactly the same name so following Pete's advice I>deleted it.>http://forums.simflight.com/viewtopic.php?...41fbc6660b7c6fdThe deletion of the folder is only a step in a process of repair. You must NOT just delete the folder. The deletion is just a way of forcing FS's repair action to reinstall SimConnect correctly when it fails to work properly. If the folder is still there but the Registry is broken for it, the repair doesn't work!>But why would Pete advise deleting a folder that appears>necessary for GoFlight to work? Unfortunately he's on holiday>at present. I'll have a chat to him on his return.I have never ever advised simply deleting a folder!!! You MUST follow that with running the repair, as it clearly says. By just deleting the folder you completely wreck any chance of SimConnect working!I keep repeating this on the several threads/forums you posted the same statements because I don't want people to believe I give such stupid and incorrect advice as you are clearly implying, even if unintentionally! :-(RegardsPete

Share this post


Link to post
Share on other sites

Hi Pete,I know we've spoken face to face about this yesterday but I just wanted to post publicly for the benefit of others...<>I didn't just delete the folder. I did run the repair but for whatever reason I still couldn't get the GoFlight program to run. This was whilst I was trying to get ASX (on a laptop) to speak to FSX (on a desktop PC) and because of my lack of knowledge of how the simconnect process works I probably missed doing something important.Anyway, I have since deleted all FlightSim named folders in WinSxS and run the repair. I've also installed the SDK SP1 and I now have two FlightSim folders in WinSxS each with different versions of simconnect.dll in them. The one created by the repair run from the FSX DVD is the base version of simconnect.dll required by GoFlight. The later one contains the simconnect.dll required (probably) by ASX.I was under the impression that only one version of simconnect.dll was required. That is not the case. The builds are incremental and each dependent piece of software will use the relevant version.Regards,

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this