title image


Smiley Laufende Prozesse herausfinden - So gehts unter 95/98
so sollte es unter 95/98 gehen (das programm durchlaeuft alle prozesse und "debug.printet" die exe-namen.gruss philippPrivate Const MAX_PATH = 260Private Type PROCESSENTRY32 dwSize As Long cntUsage As Long th32ProcessID As Long th32DefaultHeapID As Long th32ModuleID As Long cntThreads As Long th32ParentProcessID As Long pcPriClassBase As Long dwFlags As Long szExeFile As String * MAX_PATHEnd TypePrivate Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As LongPrivate Declare Function CreateToolhelp32Snapshot Lib "kernel32" (ByVal dwFlags As Long, ByVal th32ProcessID As Long) As LongPrivate Declare Function Process32First Lib "kernel32" (ByVal hSnapshot As Long, lppe As Any) As LongPrivate Declare Function Process32Next Lib "kernel32" (ByVal hSnapshot As Long, lppe As Any) As LongPrivate Const TH32CS_SNAPHEAPLIST = &H1Private Const TH32CS_SNAPPROCESS = &H2Private Const TH32CS_SNAPTHREAD = &H4Private Const TH32CS_SNAPMODULE = &H8Private Const TH32CS_SNAPALL = (TH32CS_SNAPHEAPLIST + TH32CS_SNAPPROCESS + TH32CS_SNAPTHREAD + TH32CS_SNAPMODULE)Private Const TH32CS_INHERIT = &H80000000Public Function PrintExeNames()'Dieses Programm gibt alle laufenden Programme mit exe-Dateien aus... Dim appActual As Variant Dim hSnapshot As Long, lRet As Long, P As PROCESSENTRY32 P.dwSize = Len(P) hSnapshot = CreateToolhelp32Snapshot(TH32CS_SNAPALL, ByVal 0) If hSnapshot Then lRet = Process32First(hSnapshot, P) Do While lRet appActual = VBA.Left$(P.szExeFile, InStr(P.szExeFile, VBA.Chr$(0)) - 1) Debug.Print appActual If appActual = "" Then 'Alle durchlaufen lRet = False Else lRet = Process32Next(hSnapshot, P) End If Loop lRet = CloseHandle(hSnapshot) End IfEnd Function

geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: