May 27, 200917 yr HiI want to make an in-process dll like described in 'Beatle's Blog' http://beatlesblog.spaces.live.com/My only issue is, I think it would take forever to do this. Since it would be a dll, I can't compile myapp.dll while flight sim is running, correct? That means I'd have to shut down flight sim everytime I re-compile.Is there any way around this? I'm fairly new to dlls. Can I have an intermediate dll that starts with flight sim, that also tells myapp.dll to start/stop? I think that when fsx starts/stops it sends a dllstart/dllstop to run all its dlls.Am I making any sense? And if so, any ideas?Thanksbobby
May 29, 200917 yr I offer a thought in the absence of any other response, and with zero knowledge of SimConnect.Generally DLLs can be linked to an application in two ways: either at load time or dynamically at run time. The latter uses the LoadLibrary() function (or LoadLibraryEx()) to load the DLL. It then uses GetProcAddress() to get the address of an exported function or variable in the DLL so it can be used. Finally it can use FreeLibrary() to free the previously loaded DLL.In principle it seems that it could be possible to load and unload a DLL as you want, but it would need a real expert to confirm it - especially for SimConnect. Gerry Howard
May 29, 200917 yr Commercial Member Bobby-it's indeed true that when you need to recompile your DLL, FS will have to restart if the DLL is in-process...HOWEVER-most experienced developers will tell you they save LOTS of time by using Visual Studio's "edit & continue" functionality, which allows them to apply any code changes after breaking in the debugger. Major code changes (like adding static variables or new structures to the include files) will require a restart, but the savings for code tweaking are tremendous.Best regards, Lefteris Kalamaras - Founder www.flightsimlabs.com
May 29, 200917 yr Unless the functionality of your addon requires running as an in-proc DLL (ie you need access to the panel system maybe), you should be able to build the bulk of your addon as a console app (or Win32/MFC app I suppose, just more stuff to eventually remove though :-> ), and once you have everything working the way you want, do the minor changes to convert the console app to an in-proc DLL.With a console app, just use a background thread to handle the SimConnect_DispatchXxx stuff and pass an event handle to the SimConnect_Open function, and you can get pretty close to how the in-proc DLL works (I'm pretty sure there is an example of a console app in the SDK designed this way, probably listed as a sample under the SimConnect_Open function).Tim Tim http://fsandm.wordpress.com
May 29, 200917 yr Author Thanks for the input guys. I think I'll just make my program a .exe for now. I wanted to take the .dll route to make the program faster, but I think it'll be small enough that it won't really matter.thanksbobby
Create an account or sign in to comment