PDA

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


Drigo
06-26-2009, 05:45 AM
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
06-26-2009, 04:52 PM
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
06-27-2009, 06:42 AM
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
06-27-2009, 08:35 AM
upgrade your first code: change simple timer to MMtimer

dELTA
06-28-2009, 08:45 AM
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.