473,406 Members | 2,217 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Error: Class not registered.Looking for object with ClsID :{...}

53
Hi ,

I am having a .Net Activex control. I have done coding for COMRegistering and Unregistereing in C#.Net. The code is follows..
[ComRegisterFunction]
static void ComRegister(Type t)
{
string keyName = @"CLSID\" + t.GUID.ToString("B");
using (RegistryKey key =
Registry.ClassesRoot.OpenSubKey(keyName, true))
{
key.CreateSubKey("Control").Close();
using (RegistryKey subkey = key.CreateSubKey("MiscStatus"))
{
subkey.SetValue("", "131457");
}
using (RegistryKey subkey = key.CreateSubKey("TypeLib"))
{
Guid libid = Marshal.GetTypeLibGuidForAssembly(t.Assembly);
subkey.SetValue("", libid.ToString("B"));
}
using (RegistryKey subkey = key.CreateSubKey("Version"))
{
Version ver = t.Assembly.GetName().Version;
string version =
string.Format("{0}.{1}",
ver.Major,
ver.Minor);
if (version == "0.0") version = "1.0";
subkey.SetValue("", version);
}
}
}

[ComUnregisterFunction]
static void ComUnregister(Type t)
{
// Delete entire CLSID\{clsid} subtree
string keyName = @"CLSID\" + t.GUID.ToString("B");
Registry.ClassesRoot.DeleteSubKeyTree(keyName);
}

When i Build this .Net project this control is getting registering in the registry and i am able to add this .net control in vb 6.0 form also. its working fine.

I want to test this dll on any other system other than developer machine....
Then i tried to register this dll through Regasm.. The control is registered succefully. but when i tried to add this control in to vb 6.0 form.. I am getting this error: Class not Registered .Looking for Object with ClsId :{...}..

Then i send full .net project to that system and build the .net appliaction. then it is registered fine and working fine in vb 6.0 also.. the problem is comming if i registered that dll through command line.. what is the solution for this...

Plz Help ....
Jan 14 '08 #1
0 1999

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Shabbs | last post by:
hi I am getting this error message :- Run-time error 713 Class not registered Looking for object with CLSID:{20DD1B9E-87C4-11D1-8BE3-0000F8754DA1} when ever i click on components which i...
4
by: Ahmed | last post by:
i have tried running the csharpsite in my Microsoft Visual C#.net and after i hit the run button i keep getting the same error which is : Server Error in '/csharpsite' Application COM object with...
4
by: Shiraz | last post by:
Hi I just made an installer package for an application in .NET which also uses COM dlls. It seems to work fine on my machine but when tried it on a co-worker's machine, the application installs,...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
0
by: Nonee | last post by:
Hello- I have a form with the mediaplayer referenced to play mp3's and avi's and I believe that is what is causing the problem. I am not sure, but I am hoping. Anyway, I "published" the vb.net...
0
by: Nonee | last post by:
Anyone, anyone? : ) Hello- I have a form with the mediaplayer referenced to play mp3's and avi's and I believe that is what is causing the problem. I am not sure, but I am hoping. ...
5
by: krafla | last post by:
I have a similar problem with a program i made with VB 6.0 - the only control I used is MSFlexGrid - the program was developed on an XP machine. and the first time to use it on another machine i got...
9
by: DKn | last post by:
Hi , I am having a .Net Activex control. I have done coding for COMRegistering and Unregistereing in C#.Net. The code is follows.. static void ComRegister(Type t) { ...
2
by: pavanip | last post by:
Hi, I developed a windows application in Vb.Net 2003.It is working fine in this. But when I am trying to convert this into .Net 2005 I am getting this error. Class not registered...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.