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


相关推荐

  • Keil(MDK-ARM)使用教程——在线调试

    Keil(MDK-ARM)使用教程——在线调试Keil(MDK-ARM)使用教程(三)_在线调试由于我是直接使用(打开现有的软件工程),如果跟着需要下载上面演示参考的软件工程才行。工程默认是使用硬件在线调试,接下来按照每一点来讲述。 1.编译+调试打开软件工程 -> 编译 -> 调试这里的编译建议使用BuildTarget(第2个按钮)编译工程(如下图动画),也就是使用快捷键F7。Translate(第1个按钮)是编译当前活动文…

    2022年5月23日
    41
  • Xray的快速使用

    Xray的快速使用快速使用使用基础爬虫爬取并扫描整个网站xraywebscan–basic-crawlerhttp://example.com–html-outputcrawler.html使用HTTP代理进行被动扫描xraywebscan–listen127.0.0.1:7777–html-outputproxy.html设置浏览器http代理为http://127.0.0.1:7777,就可以自动分析代理流量并扫描。如需扫描https流量,请阅读下方文档抓取htt

    2022年5月30日
    69
  • 十个拿来就能用的网页炫酷特效

    十个拿来就能用的网页炫酷特效之前喜欢收集能美化网页的代码,比如给网页加个背景啦,给鼠标加个特效啦,来来回回也收集到了一些“使用简单”,“效果爆炸”的页面,给大家陆续分享出来,如果觉得有帮助可以点赞收藏支持一下,如果能关注一下就再好不过了ヾ(≧▽≦*)o

    2022年7月26日
    7
  • hashmap顺序遍历_遍历排序

    hashmap顺序遍历_遍历排序hashmap元素排序想要hashmap中的元素有序可以使用linkedHashMap。HashMap<Integer,User>hashMap=newHashMap<>();hashMap.put(1,newUser(“张三”,32));hashMap.put(2,newUser(“张四”,33));hashMap.put(3,newUser(“王五”,22));//将map转换为一个entry类型的lis

    2025年10月14日
    3
  • 装饰器设计模式

    装饰器设计模式

    2021年9月16日
    61
  • jdbctemplate.query_query方法

    jdbctemplate.query_query方法Document.querySelectorAllSummaryReturnsalistoftheelementswithinthedocument(usingdepth-firstpre-ordertraversalofthedocument’snodes)thatmatchthespecifiedgroupofselectors….

    2025年7月6日
    2

发表回复

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

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