473,289 Members | 1,917 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,289 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 1108

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...........
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
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...
1
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...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
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)...

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.