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

Interface from C# to VB 6 not working

I am working on an existing .NET (C Sharp) component that had a com
interface that was used by a VB component. When it was originally
written, it had the SSEAssemblyCom class below - minus the two last
methods (for space I modified method names in my example below). I
added those. Everything but the two new methods I added referenced
the ISSEAssemblyCom interface below.

I was told I would need to create a secondary interface
(ISSEAssemblyCom2 below) that SSEAssemblyCom would use which I've done
as you can see in the code below. I created a tlb file for my .NET
component to use by my VB component and reference it and now my VB
component is only recognizing the two new methods I wrote and not any
of the other ones. I checked with a developer in my company and he
had me try putting the methods from ISSEAssemblyCom into
ISSEAssemblyCom2 and try it again. I did that and now my VB component
recognizes the first 12 but not the 2 new ones I added...??? Does
anyone know how this is supposed to be done properly so that I can
reference both the old and new interface methods? (By the way, I took
out the code below in each method of SSEAssemblyCom as I figured you'd
only care about the signatures anyways)

[ComVisible(true), ClassInterface(ClassInterfaceType.None)]
[Guid("A GUID VALUE HERE")]
[ProgId("PLXX0005.SSEAssemblyCom")]
public class SSEAssemblyCom : ISSEAssemblyCom, ISSEAssemblyCom2
{
public void Method1(string sz)
public void Method2(string sz)
public bool Method3(string sz, string sz2, out string sz3, int i)
public bool Method4(string sz, out string sz2, int i)
public void Method5(string sz)
public void Method6(string sz)
public string Method7(string sz)
public bool Method8(string sz, out string sz2, int i)
public void Method9(string sz, string sz2)
public bool Method10(string sz, out string sz2, int i)
public bool Method11(string sz)
public void Method12(string sz, string sz2)
public void MyNewMethod1(string sz, out string sz2)
public bool MyNewMethod2(string sz, out string sz2)
}

[ComVisible(true)]
[Guid("ANOTHER GUID VALUE HERE")]
public interface ISSEAssemblyCom
{
[DispId(1)] void Method1(string sz)
[DispId(2)] void Method2(string sz)
[DispId(3)] bool Method3(string sz, string sz2, out string sz3,
int i)
[DispId(4)] bool Method4(string sz, out string sz2, int i)
[DispId(5)] void Method5(string sz)
[DispId(6)] void Method6(string sz)
[DispId(7)] string Method7(string sz)
[DispId(8)] bool Method8(string sz, out string sz2, int i)
[DispId(9)] void Method9(string sz, string sz2)
[DispId(10)] bool Method10(string sz, out string sz2, int i)
[DispId(11)] bool Method11(string sz)
[DispId(12)] void Method12(string sz, string sz2)
}

[ComVisible(true)]
[Guid("A THIRD GUID VALUE HERE")]
public interface ISSEAssemblyCom2 : ISSEAssemblyCom
{
[DispId(13)] void MyNewMethod1(string sz, out string sz2)
[DispId(14)] bool MyNewMethod2(string sz, out string sz2)
}
Nov 22 '05 #1
0 1112

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

Similar topics

9
by: Anon Email | last post by:
Hi people, I'm learning about header files in C++. The following is code from Bartosz Milewski: // Code const int maxStack = 16; class IStack
175
by: Ken Brady | last post by:
I'm on a team building some class libraries to be used by many other projects. Some members of our team insist that "All public methods should be virtual" just in case "anything needs to be...
4
by: Doug | last post by:
I am working on an existing .NET (C Sharp) component that had a com interface that was used by a VB component. When it was originally written, it had the SSEAssemblyCom class below - minus the two...
3
by: zlst | last post by:
Many technological innovations rely upon User Interface Design to elevate their technical complexity to a usable product. Technology alone may not win user acceptance and subsequent marketability....
20
by: Ole Hanson | last post by:
I am accessing my database through an interface, to allow future substitution of the physical datastore - hence I would like to declare in my Interface that my DAL-objects implementing the...
2
by: Todd Brooks | last post by:
I have a coclass that implements a dual interface. The thing that's a little unusual is that the coclass doesn't inherit directly from the interface, rather it inherits from an implementation class...
7
by: moondaddy | last post by:
If I'm in a class that inherits an interface, is there a shortcut key that will write the implementation of the interface into the class? I remember seeing something like this in vb.net. ...
0
by: YellowFin Announcements | last post by:
Introduction Usability and relevance have been identified as the major factors preventing mass adoption of Business Intelligence applications. What we have today are traditional BI tools that...
7
by: Jwe | last post by:
Hi, I've written a program which has both a command line interface and Windows form interface, however it isn't quite working correctly. When run from command line with no arguments it should...
2
by: nibin | last post by:
pls help me it urgent i m facing a problem with my vb.net code this is the code equivalent in c# this is the interface...........
1
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.