Дарова! у меня возникла проблемма с написанием моей программы обьясняю суть проблеммы: я получаю список процессов мне необходимо отследить откуда они работают, к каким библиотекам и файлам обращаются а так же куда ссылаются в реестр... кто знает подскажите (Далее следует выписка из программы) Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long Private Declare Function GetWindow Lib "user32" (ByVal hwnd As Long, ByVal wCmd As Long) As Long Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long Private Declare Function PostMessage Lib "user32" Alias "PostMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Const GW_HWNDFIRST = 0 Const GW_HWNDNEXT = 2 Const WM_CLOSE = &H10 Const WM_QUIT = &H12 Dim CurrWnd As String Dim ListItem As String Dim Length As String Sub GetTaskList() CurrWnd = GetWindow(Me.hwnd, GW_HWNDFIRST) Do While CurrWnd <> 0 Length = GetWindowTextLength(CurrWnd) ListItem = Space(Length + 1) Length = GetWindowText(CurrWnd, ListItem, Length + 1) If Length <> 0 Then List1.AddItem ListItem End If CurrWnd = GetWindow(CurrWnd, GW_HWNDNEXT) DoEvents Loop End Sub
Ответить
|