首页 > 解决方案 > What is the Windows "WorkerW" windows and what creates them?

问题描述

On some Windows 10 computers (and possibly older versions) there are sometimes "WorkerW" windows that show up in the list from a call to EnumWindows. This is not on all computers - just some. What are these windows and what creates them?

标签: windowsuser-interfacewinapi

解决方案


它基本上是通过调用 Shell API 函数 SHCreateWorkerWindowW 创建的。W 代表窗口的宽字符(unicode)版本,而 SHCreateWorkerWindowA 代表 ascii 版本。任何需要监听窗口消息的应用程序都会调用此 Api 来创建工作窗口。该 API 基本上是 CreateWindowEx 的包装器,但窗口类名称被硬编码为“WorkerW”或“WorkerA”。

要求提供支持文件的评论。不幸的是,MSDN 上没有文档,因为这是一个未记录的函数。如果您查看 shlwapi.dll 中 SHCreateWorkerWindowA 的反汇编,您可以轻松验证这一点。或者,您可以为 SHCreateWorkerWindowA 执行 GetProcAddress() 并调用该函数来创建工作窗口。


推荐阅读