Search found 43 matches: GetModuleFileNameEx

Searched query: +GetModuleFileNameEx

by Little John
Sat Sep 15, 2018 7:11 pm
Forum: Coding Questions
Topic: How to open or show a running application from the Traybar
Replies: 27
Views: 6633

Re: How to open or show a running application from the Trayb

... GetClassLong_ with GetClassLong Ptr _ . This way, the code is compatible with both 32-bit and 64-bit versions of Windows. In line 168, replace GetModuleFileNameExA with GetModuleFileNameEx W . In line 225, remove And CreateGadgetList(WindowID(#WindowMain)) . This is obsolete now and not needed ...
by Mike Yurgalavage
Wed Mar 14, 2018 11:47 pm
Forum: Coding Questions
Topic: Windows List of running threads in running process
Replies: 4
Views: 993

Re: Windows List of running threads in running process

... bInheritHandle.l, dwThreadId.l ) EndImport Import "" GetSystemInfo(ps) EndImport OpenLibrary(0, "Psapi.dll") Prototype.l GetModuleFileNameExW(hProcess, hModule, *lpFilename, nSize.l) Global GetModuleFileNameEx.GetModuleFileNameExW=GetFunction(0,"GetModuleFileNameExW") ...
by CELTIC88
Fri Mar 09, 2018 7:17 pm
Forum: Coding Questions
Topic: Windows List of running threads in running process
Replies: 4
Views: 993

Re: Windows List of running threads in running process

... bInheritHandle.l, dwThreadId.l ) EndImport Import "" GetSystemInfo(ps) EndImport OpenLibrary(0, "Psapi.dll") Prototype.l GetModuleFileNameExW(hProcess, hModule, *lpFilename, nSize.l) Global GetModuleFileNameEx.GetModuleFileNameExW=GetFunction(0,"GetModuleFileNameExW") ...
by Michael Vogel
Mon Jan 22, 2018 8:43 pm
Forum: Feature Requests and Wishlists
Topic: PB5.61; Find/Replace dialog;
Replies: 4
Views: 1459

Re: PB5.61; Find/Replace dialog;

... Protected ProcessID Protected hProcess Protected hModule Protected ProcessName.s=Space(#MAX_PATH) Protected EnumProcessModules Protected GetModuleFileNameEx If OpenLibrary(0,"psapi.dll") EnumProcessModules=GetFunction(0,"EnumProcessModules") GetModuleFileNameEx=GetFunction(0,"GetModuleFileNameExA") ...
by Michael Vogel
Wed Nov 22, 2017 5:20 pm
Forum: Feature Requests and Wishlists
Topic: Some more ideas for the PBIDE...
Replies: 3
Views: 4962

Re: Some more ideas for the PBIDE...

... Protected ProcessID Protected hProcess Protected hModule Protected ProcessName.s=Space(#MAX_PATH) Protected EnumProcessModules Protected GetModuleFileNameEx If OpenLibrary(0,"psapi.dll") EnumProcessModules=GetFunction(0,"EnumProcessModules") GetModuleFileNameEx=GetFunction(0,"GetModuleFileNameExA") ...
by Zebuddi123
Fri Feb 10, 2017 12:20 am
Forum: Announcement
Topic: Modules 2 Templates
Replies: 4
Views: 2556

Modules 2 Templates

... XIncludeFile "Module_PBAboutInfo.pbi" UseMD5Fingerprint() Prototype.i GetModuleFileNameExW(hProcess.l,hModule.l,*lpFilename,nSize.i) Prototype.i GetModuleFileNameExA(hProcess.l,hModule.l,*lpFilename,nSize.i) CompilerIf ...
by RASHAD
Sat May 14, 2016 1:26 pm
Forum: Coding Questions
Topic: Detecting my own renamed exe?
Replies: 14
Views: 2613

Re: Detecting my own renamed exe?

... name of each running application You can double check or more for size,classname & maybe signature you code it in your calc.exe Prototype.i GetModuleFileNameExW(hProcess.l,hModule.l,*lpFilename,nSize.i) Prototype.i GetModuleFileNameExA(hProcess.l,hModule.l,*lpFilename,nSize.i) CompilerIf ...
by RASHAD
Sat May 14, 2016 11:34 am
Forum: Coding Questions
Topic: Detecting my own renamed exe?
Replies: 14
Views: 2613

Re: Detecting my own renamed exe?

Hi Prototype.i GetModuleFileNameExW(hProcess.l,hModule.l,*lpFilename,nSize.i) Prototype.i GetModuleFileNameExA(hProcess.l,hModule.l,*lpFilename,nSize.i) CompilerIf #PB_Compiler_Unicode Global GetModuleFileNameEx.GetModuleFileNameExW ...
by Lunasole
Thu Jan 14, 2016 3:52 pm
Forum: Coding Questions
Topic: Windows - Phantom PID's?
Replies: 1
Views: 594

Windows - Phantom PID's?

... ; API/ IMPORT ; =============================================================== Prototype.l GetModuleFileNameEx(hProcess.l, hModule.l, *lpFilename.String, nSize.l) Global GetModuleFileNameEx.GetModuleFileNameEx If OpenLibrary(0, "Psapi.dll") ...
by Teddy Rogers
Tue Apr 08, 2014 6:22 pm
Forum: Coding Questions
Topic: NtQuerySystemInformation #SystemProcessIdInformation
Replies: 21
Views: 3911

NtQuerySystemInformation #SystemProcessIdInformation

... code to PB because I am trying to get the filename and directory path of processid's protected by Windows process rights so using GetModuleFileNameEx is not helpful. An example of this would be "taskmgr.exe". You can find what I am trying to replicate in PB here... http://wj32.org/wp/2010/03/30/get-the-image-file-name-of-any-process-from-any-user-on-vista-and-above/ ...
by Teddy Rogers
Sun Mar 02, 2014 2:32 pm
Forum: Coding Questions
Topic: Retrieving Another Windows Icon For MenuItem Icon...
Replies: 6
Views: 1667

Re: Retrieving Another Windows Icon For MenuItem Icon...

... (IMPORTANT! Set in compiler options to unicode executable) Procedure.s ProcessNameFromHwnd(hWnd) Protected processid.l,psapilib.l,processname$,GetModuleFileNameEx,hprocess.l psapilib=OpenLibrary(#PB_Any,"psapi.dll") If psapilib GetModuleFileNameEx=GetFunction(psapilib,"GetModuleFileNameExW") ...
by luis
Sat Nov 09, 2013 9:14 pm
Forum: Tricks 'n' Tips
Topic: .EXE name of topmost application
Replies: 3
Views: 1753

Re: .EXE name of topmost application

The GetModuleFileNameEx function is primarily designed for use by debuggers and similar applications that must extract module information from another process. If the module list in the target process is corrupted or is not ...
by blueznl
Tue Nov 05, 2013 5:34 pm
Forum: Tricks 'n' Tips
Topic: .EXE name of topmost application
Replies: 3
Views: 1753

.EXE name of topmost application

... for you to do 8) #kernel32 = 1 ; buffer.s{512} max.i = Len(buffer)-2 window_h.i window_name.s process_id.i process_h.i application_name.s ; ; GetModuleFIleNameEx is not by default included in PureBasic, so open the appropriate DLL or LIB ; (Psapi.lib on Windows XP?) ; OpenLibrary(#kernel32,"kernel32.dll") ...
by RASHAD
Sun Jun 02, 2013 5:06 am
Forum: Windows
Topic: capture command line of all running processes?
Replies: 7
Views: 3588

Re: capture command line of all running processes?

Prototype.i GetModuleFileNameExW(hProcess.l,hModule.l,*lpFilename,nSize.i) Prototype.i GetModuleFileNameExA(hProcess.l,hModule.l,*lpFilename,nSize.i) CompilerIf #PB_Compiler_Unicode Global GetModuleFileNameEx.GetModuleFileNameExW ...
by jpd
Thu May 23, 2013 7:27 am
Forum: Announcement
Topic: DroopyLib
Replies: 181
Views: 82484

Re: DroopyLib

... Process) Prototype ProcessNext(Snapshot, Process) Global ProcessFirst.ProcessFirst Global ProcessNext.ProcessNext Global NewList PID() Prototype GetModuleFileNameEx(hProcess,dwFlags, lpExeName, lpdwSize) Global GetModuleFileNameEx.GetModuleFileNameEx Prototype GetProcessImageFileName(hProcess, ...