Hello, I have been working on creating a [color=orange:2a61284d80].dll[/color:2a61284d80] file, and calling it from Visual Basic Application (VB 6.5) in Microsoft Excel. Currently it results in a crash of MS Excel when the function is called.
Currently I have the following **.f95 ** (f95.f95)file:
F_STDCALL FUNCTION F(X)
INTEGER F, X
F=X
END
I generated a [color=orange:2a61284d80].dll[/color:2a61284d80] file using the slink in command line after calling the function:
C:\\...\\dll_File_Test>ftn95 f95.f95
[FTN95/Win32 Ver. 6.10.0 Copyright (c) Silverfrost Ltd 1993-2011]
NO ERRORS [<F> FTN95/Win32 v6.10.0]
C:\\...\\dll_File_Test>slink
[SLINK/Win32 v1.44 Copyright (c) Silverfrost Ltd. 1995-2010]
* dll
* lo f95.obj
* exportall
* file c:\\WINDOWS\\f95.dll
I then created a VB module in **MS Excel **:
Private Declare Function F Lib 'c:\\WINDOWS\\f95.dll' (ByVal i As Integer) As Integer
When I call the function in a cell in Excel, the application crashes. I assume that it is possible due to an incorrect variable pass, or something along those lines; however, am not certain. I have tried this by a couple methods - creating a .dll project as well, and have the same results.
I currently have Windows 5.10, with ftn95 6.10.0, Plato 4.4.0, VB-6.5, and MS Excel 2007
Thank you very much in advance. (I tried to look through most of the help files and previous posts, some had similar issues, but let me know if I have missed any)