OK, my application works fine now, but when I try to build it in release mode, the compiler terminates with an error. It says an unknown software exception occurred. That really stinks because I was just about to put the final executable with the dlls and see how it runs.