Click here to Skip to main content
Rate this: bad
good
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;
using RDPCOMAPILib;
 
namespace ScrS_server_
{
    public partial class Form1 : Form
    {
        RDPSession x = new RDPSession();
        public Form1()
        {
            InitializeComponent();
        }
        
        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;
            x.Open();
 
        }
 
        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.Close();
            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
rtpc34221
Edited 7-Feb-11 2:26am
TweakBird17.1K
v2
Comments
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
good
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.
  Permalink  
Comments
SAKryukov at 7-Feb-11 12:45pm
   
A 5,
--SA
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
good
Please Sign up or sign in to vote.

Solution 2

gf h gf f fg fj gf
  Permalink  

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

  Print Answers RSS
0 Maciej Los 315
1 OriginalGriff 233
2 Aajmot Sk 224
3 Richard MacCutchan 220
4 Marcin Kozub 210
0 OriginalGriff 7,853
1 Sergey Alexandrovich Kryukov 7,107
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,790


Advertise | Privacy | Mobile
Web01 | 2.8.1411023.1 | Last Updated 22 Feb 2013
Copyright © CodeProject, 1999-2014
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