Re: Exception when creating a Thread with Windows

2025-07-05 Thread stef via Digitalmars-d-learn
On Saturday, 5 July 2025 at 10:52:21 UTC, Steven Schveighoffer wrote: By using WinMain, You are bypassing the runtime startup. Check out this article: https://wiki.dlang.org/D_for_Win32 -Steve Thank you very much. It's working perfectly. stef

Re: Exception when creating a Thread with Windows

2025-07-05 Thread Steven Schveighoffer via Digitalmars-d-learn
On Saturday, 5 July 2025 at 10:39:13 UTC, stef wrote: Hello, I'm totally new using D. I'm trying to create a thread using this code: ```d … extern (Windows) int WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) … ``` I'm testing this program using

Exception when creating a Thread with Windows

2025-07-05 Thread stef via Digitalmars-d-learn
Hello, I'm totally new using D. I'm trying to create a thread using this code: ```d import std.stdio; import core.thread; import core.time; import std.format; import core.stdc.stdio; void myThread() { for (int i = 0; i < 5; i++) { writefln("Message from secon