как зактрыть приложение по имени файла, или как взять список процессов и нажатием на процесс(В ЛистБоксе) он бы завершался??
Если кому не лень, зарание спасибо!!!!
API-Guide писал(а):
1) Declarations:
- Код: Выделить всё
Private Declare Function TerminateProcess Lib "kernel32" Alias "TerminateProcess" (ByVal hProcess As Long, ByVal uExitCode As Long) As Long
Parameters:
· hProcess
Identifies the process to terminate.
Windows NT: The handle must have PROCESS_TERMINATE access. For more information, see Process Objects.
· uExitCode
Specifies the exit code for the process and for all threads terminated as a result of this call. Use the GetExitCodeProcess function to retrieve the process’s exit value. Use the GetExitCodeThread function to retrieve a thread’s exit value.
Return Values:
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
API-Guide писал(а):2) Declarations:
- Код: Выделить всё
Private Declare Sub ExitProcess Lib "kernel32" Alias "ExitProcess" (ByVal uExitCode As Long)
Parameters:
· uExitCode
Specifies the exit code for the process, and for all threads that are terminated as a result of this call. Use the GetExitCodeProcess function to retrieve the process’s exit value. Use the GetExitCodeThread function to retrieve a thread’s exit value.
Return Values:
This function does not return a value.
API-Guide писал(а):3) Declarations:
- Код: Выделить всё
Private Declare Function DestroyWindow Lib "user32" Alias "DestroyWindow" (ByVal hwnd As Long) As Long
Parameters:
· hWnd
Identifies the window to be destroyed.
Return Values:
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Сейчас этот форум просматривают: AhrefsBot, SemrushBot, Yandex-бот и гости: 16