1

I have created a Virtual Desktop Manager for a client that allows him to organize his Desktop a little better by separating business from personal, etc etc.

But, before I send it to him, I need to learn how to Dispose of a desktop that was created by him. For example, if I create a new virtual desktop, then later on when I've finished with the program, I would want all virtual desktops that were created to be Disposed of, obviously...

But, months later, I cannot find this documentation on MSDN anymore. It looks like the layout and info has been moved around.

Can someone please help? Any help is really appreciated.

Thank you!

βӔḺṪẶⱫŌŔ
  • 1,276
  • 3
  • 17
  • 33

1 Answers1

1

According to MSDN Window Station and Desktop Functions and CreateDesktop Function :

If the function succeeds, the return value is a handle to the newly created desktop. If the specified desktop already exists, the function succeeds and returns a handle to the existing desktop. When you are finished using the handle, call the CloseDesktop function to close it.

user703016
  • 37,307
  • 8
  • 87
  • 112
  • Thanks Heandel, I didn't think it was quite relevent that I tell this, but when I used CloseDesktop, I noticed that even though it has been 'Closed' it still exists somewhere, because I can still reference it, and can still see it on the list of Desktops that *were* created. Which is what led me to believe that CloseDesktop doesn't completely kill a Desktop. Kind of like Closing a Form is different from Disposing a Form – βӔḺṪẶⱫŌŔ Apr 26 '11 at 08:59
  • I have checked that it succeeds, so maybe it's a bug somewhere in my code. But I can't see where, it's a very tiny file and have gone over and over it. I'll keep reading around MSDN, see if I can find something – βӔḺṪẶⱫŌŔ Apr 26 '11 at 21:30