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

Linking on XP when fn ref not available

gelarimer
Einsteiger
1.827Aufrufe

I would like to include a call to fn. SetProcessDPIAware(), which is available in the Vista OS but not XP OS. However, I need to compile and link on an XP machine.

The program tests for the Vista OS before calling SetProcessDPIAware(), and the INTEFACE block for SetProcessDPIAware() is included in the IVF program.

Is there a way that an executable IVF program can be generated on XP without producing a link error, and that will still be able to call fn. SerProcessDPIAware() when run on Vista?

Thanks for any comments or information.

0 Kudos
2 Antworten
Steven_L_Intel1
Mitarbeiter
1.827Aufrufe
You would have to dynamically load the Windows DLL that defines this routine (user32.dll) and then call GetProcAddress to see if it's there. If so, then you can call it. See the sample DynamicLoad for an example of loading a DLL and call ing a procedure in it.
gelarimer
Einsteiger
1.827Aufrufe
Thanks Steve.
Antworten