Silverfrost Forums

Welcome to our forums

*64 DLL link to Excel 64

24 Aug 2016 3:54 #17906

Having some years ago successfully created a link to a Silverfrost 32 bit DLL providing 2 additional cell functions (using in part code from a web posting I did not fully understand!) I am now trying to do the same for *64 to Excel 64 bit.

Have created a *64 DLL but having problems getting this working.

If anyone has done this and could provide any pointers would be most grateful..

Bill

28 Aug 2016 11:05 #17925

In 32 bit mode (32 bit fortran to a DLL) and 32 bit Excel (various versions) the following code works:

! PACK1210 - Packing 12001000 pallet with maximum number of real boxes a * b ! F_stdcall function PACK1210(a, b) ! Packing Function WINAPP include <WINDOWS.INS> REAL8 , intent(in) :: a,b REAL*8 PACK1210, rpacked etc

and in the Excel (32) the function is declared and the new function PACK1210 returns the expected results

Declare Function PACK1210 Lib 'MathFunc.dll' (a As Double, b As Double) As Double

In 64 bit I have left the fortran program unchanged (but compiled in 64 bit mode and used SLINK64 to create the DLL)

I know that changes are required to the Doubles in the Excel 64 declaraTion (LongLong or LongPtr?)

but all attempts have failed to get the PACK1210 declaration to accept input - selecting the new function and then providing a and b values causes Excel 64 to re-start itself.

Any ideas would be gratefully received.

Thanks, Bill

Please login to reply.