• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 391
  • Last Modified:

Desktop ID

Hi,

I need to be able to identify unique desktops.

I have a windows service and it is independant of any desktop and there are application that are making calls to this service via remoting. I need to be able to file these calls, each call can come from a specific machine, username and desktop, and I need to be able to retrieve that information somehow.

I use Environment.Username and Environment.MachineName for first 2 parameters, but i can't get the Desktop ID...

I tried using GetProcessWindowStation in user32.dll but it doesn't return unique id when I login to the same workstation with the same username, this GetProcessWindowStation function returns the same number... thus I cannot differentiate between desktops.

Can someone please help me... I spend hours and hours searching the internet and I can't find anything
0
RodionP
Asked:
RodionP
1 Solution
 
vinhnlCommented:
Hi RodionP,

this is a example very good. It has some methodsfor your problem: http://www.codeproject.com/csharp/csdesktopswitching.asp

Good luck,
VINHNL
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now