I am trying to find the process ID of explorer that relates
to window station that my service is allowed to interact with (WinSta0).
I can use EnumProcesses to get process IDs, but I don't know which
explorer.exe belongs to which window station (on XP there can be multiple
connected users each with their own Window Station). I need to find the
proper explorer to get the token which is used to ImpersonateLoggedOnUser,
but on Windows XP, this causes problems when I can't figure which explorer
is the right one.
I can easily get the window station of my process. How can I find the
process ID of explorer that uses the same window station when there is
more than one explorer.exe running for multiple users?
Start Free Trial