- Joined
- Aug 6, 2011
- Messages
- 405
- Reaction score
- 3
- Points
- 18
In the API guide, it states that:
In my work on catch-ctd, I hooked LoadLibraryA. It seems that DeltaGlider.dll is being loaded with LoadLibraryA twice!
This was done with my standard test scenario, the DeltaGlider/Brighton Beach scenario.
Looking at the Orbiter API calls made, the first load of the DG DLL does some init code with colors and such, then moves on to loading Lua and some other functions.
Then, the last library to load is the DG DLL again, where it does the same 8 init calls. The rest of the log is normal simulation stuff, no more libraries are loading.
What's happening with this dual-loaded DLL?
When the user launches the simulation by picking a scenario from the Orbiter Launchpad dialog and pressing the “Launch Orbiter” button, Orbiter will load the vessel DLL module for each spacecraft type used in the simulation, and call its InitModule function. This function is called only once per Orbiter session, no matter how many spacecraft of that type appear in the simulation
In my work on catch-ctd, I hooked LoadLibraryA. It seems that DeltaGlider.dll is being loaded with LoadLibraryA twice!
Code:
--snipped init code and loading planet modules--
LoadLibraryA:(libFileName:Modules\ShuttlePB.dll)...
LoadLibraryA:(libFileName:[B]Modules\DeltaGlider.dll[/B])...
oapiGetColour:(red:80 , green:80 , blue:224)...
oapiGetColour:(red:160 , green:120 , blue:64)...
oapiReadItem_bool:(f:00AEF3D0 , item:SCRAMJET , b:0)...
oapiRegisterExhaustTexture:(name:Contrail1a)...
oapiLoadMeshGlobal:(fname:DG\deltaglider_ns)...
oapiLoadMeshGlobal:(fname:DG\DeltaGliderCockpit)...
oapiCreateTextureSurface:(width:256 , height:256)...
oapiGetTextureHandle:(hMesh:0889BBC0 , texidx:5)...
LoadLibraryA:(libFileName:.\LuaInline.dll)
--snip--
LoadLibraryA:(libFileName:Modules\ShuttleA.dll)...
--snip--
LoadLibraryA:(libFileName:[B]Modules\DeltaGlider.dll[/B])...
oapiGetColour:(red:80 , green:80 , blue:224)...
oapiGetColour:(red:160 , green:120 , blue:64)...
oapiReadItem_bool:(f:00AEF3D0 , item:SCRAMJET , b:0)...
oapiRegisterExhaustTexture:(name:Contrail1a)...
oapiLoadMeshGlobal:(fname:DG\deltaglider_ns)...
oapiLoadMeshGlobal:(fname:DG\DeltaGliderCockpit)...
oapiCreateTextureSurface:(width:256 , height:256)...
oapiGetTextureHandle:(hMesh:0889BBC0 , texidx:5)...
oapiAsyncScriptCmd:(hInterp:08A29920 , cmd:run('dg/aap'))...
oapiReadScenario_nextline:(scn:00AEF59C , line:—Ðz·µÎ)...
oapiReadScenario_nextline:(scn:00AEF59C , line:STATUS Landed Mars)...
oapiReadScenario_nextline:(scn:00AEF59C , line:BASE Olympus)...
oapiReadScenario_nextline:(scn:00AEF59C , line:POS -135.4300001 12.7366196)...
oapiReadScenario_nextline:(scn:00AEF59C , line:HEADING 0.00)...
oapiReadScenario_nextline:(scn:00AEF59C , line:AFCMODE 7)...
oapiReadScenario_nextline:(scn:00AEF59C , line:PRPLEVEL 0:1.000000)...
oapiReadScenario_nextline:(scn:00AEF59C , line:NAVFREQ 0)...
oapiReadScenario_nextline:(scn:00AEF59C , line:XPDR 0)...
oapiReadScenario_nextline:(scn:00AEF59C , line:GEAR 1 1.0000)...
oapiReadScenario_nextline:(scn:00AEF59C , line:AAP 0:0 0:0 0:0)...
--snip--
This was done with my standard test scenario, the DeltaGlider/Brighton Beach scenario.
Looking at the Orbiter API calls made, the first load of the DG DLL does some init code with colors and such, then moves on to loading Lua and some other functions.
Then, the last library to load is the DG DLL again, where it does the same 8 init calls. The rest of the log is normal simulation stuff, no more libraries are loading.
What's happening with this dual-loaded DLL?