Article View: borland.public.cppbuilder.internet.socket
Article #104Re: Indy 10 - Attachment
From: Remy Lebeau (TeamB)
Date: Wed, 14 May 2008 18:05
Date: Wed, 14 May 2008 18:05
21 lines
1935 bytes
1935 bytes
"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:
<482b2a22@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!87.106.137.111.MISMATCH!newsfeeder.dynfx.net!weretis.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<482b25c8@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: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com> Newsgroups: borland.public.cppbuilder.internet.socket References: <482b25c8@newsgroups.borland.com> Subject: Re: Indy 10 - Attachment Date: Wed, 14 May 2008 11:05:52 -0700 Lines: 23 Organization: Lebeau Software X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.3138 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 X-RFC2646: Format=Flowed; Original NNTP-Posting-Host: 207.178.157.90 Message-ID: <482b2a22@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1210788386 207.178.157.90 (14 May 2008 11:06:26 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder1-2.proxad.net!proxad.net!feeder1-1.proxad.net!ecngs!feeder2.ecngs.de!87.106.137.111.MISMATCH!newsfeeder.dynfx.net!weretis.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail