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
LVL 1
RodionPAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.