Click here to Skip to main content
11,480,938 members (62,286 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#2.0
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
namespace ScrS_server_
    public partial class Form1 : Form
        RDPSession x = new RDPSession();
        public Form1()
        private void Form1_Load(object sender, EventArgs e)
        private void Incoming(object Guest)
            IRDPSRAPIAttendee MyGuest = (IRDPSRAPIAttendee)Guest;//???
            MyGuest.ControlLevel = CTRL_LEVEL.CTRL_LEVEL_INTERACTIVE;
        private void button1_Click(object sender, EventArgs e)
            x.OnAttendeeConnected += Incoming;
        private void button2_Click(object sender, EventArgs e)
            IRDPSRAPIInvitation Invitation = x.Invitations.CreateInvitation("Trial", "MyGroup", "", 10);
            textBox1.Text = Invitation.ConnectionString;
        private void button3_Click(object sender, EventArgs e)
            x = null;

It will give the following error:-
Retrieving the COM class factory for component with CLSID {9B78F0E6-3E05-4A5B-B2E8-E743A8956B65} failed due to the following error: 80040154.
Posted 7-Feb-11 2:22am
Edited 7-Feb-11 2:26am
hopingToCode at 7-Feb-11 7:28am
What does RDPCOMAPILib do? You are importing something but can't see it n your code so may be in RDPCOMAPILib
It's a remote desktop process library. Google it, and you'll get a much more complete answer than I feel like providing on my own.
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

That's a "class is not registered" error. Check your registry to make sure that the CLSID cited in the error message is listed.
SAKryukov at 7-Feb-11 12:45pm
A 5,
dschakel at 18-Apr-11 22:53pm
I get a similar error using the VB version of the above code.
And yes, the CLSID is in the registry.
Creating an instance of the COM component with CLSID {9B78F0E6-3E05-4A5B-B2E8-E743A8956B65} from the IClassFactory failed due to the following error: 800700b7
Namely, the first time through all works as expected, however, the second time around the code is called the above error occurs. And, also, I have checked that all of the variables have been released, even going as far as putting everything on a new form and destroying the form before trying again.
When the application is exited, everything works as advertised.
Sumit Prakash Sharma at 25-Apr-14 3:54am
how can i register this class in Registry
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

gf h gf f fg fj gf

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

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 294
1 CPallini 135
2 OriginalGriff 130
3 CHill60 130
4 Member 10254688 65
0 Sergey Alexandrovich Kryukov 8,184
1 OriginalGriff 7,586
2 Sascha Lefèvre 3,114
3 Maciej Los 2,491
4 Richard Deeming 2,335

Advertise | Privacy | Mobile
Web01 | 2.8.150520.1 | Last Updated 22 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100