Ankur Tripathi
Ankur Tripathi

Reputation: 691

c++ get Process.GetCurrentProcess().SessionId

In c# we can get Current user process id by using this method in Windows Process.GetCurrentProcess().SessionId;

how can we do this in c++.

Upvotes: 0

Views: 3501

Answers (1)

David Schwartz
David Schwartz

Reputation: 182819

Call GetCurrentProcessID to get the current process ID, and then call ProcessIDToSessionID to convert that process ID to a session ID.

Upvotes: 3

Related Questions