Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
29235 Discussions

Using DLL:s from a QuickWin application

los
Beginner
1,027 Views
Hi,
I have seen that you can't link to a DLL when using Qwin (also tried with negative result).
Why is that? Is there a workaround?
Lars
0 Kudos
4 Replies
Steven_L_Intel1
Employee
1,027 Views
It's because the QuickWin environment is actually the "main program" and it calls your main program to begin execution. This requires static linking and having your main program in the link with the library.

You can call other DLLs from a QuickWin application, but they can't do anything that would require QuickWin.

QuickWin is intended as an easy way to add windows and graphics to a traditional Fortran application. It is not meant as an ultimate solution for all application types. You can use Win32 APIs or a third-party library such as Winteracter or GINOMENU. While these do not give you the ease of QuickWin nor the integration with Fortran I/O, the third-party libraries are fairly simple to add to any kind of application.
0 Kudos
los
Beginner
1,027 Views

The QuickWin interface has been very usefull in moving my command controlled simulation program developed under VMS to modern Windows environment. I have tried Win32 API but the scrolling "Terminal" window in QuickWin is a very god feature. I have enhanced the application with the toolbar function recommended byJugoslav Dujic plus a number of dialogs that "sends"commandsto the "Terminal" window. I have managed to do it without knowing a lot of Windows programming.

However, now I tied to link to a seperate simulation module (do not use any QuickWin or other user interface) in a DLL that I load with theloadlibrary function. It works together with a consol version of the program but not with the QuickWin version, I get access violation after a few calls to the DLL.

Do you have any tips what to? Maybe I need to link the DLL from the "main program"?

Thanks,

Lars

0 Kudos
Steven_L_Intel1
Employee
1,027 Views
What does this other DLL do? Are you sure you are calling it using the correct calling mechanism (C vs. STDCALL)?
0 Kudos
los
Beginner
1,027 Views

I use C convention since it's a C++ DLL but...

I seem to have jumped to conclusions based on reading the manual. I had an error in my debug printouts causing the error, just don't understand why the console version didn't trap. Any way, at the moment Iseem tobe able to get on developing the DLL link.

Thank you, Lars

0 Kudos
Reply