🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1951

Copy TIdMessage Object

#1951
From: Siddharth
Date: Mon, 18 Sep 2006 11:01
20 lines
1494 bytes
i am using Borland C++Builer 6 with Indy Components.

I want make a copy of TIdMessage and retain the copy even after the original 
obec t gets deleted. I couldn't find copy constructor which could do job for 
me.

Here is the sample code


       TIdMessage *original = new TIdMessage(Owner);
        TIdMessage *copy;
        original->From->Text  = "Nestle netuser <abc@gmail.com>";

        copy = new  TIdMessage(original);
        delete original;
        Sleep(100);

        //After Original Is deleted I want its copy to be present
        ShowMessage(copy->From->Text);
        delete copy;
Technical Details
Message-ID: <450e7ed4$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,7f460e276167209a,start
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Siddharth" <sidharth@cosmos-call-center.com>
Newsgroups: borland.public.cppbuilder.internet.socket
Subject: Copy TIdMessage Object
Date: Mon, 18 Sep 2006 16:31:58 +0530
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2869
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 59.181.99.83
Message-ID: <450e7ed4$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1158577876 59.181.99.83 (18 Sep 2006 04:11:16 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail