- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have just tried using the Fortran Module Wizard to generate COM and Automation interfaces for MS Powerpoint. The Fortran f90 code generated is attached but when I attempt to compile it I get copious warning messages relating to INVOKEARGS and an error message. I am compiling for x64 and get the same result with IFORT and IFX.
Many years ago I successfully used the wizard for Word & Excel interface generation.
I wonder if anyone can advise on what may be going wrong.
Thanks,
Steve
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm surprised that no one has answered this. It is a bug in the Module Wizard. It is generating code that declares the argument invokeargs of subroutine $$DisplayError as integer(4) whereas it should be integer(INT_PTR_KIND()). (Line 3434 in your file.)
For info, AUTOADDARG doesn't accept an array of variants as an argument so you'll have to remove the $Application_Run routine (lines 4804 to 4828 in your file) and forgo its functionality.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, "mfinnis", for your reply, it has been really useful. I am also surprised that no-one from Intel has replied or commented, maybe too busy trying to fix IFX or maybe Module Wizard is not under their umbrella anymore.
I do remember there were a relatively small number of warnings issued when I created COM interfaces for Word and Excel but as these didn't affect the functionality I needed I didn't follow up with Intel beyond an initial post on this forum many years ago.
I have already commented out the interface for $Application_Run just to get rid of the error, I probably won't need it. I will change the invokargs argument to INT_PTR_KIND() in $$DisplayError which should fix the 1000's of warnings. Now I can look into trying to interact with presentation functions to allow me to:
1) create a new Powerpoint presentation based on a template
2) fill in header text
3) add slides and populate each with bmp/jpg images
4) save presentation
5 close Powerpoint
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
This issue is escalated to Fortran Engineering for a fix. Thank you for reporting this to us.
@Stephen_Sutcliffe I do see you have Priority Support. Reporting this issue via Online Service Center will get a quicker response from Compiler Engineering.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have just submitted this request to Premier Support but there is a message saying they are currently very busy. (Can't imagine why?) Anyway I have reproduced the problem request here in hope that someone may be able to help. It maybe a "schoolboy error" on my part!
I have managed to fix the errors in the MSPPT interfaces generated by the Fortran Module Wizard, with help from community members replying to this post, and managed to compile the source file successfully. However when I try to link I get unresolved external symbols.
Build started...
1>------ Skipped Build: Project: Conversion (IFORT), Configuration: Debug x64 ------
1>Project not selected to build for this solution configuration
2>------ Build started: Project: FEM2000 (IFORT), Configuration: ExpDbg x64 ------
Linking...
Creating library x64\ExpDbg\FEM2000x_64dbg.lib and object x64\ExpDbg\FEM2000x_64dbg.exp
Modules.lib(MSPPTLib.obj) : error LNK2019: unresolved external symbol __imp_MSPPT_mp_$APPLICATION_GETPRESENTATIONS referenced in function PPTLIB_mp_PWP_CREATE
Modules.lib(MSPPTLib.obj) : error LNK2019: unresolved external symbol __imp_MSPPT_mp_$APPLICATION_ACTIVATE referenced in function PPTLIB_mp_PWP_CREATE
Modules.lib(MSPPTLib.obj) : error LNK2019: unresolved external symbol __imp_MSPPT_mp_$APPLICATION_QUIT referenced in function PPTLIB_mp_PWP_UNINIT
x64\ExpDbg\FEM2000x_64dbg.exe : fatal error LNK1120: 3 unresolved externals
Build log written to "file://C:/Win/FEM2000-XE%202023/x64/ExpDbg/BuildLog.htm"
FEM2000 - 4 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 34 up-to-date, 1 skipped ==========
========== Build started at 7:02 PM and took 07.936 seconds ==========
Do I need to specify additional libraries for linking or install more libraries from MS software development kit? I already successfully use both Word & Excel COM/Automation, utilizing interfaces generated by the Module Wizard (probably over 20 years ago), so the ole32.lib & oleauto32.lib libraries are already called up (see attached BuildLog.txt). BTW BuildLog.htm couldn't be attached to Post for some reason.
Interestingly there are functions called $Application_Activate and $Application_Quit in the Word interfaces module file which I call up when opening the Word application and quitting after populating the documents.
Finally can anyone suggest where can I find suitable documentation for implementing COM / Automation using Fortran?
Thanks
Steve

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page