Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

fs9 module loading order

Featured Replies

I am working on improving my fs9 Toolbox and I added a new feature into it. I tested it on my "work" version of fs9 and it was working perfect. Then I transfered it on my "full" fs9 installation, which has many other add-ons installed, and it crashed fs9 right after the splash screen appeared.Surprised, I searched and searched again into my new code. It is quite simple, just accessing DirectInput to read the joystick status, nothing supposed to crash FS... So I removed all the other add-on modules, and it worked. It appeared it was a conflict with IBD3D9GE.dll, a module from IBNET.I sometimes use INBET to fly in network so I tried to solve this conflict. I realized that when my module is named ZZZ.dll, it works perfect, but if I name it AAA.dll, it crashes.Does it mean FS loads the module DLLs in the alphabetical order? Maybe...Is there any other way to make sure a module is loaded before another one?Any info is greatly welcome :)Eric

I am working on improving my fs9 Toolbox and I added a new feature into it. I tested it on my "work" version of fs9 and it was working perfect. Then I transfered it on my "full" fs9 installation, which has many other add-ons installed, and it crashed fs9 right after the splash screen appeared.Surprised, I searched and searched again into my new code. It is quite simple, just accessing DirectInput to read the joystick status, nothing supposed to crash FS... So I removed all the other add-on modules, and it worked. It appeared it was a conflict with IBD3D9GE.dll, a module from IBNET.I sometimes use INBET to fly in network so I tried to solve this conflict. I realized that when my module is named ZZZ.dll, it works perfect, but if I name it AAA.dll, it crashes.Does it mean FS loads the module DLLs in the alphabetical order? Maybe...Is there any other way to make sure a module is loaded before another one?Any info is greatly welcome :)Eric
I've used the API functions FindFirstFile()and FindNextFile() to search for files. They appear to find files within a folder in alphabetic order.dlls can be loaded by LoadLibrary() API function so it seems likely that dlls would loaded alphabetically having been found by findFirstFile() and FindNextfile() in the module folder.

Gerry Howard

  • Author
I've used the API functions FindFirstFile()and FindNextFile() to search for files. They appear to find files within a folder in alphabetic order.dlls can be loaded by LoadLibrary() API function so it seems likely that dlls would loaded alphabetically having been found by findFirstFile() and FindNextfile() in the module folder.
Full agreed, I'm sure you're right.Now does someone has an idea why a module would work only when loaded before or after another?In other words, why does my module work when loaded last, but not when loaded first...Eric
Full agreed, I'm sure you're right.Now does someone has an idea why a module would work only when loaded before or after another?In other words, why does my module work when loaded last, but not when loaded first...Eric
I have no experience of writting dlls for FS other than for gauges.Can you explain what functions your dll exports/imports and what calls/uses them?

Gerry Howard

  • Author
I have no experience of writting dlls for FS other than for gauges.Can you explain what functions your dll exports/imports and what calls/uses them?
In fact, my module interacts with some fs9 standard DLLs, such as sim1.dll and window.dll. It initializes the links with these dlls when they are loaded, so there is no problem. The problem occured when I have just added some DirectX code to read the stick buttons (DirectInput). This is very standard and simple code, nothing very complex, and it causes a crash if my dll is not the last to load.Very hard to understand...Eric
In fact, my module interacts with some fs9 standard DLLs, such as sim1.dll and window.dll. It initializes the links with these dlls when they are loaded, so there is no problem. The problem occured when I have just added some DirectX code to read the stick buttons (DirectInput). This is very standard and simple code, nothing very complex, and it causes a crash if my dll is not the last to load.Very hard to understand...Eric
If a dll has a WINAPI DllMain() entry point any code in that section is executed when the dll is loaded by LoadLibrary(). It could be (though I don't know how) that this could somehow be affected by the order. EDITThis may be helpful. It refers to "fragility in load order" and recommends verifying that no calls depend on another DLL that may not have been fully loaded yet.http://www.microsoft.com/whdc/driver/kerne...L_bestprac.mspx

Gerry Howard

  • Author
If a dll has a WINAPI DllMain() entry point any code in that section is executed when the dll is loaded by LoadLibrary(). It could be (though I don't know how) that this could somehow be affected by the order. EDITThis may be helpful. It refers to "fragility in load order" and recommends verifying that no calls depend on another DLL that may not have been fully loaded yet.http://www.microsoft.com/whdc/driver/kerne...L_bestprac.mspx
Thank you, this document is really ineresting and may help, even if my code that interacts with other DLLs is NOT in the DllMain, it is used later, at a time when (I think) all the other DLLs are loaded. If they were not loaded, I would detect an error.Thank you again :)Eric

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.