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 ....
9 17486
Try to register the DLL using REGSVR32 .
Try to register the DLL using REGSVR32 .
Yes i have done that .
.NET commandPrompt, i run the Command regsvr32 MyDotNetControl.dll.
error :MyDotNelControl.dll was loaded, but the DllRegisterServer Entry point was not found. the file can not be registered.
Hi,
If you want to use the .net dll in VB6,
While registering with regasm, you have to generate the "TypeLibrary" : -
regasm myAssembly.dll /tlb:myAssembly.tlb
-
OR, if you have already registered(Without Type Library),
you can LateBind the Objects in VB6: -
Dim tObj As Object
-
Set tObj = CreateObject("MyProjName.MyClassName")
-
Regards
Veena
Hi,
When i build my .net Project , both dll and tlb files are getting generated in bin debug folder.
I have tried this code in vb 6.0
Private Sub Form_Load()
Dim Obj As VBControlExtender
Set Obj = Form1.Controls.Add("MyProjName.MyClassName")
Obj.Visible = True
End Sub
Getting run time error: Class not registered.Looking for object with CLSID{....}
Is there any other solution....
Hi,
If you want to use the .net dll in VB6,
While registering with regasm, you have to generate the "TypeLibrary" : -
regasm myAssembly.dll /tlb:myAssembly.tlb
-
OR, if you have already registered(Without Type Library),
you can LateBind the Objects in VB6: -
Dim tObj As Object
-
Set tObj = CreateObject("MyProjName.MyClassName")
-
Regards
Veena
Hi,
its an ActiveX Dll or an ActiveX ocx..?
My previous code was for ActiveX Dll
If ActiveX ocx, then remove the code,
add the Control to the project
and from toolbox, directly place the Control on the Form..
Regards
Veena
Its .Net ActiveX Control.. when i drag and drop to the vb 6.0 form.. the same error...Class not registered.Looking for object with clsid :{...} is coming..
Hi,
If I register through .Net code... In the registry Editor, the control is registered with the GUID under classRoot . InProcServer32 CodeBase Entry is coming.
When I registered through Regasm this entry (codeBase value) is not there under InProcServer32. This is the only difference I observed....
Is this is the Reason, I am getting the error : Class not registered. Looking for object with clsid :{...}
Please anybody help me...
Its .Net ActiveX Control.. when i drag and drop to the vb 6.0 form.. the same error...Class not registered.Looking for object with clsid :{...} is coming..
I suspect the .Net forum would provide a better response to this question.
Hi, i got the solution for this problem...
We need to Use this command..
Regasm /codebase myDotNetControl.dll
Now its working fine in other systems also..
But, the .Net dll must be strong named to use the Codebase command.....
I suspect the .Net forum would provide a better response to this question.
Sign in to post your reply or Sign up for a free account.
Similar topics
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...
|
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...
|
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,...
|
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....
|
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...
|
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. ...
|
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...
|
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)
{
...
|
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...
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: Aftab Ahmad |
last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below.
Dim IE As Object
Set IE =...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: marcoviolo |
last post by:
Dear all,
I would like to implement on my worksheet an vlookup dynamic , that consider a change of pivot excel via win32com, from an external excel (without open it) and save the new file into a...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: Vimpel783 |
last post by:
Hello!
Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
| |