Silverfrost Forums

Welcome to our forums

Using COM (Component Object Model) objects

1 Sep 2014 2:16 #14576

Hi,

Does the FTN95 7.1 compiler have any simplifying syntax for using COM objects? How would I access objects in FORTRAN through COM?

Thanks, Sterren

1 Sep 2014 2:35 #14577

There is nothing for Win32 FTN95. There may be a way via .NET Fortran.

1 Sep 2014 2:45 #14578

That is unfortunate. The product I wish to use as a COM client is a Win32 application. Can you recommend any literature on how to interface with COM through FORTRAN? Available free and online would be a bonus.

2 Sep 2014 8:50 #14586

Quoted from Sterren That is unfortunate. The product I wish to use as a COM client is a Win32 application.

The most straightforvard way to use COM automation would be to write a FTN95 callable DLL in C++ or use some other programming tool with easier support for COM. Also if you prefer hardcode approach, then you can probably call methods of the COM objects directly from the FTN95 with a little help from the inline assembler.

I once wrote a simple DLL for interfacing Excel from FTN95. It's available here with sample FTN95 project.

2 Sep 2014 4:13 #14587

Also this might be helpful example and could be used as a starting point for general purpose COM functions.

Please login to reply.