Load D shared library on windows x64

Igor stojkovic.igor at gmail.com
Sat Aug 18 09:06:42 UTC 2018


On Saturday, 18 August 2018 at 00:31:49 UTC, Tofu Ninja wrote:
> On Friday, 17 August 2018 at 20:27:05 UTC, Tofu Ninja wrote:
>> Its this part that fails... always returns null
>>
>> HMODULE h = cast(HMODULE) Runtime.loadLibrary(dllName);
>> if (h is null) {
>> 	writeln("error loading");
>> 	return;
>> }
>
>
> I there any way to see why Runtime.loadLibrary is failing? It 
> just returns null on error which is not very helpful.

Maybe you can find something useful in how Derelict does it here: 
https://github.com/DerelictOrg/DerelictUtil/blob/master/source/derelict/util/sharedlib.d


More information about the Digitalmars-d-learn mailing list