 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Eddie Shipman Guest
|
Posted: Thu Apr 27, 2006 3:03 pm Post subject: Delphi conversion |
|
|
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
|
Posted: Thu Apr 27, 2006 6:03 pm Post subject: Re: Delphi conversion |
|
|
"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 |
|
 |
|
|
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
|
|