The thread 0xFFF8D3A7 has exited with code -1 (0xFFFFFFFF).
The thread 0xFFF7BE9F has exited with code 666 (0x29A).
The program 'programname' has exited with code 666 (0x29A).


Now, at the end of winmain i got return 666.

See, I know its Dx doing it, the second thread appears once I create a interface with DirectDraw.

So, it exits with -1..that good?