Results 1 to 1 of 1
  1. #1
    seoyoungtae
    seoyoungtae is offline
    Guest
    Join Date
    2014 Mar
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    [Source] Process Suspend / resume function

    uses 절에 tlhelp32 추가



    //////////////



    interface 절에 아래 추가



    function OpenThread(dwDesiredAccess: DWORD; bInheritHandle: BOOL;
    dwThreadId: DWORD): THandle; stdcall; external kernel32;



    /////////////





    Procedure SuspendProcess( PID : DWORD );
    const
    THREAD_SUSPEND_RESUME = $0002;
    var
    nThread : THREADENTRY32;
    i,j : integer;
    hSnap,hThread : THandle;
    Return : Boolean;
    begin
    hSnap := CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD,0);
    if hSnap = 0 then
    Exit;
    nThread.dwSize := SizeOf(nThread);
    Return := Thread32First(hSnap,nThread);
    while Return do
    begin
    if nThread.th32OwnerProcessID = PID then
    begin
    hThread := OpenThread(THREAD_SUSPEND_RESUME,False,nThread.th3 2ThreadID);
    SuspendThread(hThread);
    end;
    Return := Thread32Next(hSnap,nThread);
    end;
    end;


    Procedure ResumeProcess( PID : DWORD);
    const
    THREAD_SUSPEND_RESUME = $0002;
    var
    nThread : THREADENTRY32;
    i,j : integer;
    hSnap,hThread : THandle;
    Return : Boolean;
    begin
    hSnap := CreateToolhelp32Snapshot(TH32CS_SNAPTHREAD,0);
    if hSnap = 0 then
    Exit;
    nThread.dwSize := SizeOf(nThread);
    Return := Thread32First(hSnap,nThread);
    while Return do
    begin
    if nThread.th32OwnerProcessID = PID then
    begin
    hThread := OpenThread(THREAD_SUSPEND_RESUME,False,nThread.th3 2ThreadID);
    ResumeThread(hThread);
    end;
    Return := Thread32Next(hSnap,nThread);
    end;
    end;

Similar Threads

  1. Replies: 2
    Last Post: 2018-04-02, 04:48 PM
  2. [Hack] Soul Saver function of abnormal function array of byte~
    By qq5600061 in forum Soul Saver
    Replies: 0
    Last Post: 2016-01-20, 11:23 AM
  3. Help scan function
    By proseco91 in forum Forsaken World Bots, Hacks, Cheats
    Replies: 0
    Last Post: 2012-07-20, 03:38 PM
  4. [Process, Services & Network] Process Hacker
    By wildspirit in forum Files & Tools
    Replies: 0
    Last Post: 2011-11-09, 05:00 AM
Visitors found this page by searching for:
Nobody landed on this page from a search engine, yet!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •