GaAck
11-06-2015, 03:28 PM
Hallo,
I have some 32-bit-DLLs with complicated functions, which I use in an Excel-Spreadsheet. For this, I made a macro (VBA), which defines a function for the spreadsheet (user defined function) and this macro does not more than to calls the function in the DLL. Works fine.
Now I have to adapt it to 64-bit-systems. I decided, to use C++ and Visual Studio 2015 to make the DLL. (My original Pascal-Compiler does not support 64 bit and a change to C++ was very simple, there are only mathematical operations). I have read a lot, read posts in forums, tried a lot... no success. The macro runs, but I get "#WERT!" (I assume, in English versions "#VALUE!") in the cell. The problem seems to be in the fields "byval, byref", "stdcall, cdecl", "4- or 8-bit alignment" or any other of this kind.
Does anybody have an example which works? Any function "MyAdd(a1,a1 as double)" giving a1+a2 as result?
Would be great,
GaAck
Note: The algorithms are also used and tested (!!) in other programs, otherwise I could do it simply in an Excel-Makro.
I have some 32-bit-DLLs with complicated functions, which I use in an Excel-Spreadsheet. For this, I made a macro (VBA), which defines a function for the spreadsheet (user defined function) and this macro does not more than to calls the function in the DLL. Works fine.
Now I have to adapt it to 64-bit-systems. I decided, to use C++ and Visual Studio 2015 to make the DLL. (My original Pascal-Compiler does not support 64 bit and a change to C++ was very simple, there are only mathematical operations). I have read a lot, read posts in forums, tried a lot... no success. The macro runs, but I get "#WERT!" (I assume, in English versions "#VALUE!") in the cell. The problem seems to be in the fields "byval, byref", "stdcall, cdecl", "4- or 8-bit alignment" or any other of this kind.
Does anybody have an example which works? Any function "MyAdd(a1,a1 as double)" giving a1+a2 as result?
Would be great,
GaAck
Note: The algorithms are also used and tested (!!) in other programs, otherwise I could do it simply in an Excel-Makro.