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

C# ClassLibrary External Interface

Need to create first simple C# ClassLibrary with string property accessible
from VB 6.0 application. Have .NET-created, regasm-registered, and
VB-accessed a prototype --> VB can "see" the property via ObjectBrowser but
can't use it. Other than adding the "public interface" statement and then
adding Properties to it (see below), can someone outline what other steps
are needed?

Thanks for your help!
using System;

namespace CsharpEmailer

{

/// <summary>

/// Summary description for Class1.

/// </summary>

public class Class1

{

public Class1()

{

//

// TODO: Add constructor logic here

//

}

public interface emailer

{

string EmailAttachmentInputString

{

get;

set;

}

}

}

}


Nov 16 '05 #1
1 2199
Tom Roach wrote:
Need to create first simple C# ClassLibrary with string property
accessible from VB 6.0 application. Have .NET-created,
regasm-registered, and VB-accessed a prototype --> VB can "see" the
property via ObjectBrowser but can't use it. Other than adding the
"public interface" statement and then adding Properties to it (see
below), can someone outline what other steps are needed?


It would appear the interface is a member of the class as opposed to
namespace.

Also, while not absolutely necessary, you really should use attributes
to control what is exposed to COM.

Look at the ComVisible, ProgId, Guid and InterfaceType attributes.
Nov 16 '05 #2

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

Similar topics

0
by: Will Waggoner | last post by:
Ok, I've been hung up on this issue for quite some time now and I would like some help in getting it to work. I think this may be a setup issue but I'd like to ask your eminences first. Here's...
9
by: keith | last post by:
I created a class libery which has name space Assembly and class Assembly and compiled it. Then created a C# project and called a method in the external class e.g. Assembly dll;...
1
by: Tom Roach | last post by:
Can someone show a (very!) simple C# example class that would implement the following interface so that MyString could then be written/read from a VB application? interface MyInterface { ...
5
by: Wayne Gibson | last post by:
Hi, Was wondering if anybody could help. I'm slowly trying to migrate over to the .NET using windows forms, but still have a need to support existing systems developed in MSVC 6 using MFC and...
3
by: Rene | last post by:
I notice that VS lets you choose to create a WindowsControlLibrary and ClassLibrary, I created a class library and then added a user control and it let me do that. I am assuming that the opposite...
7
by: A.M-SG | last post by:
Hi, We have a class library application that needs to read some application settings from it's own app.config file. I assume that a ClassLibrary.DLL can have a app.config file, but...
2
by: Poobalam | last post by:
Hi, I just got VS.NET 2005. It has a new template called WebControlLibrary. I normally use ClassLibrary to build my business logic and use that dll into ASP.NET project. However I'm assuming...
7
by: Stefan | last post by:
Hi! I´m creating a classlibrary project. The output will be a dll. This dll will have to read some settings from some kind of config-file. Normally, when creating a standard .exe-program I use...
1
by: Janus | last post by:
Hi all, I've got a third party class library that i want to use in an 'old' MFC project (actually i need it in a Borland C++ builder project, but if i can use it in MFC i propably can convert it...
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
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: 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...
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...

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.