Load D shared library on windows x64

Mike Wey mike-wey at example.com
Sat Aug 18 11:27:29 UTC 2018


On 18-08-18 02:31, 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.

You can probably use: core.sys.windows.winbase.GetLastError

-- 
Mike Wey


More information about the Digitalmars-d-learn mailing list