Arsip: detect program lain di windows

 
user image
more 16 years ago

daksa

halo master delphi, aku mo tanya gmn caranya buat detect program lain di windows jalan mis : kayak software athan basic, dia muncul saat waktu sholat tiba, supaya aku tau sekarang program tsb on show gimana?ato masih hide? trus pas aku tau athan basic itu on show aku njalanin ekseksusi, mungkin kayak winexec yang lain! TRIMS YA mohon dibantu :D
user image
more 16 years ago

ImanD

Inikah maksudnya?

function EnumProcess(hHwnd: HWND; lParam : integer): boolean; stdcall;
var
  pPid : DWORD;
  title, ClassName : string;
begin
  //if the returned value in null the 
  //callback has failed, so set to false and exit.
  if (hHwnd=NULL) then
  begin
    result := false;
  end
  else
  begin
    //additional functions to get more 
    //information about a process.
    //get the Process Identification number.
    GetWindowThreadProcessId(hHwnd,pPid);
    //set a memory area to receive 
    //the process class name
    SetLength(ClassName, 255);
    //get the class name and reset the 
    //memory area to the size of the name
    SetLength(ClassName, 
              GetClassName(hHwnd, 
                           PChar(className), 
                           Length(className)));
    SetLength(title, 255);
    //get the process title; usually displayed 
    //on the top bar in visible process
    SetLength(title, GetWindowText(hHwnd, PChar(title), Length(title)));
    //Display the process information 
    //by adding it to a list box
    ProcessForm.ProcessListBox.Items.Add
      ('Class Name = ' + className + 
       '; Title = ' + title + 
       '; HWND = ' IntToStr(hHwnd) + 
       '; Pid = ' + IntToStr(pPid));
    Result := true;
  end;
end;

procedure TProcessForm.GetProcessButtonClick(Sender: TObject);
begin  
  //Clear any previous calls
  if ProcessListBox.Count > 0 then
  ProcessListBox.Clear;
  //define the tag flag
  lp := 0; //globally declared integer
  //call the windows function with the address 
  //of handling function and show an error message if it fails
  if EnumWindows(@EnumProcess,lp) = false then
    ShowMessage('Error: Could not obtain 
               process window hook from system.');
end;
user image
more 16 years ago

xerion

yah, seperti itu lah.........
user image
more 16 years ago

ImanD

xixixiix, xerion hebat bisa tau yg dimaksud daksa, xixixiix
more ...
  • Pages:
  • 1
Share to

Random Topic

Local Business Directory, Search Engine Submission & SEO Tools FreeWebSubmission.com SonicRun.com