Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Creating a custom module

Featured Replies

  • Commercial Member

Hi folks,I want to create a simple DLL that gets automatically loaded when FS9 starts and released when FS9 exits. The DLL won't communicate with FS9 directly so I hope I don't have to use the SDK (I have just taken a look at it and I'm not impressed :-) ). Which functions have to be exported by a DLL? I've taken a look at the existing DLL's (with DependencyWalker) and they all seem to export at least two functions, ImportTable and Linkage. The SDK doesn't explain these functions so I guess some type of macro creates those functions for you?Can someone maybe explain how these functions are called and what the prototype is so I can create my DLL?Thanks!Mark

Mark Foti

Author of aviaworx - https://www.aviaworx.com

logo_avsim.png

Here is the basic block of code:#include "fs9gauges.h"#include "some_local_header_file.h"#include #include void FSAPI module_init(void){} void FSAPI module_deinit(void){} /* 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} };The first element in the declaration of Linkage (0x2d9) can be pretty much any number you want.By including the reference to the gauges.h file, you will be able to use FS variables and key events - something that will make your life much easier.Doug

  • Author
  • Commercial Member

Hi Doug,thanks for the info! That's pretty much exactly what I needed! Although I can't honestly say I truly understand how the constructs work...How come the FS SDK is so "unfriendly"? Does it have to do with FS's ancient programming history (I hear many parts of the core have been carried over from version 4 written in assembler)?I'll give the dll a try tomorrow - thank goodness I can communicate with FS through FSUIPC!Do you also use these constructs or did someone create a more user-friendly wrapper?Kind regards,Mark

Mark Foti

Author of aviaworx - https://www.aviaworx.com

logo_avsim.png

  • Author
  • Commercial Member

And to everyone who might want to add something to the FS menu, consider using "SetWindowLongPtr" instead of "SetWindowLong" as its safer (considering the jump to 64 bit pointers)Regards,Mark

Mark Foti

Author of aviaworx - https://www.aviaworx.com

logo_avsim.png

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.