473,386 Members | 1,609 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,386 software developers and data experts.

Register .Net Components for COM

Hi,
I have created a simple managed component in vb.Net with a public class
exposing a public function. I successfully registered it using 'Regasm.exe'
.. But
when I tired to access it in vb 6.0( using late binding) it gives an error .
I cannot view managed component in Ole View .
Both managed componet and vb 6.0 exe are in the same folder.
How Can I successfully register my component for COM?

Thanks

Nov 21 '05 #1
4 2189
Hi,

The public classes in vb.net dl must be marked as comvisible for them
to work with vb6.

http://msdn.microsoft.com/library/de...classtopic.asp
Ken
-----------------------
"Mihiri" <Mi****@discussions.microsoft.com> wrote in message
news:5C**********************************@microsof t.com...
Hi,
I have created a simple managed component in vb.Net with a public class
exposing a public function. I successfully registered it using
'Regasm.exe'
. But
when I tired to access it in vb 6.0( using late binding) it gives an error
.
I cannot view managed component in Ole View .
Both managed componet and vb 6.0 exe are in the same folder.
How Can I successfully register my component for COM?

Thanks

Nov 21 '05 #2
"Mihiri" <Mi****@discussions.microsoft.com> wrote in message
news:5C**********************************@microsof t.com...
I have created a simple managed component in vb.Net with a
public class exposing a public function. I successfully registered it
using 'Regasm.exe'. I cannot view managed component in Ole View .
Try using the TypeLib (tlb) created by regasm instead.
Both managed componet and vb 6.0 exe are in the same folder.


Irrelevant - COM always finds components via the location held in
the Registry.

HTH,
Phill W.
Nov 21 '05 #3
"Mihiri" <Mi****@discussions.microsoft.com> schrieb:
I have created a simple managed component in vb.Net with a public class
exposing a public function. I successfully registered it using
'Regasm.exe'
. But
when I tired to access it in vb 6.0( using late binding) it gives an error
.
I cannot view managed component in Ole View .


Make sure you reference the type library file (".tlb") instead of the DLL.

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

Nov 21 '05 #4
You cannot view the DLL in OLE View because it is just an assembly not a COM
DLL. It is better to create your class as a COM class in the IDE and set the
COM Interop option for the project you are compiling. Making your class a
COM class in the IDE will automatically add the class attributes to assign
GUIDs to the interfaces. Otherwise, you'll get new GUIDS all of the time. A
COM type library will not be generated unless you set COM Interop for the
project. If you do all this you can use RegAsm to register and unregister
the assembly on other machines.

"Mihiri" wrote:
Hi,
I have created a simple managed component in vb.Net with a public class
exposing a public function. I successfully registered it using 'Regasm.exe'
. But
when I tired to access it in vb 6.0( using late binding) it gives an error .
I cannot view managed component in Ole View .
Both managed componet and vb 6.0 exe are in the same folder.
How Can I successfully register my component for COM?

Thanks

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Rajkumari | last post by:
Hi! I'm migrating ASP to ASP.NET. I've migrated using the 'ASP to ASP.NET Migration Assistant' tool. On debugging the migrated aspx code,the got an error saying," The 'itrackappln.itrackuser'...
0
by: Razak | last post by:
Hi all, How do I register FileSystemObject and ImageGlue component with MTS? Because the files manipulated using ImageGlue & FSO need to be recorded in the database. Without transactions, a lot...
1
by: Mullin Yu | last post by:
i write a c# application with reference to a VB6 com dll by using Add Reference -> COM i found an Interop.xxxx.dll has been created at the build directory. it works fine at my development...
3
by: Danny Mansour | last post by:
Hi there, I have created class library project called DSResolver in an attempt to create a SQL server Custom Conflict Resolver dll. My project contains on class called DataSafeResolve which...
0
by: Andre | last post by:
Hello, i've written a simple client-server-application. I want to register the server in the component service. Every try fails with the message, that there are no components or type libraries in...
7
by: Roby Eisenbraun Martins | last post by:
Hi, I'm trying to register my Dlls in the client machine without using any deployment package. I tried copying all the files and Dlls to a specified folder and run, but then the application...
4
by: Philip Wagenaar | last post by:
I am trying to create a vb6 activeX dll in .Net. I used the upgrade wizard in vs.net to load my vb6 project and it converted it to vb.net. Now I know that I have to register the DLL from COM...
1
by: alpana.dhole | last post by:
I have made a ActiveX control for commericial application. A Drag and Drop component for Mail server. I need to host the component in Internet Explorer. When a user opens a mail it should...
1
by: Billingsley | last post by:
I have a folder in a website that contains a lot of VB6 DLLs that I want registered. What are some ways to go about this so I can CreateObjects from these DLLs? Registering them with regsvr32 is...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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: 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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.