BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Delphi conversion

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Web)
View previous topic :: View next topic  
Author Message
Eddie Shipman
Guest





PostPosted: Thu Apr 27, 2006 3:03 pm    Post subject: Delphi conversion Reply with quote



I have a friend that needs this code converted from Delphi to
BCPP6.

uses ..., MSXML2_TLB, IdBaseComponent, IdCoder, IdCoder3to4,
IdCoderMIME;

procedure AddBinaryFile(AStream: TStream; oNode: IXMLDOMNode);
var
oCDataSection: IXMLDOMCDATASection;
meMIMEEncoder: TIdEncoderMIME;
begin
meMIMEEncoder := TIdEncoderMIME.Create(nil);
try
oCDataSection := oXMLDoc.createCDATASection(meMIMEEncoder.Encode
(AStream, AStream.Size));
finally
meMIMEEncoder.Free;
end;
oNode.appendChild(oCDataSection);
oCDataSection := nil;
end;

Does Indy come installed with BCPP6?
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Thu Apr 27, 2006 6:03 pm    Post subject: Re: Delphi conversion Reply with quote



"Eddie Shipman" <mrbaseball34 (AT) No_Spam_gmail (DOT) com> wrote in message
news:MPG.1eba898ad1826f2f9897dd (AT) forums (DOT) borland.com...

Quote:
I have a friend that needs this code converted from Delphi to BCPP6.

#include "msxml2.h"
#include "IdBaseComponent.hpp"
#include "IdCoder.hpp"
#include "IdCoder3to4.hpp"
#include "IdCoderMIME.hpp"
#include <utilcls.h>

void __fastcall AddBinaryFile(TStream *AStream, IXMLDOMNode *oNode)
{
TComInterface<IXMLDOMCDATASection> oCDataSection;
TComInterface<IXMLDOMNode> oChild;

TIdEncoderMIME *meMIMEEncoder = new TIdEncoderMIME(NULL);
try
{

oXMLDoc->createCDATASection(WideString(meMIMEEncoder->Encode(AStream,
AStream->Size)), &oCDataSection);
}
__finally
{
delete meMIMEEncoder;
}

oNode->appendChild(oCDataSection, &oChild);
}

Quote:
Does Indy come installed with BCPP6?

Indy 8 does. That is a very old version, though. You would have to
completely remove it from the computer first in order to upgrade to Indy 9
or higher.


Gambit
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Web) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.