EMO Style ForumPro - Hos Geldiniz
Getting Window Title From Process Name? Uyeols10

Join the forum, it's quick and easy

EMO Style ForumPro - Hos Geldiniz
Getting Window Title From Process Name? Uyeols10
EMO Style ForumPro - Hos Geldiniz
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Giriş yap

Şifremi unuttum

Istatistikler
Toplam 203 kayıtlı kullanıcımız var
Son kaydolan kullanıcımız: crayzboy76

Kullanıcılarımız toplam 1186 mesaj attılar bunda 862 konu
Tarıyıcı
 Kapı
 Indeks
 Üye Listesi
 Profil
 SSS
 Arama
Arama
 
 

Sonuç :
 


Rechercher çıkıntı araştırma

RSS akısı


Yahoo! 
MSN 
AOL 
Netvibes 
Bloglines 


Anahtar-kelime

kutu  loot  pointer  

Kimler hatta?
Toplam 3 kullanıcı online :: 0 Kayıtlı, 0 Gizli ve 3 Misafir

Yok

[ Bütün listeye bak ]


Sitede bugüne kadar en çok 217 kişi C.tesi Tem. 29, 2017 1:46 am tarihinde online oldu.
En son konular
» İnternetten Para Kazandıran Oyun ! Ödeme Alt Limiti Yok ! DEV KONU
Getting Window Title From Process Name? I_icon_minitimeCuma Ağus. 29, 2014 8:33 am tarafından Hello EMO

» goldenchase.net maden yaparak para kazanma
Getting Window Title From Process Name? I_icon_minitimeCuma Ağus. 29, 2014 8:18 am tarafından Hello EMO

» etichal hacker görsel egitim seti
Getting Window Title From Process Name? I_icon_minitimeÇarş. Ağus. 06, 2014 4:57 am tarafından Hello EMO

» KO TBL Source C#
Getting Window Title From Process Name? I_icon_minitimePtsi Ara. 09, 2013 6:36 am tarafından Hello EMO

» x86 Registers
Getting Window Title From Process Name? I_icon_minitimeC.tesi Ağus. 24, 2013 5:02 am tarafından Hello EMO

» [Tutorial] Pegando Address, Pointers de WYD
Getting Window Title From Process Name? I_icon_minitimeÇarş. Tem. 10, 2013 7:25 am tarafından Hello EMO

» [Tutorial] Pegando Address, Pointers de CS Metodo²
Getting Window Title From Process Name? I_icon_minitimeÇarş. Tem. 10, 2013 7:23 am tarafından Hello EMO

» [Tutorial] Aprendendo basico deASM OLLYDBG
Getting Window Title From Process Name? I_icon_minitimeÇarş. Tem. 10, 2013 7:22 am tarafından Hello EMO

» Basic C# DLL injector
Getting Window Title From Process Name? I_icon_minitimePtsi Tem. 08, 2013 7:48 am tarafından Hello EMO

Reklam

Getting Window Title From Process Name?

Aşağa gitmek

Getting Window Title From Process Name? Empty Getting Window Title From Process Name?

Mesaj tarafından Hello EMO Paz Ağus. 14, 2011 6:24 pm

[quote='The Godfather.' pid='14303059' dateline='1312482574']
Hey all,

Im kind of new to Delphi, but i am pretty awesome with VB(6, .NET, C#)

I am trying to get the title of a window, i know i need the handle, but how do i get the PID?

Once i have the PID, i think i can use this to get that windows title?

[PHP]type
PProcessID = ^TProcessID;
TProcessID = record
PID : DWORD;
Title : String[255];
end;

function GetWindowNameFromPID(PID: DWORD): String;
var
ProcessID : PProcessID;
begin
GetMem(ProcessID,SizeOf(TProcessID));
ProcessID^.PID := PID;
If Not EnumWindows(@EnumProcess,Integer(Pointer(ProcessID))) Then
begin
If MessageDlg('Could not get hook to the process handles.' + #13#10 + 'Try Again?',mtConfirmation,[mbYes,mbNo],0) = mrYes Then
begin
GetWindowNameFromPID(PID);
end;
end;
end;

function EnumProcess(Handle: HWND; lParam: Integer): BOOL; stdcall;
var
PID : Cardinal;
ProcessID : TProcessID;
Title : String;
begin
If Handle = NULL Then
begin
Result := False;
end
Else
begin
ProcessID := PProcessID(Pointer(lParam))^;
GetWindowThreadProcessID(Handle,PID);
If ProcessID.PID = lParam Then
begin
SetLength(Title,255);
SetLength(Title,GetWindowText(Handle,PChar(Title),Length(Title)));
If Title = '' Then
begin
Title := 'Empty';
end;
ProcessID.Title := Title;
end;
Result := True;
end;
end;[/PHP]

I would really appreciate any help or advice given to me.

Thank you for reading my thread.

Regards.
[/quote]
Hello EMO
Hello EMO
EMO Team
EMO Team

Cinsiyet : Erkek
Burçlar : Yay
Yılan
Mesaj Sayısı : 935
Puan : 374543
Rep Puanı : 18
Doğum tarihi : 28/11/89
Kayıt tarihi : 21/07/09
Yaş : 34
Nerden : EMO WorlD
İş/Hobiler : RCE Student / Game Hacking / Learn Beginner C#,C++,Delphi
Lakap : EMO

https://emostyle.yetkinforum.com

Sayfa başına dön Aşağa gitmek

Getting Window Title From Process Name? Empty Geri: Getting Window Title From Process Name?

Mesaj tarafından Hello EMO Paz Ağus. 14, 2011 6:29 pm

[quote='The Godfather.' pid='14304858' dateline='1312486201']
Not exactly, i need to get a windows title from the process name, somehow.

Example : GetWindowtitle('notepad.exe')

Output : Untitled - Notepad

Example : GetWindowtitle('firefox.exe')

Output : Getting Window title From Process Name? - Page 1 - Mozilla Firefox

Make sense?



When i try this, the messagebox is just blank:

[PHP]unit Unit2;

interface

uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;

type
TForm2 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

type
PProcessID = ^TProcessID;
TProcessID = record
PID : DWORD;
Title : String[255];
end;

var
Form2: TForm2;

implementation

{$R *.dfm}

function EnumProcess(Handle: HWND; lParam: Integer): BOOL; stdcall;
var
PID : Cardinal;
ProcessID : TProcessID;
Title : String;
begin
If Handle = NULL Then
begin
Result := False;
end
Else
begin
ProcessID := PProcessID(Pointer(lParam))^;
GetWindowThreadProcessID(Handle,PID);
If ProcessID.PID = lParam Then
begin
SetLength(Title,255);
SetLength(Title,GetWindowText(Handle,PChar(Title),Length(Title)));
If Title = '' Then
begin
Title := 'Empty';
end;
ProcessID.Title := Title;
end;
Result := True;
end;
end;

function GetWindowNameFromPID(PID: DWORD): String;
var
ProcessID : PProcessID;
begin
GetMem(ProcessID,SizeOf(TProcessID));
ProcessID^.PID := PID;
If Not EnumWindows(@EnumProcess,Integer(Pointer(ProcessID))) Then
begin
If MessageDlg('Could not get hook to the process handles.' + #13#10 + 'Try Again?',mtConfirmation,[mbYes,mbNo],0) = mrYes Then
begin
GetWindowNameFromPID(PID);
end;
end;
end;

procedure TForm2.Button1Click(Sender: TObject);
begin
showmessage(GetWindowNameFromPID(2392));
end;
end.
[/PHP]
[/quote]
Hello EMO
Hello EMO
EMO Team
EMO Team

Cinsiyet : Erkek
Burçlar : Yay
Yılan
Mesaj Sayısı : 935
Puan : 374543
Rep Puanı : 18
Doğum tarihi : 28/11/89
Kayıt tarihi : 21/07/09
Yaş : 34
Nerden : EMO WorlD
İş/Hobiler : RCE Student / Game Hacking / Learn Beginner C#,C++,Delphi
Lakap : EMO

https://emostyle.yetkinforum.com

Sayfa başına dön Aşağa gitmek

Sayfa başına dön

- Similar topics

 
Bu forumun müsaadesi var:
Bu forumdaki mesajlara cevap veremezsiniz