forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

runtime error in DLL containing ClearWin code

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+
View previous topic :: View next topic  
Author Message
Roger



Joined: 24 Oct 2008
Posts: 2

PostPosted: Tue Dec 09, 2008 10:29 am    Post subject: runtime error in DLL containing ClearWin code Reply with quote

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
View user's profile Send private message Send e-mail
PaulLaidler
Site Admin


Joined: 21 Feb 2005
Posts: 7916
Location: Salford, UK

PostPosted: Tue Dec 09, 2008 11:03 am    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
Roger



Joined: 24 Oct 2008
Posts: 2

PostPosted: Tue Dec 09, 2008 11:19 am    Post subject: Reply with quote

Done what you suggested, and it is running correctly now.

Many thanks for your help

Roger
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> ClearWin+ All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group