Jump to content
The simFlight Network Forums

Placing a .DLL in MODULES folder


Recommended Posts

Pete,

We use several hardware devices in one of our applications that FS2004 provides the info (through FSUIPC) to. Each device comes from its vendor with an API so that we can control the device in software we develop (in c++). The APIs provide a header file (.h) with function definitions that we include in our software, a library file (.lib) that we link to, and a DLL (.dll) file that we run with. If we want Flight Simulator to run an application that we provide the DLL for, what do we need to do in Flight Simulator? For instance, the DLL has one function - how does Flight Simulator know the name of the function so it can call it? Or does the DLL need to be defined in such a way that Flight Simulator doesn't need to know the name of the function? That way every time FS starts my .DLL would properly load/execute. This is what PFC.DLL does using the serial port.

Link to comment
Share on other sites

The APIs provide a header file (.h) with function definitions that we include in our software, a library file (.lib) that we link to, and a DLL (.dll) file that we run with. If we want Flight Simulator to run an application that we provide the DLL for, what do we need to do in Flight Simulator? For instance, the DLL has one function - how does Flight Simulator know the name of the function so it can call it?

The DLL you use for your API is specific to your process. It will not be an FS DLL. Just because both programs use such libraries please do not be fooled into thinking that any program can use anyone else's library (DLL). It cannot unless specifically written to do so, and I doubt that you can persuade Microsoft to change FS to use your DLL.

Or does the DLL need to be defined in such a way that Flight Simulator doesn't need to know the name of the function?

DLLs used as FS Modules are written especially to be DLLs that run as modules in FS. They are not any-old library from any other project which are just tarted-up and plonked into the Modules folder. The nearest thing to an FS Module which is fully documented is an FS Gauge -- in fact a Gauge is merely a DLL which is loaded with a panel. If you learn to write FS gauges in C you will not be far off being able to write a Module.

Regards,

Pete

Link to comment
Share on other sites

That way every time FS starts my .DLL would properly load/execute.

I should have answered this part too.

You can add parameters to FSUIPC.INI to make FSUIPC load your program for you. See the section in the Advanced User's guide on this. There's also a utility, made by Jose Oliveira, available on the http://www.schiratti.com/dowson page to help.

Regards,

Pete

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.