Microsoft KB Archive/26732

Calling FORTRAN Routines from Windows Excel PSS ID Number: Q26732 Article last modified on 02-09-1993 PSS database name: W_eXceL

2.x 3.00

WINDOWS

Summary:

Windows Excel can call routines that are compiled into a Windows Dynamic Link Library (DDL). A Windows DLL can be written in C or Assembly. You currently cannot use Microsoft FORTRAN to write a Windows DLL.

More Information:

At least three significant differences exist between DLL libraries and normal libraries. The most significant difference arises because FORTRAN assumes that the DataSegment is the same as the StackSegment. In a Windows DLL, SS! equals DS; this is not true in a DLL.

The second difference is that all data in the library must be declared public or private in a special DEF file. Thus, any use of the FORTRAN run-time library will require an exhaustive list of all the data in the library marked private.

The third difference is that each library needs to call a startup routine similar to the startup routine called at the beginning of a normal FORTRAN program.

For Microsoft FORTRAN Versions 4.00 and 4.10, there is no support for any of these three differences. Excel cannot call FORTRAN code that is compiled with Microsoft FORTRAN.

Additional reference words: 2.0 2.00 2.01 2.10 2.1 3.0 3.00

Copyright Microsoft Corporation 1993.