1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

OpenDesktop function results in ERROR_FILE_NOT_FOUND

Discussion in 'Windows' started by coder0xff, Dec 29, 2007.

  1. coder0xff

    coder0xff New Member

    Joined:
    Dec 29, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    I am using the OpenStation and SetProcessWindowStation to enumerate the desktops in a station. The EnumDesktops function is returning simple names like "default" and "winlogon", but when I try to use these names to call OpenDesktop it returns a null handle and the last set error is 2, or ERROR_FILE_NOT_FOUND. Tried adding "PC\\" which is the name of my computer. Tried oppening "WinSta0\Default", "PC\\Brent", "Brent", etc. based on the Win32_Desktop objects I see from WMI. Still, no luck. Any ideas?

    Thanks,
    Brent
     

Share This Page