Search found 48 matches: GetModuleFileNameEx
Searched query: +GetModuleFileNameEx
- Fri Mar 31, 2023 7:05 pm
- Forum: Coding Questions
- Topic: (Windows) Detect if exe is running from command/shell or as a service?
- Replies: 5
- Views: 256
Re: (Windows) Detect if exe is running from command/shell or as a service?
... EnableExplicit Define lib ;- Initialization Lib = OpenLibrary(#PB_Any,"psapi.dll") If Lib CompilerIf #PB_Compiler_Unicode Prototype.i GetModuleFileNameExW(hProcess.l,hModule.l,*lpFilename,nSize.i) Global GetModuleFileNameEx.GetModuleFileNameExW = GetFunction(Lib,"GetModuleFileNameExW") ...
- Fri Mar 31, 2023 5:10 pm
- Forum: Coding Questions
- Topic: (Windows) Detect if exe is running from command/shell or as a service?
- Replies: 5
- Views: 256
Re: (Windows) Detect if exe is running from command/shell or as a service?
Simplify things [Service or Not] Global ImageName$,FilePath$ Prototype.i GetModuleFileNameExW(hProcess.l,hModule.l,*lpFilename,nSize.i) Prototype.i GetModuleFileNameExA(hProcess.l,hModule.l,*lpFilename,nSize.i) Lib = OpenLibrary(#PB_Any,"psapi.dll") ...
- Thu Dec 09, 2021 12:49 pm
- Forum: General Discussion
- Topic: Switch the explorer tree display
- Replies: 0
- Views: 910
Switch the explorer tree display
... путь к EXE-файлу запущенного процесса зная его дескриптор окна или PID Procedure.s ProcessNameFromHwnd(hWnd) Protected PID, psapi_dll, Path$, GetModuleFileNameEx, hProcess psapi_dll = OpenLibrary(#PB_Any, "psapi.dll") If psapi_dll GetModuleFileNameEx = GetFunction(psapi_dll, "GetModuleFileNameExW") ...
- Sun Nov 21, 2021 12:55 pm
- Forum: Coding Questions
- Topic: File or folder selected in windows explorer
- Replies: 28
- Views: 6803
Re: File or folder selected in windows explorer
Could not get the file name EnableExplicit Define Pos.b Procedure.s ProcessNameFromHwnd(hWnd) Protected PID, psapi_dll, Path$, GetModuleFileNameEx, hProcess psapi_dll = OpenLibrary(#PB_Any, "psapi.dll") If psapi_dll GetModuleFileNameEx = GetFunction(psapi_dll, "GetModuleFileNameExW") ...
- Thu Nov 18, 2021 1:47 pm
- Forum: General Discussion
- Topic: Disabling the Explorer navigation bar
- Replies: 0
- Views: 2374
Disabling the Explorer navigation bar
... #False, RegValue) Else End EndIf ClearStructure(RegValue, RegValue) Procedure.s ProcessNameFromHwnd(hWnd) Protected PID, psapi_dll, Path$, GetModuleFileNameEx, hProcess psapi_dll = OpenLibrary(#PB_Any, "psapi.dll") If psapi_dll GetModuleFileNameEx = GetFunction(psapi_dll, "GetModuleFileNameExW") ...
- 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: 7487
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 ...
- Wed Mar 14, 2018 11:47 pm
- Forum: Coding Questions
- Topic: Windows List of running threads in running process
- Replies: 4
- Views: 1270
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") ...
- Fri Mar 09, 2018 7:17 pm
- Forum: Coding Questions
- Topic: Windows List of running threads in running process
- Replies: 4
- Views: 1270
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") ...
- Mon Jan 22, 2018 8:43 pm
- Forum: Feature Requests and Wishlists
- Topic: PB5.61; Find/Replace dialog;
- Replies: 4
- Views: 1685
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") ...
- Wed Nov 22, 2017 5:20 pm
- Forum: Feature Requests and Wishlists
- Topic: Some more ideas for the PBIDE...
- Replies: 3
- Views: 5283
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") ...
- Fri Feb 10, 2017 12:20 am
- Forum: Announcement
- Topic: Modules 2 Templates
- Replies: 4
- Views: 2878
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 ...
- Sat May 14, 2016 1:26 pm
- Forum: Coding Questions
- Topic: Detecting my own renamed exe?
- Replies: 14
- Views: 3074
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 ...
- Sat May 14, 2016 11:34 am
- Forum: Coding Questions
- Topic: Detecting my own renamed exe?
- Replies: 14
- Views: 3074
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 ...
- Thu Jan 14, 2016 3:52 pm
- Forum: Coding Questions
- Topic: Windows - Phantom PID's?
- Replies: 1
- Views: 696
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") ...
- Tue Apr 08, 2014 6:22 pm
- Forum: Coding Questions
- Topic: NtQuerySystemInformation #SystemProcessIdInformation
- Replies: 21
- Views: 4822
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/ ...