View previous topic :: View next topic |
Author |
Message |
Roger
Joined: 24 Oct 2008 Posts: 2
|
Posted: Tue Dec 09, 2008 10:29 am Post subject: runtime error in DLL containing ClearWin code |
|
|
I am calling a DLL (compiled with FTN95, contains a lot of calculations) from an Excel spreadsheet, and this works fine. However, I decided to display a window at the start of the main fortran routine, with info about the version, contact, author, etc., using a fomat window.
When the spreadsheet is loaded, the first call to the DLL works fine, displaying the window and doing the calculations. However, the second call
shows a runtime error window, with the following message:
unable to register class SalfordDialog.
Pressing OK then closes the spreadsheet.
Any idea what is wrong with this approach?
Roger |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Tue Dec 09, 2008 11:03 am Post subject: |
|
|
I do not know why this happens but you may be able to avoid the problem by finding a way to call the Windows API function LoadLibrary in order to keep salflibc.dll loaded. You should also call FreeLibrary afterwards. |
|
Back to top |
|
|
Roger
Joined: 24 Oct 2008 Posts: 2
|
Posted: Tue Dec 09, 2008 11:19 am Post subject: |
|
|
Done what you suggested, and it is running correctly now.
Many thanks for your help
Roger |
|
Back to top |
|
|
|