How create Win32api Thread in Dlang?

Adam D. Ruppe destructionator at gmail.com
Sat Sep 26 03:31:24 UTC 2020


On Saturday, 26 September 2020 at 03:08:56 UTC, Marcone wrote:
> #include <windows.h>

import core.sys.windows.windows

> WINAPI

extern(Windows)

> int main(int argc, char *argv[]) {

int main(string[] args)

>   CreateThread(NULL, 0, threadFunc, NULL, 0, NULL);

    CreateThread(null, 0, &threadFunc, null, 0, null);



Maybe minor compile errors like required casts but this is really 
about it. You can almost literally copy/paste most C examples to 
D.


More information about the Digitalmars-d-learn mailing list