[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

microsoft.public.vb.general.discussion

Wrapping .net code for VB6 use

Greyhound

7/8/2011 1:51:00 PM

I have created an email library in .net and need to call this library
from a VB6 application. Can someone tell me if this can be done and,
if so, how to go about it.
Many Thanks
4 Answers

Dee Earley

7/8/2011 2:14:00 PM

0

On 08/07/2011 14:51, Greyhound wrote:
> I have created an email library in .net and need to call this library
> from a VB6 application. Can someone tell me if this can be done and,
> if so, how to go about it.
> Many Thanks

Look at COM interop and exposing COM interfaces.

--
Dee Earley (dee.earley@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk...

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)

Jeff Johnson [MVP: VB]

7/8/2011 6:00:00 PM

0

"Greyhound" <greyhound75635@gmail.com> wrote in message
news:d7b9728e-1a0c-4439-a985-a04a9fca5235@u28g2000yqf.googlegroups.com...

>I have created an email library in .net and need to call this library
> from a VB6 application. Can someone tell me if this can be done and,
> if so, how to go about it.

Yes, it can be done, but it's really a question for a .NET group. Pointers
in canned reply below:

--
[Canned response]

This is a VB "classic" newsgroup. Questions about VB.NET (including VB
2005/2008 and VB Express, which have dropped .NET from their names) are
off-topic here.

Please ask .NET questions in newsgroups with "dotnet" in their names. The
*.vb.* groups are for VB6 and earlier.

For questions specific to the VB.NET language, use this group:

microsoft.public.dotnet.languages.vb

Please note that things like controls and data access, which have their own
subgroups in the Classic VB hierarchy, are not language-specific in .NET, so
you should look for groups like these:

microsoft.public.dotnet.framework.windowsforms.controls
microsoft.public.dotnet.framework.adonet

(Note that "vb" is not present in the group name.)


Mayayana

7/8/2011 7:56:00 PM

0


|I have created an email library in .net and need to call this library
| from a VB6 application. Can someone tell me if this can be done and,
| if so, how to go about it.
| Many Thanks

Why not just write it in VB6 and save yourself
hundreds of MBs of .Bloat dependencies? There's
no sense hiring a Mac truck to deliver a pizza.

Here's one sample of SMTP:
www.jsware.net/jsware/vbcode.php5#mail

There are others. There's a DLL called VBSendMail.
And I think there's POP3 code around.
Isn't CDO/CDOSys also available on 2000+?


Jason Keats

7/9/2011 5:09:00 AM

0

Greyhound wrote:
> I have created an email library in .net and need to call this library
> from a VB6 application. Can someone tell me if this can be done and,
> if so, how to go about it.
> Many Thanks

You haven't said whether your library will be on a local or remote machine.

Dee has already explained that you can create a COM wrapper for your DLL
and call it directly.

However, you may wish to run it on a web server - it depends why or what
you need to email, and whether it has to be addressed from the sender.

There are a couple of options in this case:
- create a web service and call it using, say, PocketSOAP
- create an HttpHandler and call it using MSXML (which is what I do).