Re: Calling main() from WinMain()

2012-06-06 Thread John Chapman
On Wednesday, 6 June 2012 at 02:52:39 UTC, BLM768 wrote: I've researched this some more, and it appears that WinMain() actually doesn't do any runtime initialization. That means I should be able to just call the C main from WinMain() and let it initialize the runtime and call _Dmain(). The main

Re: Calling main() from WinMain()

2012-06-05 Thread BLM768
I've researched this some more, and it appears that WinMain() actually doesn't do any runtime initialization. That means I should be able to just call the C main from WinMain() and let it initialize the runtime and call _Dmain(). The main problem I have now is that as soon as I put main() in, D

Re: Calling main() from WinMain()

2012-06-05 Thread Andrej Mitrovic
On 6/5/12, BLM768 wrote: > I'm working on a cross-platform GUI library and I'd like to be > able to call the user's main() function from WinMain() so users > don't have to write both functions. GUI libraries don't have to work this way. You could instantiate an "App" and then call some internal "

Re: Calling main() from WinMain()

2012-06-05 Thread Artur Skawina
On 06/05/12 16:40, BLM768 wrote: > I'm working on a cross-platform GUI library and I'd like to be able to call > the user's main() function from WinMain() so users don't have to write both > functions. However, I'm at a bit of a loss as to how to accomplish that. I > know that D internally creat

Calling main() from WinMain()

2012-06-05 Thread BLM768
I'm working on a cross-platform GUI library and I'd like to be able to call the user's main() function from WinMain() so users don't have to write both functions. However, I'm at a bit of a loss as to how to accomplish that. I know that D internally creates the extern(C) main(), which in turn c