2
votes

I'm trying to use the Remote Desktop API on a remote machine that I have Administrator rights on, however the WTSOpenServer call always returns error 5 ("Access denied"). I even tried calling WNetAddConnection2 to establish a session, which works fine (I can connect to IPC$ or C$) on the machine). I can also use the Remote Desktop client to actually start a terminal session to it.

The remote machine is running Windows XP Pro SP3 and I'm running Windows XP Pro x64 SP2.

1
Try putting both machines to have the same username/password, does that work at least? Or if you have a domain both on the same domain.Brian R. Bondy
Yes, they are both on the same domain and I'm logged on with my domain account.EMP

1 Answers

4
votes

Check the value of HKLM\System\CurrentControlSet\Control\TerminalServer\AllowRemoteRPC, it is set to 0 by default on workstation OS and needs to be set to 1 for WTSOpenServer to work.