Prozess zu Pfad

  • Ja:

    [autoit]


    MsgBox(0, '', _ProcessGetLocation(@AutoItPID))

    [/autoit][autoit][/autoit][autoit]

    Func _ProcessGetLocation($iPID)
    ; SmOke_N, Larry
    ; GetModuleFileNameExW
    Local $aProc = DllCall('kernel32.dll', 'hwnd', 'OpenProcess', 'int', BitOR(0x0400, 0x0010), 'int', 0, 'int', $iPID)
    If $aProc[0] = 0 Then Return SetError(1, 0, '')
    Local $vStruct = DllStructCreate('int[1024]')
    DllCall('psapi.dll', 'int', 'EnumProcessModules', 'hwnd', $aProc[0], 'ptr', DllStructGetPtr($vStruct), 'int', DllStructGetSize($vStruct), 'int_ptr', 0)
    Local $aReturn = DllCall('psapi.dll', 'int', 'GetModuleFileNameExW', 'hwnd', $aProc[0], 'int', DllStructGetData($vStruct, 1), 'wstr', '', 'int', 2048)
    If $aReturn[0] = 0 Then Return SetError(2, 0, '')
    Return $aReturn[3]
    EndFunc

    [/autoit]

    Parameter des Programs: http://www.autoitscript.com/forum/index.php?showtopic=88214&hl=_GetCommandLineFromPID


  • Und was ist denn mit deinem Beitrag hier: http://www.autoitscript.com/forum/index.php?showtopic=76919&view=findpost&p=557243? ^^

    UEZ

    Auch am Arsch geht ein Weg vorbei...

    ¯\_(ツ)_/¯

  • Das funktioniert nicht so gut. Bei mir kommt alles, aber den Antworten nach hat das ja viele Probleme.