Click here to Skip to main content
15,884,425 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I've been trying to make a remote desktop program for 3+ years and just want to be able to do it now. I eventually found the RDPViewer class from rdpencom.dll but that only allows one connection for each run of the program, so you can't just disconnect and reconnect because it says:

Creating an instance of the COM component with CLSID {9B78F0E6-3E05-4A5B-B2E8-E743A8956B65} from the IClassFactory failed due to the following error: 800700b7 Cannot create a file when that file already exists. (Exception from HRESULT: 0x800700B7).

So I gave up with that and tried using the microsoft terminal services client control (which I named "rdp") from mstscax.dll, but that won't connect. I'm using the following code for it:


VB
rdp.Server = "Rixterz-PC" 'This computer's name
rdp.Domain = "WORKGROUP" 'The workgroup my laptop is in
rdp.UserName = "Owner" 'Owner is the username for Windows 7
Dim secured As IMsTscNonScriptable = DirectCast(rdp.GetOcx(), IMsTscNonScriptable)
secured.ClearTextPassword = "This computer's password"
rdp.Connect()


I tried to run this on my pc (both ends of the program) and although there were no errors, there was no screen showing up either. Once the connect button was clicked, that was it. Nothing.

What am I doing wrong? I used Ammyy Admin for inspiration and that can do it.
Posted
Comments
Sergey Alexandrovich Kryukov 21-Mar-14 15:47pm    
You re-posted this question. This is considered as abuse. Moreover, here is what happened then:

Richard MacCutchan commented that you should not re-post, but should edit your question on this page.

You replied:
"I'm not going to revive old posts. If I write anything on there, nobody will be notified. -and your comment wasn't helpful so don't write comments that aren't helpful."

First of all, this is not true. "Improve question" would pop your post on top of the question queue. Different thing is important: your words are extremely rude, your behavior at this forum is abusive and your attitude is extremely negative and counter-productive. Please, don't even play with the idea of telling members "don't write comments that aren't helpful". Most people really know better what is helpful and what is not; and all members are equally free to write their comment, unless they violate common rules of correct communications.

—SA
[no name] 22-Mar-14 6:43am    
OK. I see where you're coming from. And this isn't meant to be rude, but I am a fluent, native English speaker and none of that was rude. It may just be your misunderstanding because you're not a fluent English speaker. I wouldn't ever be rude to someone unless they were rude to me. And one more thing: you said that my attitude is negative and counterproductive. How am I supposed to be positive if the only thing people do on codeproject is delete me posts? It's happened more than once now and nobody ever gives me an actual answer. Unlike what some people may do, I always try my best to solve the problem before I ask questions on codeproject. So that means that I need a definate answer from people instead of cryptic and quite frankly useless and down-putting comments.

-Rixterz
Sergey Alexandrovich Kryukov 22-Mar-14 19:42pm    
No, excuse me. I mean it. I quoted what you said. What you call down-putting means criticism, not rudeness. If you break some rules, you should expect some corrective comments. And your post was deleted automatically due to abuse reports by some number of the members.

Sorry if you don't like the rules observed by most members. But than you cannot expect approval of your action.

Thank you for understanding,
—SA

[no name] 25-Mar-14 12:19pm    
I found out that remote desktop can't be hosted on Windows 7 Home Premium, which I have. So I'm going to get Windows 7 Ultimate so it should work.
syed shanu 24-Mar-14 22:33pm    
Chk this link for remote desktop program http://www.codeproject.com/Articles/43705/Remote-Desktop-using-C-NET

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900