However, I have no windows programming experience at all, so have no idea which function call is mis-behaving here. Last few calls before the message box are: KERNEL32.VirtualFree() KERNEL32.LocalFree() ntdll.RtlDeleteCriticalSection() oleaut32.VariantClear() ntdll.RtlUnwind() KERNEL32.VirtualQuery() However, as far as I can see these might all be related to handling the error, and not be the cause of the error. If anyone could point me to the actual cause of the error I would greatly appreciate it. best regards, Jos de Kloe