Home All Groups Group Topic Archive Search About

user control dll missing DllRegisterServer

Author
17 Mar 2006 5:00 PM
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

Author
17 Mar 2006 5:14 PM
Chris
Michelangelo wrote:
Show quoteHide quote
> 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
Author
17 Mar 2006 5:48 PM
Michelangelo
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 ... :-(

Show quoteHide quote
"Chris" <no@spam.com> wrote in message
news:OuOPLZeSGHA.5036@TK2MSFTNGP12.phx.gbl...
> Michelangelo wrote:
>> 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
Author
17 Mar 2006 6:05 PM
Chris
Michelangelo wrote:
Show quoteHide quote
> 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 ... :-(
>
> "Chris" <no@spam.com> wrote in message
> news:OuOPLZeSGHA.5036@TK2MSFTNGP12.phx.gbl...
>
>>Michelangelo wrote:
>>
>>>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
>
>
>

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

Chris
Author
17 Mar 2006 5:19 PM
Armin Zingler
Show quote Hide quote
"Michelangelo" <Michelangelo2006-nientespam@amiura.com> schrieb
> 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
Author
17 Mar 2006 5:46 PM
Michelangelo
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?



Show quoteHide quote
"Armin Zingler" <az.nospam@freenet.de> wrote in message
news:uPEAybeSGHA.4440@TK2MSFTNGP11.phx.gbl...
> "Michelangelo" <Michelangelo2006-nientespam@amiura.com> schrieb
>> 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
Author
17 Mar 2006 7:01 PM
Armin Zingler
"Michelangelo" <Michelangelo2006-nientespam@amiura.com> schrieb
> 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
Author
18 Mar 2006 11:29 AM
Herfried K. Wagner [MVP]
"Michelangelo" <Michelangelo2006-nientespam@amiura.com> schrieb:
> 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".

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://classicvb.org/petition/>