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.

Fs9 Modules With Vista

Featured Replies

I have developed a DLL module for fs9 (a DLL that is placed in the "Modules" directory of fs9, DLL that is loaded when fs9 starts) and it runs perfect on my system that runs Windows XP. Some other people also use this module without any problem with XP.But a friend of mine has Vista 32. He also uses this module without problem, except the error he gets when he quits fs9. At this time, he gets an error window that reports an error in XXX.dll_unloaded, where XXX.dll is the name of my module file.I don't understand this because I don't have such a module name. I don't understand why it works perfect on XP and crashes on Vista.Do I need to change anything in my code to make it work with Vista?Is there any Vista-specific action that must be done when the DLL_PROCESS_DETACH event occurs?Any help is welcome.Eric

  • Moderator
Do I need to change anything in my code to make it work with Vista?Is there any Vista-specific action that must be done when the DLL_PROCESS_DETACH event occurs?Any help is welcome.Eric
Eric, somewhere Tim Gregson (MS/ACES) mentioned some specific options that must be used when compiling to make the .dll "Vista compliant" but I'll be darned if I can find his post now... :( IIRC, it was in a thread at http://fsdevelopers.com some months ago... :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author

Thanks for the info. I will try to find it.Eric

I have developed a DLL module for fs9 (a DLL that is placed in the "Modules" directory of fs9, DLL that is loaded when fs9 starts) and it runs perfect on my system that runs Windows XP. Some other people also use this module without any problem with XP.But a friend of mine has Vista 32. He also uses this module without problem, except the error he gets when he quits fs9. At this time, he gets an error window that reports an error in XXX.dll_unloaded, where XXX.dll is the name of my module file.I don't understand this because I don't have such a module name. I don't understand why it works perfect on XP and crashes on Vista.Do I need to change anything in my code to make it work with Vista?Is there any Vista-specific action that must be done when the DLL_PROCESS_DETACH event occurs?Any help is welcome.Eric
Eric, if you compiled your DLL in Visual C++ you should ask your friend whether he has VC++ or on defect its redistributable (x86) package installed, otherwise your module might work bad or not work at all.Tom
  • Author
Eric, somewhere Tim Gregson (MS/ACES) mentioned some specific options that must be used when compiling to make the .dll "Vista compliant" but I'll be darned if I can find his post now... :( IIRC, it was in a thread at http://fsdevelopers.com some months ago... :(
Bill,Is this the thread you were talking about?http://www.fsdeveloper.com/forum/showthread.php?t=12813If so, I'm sorry to say it doesn't help much...Thank you,Eric
  • Moderator

Yes Eric, that was the one. Darn, I had hoped it might be relevant... But, it was a long time ago so I'm just happy to have remembered that there was a post! ;)Tom may be on to something with his suggestion.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Commercial Member

Eric,What version of Visual Studio are you running?

Andrew Wilson

sig_fslDeveloper.jpg

  • Author

I am using Visual Studio 2003.My friend, who has this problem under Vista, is not a developer so he doesn't have the redistributable package installed.Eric

No immediate idea what the problem could be, but a few things to look into:

  • Are you using any OS or 3rd Party subsystems from your DLL (like MSXML, MSHTML, any COM based interfaces, OS memory allocate/free functions, etc) - if so, does your Vista using friend have a different build/version of any of these?
  • Vista may be more active in checks made at exit, so check that you have freed any memory allocated, released any COM interfaces, etc before exiting the DLL
  • Can you get physical access to the Vista machine (ie is your friend local to you), or can your friend follow directions over the phone :-> - try running FS9, with your DLL, under a debugger and see if the debugger can let you see anything useful at crash time.
  • Try creating a minimal DLL (use your same basic framework, just remove all the code that actually does something) and have your friend try that one out and see if you still get the same problem (lets you narrow it down between either how your DLL is being built (which could include the VS2003 you are using, may have to upgrade to VS2005 or VS2008) or what your DLL is doing).

Can't think of anything else right now, its been ages since I've used the old Module system (we dropped support for that system in FSX, except a small subset thats still used by gauges), but you would think having written the original version for FS95 I would remember more about it :->Tim

  • Author
No immediate idea what the problem could be, but a few things to look into:
  • Are you using any OS or 3rd Party subsystems from your DLL (like MSXML, MSHTML, any COM based interfaces, OS memory allocate/free functions, etc) - if so, does your Vista using friend have a different build/version of any of these?
  • Vista may be more active in checks made at exit, so check that you have freed any memory allocated, released any COM interfaces, etc before exiting the DLL
  • Can you get physical access to the Vista machine (ie is your friend local to you), or can your friend follow directions over the phone :-> - try running FS9, with your DLL, under a debugger and see if the debugger can let you see anything useful at crash time.
  • Try creating a minimal DLL (use your same basic framework, just remove all the code that actually does something) and have your friend try that one out and see if you still get the same problem (lets you narrow it down between either how your DLL is being built (which could include the VS2003 you are using, may have to upgrade to VS2005 or VS2008) or what your DLL is doing).

Can't think of anything else right now, its been ages since I've used the old Module system (we dropped support for that system in FSX, except a small subset thats still used by gauges), but you would think having written the original version for FS95 I would remember more about it :->Tim

Hello Tim,
  • I am not using any 3rd party subsystem, no memory allocation/deallocation. I don't even use real C++ in this module, there is no class instanciation, no new, no delete
  • Indeed, it seems that Vista makes more checks than XP. I'm not sure, but I think Vista causes a crash if it releases a space memory that has already been released. Do you know if this is correct?
  • Unfortunately my friend is not really close, and not a developper. If I can't fix the problem, I will have to install Vista on a separate partition to test it by myself.
  • The idea of creating a minimal DLL is very good. This is my next step.

Apart from this, I may have found the solution. I moved the code that closes from the DllMain (when DLL_PROCESS_DETACH occurs) to the module_deinit. It seems to work better but it needs more testing.Thanks for your great help anyway !!Eric

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.