- fixed 64 bit compatibility issues by changing the data type of the handle used
- fixed a reetrancy problem into which one could run when calling MessageDlg
from inside of the error event handler. That triggered calling the eventhandler
again, which called MessageDlg again which triggered the event handler again...