Can't find windows' CreateThread function / concurrency.spawn crashes host application
alkololl via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Fri Jan 1 14:02:46 PST 2016
Hey there and a happy new year,
I wrote a C++ Dll which gets injecrted into another process. Now
I want to port that Dll to D. In my C++ Dll I used a while loop
which captures all keystrokes via GetAsyncKeyState and waited for
F7 to be pressed and lastly unloads the dll via
FreeLibraryAndExitThread.
This while loop needs to be run out of an dedicated thread.
I've found that std.c.windows.windows doesn't include a
definition for Windows API's CreateThread method and the usage of
concurrency.spawn crashes my host application (in which the Dll
gets injected to).
How am I supposed to create a thread in the host application? Or
are there other ways to capture the F7 keystroke?
More information about the Digitalmars-d-learn
mailing list