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

.NET/COM Interop Issue

Hi All,

I am having a problem getting a .NET control library to "play nice" with VB6.

This particular control wraps a number of other .NET controls in the same
project. It has a number of properties and methods (but no events). I am
using both the ProgIdAttribute and a GuidAttribute, declared before the
class. I also have enabled the "Register for COM Interop" option in the
Build properties.

It compiles correctly, and appears in the registry with the ProgID and Guid
(CLSID) that I specified.

If I try to use late binding to add it to a VB6 application, I always get a
' Runtime error 336: Component not correctly registered'.

I created another, much simpler control (no public properties or methods,
and not wrapping other controls), and specified the ProgIdAttribute. This
one late-binds with no errors, and is interactive (I have a button that
changes the color of a label).

Any ideas?

Thanks,
pagates
Jan 3 '06 #1
2 1389
pagates,

By control, do you mean a visual control (and not just a class)? If
that is the case, you can't do this. .NET does not support exporting
ActiveX controls for use in automation.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"pagates" <pa*****@discussions.microsoft.com> wrote in message
news:FA**********************************@microsof t.com...
Hi All,

I am having a problem getting a .NET control library to "play nice" with
VB6.

This particular control wraps a number of other .NET controls in the same
project. It has a number of properties and methods (but no events). I am
using both the ProgIdAttribute and a GuidAttribute, declared before the
class. I also have enabled the "Register for COM Interop" option in the
Build properties.

It compiles correctly, and appears in the registry with the ProgID and
Guid
(CLSID) that I specified.

If I try to use late binding to add it to a VB6 application, I always get
a
' Runtime error 336: Component not correctly registered'.

I created another, much simpler control (no public properties or methods,
and not wrapping other controls), and specified the ProgIdAttribute. This
one late-binds with no errors, and is interactive (I have a button that
changes the color of a label).

Any ideas?

Thanks,
pagates

Jan 4 '06 #2
If your component is not a visual control, you can find step-by-step
instructions for configuring a .NET component to be accessed via COM
Interop here...

http://j-integra.intrinsyc.com/suppo...?article=78813

The article talks about accessing .NET components from Java using
J-Integra, but the setup on the .NET side is the same no matter what
COM Interop client you are using.

Shane Sauer
J-Integra Interoperability Solutions
http://j-integra.intrinsyc.com/
high performance interop middleware for java, corba, com & .net

Jan 4 '06 #3

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

Similar topics

17
by: Patrick | last post by:
I am almost certain that I could use HTTP Post/Get to submit XML Web Service call (over SSL as well, if using Version 3 of MSXML2) from an ASP Application? However, would I only be able to call...
0
by: H Wu | last post by:
I have an application in VB6 (Single Thread Apartment) reference an Interop code (register as COM written in C# that use Asynchronous Call) that help process calls back and forward with VB6 app and...
6
by: Sudha | last post by:
Hi All, I am trying to use COM DLL in my C#. I have added this DLL in referance and all interface are working fine. I have one issue in calling function decleared like: void...
8
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be...
2
by: Jas Manghera | last post by:
Hello everyone, Im having a rather strange problem with my custom ASP.NET application. After deploying the application on a .NET v1.1 computer, the first time the application is launched it can...
2
by: Christopher H. Laco | last post by:
Long story longer, I'm tearing my hair out trying to get some of my assemblies to work in ASP/COM. I have 4 classes/assemblies: #1. CustomerMembershipProvider (Inherits MembershipProvider) #2. ...
5
by: Yoavo | last post by:
Hi, In my application I have to use som external COM dll's. In the code: using MyDll when I build the project, I get (in addition to the .exe file) a Dll called Interop.MyDll.dll I want to...
2
by: RodneyAnonymous | last post by:
I've got some code for composing an e-mail from the contents of an RTF box. The first time I execute it, everything works fine. If I close my app and then re-run it, however, I always receive the...
5
by: muriwai | last post by:
Hi, I have a C# assembly project under Visual Stuio 2008 Pro on Windows Server 2008. I converted the project from VS 2005. The project references COM->Microsoft CDO for Windows 2000 Library...
1
by: Bhrionn | last post by:
Hello World, I am working on implementing a build for my companies application. The scenario implemeted is producing the error: ‘Class does not support automation or does not support expected...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
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...
0
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...
1
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)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.