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.

Modules for FS9 (More specific: ITrafficInfo)

Featured Replies

Hi fellow developersI'm experimenting with c++ and tried to write a module for fs9. With the help of some examples found on the internet this worked quite ok.I don't succeed using the itrafficinfo though: when I tried to include gauges.h and itrafficinfo.h kinda everything went wrong. Seems like I just can't connect to FS like this:extern "C" __declspec (dllexport) LINKAGE Linkage ={ 0x00000654, module_init, module_deinit, 0, 0, 0x0900,};extern "C" __declspec (dllexport) IMPORTTABLE ImportTable ={ { 0x00000000, NULL }};and then call this:IPanelCCallback* pPanelCallback = panel_get_registered_c_callback(TRAFFIC_INFO_INTERFACE_NAME);I'd be glad if anyone could point this out for me (using gauges.h and itrafficinfo.h in a module, what needs to be declared where, etc).ThanksJoris

My inner core of FS9 modules looks likes this, I never tried to acces the TrafficInfo interface from a module though, only from gauges.void FSAPI ModuleInit(void){...}void FSAPI ModuleDeinit(void){...}//-------------------------------------------------------------------------------------------------------BOOL WINAPI DllMain (HINSTANCE hDLL, DWORD dwReason, LPVOID lpReserved) { ... } /* This is the module's import table. */ GAUGESIMPORT ImportTable = { { 0x0000000F, (PPANELS)NULL }, { 0x00000000, NULL } }; /* This is the module's export table. */ GAUGESLINKAGE Linkage = { 0x00000001, ModuleInit, ModuleDeinit, 0, 0, FS9LINK_VERSION, NULL};If I recall that right you need 0x00000001 for full access to all functions of the PANELS structure (ImportTable), other numbers like 0x00000000 limit the functionality and all ..._register_c_callback functions are part of the "higher" ImportTable functions. Also ImportTable has to be properly set up with both entries, to get ImportTable at all which you need for calling any function out of it (most FS functions that are not part of the image structure itself, are macros extending the ImportTable members).Arne Bartels

Thanks Arne, I got it working now. I thought the 0x00000001 had to be a unique identifier, that's mistake 1 and mistake 2 I was exporting my own tables instead of using those provided in the gauges.h. Also the iTrafficInfo works now...Thanks!!Joris

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.