I'd guess stack overrun too - its fairly easy to do, and can happen if you pass bad values to some windows functions. Step through your program when you get to the 'bad' area (or use logging, with a flush after each write to your log file) and check carefully around the last thing you did. Check for mismatched parameters on your Calls to the DLLs - its a risk area. --Mark Terrano www.ensemblestudios.com (Creators of the Age of Empires series)