user control dll missing DllRegisterServer

  • Thread starter Thread starter Michelangelo
  • Start date Start date
M

Michelangelo

Hi All,

I hace created a sample user control in Visual Studio .NET (2003); I have
been able to compile and use it (add it to a form) in a test standard
windows application, but
when I try to register it in another system, an error comes out saying the
dll does not have the DllRegisterServer function.

I have tried to add the check box "Register for COM Interop" in the Project
properties, but it does not help.

I am sorry if this is a stupid question (I have not been developing with vb
since a long time).

Thanks in advance for any help.

Michelangelo
 
Michelangelo said:
Hi All,

I hace created a sample user control in Visual Studio .NET (2003); I have
been able to compile and use it (add it to a form) in a test standard
windows application, but
when I try to register it in another system, an error comes out saying the
dll does not have the DllRegisterServer function.

I have tried to add the check box "Register for COM Interop" in the Project
properties, but it does not help.

I am sorry if this is a stupid question (I have not been developing with vb
since a long time).

Thanks in advance for any help.

Michelangelo

Are you trying to use this control in a Non-.Net language?

If you are going to use this control with .Net there is no need to
register the dll with the operating system. Just add a reference to it
in your project.

Let us know more what you are trying to do.

Chris
 
Michelangelo said:
Hi All,

I hace created a sample user control in Visual Studio .NET (2003); I
have been able to compile and use it (add it to a form) in a test
standard windows application, but
when I try to register it in another system, an error comes out
saying the dll does not have the DllRegisterServer function.

I have tried to add the check box "Register for COM Interop" in the
Project properties, but it does not help.

I am sorry if this is a stupid question (I have not been developing
with vb since a long time).

Thanks in advance for any help.


A .Net assembly can not be registerde by using regsvr32. Use Regasm.exe
instead (see help index). You don't need to register for COM interop because
the usercontrol can not be used via COM interop. At least not as a Control.
It's a .Net control that can only be used on .Net Forms.

Armin
 
I am trying to use it in a non .net application. So my question now is: can
I develop a control that can be used by a non .NET application with Visual
Studio .NET?
 
Chris,

I am trying to use it in a non .net application. So my question now is: can
I develop a control that can be used by a non .NET application with Visual
Studio .NET?

The application I am trying to use lists registered controls and can add
..ocx controls, but I have not found a way to make an .ocx control in Visual
Basic .NET ... :-(
 
Michelangelo said:
Chris,

I am trying to use it in a non .net application. So my question now is: can
I develop a control that can be used by a non .NET application with Visual
Studio .NET?

The application I am trying to use lists registered controls and can add
.ocx controls, but I have not found a way to make an .ocx control in Visual
Basic .NET ... :-(

I know of no way to make an ocx control in .net. You may need to use
VB6 for this.

Chris
 
Michelangelo said:
I am trying to use it in a non .net application. So my question now
is: can I develop a control that can be used by a non .NET
application with Visual Studio .NET?

No, not that I know.


Armin
 
Michelangelo said:
I hace created a sample user control in Visual Studio .NET (2003); I have
been able to compile and use it (add it to a form) in a test standard
windows application, but
when I try to register it in another system, an error comes out saying the
dll does not have the DllRegisterServer function.

I have tried to add the check box "Register for COM Interop" in the
Project properties, but it does not help.

Use "RegAsm" instead of "regsvr32".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top