P3 causes general protection fault in .dll