|
-
Mar 11th, 2000, 01:02 AM
#1
Thread Starter
Addicted Member
* How to create a GPF ? *
YES! you read it RIGHT!
How to create a General Protection Fault from a vb App ?
Reason:
-----------------------------------------------------------
I want to generate Various Faults like 'GPF', 'Invalid Page Fault' and 'divide error' in my VB app which tests the efficiency of Crash protection programs like Nuts&Bolts-Bomb shelter, Norton Utilities-CrashGuard etc...
-----------------------------------------------------------
My question is What are the Different ways by which we can
generate a fault in a vb app.?
[Note :
The Generated Fault should not affect other Applications and
should not degrade system stability or performance.
It should work in Win95,98, NT4, Win2000]
For example I can throw an GPF by this code:
I do this by attempting to set my form as the parent of Desktop.
'---------------- Form Code --------------------------------
Private Declare Function GetDesktopWindow Lib "user32.dll" () As Long
Private Declare Function SetParent Lib "user32.dll" _
(ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long
Private Sub ThrowGPF()
Dim lRtn As Long
lRtn = SetParent(GetDesktopWindow, Me.hWnd)
End Sub
'---------------------------------------------------
BTW, If anyone Know how Crash Protection Programs Work it would be helpful to me!
Edited by G.Kumaraguru on 03-11-2000 at 03:03 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|