Old 32-bit DLL; cannot get calls working in 64-bit MS-Excel - PtrSafe or more?

mcm91201

New Member
Joined
Dec 4, 2012
Messages
16
I am not a programmer so please beer with me.


I am running:


Windows v10 Pro ver 1607 OS Build 14393.953
MS-Office 365 ProPlus Version 1701 Build 7766.2060 (there is a Star Trek joke in there somewhere)
MS-Excel 2016 MSO (16.0.7766.7080) 64-bit


I am trying to get an old dll running in new MS-Excel. I use a tool developed by the French space agency (CNES) to calculate satellite link parameters. The tool can be found at https://logiciels.cnes.fr/content/propa?language=en: . The tool consists of a 32-bit dll (propa.dll) and a VBA file (propa.bas). To get the tool to work you put the dll in the MS-Excel path (I stuff it in c:\windows\system32), open up MS-Excel, import the .bas (I stuff it in the same directory as the dll), and start using the dll using the functions defined in the bas file. This worked great all the way through Win v8.1 and MS-Excel 2013 (32-bit). Now upgraded to 64-bit and not so good with the dll/bas. I have reviewed as much as I can find on the web and have some hints but appear to not know what I am doing.


I have the original "VBA6" bas file and a modified "VBA7" bas file listed below. Here are questions comments running through my head; all I care about is getting it working but these questions may give me some understanding to someone else's solution.


VBA6 bas file has an Attribute line; no idea what it does. https://msdn.microsoft.com/EN-US/library/office/gg264344.aspx


The (#if VBA7 - Declare functions - #else) defines everything for VBA7. The (#else - Declare functions - #end if) defines everything for VBA6 or older.
http://www.mrexcel.com/forum/excel-questions/988981-32-bit-visual-basic-applications-64-bit-pc.html


When looking at the VBA code in MS-Excel Developer the VBA7 is compiled "black/blue". The VBA6 stuff is red "error". Trying to call the functions defined in the compiled portion of the bas file (VBA7) gives NAME? errors.


Deleting the #if-then-#else-#end if statements and the VBA6 declarations leaving the VBA7 stuff alone still does not get the VBA7 to work in MS-Excel.


I am guessing that I have two problems here: 1. VBA7 variables in/out of dll are wrong, and 2. if-then-else-endif is wrong.

All of the dll function call input and outputs are of type double. I assume that these are all safe in a 64-bit system or is there something I must do on top of adding the PtrSafe keyword? https://msdn.microsoft.com/en-us/library/office/gg251723.aspx


The aliases all end in an @## is that a clue about variables?

Any help appreciated

Mike


*****Original bas file starts here*****

Rich (BB code):
Attribute VB_Name = "Propa"


Declare Function Agaz Lib "propa" _
           Alias "_Calcule_Agaz@32" (ByVal freq As Double, _
                 ByVal Elevation As Double, _
                 ByVal Temperature As Double, _
                 ByVal ro As Double) As Double


Declare Function Acloud Lib "propa" _
           Alias "_Calcule_Anuages@24" (ByVal freq As Double, _
                 ByVal Elevation As Double, _
                 ByVal L As Double) As Double


Declare Function Arain Lib "propa" _
           Alias "_Calcule_Apluie@64" (ByVal lat As Double, _
                 ByVal freq As Double, _
                 ByVal Elevation As Double, _
                 ByVal Indispo As Double, _
                 ByVal hstation As Double, _
                 ByVal hpluie As Double, _
                 ByVal R001 As Double, _
                 ByVal polar As Double) As Double


Declare Function Iscint Lib "propa" _
           Alias "_Calcule_Scintillation@56" (ByVal Nwet As Double, _
                 ByVal freq As Double, _
                 ByVal Elevation As Double, _
                 ByVal Indispo As Double, _
                 ByVal hstation As Double, _
                 ByVal eta As Double, _
                 ByVal Diam As Double) As Double


Declare Function Nwet Lib "propa" _
           Alias "_Calcule_coindice_refraction@16" (ByVal latitude As Double, _
                 ByVal longitude As Double) As Double


Declare Function TTC Lib "propa" _
           Alias "_Calcule_contenu_eau_liquide@24" (ByVal latitude As Double, _
                 ByVal longitude As Double, _
                 ByVal Indispo As Double) As Double


Declare Function rain_height Lib "propa" _
           Alias "_Calcule_hauteur_pluie@16" (ByVal latitude As Double, _
                 ByVal longitude As Double) As Double


Declare Function rain_intensity Lib "propa" _
           Alias "_Calcule_intensite_pluie@24" (ByVal latitude As Double, _
                 ByVal longitude As Double, _
                 ByVal Indispo As Double) As Double


Declare Function Temperature Lib "propa" _
           Alias "_Calcule_temperature@16" (ByVal latitude As Double, _
                 ByVal longitude As Double) As Double


Declare Function WVC Lib "propa" _
           Alias "_Calcule_vapeur_d_eau@16" (ByVal latitude As Double, _
                 ByVal longitude As Double) As Double


Declare Function iwvc Lib "propa" _
           Alias "_Calcule_contenu_vapeur_eau@24" (ByVal latitude As Double, _
                 ByVal longitude As Double, _
                 ByVal Indispo As Double) As Double


Declare Function Agaz_exceeded Lib "propa" _
           Alias "_Calcule_Agaz_depassee@40" (ByVal freq As Double, _
                 ByVal Elevation As Double, _
                 ByVal Temperature As Double, _
                 ByVal iwvc As Double, _
                 ByVal ro As Double) As Double


Public Declare Function version Lib "propa" _
           Alias "_version@0" () As Long

*****End of original bas file*****


Everything I read says that this edited bas file should do it.


*****Edited bas file*****

Rich (BB code):
#If VBA7 Then
Declare PtrSafe Function Agaz Lib "C:\Windows\System32\propa" _
                   Alias "_Calcule_Agaz@32" (ByVal freq As Double, _
                         ByVal Elevation As Double, _
                         ByVal Temperature As Double, _
                         ByVal ro As Double) As Double


Declare PtrSafe Function Acloud Lib "C:\Windows\System32\propa" _
                   Alias "_Calcule_Anuages@24" (ByVal freq As Double, _
                         ByVal Elevation As Double, _
                         ByVal L As Double) As Double


Declare PtrSafe Function Arain Lib "C:\Windows\System32\propa" _
                   Alias "_Calcule_Apluie@64" (ByVal lat As Double, _
                         ByVal freq As Double, _
                         ByVal Elevation As Double, _
                         ByVal Indispo As Double, _
                         ByVal hstation As Double, _
                         ByVal hpluie As Double, _
                         ByVal R001 As Double, _
                         ByVal polar As Double) As Double


Declare PtrSafe Function Iscint Lib "C:\Windows\System32\propa" _
                   Alias "_Calcule_Scintillation@56" (ByVal Nwet As Double, _
                         ByVal freq As Double, _
                         ByVal Elevation As Double, _
                         ByVal Indispo As Double, _
                         ByVal hstation As Double, _
                         ByVal eta As Double, _
                         ByVal Diam As Double) As Double


Declare PtrSafe Function Nwet Lib "C:\Windows\System32\propa" _
                   Alias "_Calcule_coindice_refraction@16" (ByVal latitude As Double, _
                         ByVal longitude As Double) As Double


Declare PtrSafe Function TTC Lib "C:\Windows\System32\propa" _
                   Alias "_Calcule_contenu_eau_liquide@24" (ByVal latitude As Double, _
                         ByVal longitude As Double, _
                         ByVal Indispo As Double) As Double


Declare PtrSafe Function rain_height Lib "C:\Windows\System32\propa" _
                   Alias "_Calcule_hauteur_pluie@16" (ByVal latitude As Double, _
                         ByVal longitude As Double) As Double


Declare PtrSafe Function rain_intensity Lib "C:\Windows\System32\propa" _
                   Alias "_Calcule_intensite_pluie@24" (ByVal latitude As Double, _
                         ByVal longitude As Double, _
                         ByVal Indispo As Double) As Double


Declare PtrSafe Function Temperature Lib "C:\Windows\System32\propa" _
                   Alias "_Calcule_temperature@16" (ByVal latitude As Double, _
                         ByVal longitude As Double) As Double


Declare PtrSafe Function WVC Lib "C:\Windows\System32\propa" _
                   Alias "_Calcule_vapeur_d_eau@16" (ByVal latitude As Double, _
                         ByVal longitude As Double) As Double


Declare PtrSafe Function iwvc Lib "C:\Windows\System32\propa" _
                   Alias "_Calcule_contenu_vapeur_eau@24" (ByVal latitude As Double, _
                         ByVal longitude As Double, _
                         ByVal Indispo As Double) As Double


Declare PtrSafe Function Agaz_exceeded Lib "C:\Windows\System32\propa" _
                   Alias "_Calcule_Agaz_depassee@40" (ByVal freq As Double, _
                         ByVal Elevation As Double, _
                         ByVal Temperature As Double, _
                         ByVal iwvc As Double, _
                         ByVal ro As Double) As Double


Public Declare PtrSafe Function version Lib "C:\Windows\System32\propa" _
                   Alias "_version@0" () As Long


#Else


Declare Function Agaz Lib "C:\Windows\System32\propa" _
           Alias "_Calcule_Agaz@32" (ByVal freq As Double, _
                 ByVal Elevation As Double, _
                 ByVal Temperature As Double, _
                 ByVal ro As Double) As Double


Declare Function Acloud Lib "C:\Windows\System32\propa" _
           Alias "_Calcule_Anuages@24" (ByVal freq As Double, _
                 ByVal Elevation As Double, _
                 ByVal L As Double) As Double


Declare Function Arain Lib "C:\Windows\System32\propa" _
           Alias "_Calcule_Apluie@64" (ByVal lat As Double, _
                 ByVal freq As Double, _
                 ByVal Elevation As Double, _
                 ByVal Indispo As Double, _
                 ByVal hstation As Double, _
                 ByVal hpluie As Double, _
                 ByVal R001 As Double, _
                 ByVal polar As Double) As Double


Declare Function Iscint Lib "C:\Windows\System32\propa" _
           Alias "_Calcule_Scintillation@56" (ByVal Nwet As Double, _
                 ByVal freq As Double, _
                 ByVal Elevation As Double, _
                 ByVal Indispo As Double, _
                 ByVal hstation As Double, _
                 ByVal eta As Double, _
                 ByVal Diam As Double) As Double


Declare Function Nwet Lib "C:\Windows\System32\propa" _
           Alias "_Calcule_coindice_refraction@16" (ByVal latitude As Double, _
                 ByVal longitude As Double) As Double


Declare Function TTC Lib "C:\Windows\System32\propa" _
           Alias "_Calcule_contenu_eau_liquide@24" (ByVal latitude As Double, _
                 ByVal longitude As Double, _
                 ByVal Indispo As Double) As Double
                 
Declare Function rain_height Lib "C:\Windows\System32\propa" _
           Alias "_Calcule_hauteur_pluie@16" (ByVal latitude As Double, _
                 ByVal longitude As Double) As Double
                 
Declare Function rain_intensity Lib "C:\Windows\System32\propa" _
           Alias "_Calcule_intensite_pluie@24" (ByVal latitude As Double, _
                 ByVal longitude As Double, _
                 ByVal Indispo As Double) As Double


Declare Function Temperature Lib "C:\Windows\System32\propa" _
           Alias "_Calcule_temperature@16" (ByVal latitude As Double, _
                 ByVal longitude As Double) As Double
                 
Declare Function WVC Lib "C:\Windows\System32\propa" _
           Alias "_Calcule_vapeur_d_eau@16" (ByVal latitude As Double, _
                 ByVal longitude As Double) As Double
                 
Declare Function iwvc Lib "C:\Windows\System32\propa" _
           Alias "_Calcule_contenu_vapeur_eau@24" (ByVal latitude As Double, _
                 ByVal longitude As Double, _
                 ByVal Indispo As Double) As Double
                 
Declare Function Agaz_exceeded Lib "C:\Windows\System32\propa" _
           Alias "_Calcule_Agaz_depassee@40" (ByVal freq As Double, _
                 ByVal Elevation As Double, _
                 ByVal Temperature As Double, _
                 ByVal iwvc As Double, _
                 ByVal ro As Double) As Double


Public Declare version Lib "C:\Windows\System32\propa" _
           Alias "_version@0" () As Long


#End If

*****End of edited bas file*****
 
Last edited by a moderator:
I paid a software developer colleague to rework the VBA bas file. He reverse engineered the 64-bit version of the dll then updated the bas file. I have looked at his code but have not been able to determine exactly how he made things happy. Sorry - not much help.
OK. Thanks for the reply. At the risk of being cheeky, is there any chance you could share the updated .bas file here?

Jaafar, there is indeed a 64-bit .dll, but the provided VBA script that is meant to allow Excel to speak to the .dll does not work, and it is impossible to know why without "looking under the hood" which I guess is what Mike/mcm91201 did. Also don't worry, the licence of the software allows modification:
On this "PROPA" software available in source code accompanied by the instructions, the CNES grants the licensee the right to use, reproduce, translate, modify and adapt and incorporate the software into another software.
 
Upvote 0

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
In theory, the 64bit client code should work the same as the 32bit after making a few changes like PtrSafe , LongLong Pointers, LongLong handles etc

For testing, I downloaded the propa64.dll file and tried calling the dll exported version function (which is self-explanatory) and it worked for me just fine and as expected.
VBA Code:
Option Explicit

Declare PtrSafe Function version Lib "C:\Test\propa64.dll" () As Long

Sub Test64()
    MsgBox version
End Sub
 
Upvote 0
And here is another example for returning temperature and rain height (based on latitude and longitude) in excel x64bit :
VBA Code:
Option Explicit

Declare PtrSafe Function rain_height Lib "C:\Test\propa64.dll" ( _
    ByVal latitude As Double, _
    ByVal longitude As Double _
) As Double

Declare PtrSafe Function Temperature Lib "C:\Test\propa64.dll" Alias "temperature" ( _
    ByVal latitude As Double, _
    ByVal longitude As Double _
) As Double


Sub Test64()
    MsgBox "Raing Height is : " & rain_height(8.5, 10)
    MsgBox "Temperature is : " & Temperature(28.125283, 1.824948)
End Sub
 
Last edited:
Upvote 0
Hmm. Thanks a lot Jaafar for these pointers. It feels like progress. However, some functions do not produce anything useful. Also when I compare some of the outputted values against a validated example, I see massive differences. Below I enclose the comparison between the validated 32-bit DLL running on 322-bit Excel (2013) and the functions modified as per your suggestion.

Maybe this is no longer an Excel question, but more going towards problems with the dll?? What do you think?

Modified VBA script
VBA Code:
Option Explicit

Declare PtrSafe Function Agaz Lib "C:\Test\propa64.dll" Alias "gaseous_attenuation" ( _
    ByVal freq As Double, _
    ByVal Elevation As Double, _
    ByVal Temperature As Double, _
    ByVal ro As Double _
    ) As Double

Declare PtrSafe Function WVC Lib "C:\Test\propa64.dll" Alias "SWVD" ( _
    ByVal latitude As Double, _
    ByVal longitude As Double _
    ) As Double

Declare PtrSafe Function version Lib "C:\Test\propa64.dll" () As Long

Declare PtrSafe Function rain_height Lib "C:\Test\propa64.dll" ( _
    ByVal latitude As Double, _
    ByVal longitude As Double _
    ) As Double

Declare PtrSafe Function Temperature Lib "C:\Test\propa64.dll" Alias "temperature" ( _
    ByVal latitude As Double, _
    ByVal longitude As Double _
    ) As Double

Declare PtrSafe Function rain_intensity Lib "C:\Test\propa64.dll" ( _
    ByVal latitude As Double, _
    ByVal longitude As Double, _
    ByVal Indispo As Double _
    ) As Double

Declare PtrSafe Function Nwet Lib "C:\Test\propa64.dll" Alias "NWET" ( _
    ByVal latitude As Double, _
    ByVal longitude As Double _
    ) As Double

Declare PtrSafe Function TTC Lib "C:\Test\propa64.dll" Alias "LWCC" ( _
    ByVal latitude As Double, _
    ByVal longitude As Double, _
    ByVal Indispo As Double _
    ) As Double

Declare PtrSafe Function iwvc Lib "C:\Test\propa64.dll" Alias "IWVC" ( _
    ByVal latitude As Double, _
    ByVal longitude As Double, _
    ByVal Indispo As Double _
    ) As Double

Declare PtrSafe Function Tmr Lib "C:\Test\propa64.dll" Alias "TMR" ( _
    ByVal Ts As Double _
    ) As Double

Declare PtrSafe Function Arain Lib "C:\Test\propa64.dll" Alias "rain_attenuation" ( _
    ByVal lat As Double, _
    ByVal freq As Double, _
    ByVal Elevation As Double, _
    ByVal Indispo As Double, _
    ByVal hstation As Double, _
    ByVal hpluie As Double, _
    ByVal R001 As Double, _
    ByVal polar As Double _
    ) As Double

Declare PtrSafe Function Acloud Lib "C:\Test\propa64.dll" Alias "cloud_attenuation" ( _
    ByVal freq As Double, _
    ByVal Elevation As Double, _
    ByVal L As Double _
    ) As Double

Declare PtrSafe Function Iscint Lib "C:\Test\propa64.dll" Alias "scintillation" ( _
    ByVal Nwet As Double, _
    ByVal freq As Double, _
    ByVal Elevation As Double, _
    ByVal Indispo As Double, _
    ByVal hstation As Double, _
    ByVal eta As Double, _
    ByVal Diam As Double _
    ) As Double

Declare PtrSafe Function XPD Lib "C:\Test\propa64.dll" ( _
    ByVal Arain As Double, _
    ByVal titl_deg As Double, _
    ByVal freq As Double, _
    ByVal elev_deg As Double, _
    ByVal prob As Double _
    ) As Double

Comparison table
example.png
 
Upvote 0
I see.
I suppose those values are returned in the cells via UDFs. Is it possible to upload the workbook to file sharing site (such as box.net) and post a link here so I can take a look.
 
Upvote 0
If you have the propa64.dll on your computer, then you downloaded the files from CNES -- the spreadsheet is in the zip file you downloaded ("demoprop.xls"). I have pasted the data above below in CSV format so you should be able to add in the static values easily:
Code:
,,,,,,,,
PROPAGATION LOSSES COMPUTATION,,,STATIC,,,,,
Version,,20160810,20160810,,,,,
,,,,,,,,
STATION,,"Using modified VBA, 64-bit DLL/Excel",Using 32-bit DLL and 32-bit Excel 2013,,,,,
Latitude ,(degrés),46.27,46.27,,,,,
Longitude,(degrés),6.12,6.12,,,,,
Height,(km),0.814,0.814,,,,,
Elevation,(degrés),33,33,,,,,
ANTENNA,,,,,,,,
Diameter,(m),1,1,,,,,
Efficiency,(%),50,50,,,,,
LINK,,,,,,,,
Frequency 1,(GHz),20,20,,,,,
Frequency 2 ,(GHz),30,30,,,,,
Polarisation,(°),45,45,,,,,
Unavailability,(%),0.01,0.01,,,,,
,,,,,,,,
CLIMATIC PARAMETERS,,,,,,,,
R001,(mm/h),17053.93,41.44,,,,,
Nwet,(N/A),104.00,33.79,,,,,
Rain height,(km),4.93,3.18,,,,,
Total Columnar Content Liquid Water,(kg/m2),262.90,0.85,,,,,
Surface Water vapour Density,(g/m3),19.57,6.34,,,,,
Integrated Water Vapour Content,(kg/m2),2187.89,28.06,,,,,
Temperature,(°K),298.30,279.32,,,,,
Mean Radiating Temperature ,(°K),37.34,263.59,,,,,
,,,,,,,,
,,,,,,,,
ATTENUATION Frequency 1,,,,,,,,
Atm. Gaseous Attenuation (1),(dB),0.00,0.43,,,,,
Exceed Atm. Gaseous Attenuation (2),(dB),N/A,0.80,,,,,
Rain Attenuation,(dB),###############################################################################################################################################################################################################################################################,15.84,,,,,
Clouds Attenuation,(dB),0.00,0.56,,,,,
Scintillation,(dB),###############################################################################################################################################################################################################################################################,0.58,,,,,
XPD,(dB),24475.43,13.68,,,,,
Total Attenuation without XPD,(dB),#NUM!,16.84,with (1),,,,
,,#VALUE!,17.21,with (2),,,,
 
Upvote 0
Ok- I have dowloaded the xls file and after updating the vba code for working in x64bit , I have noticed the following:

If you change the values of the input cells, the dll function results don't change !

For example;
Cell D20= rain_intensity(D6;D7;0,01). Now, If I change the values of the function parameters in cells D6 and D7, the function should normally return a different result but it doesn't !!! the rain_intensity function in D20 always returns the same value :- ie =17050.51...... It is static !

The above means the rain_intensity function is not computing its parameters... The same happens with the other dll functions.

I am positive that the vba x64bit dll declares as well as all the variable types are correct. The only thing I can think of for not working is that the downloaded propa64.dll file is faulty.

Request:
If you have x32bit excel within reach, can you please, try downloading the currently downlodeable x32bit dll (propa.dll) from CNES and check if it works ? Check if the function results are also static like the x64bit version.

Below are the declares for excel x32bit :

(Note the x32bit function names are decorated.)
VBA Code:
Attribute VB_Name = "Propa"
Declare Function Agaz Lib "propa.dll" Alias "gaseous_attenuation@32" (ByVal freq As Double, ByVal Elevation As Double, ByVal Temperature As Double, ByVal ro As Double) As Double
Declare Function Acloud Lib "propa.dll" Alias "cloud_attenuation@24" (ByVal freq As Double, ByVal Elevation As Double, ByVal L As Double) As Double
Declare Function Arain Lib "propa.dll" Alias "rain_attenuation@64" (ByVal lat As Double, ByVal freq As Double, ByVal Elevation As Double, ByVal Indispo As Double, ByVal hstation As Double, ByVal hpluie As Double, ByVal R001 As Double, ByVal polar As Double) As Double
Declare Function Iscint Lib "propa.dll" Alias "scintillation@56" (ByVal Nwet As Double, ByVal freq As Double, ByVal Elevation As Double, ByVal Indispo As Double, ByVal hstation As Double, ByVal eta As Double, ByVal Diam As Double) As Double
Declare Function Nwet Lib "propa.dll" Alias "NWET@16" (ByVal latitude As Double, ByVal longitude As Double) As Double
Declare Function TTC Lib "propa.dll" Alias "LWCC@24" (ByVal latitude As Double, ByVal longitude As Double, ByVal Indispo As Double) As Double
Declare Function rain_height Lib "propa.dll" Alias "rain_height@16" (ByVal latitude As Double, ByVal longitude As Double) As Double
Declare Function rain_intensity Lib "propa.dll" Alias "rain_intensity@24" (ByVal latitude As Double, ByVal longitude As Double, ByVal Indispo As Double) As Double
Declare Function Temperature Lib "propa.dll" Alias "temperature@16" (ByVal latitude As Double, ByVal longitude As Double) As Double
Declare Function WVC Lib "propa.dll" Alias "SWVD@16" (ByVal latitude As Double, ByVal longitude As Double) As Double
Declare Function iwvc Lib "propa.dll" Alias "IWVC@24" (ByVal latitude As Double, ByVal longitude As Double, ByVal Indispo As Double) As Double
Declare Function Agaz_exceeded Lib "propa.dll" Alias "gaseous_attenuation_exc@32" (ByVal freq As Double, ByVal Elevation As Double, ByVal Temperature As Double, ByVal iwvc As Double) As Double
Declare Function EFSR Lib "propa.dll" Alias "EFSR@24" (ByVal freq1 As Double, ByVal freq2 As Double, ByVal Att_1 As Double) As Double
Declare Function XPD Lib "propa.dll" Alias "XPD@40" (ByVal Arain As Double, ByVal titl_deg As Double, ByVal freq As Double, ByVal elev_deg As Double, ByVal prob As Double) As Double
Declare Function Tmr Lib "propa.dll" Alias "TMR@8" (ByVal Ts As Double) As Double
Declare Function Tnoise Lib "propa.dll" Alias "Noise_temperature@16" (ByVal A_total As Double, ByVal Tmr As Double) As Double
Public Declare Function version Lib "propa.dll" Alias "version@0" () As Long
 
Last edited:
Upvote 0
Hello -- in fact, the validated examples I presented in my last post were generated using the 32bit dll and 32 bit Excel. So I confirm that the outputs are NOT static, i.e. the very much vary depending on the inputs you feed into the functions. Indeed it's what I have depended on for many years :)

I also confirm the same behaviour as you with the 64-bit version... (same outputs regardless of the inputs!). Very strange (and unwanted!) behaviour.

I think I agree with your diagnosis sounds plausible..! Thanks a lot for your interest and support
 
Upvote 0
Hello -- in fact, the validated examples I presented in my last post were generated using the 32bit dll and 32 bit Excel. So I confirm that the outputs are NOT static, i.e. the very much vary depending on the inputs you feed into the functions. Indeed it's what I have depended on for many years :)

I also confirm the same behaviour as you with the 64-bit version... (same outputs regardless of the inputs!). Very strange (and unwanted!) behaviour.

I think I agree with your diagnosis sounds plausible..! Thanks a lot for your interest and support
It only happens when using the dll functions in cells. Using the functions in vba routines works fine.

I have wrapped the x64bit dll functions in vba UDFs and then call the UDFs in the cells. It works for a couple of times then I get #Value error in the cells and Out Of Stack Space error in vba !!
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,240
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top