forums.silverfrost.com Forum Index forums.silverfrost.com
Welcome to the Silverfrost forums
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

*64 DLL link to Excel 64

 
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit
View previous topic :: View next topic  
Author Message
BILLDOWS



Joined: 22 Jul 2005
Posts: 86
Location: Swansea, UK

PostPosted: Wed Aug 24, 2016 4:54 pm    Post subject: *64 DLL link to Excel 64 Reply with quote

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
Back to top
View user's profile Send private message Visit poster's website
BILLDOWS



Joined: 22 Jul 2005
Posts: 86
Location: Swansea, UK

PostPosted: Sun Aug 28, 2016 12:05 pm    Post subject: Reply with quote

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

! PACK1210 - Packing 1200*1000 pallet with maximum number of real boxes a * b
!
F_stdcall function PACK1210(a, b)
! Packing Function
WINAPP
include <WINDOWS.INS>
REAL*8 , 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
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.silverfrost.com Forum Index -> 64-bit All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group