Okay, then... I've been able to fix most bugs and the program runs fairly stable now. However, there seems to be some crashes occuring when there are many other applications running in Windows and I think it's because of an array of pointers, I'm using. I'm allocating and deallocating them correctly and normally there's no problem, but sometimes they cause an error 216 (mostly when there are a lot of other applications running). I'm thinking that I might now have set the correct memory settings for compiling in protected mode, but I can't figure out what the correct memory setting would be, since there's only the Stack Size to set and it seems that no matter what I set this to, it runs without problems (even though I've tried both setting it to 0 and the max value!). Any ideas what could be going on?