Jump to content
Sign in to follow this  
Trax

Forcing a GPF

Recommended Posts

Trax

   Oh does this date! Many years ago I wrote a program which incorporated a Serial I/O library. As it turned out if you un-plugged and re-plugged the USB several times this Serial I/O library would generate a GPF (General Protection Fault). Since the GPF would not happen all the time I found some code posted here that when inserted in to a AutoIT program it would cause a GPF without fail. By GPF I mean the window "This program has caused an error and needs to close".

   Does anyone remember what code I can use to cause this type of GPF on purpose so I can debug? If it isn't called GPF any more what is it called?

 

 

 

Share this post


Link to post
Share on other sites
Trax

So I can write a recovery routine. Very hard to do if you can't get it to GPF with any consistency.

Share this post


Link to post
Share on other sites
genius257

@Trax

I'm not sure what you mean by GPF. Do you want the program to stop responding? If so do something like this:

GUICreate("", 700, 320)
GUISetState()
DllStructGetData(DllStructCreate("BYTE", 0x1), 1)
Exit

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×