Jump to content
Sign in to follow this  
tiberiu11

Calling a DLL in FS by a gauge

Recommended Posts

Hello guys, I am posting here since I have a question that I can not answer by myself. I would like to make a DLL that will be in the FS9/Modules folder, which does some calculations and stores some variables. What I want is interaction with a gauge that I am developing. I tried everything that I could, but I couldn't get it to work. I use this code for the DLL:http://www.squawkbox.ca/downloads.php Does anybody know on how I should proceed for interaction between the gauge and the DLL. I don't want anything complex, for start create a variable in the DLL, set a value to it, and be able to obtain the value in my gauge. Thank you very much for your help.Yours Truly,Tiberiu Brasovhttp://www.eaglesoftdg.com/staff_Images/TB.gif

Share this post


Link to post
Share on other sites

TiberiuYou really need to be able to include GAUGES.H or fs9gauges.h in your module to do this. This inclusion will allow you access to all the FS gauges functions and variables in your module. It will, for instance allow the 'register_var_by_name' command which will make sharing data with gauges somewhat easier. To do this, your import table and linkage definitions need to look like this:/* This is the module's import table. */ GAUGESIMPORT ImportTable = { { 0x0000000F, (PPANELS)NULL }, { 0x00000000, NULL } }; /* This is the module's export table. */ GAUGESLINKAGE Linkage = { 0x000002d9, module_init, module_deinit, 0, 0, FS9LINK_VERSION, {0} };If you want, I have a working example I can e-mail you.Doug

Share this post


Link to post
Share on other sites

Hello Doug, Thank you very much for your reply. The snippet that you provided is interesting and I will take a look at it when I will get the chance. I am interested in a working example. You can email it to me at tiberiu11@yahoo.comThank you!Yours Truly,Tiberiu Brasovhttp://eaglesoftdg.com/staff_Images/TB.gif

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...