Article View: borland.public.cppbuilder.internet.socket
Article #142Re: Indy 10 - Attachment
From: Alexandre Paulino Sierra da Silv...
Date: Mon, 02 Jun 2008 12:16
Date: Mon, 02 Jun 2008 12:16
31 lines
2123 bytes
2123 bytes
It works fine.
Thank you Gambit
Alexandre
"Remy Lebeau (TeamB)" <no.spam@no.spam.com> escreveu na mensagem
news:482b2a22@newsgroups.borland.com...
"Alexandre Paulino Sierra da Silva" <alexandre.chokito@gmail.com> wrote in
message news:482b25c8@newsgroups.borland.com...
> I have the follow line in my app "TIdAttachment(IdMessage->MessageParts,
> pdfFile )" to attach a file and send, it works fine in C++ Builder 6, but
> in
> C++ Builder 2007 with Indy 10 I get this error when I try to compile:
> "[BCC32 Error] UnitCadastroPedido.cpp(186): E2352 Cannot create
> instance of abstract class 'TIdAttachment'"
BCB 6 shipped with Indy 8. TIdAttachment was changed in Indy 10 to be an
abstract base class. There are two descendants natively available in Indy
10 - TIdAttachmentFile and TIdAttachmentMemory - or you can write your own
custom descendants. In this particular case, you can use TIdAttachmentFile
as a direct replacement in your existing code, ie:
TIdAttachmentFile(IdMessage->MessageParts, pdfFile)
Gambit
Technical Details
Message-ID:
<48441d60$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<482b25c8@newsgroups.borland.com> <482b2a22@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,da6be48066f7d68e X-Google-Attributes: gid11508e,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Alexandre Paulino Sierra da Silva" <alexandre.chokito@gmail.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <482b25c8@newsgroups.borland.com> <482b2a22@newsgroups.borland.com> In-Reply-To: <482b2a22@newsgroups.borland.com> Subject: Re: Indy 10 - Attachment Date: Mon, 2 Jun 2008 09:16:09 -0300 Lines: 33 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Windows Mail 6.0.6001.18000 X-MimeOLE: Produced By Microsoft MimeOLE V6.0.6001.18000 NNTP-Posting-Host: 200.163.231.90 Message-ID: <48441d60$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1212423520 200.163.231.90 (2 Jun 2008 09:18:40 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news2.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail