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


相关推荐

  • SpringCloud微服务架构分析

    SpringCloud微服务架构分析微服务框架微服务是一种架构风格,一个大型复杂软件应用应该由一个或多个微服务组成。系统中的各个微服务都可以被独立部署,每个服务仅关注于完成一件任务就行了,在所有情况下,每个任务都代表着一个小的业务能力。微服务架构其实就是一种架构风格,我们将整个项目划分为多个独立的小项目,也就是我们俗称的微服务,可以理解为每个微服务都单独处理某个功能模块,可以独立开发、测试、部署、监控和扩展,甚至可以用不同的编程语言开发它们。它有利于我们平时项目的开发,解决了一体化架构项目难以扩展,开发周期长,故障级联等问题…

    2022年6月15日
    34
  • springbean的生命周期详细_fragment生命周期详解

    springbean的生命周期详细_fragment生命周期详解SpringBean生命周期详解一、简述:Spring是我们每天都在使用的框架,Bean是被Spring管理的Java对象,是Spring框架最重要的部分之一,那么让我们一起了解一下Spring中Bean的生命周期是怎样的吧二、流程图我们先从宏观的角度看一下Spring的生命周期:![在这里插入图片描述](https://img-blog.csdnimg.cn/20201028174058916.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5

    2022年9月19日
    4
  • 8 款免费的 MySQL 数据库建模工具

    数据库建模和设计是软件开发过程中必不可少的步骤,一个良好的建模工具可以帮助我们简单快速地完成数据库设计,提高工作的效率。因此,今天给大家推荐几款免费的MySQL数据库建模工具,包括MySQLWorkbench、SQLPowerArchitect、PDMan、RISE、GenMyModel、DBDesigner、dbdiagram.io、Freedgo。

    2022年4月8日
    307
  • phpstorm2021免费版 激活码破解方法

    phpstorm2021免费版 激活码破解方法,https://javaforall.net/100143.html。详细ieda激活码不妨到全栈程序员必看教程网一起来了解一下吧!

    2022年3月15日
    61
  • snmp协议端口号_SNMP OID

    snmp协议端口号_SNMP OID记一次日常工作1、SNMP是一个简单的网络管理协议,起初我也不知道啥玩意,在自己做安全设备配置日志审计服务器时突然发现的,某厂商设备不支持syslog服务器配置,只有snmp的配置,我当即填上相关信息如下图可见,将状态整为开启,版本自己选择的v2,因为顾虑v1版本可能存在一些缺陷,填好IP、端口、间隔发送时间、还有一个community选项是对应我们的server端的名称。2、原本以为简单的就完事了,我就进行下一步取server端搞一搞,三下五除二的就把server端的基本信息配置好,下图仅为snmp

    2022年8月20日
    7
  • 把字符串转换成float类型_c++如何将string类型转换成int类型

    把字符串转换成float类型_c++如何将string类型转换成int类型在学习数据结构经常碰到各种数据间转换的例程,就想c的库里面有没有现有的函数,用的时候直接调用就好,一查果然有:整型转字符串itoa();字符串转整型atoi();用的时候需要添加头文件#include<stdlib.h>。itoa();功能:将整形(int)转换为字符串(char),十进制转任意进制,以字符形式输出(转换后的结果以字符形式输出)使用方式:首先要申明头文件stdlib.hchar*_itoa(intvalue,char*string,intradix).

    2022年8月31日
    3

发表回复

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

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