Hi,
ich möchte die PID eines Prozesses mit der Funktion GetProcessId abfragen. Ich verstehe jedoch überhaupt nicht, wie ich folgenden Teil umsetzen kann (Beispiele sind auch nicht zu finden!):
ZitatProcess [in]
A handle to the process. The handle must have the PROCESS_QUERY_INFORMATION or PROCESS_QUERY_LIMITED_INFORMATION access right. For more information, see Process Security and Access Rights.
Windows Server 2003 and Windows XP: The handle must have the PROCESS_QUERY_INFORMATION access right.
Meine UDF sieht bisher folgendermaßen aus:
[autoit]Func _ProcessGetProcessId(Const $S_PROC)
;~ DWORD WINAPI GetProcessId(
;~ __in HANDLE Process
;~ );
Local Const $AI_RET = DllCall("Kernel32.dll", "dword", "GetProcessId", "ptr", $S_PROC) ;~ ToDo...
If @error Then Return SetError(1, 0, 0)
Return $ai_ret[0]
EndFunc
Kann mir da jemand weiterhelfen? ich benötige dies für eine weiter entwickelte UDF, die ich bald hier posten möchte! (Bei der Gelegenheit fällt mir ein, dass ich meine Dateisuche-UDF auch mal puplik machen wollte...)