Delphi Handbooks Collection


Delphi XE Handbook


Delphi 2010 Handbook


June 10, 2011

Amazon S3 Delphi Client

Here is a video showing my Amazon S3 Delphi client in action.

Here is a video showing my Amazon S3 Delphi client in action. No discussion of the Delphi code behind it, only a description of what it does. The full source code is available at http://code.marcocantu.com/p/delphirestclients/.

A description will be published in the Blaise Pascal magazine soon. Notice I had report of errors with buckets in non-default regions. If you try the program let me know if it works or not.





 

4 Comments

Amazon S3 Components 

Thanks for sharing this code.

Should the xmlDocument declaration not be:
  xmlDocument: IXMlDocument;
 
instead of:
  xmlDocument: TXMlDocument;

?
Comment by Pawel Rewak [] on June 14, 02:36

Amazon S3 Delphi Client 

Pawel,
  
  the TXmlDocument component implements the IXMLDocument 
interface, so in several circumstances you can use one 
for the other. Memory management might change, though.
Comment by Marco Cantu [http://www.marcocantu.com] on June 14, 06:47

Memory management 

The reason I commented was memory management - and
avoiding a leak. 

If you declare the variable as T... it will not
automatically free itself after the procedure exists. 

You have to declare the actual variable as I... (an
interface type). If you don't then you introduce a
memory leak each time the procedure executes.

Can you confirm this behavior or am I wrong?
Comment by Pawel Rewak [] on June 14, 08:12

Amazon S3 Delphi Client 

Pawel,

  I know it sounds odd but as you pass a TXMLDocument to 
an interface mapper, it takes responsibility of freeing 
it. In fact, the code has "Report Memory Leaks" turned 
on but it leaks no memory, while the xmlDocument1.Free 
call will cause havoc. 
Comment by Marco Cantu [http://www.marcocantu.com] on June 14, 09:36


Post Your Comment

Click here for posting your feedback to this blog.

There are currently 0 pending (unapproved) messages.