Skip to content

Commit ca85877

Browse files
committed
Request memory capacity for DllCall() variable "User", otherwise the Where variable got filled with random data (specifically "lf\Firefox\Installer")
1 parent 5ad5fe9 commit ca85877

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

LibreWolf-Portable.ahk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,11 @@ LauncherRunning(Where) {
276276
}
277277

278278
ProcessRunning(Where := "") {
279+
;MsgBox, ProcessRunning Where:`n%Where%
279280
Query := "Select ProcessId from Win32_Process where " Where
280281
For Process in ComObjGet("winmgmts:").ExecQuery(Query) {
281282
Try {
283+
VarSetCapacity(User, 64) ; Request memory capacity, otherwise the Where variable got filled with random data (specifically "lf\Firefox\Installer")
282284
oUser := ComObject(0x400C, &User) ; VT_BYREF
283285
Process.GetOwner(oUser)
284286
;MsgBox, % oUser[]

0 commit comments

Comments
 (0)