sandcastler
sandcastler
So Obviously, need to compile for 32bit which I fixed. However, curious on thoughts on to handle the EN_Project when interfacing from Excel. Should I create a function that somehow...
To clarify. Declarations as below. Long seems to allow a project to be created (and returns value). When that value is placed in any other function, it crashes Excel. Any...
I tried as Any and still crashed for `Declare Function EN_loadProject Lib "C:\EPANET3\epanet3.dll" (ByVal inpfile As String, ByRef prj As Any) As Long` It can only be defined `as Any`...
@LRossman this is great and way above my knowledge at this time so thanks for investigating. I'll make the updates ASAP and report back with success/failure. I'll also try to...
@LRossman I've finally had a some time to focus on this. However, I'm afraid I'm a bit over my head at the moment with the module definition file and how...
@LRossman Thanks. Compiled and the exe works. However, still fails for EN_loadProject. Wehn defined 'ByRef' EN_loadproject crashes When defined 'ByVal' VBA sends back: > Returns Run-Time error '49' Bad DLL...
Thanks. I've looked at your example and am doing verbatim (other than the full path of the epanet3.dll.) (FYI, didn't have the .frx file so couldn't see the form but...
Excel is 32-bit version, machine is 64-bit. However, I just put DLLExport infront of my EN_RunEpanet function and it worked! I [stumbled upon this](https://github.com/eladsal/epanet-deprecated/blob/master/src/toolkit.h) which I believe you are the...
Also, thanks for responding. 90% of me having a hard time is my lack of knowldege/experience with C++.
Though I was banging my head, I understood it better than you just telling me ;) I consider this a victory!