Hi Richard, in the case of Larry Sand’s LoadLibrary, if you started a new hand coded project to test it, probably you missed the conditional compiler symbols in the project settings: ABCLinkMode=>1;ABCDllMode=>0
It doesn’t need the Type definition nor the Group in the procedure parameter, probably you infered that from the example in that link, but that is another wrapper class not needed to call loadlibrary (DiskInfo.clw vs being the call directly on FreDskSp.clw). In fact the technique is easy to implement as you keep the function prototypes the same as with statically linked, with just another function name to prevent name clashing and don’t using the NAME attribute.
I made an example modifying another previous simple example here:
That example had the function GetDiskFreeSpaceExA statically linked and the one attached here incorporates the extra code for loadlibrary like the one used on Larry’s example, and by the way, what are the chances, was about GetDiskFreeSpaceExA, although on his example he didn’t make the paremeters omittable or with default value. As a side note, the function ULIntToDec in DiskInfo.clw also confirms the conversion needed the high value to be multiplied by 2^32 and not by 2^32-1, but as stated i64toDecimal should be optimal, probably it not existed in 2001. A last note the Kernel LoadLibrary object could be without & / NEW. LlcFreeLibrary and DISPOSE omitted.
Attached modified TestOmitParam.clw (needs LoadLib.inc and LoadLib.clw) from ClarionMag’s link…TestOmitParam.clw (2,3 KB)