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.

 

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

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

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

  • HTML5播放暂停音乐

    查看效果:http://hovertree.com/code/jquery/ueyf7gn4.htm代码如下:更多特效:http://www.cnblogs.com/roucheng/p/texi

    2021年12月22日
  • 零基础学Java(1)初识Java程序

    零基础学Java(1)初识Java程序前言就国内来说,Java毫无疑问是后端语言中的No.1没有之一,所以今天我们也来0基础学习Java!!!Java的好处(针对测试工程师)面试加分->涨薪大多数公司服务端用的都是Java,

  • python 去掉文件后缀名,python 删除后缀名文件

    python 去掉文件后缀名,python 删除后缀名文件Note:print语句供test用#!/usr/bin/pythonimportos,re,time,sysimportos.pathimportstringfilter_dir=”/home/fengnazh/splittest/files/”filterfile_list=os.listdir(filter_dir)printfilterfile_listfile_i…

  • vim复制粘贴到别的文件_linux复制粘贴命令

    vim复制粘贴到别的文件_linux复制粘贴命令http://www.worldhello.net/2010/12/08/2190.html

  • vue的map使用_vue定义map对象

    vue的map使用_vue定义map对象接口返回数据为:[‘2018-8-14′,’2018-8-14’]但我需要这样的数据格式:{data:“2018/08/13”,title:””},{data:“2018/08/13”,title:””}这样就能搞定是不是soeasyletarr=res.data;letnewArr=arr.map(val=>{letjson={};json.da…

  • IDEA下Log4j使用教程

    IDEA下Log4j使用教程 2015年12月14日15:30:21阅读数:13467Log4j是Apache的一个开源项目,通过使用Log4j,我们可以控制日志信息输送的目的地是控制台、文件、GUI组件,甚至是套接口服务器、NT的事件记录器、UNIXSyslog守护进程等;我们也可以控制每一条日志的输出格式;通过定义每一条日志信息的级别,我们能够更加细致地控制日志的生成过程。最令人感兴趣的就是,这些…

发表回复

您的电子邮箱地址不会被公开。

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