Quote:
because of ProcessIdToSessionId() methods minimum support is Windows Vista
That is from the actual MSDN documentation. Because Windows XP is not supported anymore, it is removed from the documentation.
If you want to support XP (or even older Windows versions) you should use an older SDK documentation. From a 2003 platform SDK:
Quote:
ProcessIdToSessionId
...
Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Redistributable: Requires Terminal Server 4.0 SP4 on Windows NT 4.0 SP4.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib
When using a not supported function, a program will stop execution immediately with an appropriate error message.
There must be another reason if the function is not working as expected with XP. But again an old SDK might have a clue:
Quote:
Remarks
If the calling process is not running in a Terminal Services environment, the value returned in pSessionId is zero