TerminateProcess Function

 Terminatesthespecifiedprocessandallofitsthreads. BOOLWINAPITerminateProcess(__inHANDLEhProcess,__inUINTuExitCode);ParametershProcessAhand

大家好,又见面了,我是你们的朋友全栈君。

 

Terminates the specified process and all of its threads.

 

BOOL WINAPI TerminateProcess(
  __in          HANDLE hProcess,
  __in          UINT uExitCode
);

Parameters

hProcess

A handle to the process to be terminated.

The handle must have the PROCESS_TERMINATE access right. For more information, see Process Security and Access Rights.

uExitCode

The exit code to be used by the process and threads terminated as a result of this call. Use the GetExitCodeProcess function to retrieve a process’s exit value. Use the GetExitCodeThread function to retrieve a thread’s exit value.

Return Value

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 .

Remarks

The TerminateProcess function is used to unconditionally cause a process to exit. The state of global data maintained by dynamic-link libraries (DLLs) may be compromised if TerminateProcess is used rather than ExitProcess.

TerminateProcess initiates termination and returns immediately. This stops execution of all threads within the process and requests cancellation of all pending I/O. The terminated process cannot exit until all pending I/O has been completed or canceled.

A process cannot prevent itself from being terminated.

Requirements

Client

Requires Windows Vista, Windows XP, Windows 2000 Professional, Windows NT Workstation, Windows Me, Windows 98, or Windows 95.

Server

Requires Windows Server 2008, Windows Server 2003, Windows 2000 Server, or Windows NT Server.

Header

Declared in Winbase.h; include Windows.h.

Library

Use Kernel32.lib.

DLL

Requires Kernel32.dll.

 

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/126199.html原文链接:https://javaforall.net

(0)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • Shell常用命令大全[通俗易懂]

    Shell常用命令大全[通俗易懂]嵌入式开发用的最多就是Shell命令,Shell命令是所有的Linux系统发行版所通用的,并不是说我在Ubuntu下学会了Shell命令,换另外一个Linux发行版操作系统以后就没用了,所以学习Shell命令非常有必要。1、目录信息查看命令文件浏览是最基本的操作了,Shell下文件浏览命令为ls,格式如下:ls[选项][路径]Is命令主要用于显示指定目录下的内容,列出指定目录下包含的所有的文件以及子目录,它的主要参数有:-a显示所有的文件以及子目录,包括以“”开头的隐藏文件。-l

    2022年10月18日
    0
  • CentOS7 下rpm安装jdk1.8「建议收藏」

    CentOS7 下rpm安装jdk1.8「建议收藏」【1】查看并卸载自带的openjdk查看系统中默认安装的jdk:rpm-qa|grepjdk卸载JDK相关文件:yum-yremovejava-1.7.0-openjdk*“*”表示卸载掉java1.7.0的所有openjdk相关文件。或者如下卸载jdk:yum-yremovejava-1.8.0-openjdk-headless-1.8.0.65-3.b17.el7.x86_64

    2022年6月7日
    52
  • 网络攻防研究第001篇:尝试暴力破解某高校研究生管理系统学生密码

    网络攻防研究第001篇:尝试暴力破解某高校研究生管理系统学生密码前言如果你是在校大学生,而且还对网络攻防比较感兴趣的话,相信你最开始尝试渗透的莫过于所在院校的学生管理系统。因为一般来说这样的系统往往比较薄弱,拿来练手那是再合适不过的了。作为本系列的第一篇文章,我将会利用暴力破解的方式,尝试对某高校的研究生管理系统的学生密码进行破解。由于这个管理系统的网站属于该高校的内网资源,外网是无法访问的,因此大家就不要尝试按照文中的内容来对文中出现的网址…

    2022年6月2日
    22
  • linux .deb 安装_快速提示:如何在Linux中安装.deb和.tar文件

    linux .deb 安装_快速提示:如何在Linux中安装.deb和.tar文件linux.deb安装Inthisquicktutorial,IexplainhowtoinstallprogramsinLinuxusingterminalcommands.ThisparticulartutorialusesLinuxMint18(Cinnamon64-bit),butthecommandsprovidedbelow…

    2022年5月15日
    51
  • html协议属于哪层,smtp协议在什么层

    SMTP:简单邮件传输协议SMTP:SimpleMailTransferProtocol)SMTP是一种提供可靠且有效电子邮件传输的协议。SMTP是建模在FTP文件传输服务上的一种邮件服务,主要用于传输系统之间的邮件信息并提供来信有关的通知。SMTP协议简介1.介绍SMTP称为简单Mail传输协议(SimpleMailTransferProtocal),目标是向用户…

    2022年4月16日
    41
  • 软件著作权的源代码_软件著作权源码被泄露

    软件著作权的源代码_软件著作权源码被泄露packagecom.example.shuoya;importjava.util.Set;importandroid.content.BroadcastReceiver;importandroid.content.Context;importandroid.content.Intent;importandroid.database.Cursor;importandroid.data…

    2022年9月22日
    0

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号