如何在 Win XP 上通过进程 ID 获取会话 ID

How can I get session ID by process ID on Win XP

ProcessIdToSessionId 函数适用于 Win Vista 及更高版本。

如何在 Windows XP 上通过进程 ID 获取会话 ID?

MSDN archive from archive.org

Minimum supported client: Windows 2000 Professional

如果您指的是比 Windows Vista 更早的版本, WindowsMicrosoft 不再支持 2000/XP,因此缺少旧的 MSDN 条目