comment créer un suspender?????

    Publicités

Users Who Are Viewing This Thread (Total: 0, Members: 0, Guests: 0)

Status
Not open for further replies.

Djockers

[Synopsis]
V
Jun 17, 2011
1,160
0
461
127.0.0.1
Bonjour à toutes et à tous!!!

Voilà ma question est dans le titre: comment créer un suspender?


Merci pour vos réponses :svp:

A++
 

Kint.Style

Membre actif
Jul 20, 2011
231
0
321
Code:
Func _NTProcess($NtAction,$process)
	If $NtAction = "2" Then
		$KtwAction = "NtResumeProcess"
	ElseIf $NtAction = "1" Then
		$KtwAction = "NtSuspendProcess"
	ElseIf $NtAction = "3" Then
		ProcessClose($process)
	EndIf
$processid = ProcessExists($process)
If $processid Then
    $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $processid)
    $i_sucess = DllCall("ntdll.dll","int",$KtwAction,"int",$ai_Handle[0])
    DllCall('kernel32.dll', 'ptr', 'CloseHandle', 'ptr', $ai_Handle)
    If IsArray($i_sucess) Then
        Return 1
    Else
        SetError(1)
        Return 0
    Endif
Else
    SetError(2)
    Return 0
EndIf
EndFunc
 

Djockers

[Synopsis]
V
Jun 17, 2011
1,160
0
461
127.0.0.1
Code:
Func _NTProcess($NtAction,$process)
	If $NtAction = "2" Then
		$KtwAction = "NtResumeProcess"
	ElseIf $NtAction = "1" Then
		$KtwAction = "NtSuspendProcess"
	ElseIf $NtAction = "3" Then
		ProcessClose($process)
	EndIf
$processid = ProcessExists($process)
If $processid Then
    $ai_Handle = DllCall("kernel32.dll", 'int', 'OpenProcess', 'int', 0x1f0fff, 'int', False, 'int', $processid)
    $i_sucess = DllCall("ntdll.dll","int",$KtwAction,"int",$ai_Handle[0])
    DllCall('kernel32.dll', 'ptr', 'CloseHandle', 'ptr', $ai_Handle)
    If IsArray($i_sucess) Then
        Return 1
    Else
        SetError(1)
        Return 0
    Endif
Else
    SetError(2)
    Return 0
EndIf
EndFunc

merci beaucoup c'est donc en autroit
 
Status
Not open for further replies.