how to use regsvr32 to register a .NET dll 
Author Message
 how to use regsvr32 to register a .NET dll

Hi, all,

I know .NET dll developed in C# can be registered by regasm. But what
I need to do is to add another entry in regedit, then anotehr program
can find that dll.

I make a sample run using VB. After compile that dll, use regsvr32
register it. Then add an entry in regedit manually, the key is
whatever I like, the value is the ProgID. In vb, it is the
Project.modulename.

But I can't make it in .NET using C#. Even I register the dll using
regasm, then I add a new entry, value set to the namespace.dllName.
But the loading application complains about not being able to find the
factory.

I am new in C#, any help or clue is highly appreciated!

min



Sat, 21 May 2005 05:49:32 GMT  
 how to use regsvr32 to register a .NET dll
Hello Min,

You may apply the ProgIdAttribute to your class to specify a ProgId for
your class. This is a sample code:

[ClassInterface(ClassInterfaceType.AutoDispatch)]
[ProgId("InteropSample.MyClass")]
public class MyClass
{
    public MyClass() {}

Quote:
}

You may refer to the link below to get more detailed information about this
attribute:

http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemRuntime...
ServicesProgIdAttributeClassTopic.asp

I hope this helps you.

Best regards,

Lion Shi [MS]
MCSE, MCSD
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.  2001 Microsoft Corporation. All rights
reserved.
--------------------

    Newsgroups: microsoft.public.dotnet.languages.csharp
    Subject: how to use regsvr32 to register a .NET dll
    Date: 2 Dec 2002 13:49:32 -0800
    Organization: http://groups.google.com/
    Lines: 19

    NNTP-Posting-Host: 65.112.82.2
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: 8bit
    X-Trace: posting.google.com 1038865772 4485 127.0.0.1 (2 Dec 2002
21:49:32 GMT)

    NNTP-Posting-Date: 2 Dec 2002 21:49:32 GMT
    Path:
cpmsftngxa08!cppssbbsa01.microsoft.com!news-out.cwix.com!newsfeed.cwix.com!n
ews.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!postnews1.go
ogle.com!not-for-mail
    Xref: cpmsftngxa08 microsoft.public.dotnet.languages.csharp:112644
    X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

    Hi, all,

    I know .NET dll developed in c# can be registered by regasm. But what
    I need to do is to add another entry in regedit, then anotehr program
    can find that dll.

    I make a sample run using VB. After compile that dll, use regsvr32
    register it. Then add an entry in regedit manually, the key is
    whatever I like, the value is the ProgID. In vb, it is the
    Project.modulename.

    But I can't make it in .NET using C#. Even I register the dll using
    regasm, then I add a new entry, value set to the namespace.dllName.
    But the loading application complains about not being able to find the
    factory.

    I am new in C#, any help or clue is highly appreciated!

    min



Sun, 22 May 2005 11:31:19 GMT  
 how to use regsvr32 to register a .NET dll
Yes. I have tried that way. But after registering using regasm, the
client application still can't find it.

I checked the registry, find the dll registered by regasm and the dll
registered by regsvr32 is different. Seems regasm wraps the dll to
make it compactiable with svr32.

Is there any way I can register the c# dll using regsvr32?

Thank you again and again for your replying!

min

Quote:

> Hello Min,

> You may apply the ProgIdAttribute to your class to specify a ProgId for
> your class. This is a sample code:

> [ClassInterface(ClassInterfaceType.AutoDispatch)]
> [ProgId("InteropSample.MyClass")]
> public class MyClass
> {
>     public MyClass() {}
> }

> You may refer to the link below to get more detailed information about this
> attribute:

> http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemRuntime...
> ServicesProgIdAttributeClassTopic.asp

> I hope this helps you.

> Best regards,

> Lion Shi [MS]
> MCSE, MCSD
> Microsoft Support Engineer

> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use.  2001 Microsoft Corporation. All rights
> reserved.
> --------------------

>     Newsgroups: microsoft.public.dotnet.languages.csharp
>     Subject: how to use regsvr32 to register a .NET dll
>     Date: 2 Dec 2002 13:49:32 -0800
>     Organization: http://groups.google.com/
>     Lines: 19

>     NNTP-Posting-Host: 65.112.82.2
>     Content-Type: text/plain; charset=ISO-8859-1
>     Content-Transfer-Encoding: 8bit
>     X-Trace: posting.google.com 1038865772 4485 127.0.0.1 (2 Dec 2002
> 21:49:32 GMT)

>     NNTP-Posting-Date: 2 Dec 2002 21:49:32 GMT
>     Path:
> cpmsftngxa08!cppssbbsa01.microsoft.com!news-out.cwix.com!newsfeed.cwix.com!n
> ews.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!postnews1.go
> ogle.com!not-for-mail
>     Xref: cpmsftngxa08 microsoft.public.dotnet.languages.csharp:112644
>     X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

>     Hi, all,

>     I know .NET dll developed in c# can be registered by regasm. But what
>     I need to do is to add another entry in regedit, then anotehr program
>     can find that dll.

>     I make a sample run using VB. After compile that dll, use regsvr32
>     register it. Then add an entry in regedit manually, the key is
>     whatever I like, the value is the ProgID. In vb, it is the
>     Project.modulename.

>     But I can't make it in .NET using C#. Even I register the dll using
>     regasm, then I add a new entry, value set to the namespace.dllName.
>     But the loading application complains about not being able to find the
>     factory.

>     I am new in C#, any help or clue is highly appreciated!

>     min



Mon, 23 May 2005 03:38:19 GMT  
 how to use regsvr32 to register a .NET dll
Hello Min,

A .NET assembly can not be registered by regsvr32 directly, since it is not
a COM dll. You have to generate a COM wrapper (which is generated by
regasm.exe automatically) for it via tlbexp.exe utility, and register the
wrapper dll with regsvr32.

By the way, have you exposed any interface of your C# class? If you only
expose some methods and properties, the COM client can not find the object.
You may try applying the ClassInterfaceAttribute to your class to generate
a interface for all public methods and properties:

[ClassInterfaceAttribute(ClassInterfaceType.AutoDual)]
public class MyClass

I hope this helps.

Best regards,

Lion Shi [MS]
MCSE, MCSD
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.  2001 Microsoft Corporation. All rights
reserved.
--------------------

    Newsgroups: microsoft.public.dotnet.languages.csharp
    Subject: Re: how to use regsvr32 to register a .NET dll
    Date: 4 Dec 2002 11:38:19 -0800
    Organization: http://groups.google.com/
    Lines: 84



    NNTP-Posting-Host: 65.112.82.2
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: 8bit
    X-Trace: posting.google.com 1039030700 30282 127.0.0.1 (4 Dec 2002
19:38:20 GMT)

    NNTP-Posting-Date: 4 Dec 2002 19:38:20 GMT
    Path:
cpmsftngxa06!tkmsftngp01!newsfeed00.sul.t-online.de!t-online.de!news-spur1.m
axwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-xit-04!supernews.
com!postnews1.google.com!not-for-mail
    Xref: cpmsftngxa06 microsoft.public.dotnet.languages.csharp:113777
    X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

    Yes. I have tried that way. But after registering using regasm, the
    client application still can't find it.

    I checked the registry, find the dll registered by regasm and the dll
    registered by regsvr32 is different. Seems regasm wraps the dll to
    make it compactiable with svr32.

    Is there any way I can register the c# dll using regsvr32?

    Thank you again and again for your replying!

    min



    > Hello Min,
    >
    > You may apply the ProgIdAttribute to your class to specify a ProgId
for
    > your class. This is a sample code:
    >
    > [ClassInterface(ClassInterfaceType.AutoDispatch)]
    > [ProgId("InteropSample.MyClass")]
    > public class MyClass
    > {
    >     public MyClass() {}
    > }
    >
    > You may refer to the link below to get more detailed information
about this
    > attribute:
    >
    >
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemRuntime...
    > ServicesProgIdAttributeClassTopic.asp
    >
    > I hope this helps you.
    >
    > Best regards,
    >
    > Lion Shi [MS]
    > MCSE, MCSD
    > Microsoft Support Engineer
    >
    > This posting is provided "AS IS" with no warranties, and confers no
rights.
    > You assume all risk for your use.  2001 Microsoft Corporation. All
rights
    > reserved.
    > --------------------

    >     Newsgroups: microsoft.public.dotnet.languages.csharp
    >     Subject: how to use regsvr32 to register a .NET dll
    >     Date: 2 Dec 2002 13:49:32 -0800
    >     Organization: http://groups.google.com/
    >     Lines: 19

    >     NNTP-Posting-Host: 65.112.82.2
    >     Content-Type: text/plain; charset=ISO-8859-1
    >     Content-Transfer-Encoding: 8bit
    >     X-Trace: posting.google.com 1038865772 4485 127.0.0.1 (2 Dec 2002
    > 21:49:32 GMT)

    >     NNTP-Posting-Date: 2 Dec 2002 21:49:32 GMT
    >     Path:
    >
cpmsftngxa08!cppssbbsa01.microsoft.com!news-out.cwix.com!newsfeed.cwix.com!n
    >
ews.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!postnews1.go
    > ogle.com!not-for-mail
    >     Xref: cpmsftngxa08 microsoft.public.dotnet.languages.csharp:112644
    >     X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
    >    
    >     Hi, all,
    >    
    >     I know .NET dll developed in c# can be registered by regasm. But
what
    >     I need to do is to add another entry in regedit, then anotehr
program
    >     can find that dll.
    >    
    >     I make a sample run using VB. After compile that dll, use regsvr32
    >     register it. Then add an entry in regedit manually, the key is
    >     whatever I like, the value is the ProgID. In vb, it is the
    >     Project.modulename.
    >    
    >     But I can't make it in .NET using C#. Even I register the dll
using
    >     regasm, then I add a new entry, value set to the
namespace.dllName.
    >     But the loading application complains about not being able to
find the
    >     factory.
    >    
    >     I am new in C#, any help or clue is highly appreciated!
    >    
    >     min



Mon, 23 May 2005 09:48:38 GMT  
 how to use regsvr32 to register a .NET dll
Thank you sooo much for your replying! But I still can't make it work.

Is the wrapper dll named as *.tlb? I use the tlbexp to output to a
model.dll. Then use regsvr32 to register that dll, but get error
message:

"model.dll" is not an executable file and no registration helper is
registered for this file type.

I use [ClassInterface(ClassInterfaceType.AutoDispatch)] before. After
reading your posting, I tried  this way:
        [ProgId("MyModel.Model1")]
        [ClassInterfaceAttribute(ClassInterfaceType.AutoDual)]
        public class MyModel:MHModelPlugin.IMHModelPlugin

Then regasm the dll, add an entry in registry, but the COM client
still complains about loading the factory.

Any suggestion? Anything is highly appreciated!

min

Quote:

> Hello Min,

> A .NET assembly can not be registered by regsvr32 directly, since it is not
> a COM dll. You have to generate a COM wrapper (which is generated by
> regasm.exe automatically) for it via tlbexp.exe utility, and register the
> wrapper dll with regsvr32.

> By the way, have you exposed any interface of your C# class? If you only
> expose some methods and properties, the COM client can not find the object.
> You may try applying the ClassInterfaceAttribute to your class to generate
> a interface for all public methods and properties:

> [ClassInterfaceAttribute(ClassInterfaceType.AutoDual)]
> public class MyClass

> I hope this helps.

> Best regards,

> Lion Shi [MS]
> MCSE, MCSD
> Microsoft Support Engineer

> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use.  2001 Microsoft Corporation. All rights
> reserved.
> --------------------

>     Newsgroups: microsoft.public.dotnet.languages.csharp
>     Subject: Re: how to use regsvr32 to register a .NET dll
>     Date: 4 Dec 2002 11:38:19 -0800
>     Organization: http://groups.google.com/
>     Lines: 84



>     NNTP-Posting-Host: 65.112.82.2
>     Content-Type: text/plain; charset=ISO-8859-1
>     Content-Transfer-Encoding: 8bit
>     X-Trace: posting.google.com 1039030700 30282 127.0.0.1 (4 Dec 2002
> 19:38:20 GMT)

>     NNTP-Posting-Date: 4 Dec 2002 19:38:20 GMT
>     Path:
> cpmsftngxa06!tkmsftngp01!newsfeed00.sul.t-online.de!t-online.de!news-spur1.m
> axwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-xit-04!supernews.
> com!postnews1.google.com!not-for-mail
>     Xref: cpmsftngxa06 microsoft.public.dotnet.languages.csharp:113777
>     X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

>     Yes. I have tried that way. But after registering using regasm, the
>     client application still can't find it.

>     I checked the registry, find the dll registered by regasm and the dll
>     registered by regsvr32 is different. Seems regasm wraps the dll to
>     make it compactiable with svr32.

>     Is there any way I can register the c# dll using regsvr32?

>     Thank you again and again for your replying!

>     min



>     > Hello Min,

>     > You may apply the ProgIdAttribute to your class to specify a ProgId
>  for
>     > your class. This is a sample code:

>     > [ClassInterface(ClassInterfaceType.AutoDispatch)]
>     > [ProgId("InteropSample.MyClass")]
>     > public class MyClass
>     > {
>     >     public MyClass() {}
>     > }

>     > You may refer to the link below to get more detailed information
>  about this
>     > attribute:

>  http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemRuntime...
>     > ServicesProgIdAttributeClassTopic.asp

>     > I hope this helps you.

>     > Best regards,

>     > Lion Shi [MS]
>     > MCSE, MCSD
>     > Microsoft Support Engineer

>     > This posting is provided "AS IS" with no warranties, and confers no
>  rights.
>     > You assume all risk for your use.  2001 Microsoft Corporation. All
>  rights
>     > reserved.
>     > --------------------

>     >     Newsgroups: microsoft.public.dotnet.languages.csharp
>     >     Subject: how to use regsvr32 to register a .NET dll
>     >     Date: 2 Dec 2002 13:49:32 -0800
>     >     Organization: http://groups.google.com/
>     >     Lines: 19

>     >     NNTP-Posting-Host: 65.112.82.2
>     >     Content-Type: text/plain; charset=ISO-8859-1
>     >     Content-Transfer-Encoding: 8bit
>     >     X-Trace: posting.google.com 1038865772 4485 127.0.0.1 (2 Dec 2002
>     > 21:49:32 GMT)

>     >     NNTP-Posting-Date: 2 Dec 2002 21:49:32 GMT
>     >     Path:

>  cpmsftngxa08!cppssbbsa01.microsoft.com!news-out.cwix.com!newsfeed.cwix.com!n

>  ews.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!postnews1.go
>     > ogle.com!not-for-mail
>     >     Xref: cpmsftngxa08 microsoft.public.dotnet.languages.csharp:112644
>     >     X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

>     >     Hi, all,

>     >     I know .NET dll developed in c# can be registered by regasm. But
>  what
>     >     I need to do is to add another entry in regedit, then anotehr
>  program
>     >     can find that dll.

>     >     I make a sample run using VB. After compile that dll, use regsvr32
>     >     register it. Then add an entry in regedit manually, the key is
>     >     whatever I like, the value is the ProgID. In vb, it is the
>     >     Project.modulename.

>     >     But I can't make it in .NET using C#. Even I register the dll
>  using
>     >     regasm, then I add a new entry, value set to the
>  namespace.dllName.
>     >     But the loading application complains about not being able to
>  find the
>     >     factory.

>     >     I am new in C#, any help or clue is highly appreciated!

>     >     min



Tue, 24 May 2005 04:53:47 GMT  
 how to use regsvr32 to register a .NET dll
Hello Min,

Then you may need to register the library manually. To do this, please
genereate the registry file first with the follwing line (it doesn't update
the registry):

regasm myTest.dll /regfile:myTest.reg

And then edit the file based on your requirement before import it to the
registry.

Hope it helps.

Best regards,

Lion Shi [MSFT]
MCSE, MCSD
Microsoft Support Engineer

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.  2001 Microsoft Corporation. All rights
reserved.
--------------------

    Newsgroups: microsoft.public.dotnet.languages.csharp
    Subject: Re: how to use regsvr32 to register a .NET dll
    Date: 5 Dec 2002 12:53:47 -0800
    Organization: http://groups.google.com/
    Lines: 170





    NNTP-Posting-Host: 65.112.82.2
    Content-Type: text/plain; charset=ISO-8859-1
    Content-Transfer-Encoding: 8bit
    X-Trace: posting.google.com 1039121627 18550 127.0.0.1 (5 Dec 2002
20:53:47 GMT)

    NNTP-Posting-Date: 5 Dec 2002 20:53:47 GMT
    Path:
cpmsftngxa06!tkmsftngp01!newsfeed00.sul.t-online.de!t-online.de!news-spur1.m
axwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-06!sn-xit-08!supernews.
com!postnews1.google.com!not-for-mail
    Xref: cpmsftngxa06 microsoft.public.dotnet.languages.csharp:114142
    X-Tomcat-NG: microsoft.public.dotnet.languages.csharp

    Thank you sooo much for your replying! But I still can't make it work.

    Is the wrapper dll named as *.tlb? I use the tlbexp to output to a
    model.dll. Then use regsvr32 to register that dll, but get error
    message:

    "model.dll" is not an executable file and no registration helper is
    registered for this file type.

    I use [ClassInterface(ClassInterfaceType.AutoDispatch)] before. After
    reading your posting, I tried  this way:
        [ProgId("MyModel.Model1")]
        [ClassInterfaceAttribute(ClassInterfaceType.AutoDual)]
        public class MyModel:MHModelPlugin.IMHModelPlugin

    Then regasm the dll, add an entry in registry, but the COM client
    still complains about loading the factory.

    Any suggestion? Anything is highly appreciated!

    min



    > Hello Min,
    >
    > A .NET assembly can not be registered by regsvr32 directly, since it
is not
    > a COM dll. You have to generate a COM wrapper (which is generated by
    > regasm.exe automatically) for it via tlbexp.exe utility, and register
the
    > wrapper dll with regsvr32.
    >
    > By the way, have you exposed any interface of your C# class? If you
only
    > expose some methods and properties, the COM client can not find the
object.
    > You may try applying the ClassInterfaceAttribute to your class to
generate
    > a interface for all public methods and properties:
    >
    > [ClassInterfaceAttribute(ClassInterfaceType.AutoDual)]
    > public class MyClass
    >
    > I hope this helps.
    >
    > Best regards,
    >
    > Lion Shi [MS]
    > MCSE, MCSD
    > Microsoft Support Engineer
    >
    > This posting is provided "AS IS" with no warranties, and confers no
rights.
    > You assume all risk for your use.  2001 Microsoft Corporation. All
rights
    > reserved.
    > --------------------

    >     Newsgroups: microsoft.public.dotnet.languages.csharp
    >     Subject: Re: how to use regsvr32 to register a .NET dll
    >     Date: 4 Dec 2002 11:38:19 -0800
    >     Organization: http://groups.google.com/
    >     Lines: 84



    >     NNTP-Posting-Host: 65.112.82.2
    >     Content-Type: text/plain; charset=ISO-8859-1
    >     Content-Transfer-Encoding: 8bit
    >     X-Trace: posting.google.com 1039030700 30282 127.0.0.1 (4 Dec
2002
    > 19:38:20 GMT)

    >     NNTP-Posting-Date: 4 Dec 2002 19:38:20 GMT
    >     Path:
    >
cpmsftngxa06!tkmsftngp01!newsfeed00.sul.t-online.de!t-online.de!news-spur1.m
    >
axwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-xit-04!supernews.
    > com!postnews1.google.com!not-for-mail
    >     Xref: cpmsftngxa06 microsoft.public.dotnet.languages.csharp:113777
    >     X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
    >    
    >     Yes. I have tried that way. But after registering using regasm,
the
    >     client application still can't find it.
    >    
    >     I checked the registry, find the dll registered by regasm and the
dll
    >     registered by regsvr32 is different. Seems regasm wraps the dll to
    >     make it compactiable with svr32.
    >    
    >     Is there any way I can register the c# dll using regsvr32?
    >    
    >     Thank you again and again for your replying!
    >    
    >     min
    >    


    >     > Hello Min,
    >     >
    >     > You may apply the ProgIdAttribute to your class to specify a
ProgId
    >  for
    >     > your class. This is a sample code:
    >     >
    >     > [ClassInterface(ClassInterfaceType.AutoDispatch)]
    >     > [ProgId("InteropSample.MyClass")]
    >     > public class MyClass
    >     > {
    >     >     public MyClass() {}
    >     > }
    >     >
    >     > You may refer to the link below to get more detailed
information
    >  about this
    >     > attribute:
    >     >
    >     >
    >  
http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemRuntime...
    >     > ServicesProgIdAttributeClassTopic.asp
    >     >
    >     > I hope this helps you.
    >     >
    >     > Best regards,
    >     >
    >     > Lion Shi [MS]
    >     > MCSE, MCSD
    >     > Microsoft Support Engineer
    >     >
    >     > This posting is provided "AS IS" with no warranties, and
confers no
    >  rights.
    >     > You assume all risk for your use.  2001 Microsoft Corporation.
All
    >  rights
    >     > reserved.
    >     > --------------------

    >     >     Newsgroups: microsoft.public.dotnet.languages.csharp
    >     >     Subject: how to use regsvr32 to register a .NET dll
    >     >     Date: 2 Dec 2002 13:49:32 -0800
    >     >     Organization: http://groups.google.com/
    >     >     Lines: 19
    >     >     Message-ID:

    >     >     NNTP-Posting-Host: 65.112.82.2
    >     >     Content-Type: text/plain; charset=ISO-8859-1
    >     >     Content-Transfer-Encoding: 8bit
    >     >     X-Trace: posting.google.com 1038865772 4485 127.0.0.1 (2
Dec 2002
    >     > 21:49:32 GMT)

    >     >     NNTP-Posting-Date: 2 Dec 2002 21:49:32 GMT
    >     >     Path:
    >     >
    >  
cpmsftngxa08!cppssbbsa01.microsoft.com!news-out.cwix.com!newsfeed.cwix.com!n
    >     >
    >  
ews.maxwell.syr.edu!sn-xit-03!sn-xit-01!sn-xit-04!supernews.com!postnews1.go
    >     > ogle.com!not-for-mail
    >     >     Xref: cpmsftngxa08
microsoft.public.dotnet.languages.csharp:112644
    >     >     X-Tomcat-NG: microsoft.public.dotnet.languages.csharp
    >     >    
    >     >     Hi, all,
    >     >    
    >     >     I know .NET dll developed in c# can be registered by
regasm. But
    >  what
    >     >     I need to do is to add another entry in regedit, then
anotehr
    >  program
    >     >     can find that dll.
    >     >    
    >     >     I make a sample run using VB. After compile that dll, use
regsvr32
    >     >     register it. Then add an entry in regedit manually, the key
is
    >     >     whatever I like, the value is the ProgID. In vb, it is the
    >     >     Project.modulename.
    >     >    
    >     >     But I can't make it in .NET using C#. Even I register the
dll
    >  using
    >     >     regasm, then I add a new entry, value set to the
    >  namespace.dllName.
    >     >     But the loading application complains about not being able
to
    >  find the
    >     >     factory.
    >     >    
    >     >     I am new in C#, any help or clue is highly appreciated!
    >     >    
    >     >     min



Tue, 24 May 2005 12:00:51 GMT  
 how to use regsvr32 to register a .NET dll
Hi, Lion,

Thank you so much for your help! I even don't know how to express my
appreciate!
The problem is that I didn't place the dll in the same folder as the
COM consumer, or I didn't use GACUTIL to bring it to the global cach
either.

Thank you again for your valuable help!

min

Quote:

> Hello Min,

> Then you may need to register the library manually. To do this, please
> genereate the registry file first with the follwing line (it doesn't update
> the registry):

> regasm myTest.dll /regfile:myTest.reg

> And then edit the file based on your requirement before import it to the
> registry.

> Hope it helps.

> Best regards,

> Lion Shi [MSFT]
> MCSE, MCSD
> Microsoft Support Engineer

> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use.  2001 Microsoft Corporation. All rights
> reserved.
> --------------------

>     Newsgroups: microsoft.public.dotnet.languages.csharp
>     Subject: Re: how to use regsvr32 to register a .NET dll
>     Date: 5 Dec 2002 12:53:47 -0800
>     Organization: http://groups.google.com/
>     Lines: 170



Tue, 24 May 2005 23:43:24 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Can't register a DLL using REGSVR32

2. Registering OCX using Regsvr32.exe

3. Cannot register DLL in Regsvr32

4. Cannot register DLL in Regsvr32

5. regsvr32 crash when registering OCX - Loading dlls dynamically from OCX's

6. Q: COM DLL: registration ok from VC++6, not using regsvr32

7. programmatically registering COM object (not regsvr32)

8. Making and registering a dll in C++.NET

9. Register .NET DLL

10. DLL register under WINCE.NET

11. how do I register my dll with NT operating system using VC++5

12. ATL component written in VC.NET 2002 won't register on non .NET machine

 

 
Powered by phpBB® Forum Software