On Wednesday, 2 December 2020 at 19:42:37 UTC, Jack wrote:
What am I missing?
As always... have you tired dmd -m32mscoff ?
On Wednesday, 2 December 2020 at 19:42:37 UTC, Jack wrote:
D code:
import core.sys.windows.dll;
mixin SimpleDllMain;
version(Windows) extern(C) export
int foo() { return 42; }
compiled with:
dmd -ofmydll.dll -shared -m32 dll.d
called from:
typedef int (__cdecl *MYPROC)(void);
int WINA
On Wednesday, 2 December 2020 at 20:08:29 UTC, Jack wrote:
On Wednesday, 2 December 2020 at 19:42:37 UTC, Jack wrote:
D code:
[...]
compiled with:
[...]
called from:
[...]
but hinstLib is NULL and GetLastError() = 193:
[...]
What am I missing?
for same reason, the dll build
On Wednesday, 2 December 2020 at 19:42:37 UTC, Jack wrote:
D code:
import core.sys.windows.dll;
mixin SimpleDllMain;
version(Windows) extern(C) export
int foo() { return 42; }
compiled with:
dmd -ofmydll.dll -shared -m32 dll.d
called from:
typedef int (__cdecl *MYPROC)(void);
int WINA
D code:
import core.sys.windows.dll;
mixin SimpleDllMain;
version(Windows) extern(C) export
int foo() { return 42; }
compiled with:
dmd -ofmydll.dll -shared -m32 dll.d
called from:
typedef int (__cdecl *MYPROC)(void);
int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,