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)
全栈程序员-站长的头像全栈程序员-站长


相关推荐

  • 【Math for ML】线性代数-单射,满射,双射,同构,同态,仿射[通俗易懂]

    【Math for ML】线性代数-单射,满射,双射,同构,同态,仿射[通俗易懂]I.映射(Mapping)1.单射(Injective)函数f是单射当且仅当若f(x)=f(y)则x=y。例子:f(x)=x+5从实数集\(R\)到\(R\)是个单射函数。这个函数很容易被还原:f(3)=8,即已知8可以返回32.满射(Surjective)函数f(从集A到集B)是满射当且仅当在B中的每个y存在至少…

    2022年5月24日
    52
  • CTFSHOW SSTI篇[通俗易懂]

    CTFSHOW SSTI篇[通俗易懂]文章目录web361web362web363web364web365web366、367web368web369web370web371web372建议大家先看下笔者之前写的模板注入的文章web361payloadname={{().__class__.__mro__[-1].__subclasses__()[132].__init__.__globals__[‘popen’](‘cat/flag’).read()}}web362payload?name={{x.__init__.__glo

    2022年10月19日
    4
  • CentOS7安装Oracle11G完整版图文教程

    CentOS7安装Oracle11G完整版图文教程系统环境:CentOSLinuxrelease7.4.1708(Core)Oracle版本:OracleDatabase11gR2注意事项:安装的过程可能遇到假死现象,直接回车即可如果遇到中文乱码:新建一个目录,上传字体包zysong.ttf到新建的目录,命令如下:#mkdir–p/usr/share/fonts/zh_CN/TrueType#cd/usr…

    2022年5月29日
    76
  • java 代码生成器 generator

    java 代码生成器 generator文章目录写在前面1、mybatis-generator1.1、第一种:利用maven插件实现2、mybatis-plus-generator写在前面我们在java开发中,经常要建一些常用的包、类,他们都千篇一律,没什么技术含量,于是我们想到了用代码生成器去自动生成他们,例如mapper、dao、实体类。1、mybatis-generatormybatis-generator的运行过程:首先连接数据库,然后从数据库的表中读取字段,生成对应文件。1.1、第一种:利用maven插件实现整个过程你只需要

    2022年6月10日
    32
  • oracle索引视图_位图联合索引

    oracle索引视图_位图联合索引一.什么是位图索引我们目前大量使用的索引一般主要是B*Tree索引,在索引结构中存储着键值和键值的RowID,并且是一一对应的.而位图索引主要针对大量相同值的列而创建(例如:类别,操作员,部门ID,库房ID等),索引块的一个索引行中存储键值和起止Rowid,以及这些键值的位置编码,位置编码中的每一位表示键值对应的数据行的有无.一个位图索引块可能指向的是几十甚至成百上千行数据的位置.这种方式存储数据…

    2025年7月17日
    3
  • 阿里巴巴Java开发手册(终极版)[通俗易懂]

    不知不觉间,2020年已经过了一大半了,作为技术圈中你,准备好迎接最新的变化了吗?在本文中,我们将以编程界最常用的编程语言Java为例,分享最为主流的技术与工具。2020年最流行的Java开发技术Java几乎无处不在,无论在智能手机、台式机、游戏设备还是科学超级计算机上,处处都有Java的影子。全世界有数百万的Java程序员在开发基于Java的产品。然而,如此激烈的竞争,意味着Java开发人员必须时刻保持领先地位。为此,他们必须随时了解和洞悉Java生态系统中的最新动..

    2022年4月18日
    53

发表回复

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

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