June 9, 201015 yr 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 My Web Site
June 9, 201015 yr 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 :)EricI'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
June 9, 201015 yr 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 My Web Site
June 10, 201015 yr 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...EricI 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
June 10, 201015 yr 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 My Web Site
June 10, 201015 yr 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...EricIf 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
June 11, 201015 yr 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 My Web Site
Create an account or sign in to comment