FVBUSICOULOUR 15
GetProcessID fuer W2000 und XP SP1
Samstag, 29. März 2008 um 20:36
Procedure GetProcessId_(hProcess) ; for windows < Vista or Windows XP SP1 
Protected hThread
Protected Pid
Protected GCPI

GCPI = GetProcAddress_(GetModuleHandle_("Kernel32"),"GetCurrentProcessId");
hThread = CreateRemoteThread_(hProcess,0,0,GCPI,0,0,0)

If Not hThread
ProcedureReturn 0
EndIf

WaitForSingleObject_(hThread,#INFINITE)
GetExitCodeThread_(hThread,@Pid)
CloseHandle_(hThread)

ProcedureReturn Pid
EndProcedure
 
© 2012 www.realsource.de
free Joomla Template by funky-visions.de powered by greatnet.de Webhosting