forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Get executable file from window handle

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Raymond175
Contributor
Contributor


Joined: 24 Apr 2002
Posts: 72

PostPosted: Fri Sep 13, 2013 3:18 pm    Post subject: Get executable file from window handle Reply with quote

Hi,

I'm trying to get a list of all visible windows with their executable file.
But whatever I try, I do not get a good list of executable files.

Right now I'm using GetWindowModuleFileName, but that is only giving me the executable files of 2 or 3 window identifiers, while I have a list with several hundreds window identifiers. For all the other identifiers, no executable file is returned.

Code:

%H = @STRDEL(@WINEXISTS(%%Identifier), 1, 1)
%T = @FILL(256)
%Z = @LIB(User32, GetWindowModuleFileName, INT:, INT:%H, @ADDR("%T"), 255)


I have Internet Explorer, Notepad, Wordpad, Calculator open, but no executable files displayed.

Can someone tell me what I'm doing wrong?
Does this have anything to do with me running a 64-bit version of Windows 7 and using User32.dll?

Thanks in advance,
Raymond
Back to top
View user's profile Send private message
Raymond175
Contributor
Contributor


Joined: 24 Apr 2002
Posts: 72

PostPosted: Fri Sep 13, 2013 3:23 pm    Post subject: Reply with quote

I think that it has something to do with this limitation:
http://support.microsoft.com/default.aspx?scid=kb;en-us;228469
Back to top
View user's profile Send private message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Wed Sep 25, 2013 2:31 am    Post subject: Reply with quote

Maybe research GetWindowThreadProcessId(IntPtr hWnd, out uint lpdwProcessId)
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group