简体   繁体   English

如何将线程转换为 GUI 线程?

[英]How can I convert a thread to a GUI thread?

I'm reading this document , and quote:我正在阅读这份文件,并引用:

This mitigation prevents calls into win32k.sys by blocking a thread from converting itself into a GUI thread此缓解措施通过阻止线程将自身转换为 GUI 线程来防止调用 win32k.sys

I'm wondering how can I convert a thread to a GUI thread?我想知道如何将线程转换为 GUI 线程? I couldn't find such a Win32 method to call.我找不到这样的 Win32 方法来调用。

Does anyone know?有人知道吗?

A lot of the functions that deals with HWNDs will convert the thread to a UI thread automatically.许多处理 HWND 的函数会自动将线程转换为 UI 线程。

IsGUIThread can be used to query and explicitly convert the current thread. IsGUIThread可用于查询和显式转换当前线程。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM