to!string and windows programming

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Dec 24 10:27:54 PST 2012


On 12/24/12, Phil Lavoie <maidenphil at hotmail.com> wrote:
> I am currently going through the much recommended book
> "Programming Windows" and experiencing some stuff. One of which
> was formatting the hInstance and prevHInstance into a string.

You need to initialize the runtime or you will get crashes as soon as
the GC allocates memory.

Note that many Programming Windows examples were translated into D and
you can find them here:
https://github.com/AndrejMitrovic/DWinProgramming

Here's an example how the runtime is initialized:
https://github.com/AndrejMitrovic/DWinProgramming/blob/master/Samples/Chap01/HelloMsg/HelloMsg.d

See the `Runtime.initialize(&exceptionHandler);` call.


More information about the Digitalmars-d-learn mailing list