Log in

View Full Version : .Net -> How to close a external Msgbox !quick! ??


Drigo
June 26th, 2009, 04:45
Hey Guys

I want to close a external Msgbox very quick. Now I use following code:

Private Sub MessabgeboxFinder_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles DemomessageFinder.Tick
MessabgeboxFinder.Enabled = False
Dim APPMSGBOXHandle As Integer
APPMSGBOXHandle = FindWindow("#32770", "Can Terminal 1.0"
If APPMSGBOXHandle > 0 Then
SendMessage(APPMSGBOXHandle, WM_CLOSE, 0, 0)
End If
APPMSGBOXHandle = FindWindow("#32770", "Best Canterminal 1.0"
If APPMSGBOXHandle > 0 Then
SendMessage(APPMSGBOXHandle, WM_CLOSE, 0, 0)
End If
APPMSGBOXHandle = FindWindow("#32770", "Ultimative Can Terminal 1.0"
If APPMSGBOXHandle > 0 Then
SendMessage(APPMSGBOXHandle, WM_CLOSE, 0, 0)
End If
APPMSGBOXHandle = FindWindow("#32770", " Can Terminal 1.0"
MessabgeboxFinder.Enabled = True
End Sub

Timertick = 10ms
10ms are faster then 1ms -> I don't know why.

But this is not fast enough. With Do Loop I have to much CPU Performance (Yes I use DoEvent).

Does anybody know, how i can make this faster??

Thanks for all answers.

squidge
June 26th, 2009, 15:52
Inject code into the processes causing the dialog box and prevent them from showing it by either overwriting there code, or the function in the system DLL?

Drigo
June 27th, 2009, 05:42
Can't inject a code in the app, because very ugly anti debug tricks.
So i decide, to close it with a external app.
Trying a loader, but app crash -> anti debug tricks

Anti DEbug Tricks are very heavy. Process Memory is compared with a encryptes file.

evaluator
June 27th, 2009, 07:35
upgrade your first code: change simple timer to MMtimer

dELTA
June 28th, 2009, 07:45
Oh, and read the FAQ, you named the target (through your source code) and asked how to manipulate its "demo protections". Not allowed, thread locked.