Arsip: detect program lain di windows
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
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;
more ...
- Pages:
- 1
reply |
Report Obsolete
Last Articles
Last Topic
- PascalTalk #6: (Podcast) Kuliah IT di luar negeri, susah gak sih?
by LuriDarmawan in Tutorial & Community Project more 3 years ago - PascalTalk #5: UX: Research, Design and Engineer
by LuriDarmawan in Tutorial & Community Project more 3 years ago - PascalTalk #4: Obrolan Ringan Seputar IT
by LuriDarmawan in Tutorial & Community Project more 3 years ago - PascalTalk #2: Membuat Sendiri SMART HOME
by LuriDarmawan in Tutorial & Community Project more 3 years ago - PascalTalk #3: RADically Fast and Easy Mobile Apps Development with Delphi
by LuriDarmawan in Tutorial & Community Project more 3 years ago - PascalTalk #1: Pemanfaatan Artificial Intelligence di Masa Covid-19
by LuriDarmawan in Tutorial & Community Project more 3 years ago - Tempat Latihan Posting
by LuriDarmawan in OOT more 4 years ago - Archive
- Looping lagi...
by idhiel in Hal umum tentang Pascal Indonesia more 11 years ago - [ask] koneksi ke ODBC user Dsn saat runtime dengan ado
by halimanh in FireBird more 11 years ago - Validasi menggunakan data tanggal
by mas_kofa in Hal umum tentang Pascal Indonesia more 11 years ago
Random Topic
- Aplikasi modular
by luckynvic in Enginering more 17 years ago - change function
by nurez in MySQL more 17 years ago - ribet dengan stok
by e_soep in Tip n Trik Pemrograman more 14 years ago - DLL Connection
by rtl_gitulho in Hal umum tentang Pascal Indonesia more 16 years ago - Banyak tanya
by Edwin2006 in Hal umum tentang Pascal Indonesia more 18 years ago - atur priority startup
by ImanD in OOT more 17 years ago - Tanya bikin interface 3D di delphi
by 113050251 in Hal umum tentang Pascal Indonesia more 17 years ago - Menampilkan stok barang berdasarkan tanggal
by deded in Hal umum tentang Pascal Indonesia more 12 years ago - [tanya] ISO 8583 Primary Bitmap
by DelphiExpert in Tip n Trik Pemrograman more 18 years ago - Borland Delphi 2005 Updated !
by xerion in Enginering more 17 years ago