Site icon Embarcadero RAD Studio, Delphi, & C++Builder Blogs

Flexible Internet Resource Access Components For Delphi/C++ FireMonkey Applications

Accessing internet resources becomes a common feature in modern desktop windows applications. Thinking how to build these capabilities in your Delphi/C++  FireMonkey Applications? WINSOFT made a Flexible component suite that helps you to access internet resources with FTP, and HTTP/HTTPS protocols. It uses the Standard Microsoft WinInet API.

Features:

Versions Supported: Delphi/C++Builder XE2 – 10.4

Platforms: Windows, OS X, iOS and Android;  

Installation Steps:  

Prerequisites: Ensure 5.8 MB minimum free space available in the system.

Installation Steps Demo: 

How to build your application with WinInet Components: 

1.Open RAD Studio 10.4, Navigate to Components bar -> Internet. Check the WinInetSuite Components installed as shown.

TFINetConnectionConnected property is true when connected to the internet and State property shows the corresponding connected state. This component enables you to dial and hangup modem with options provided retrieves the connected state. It has methods to AttempConnect, CheckConnection, Connect, Dial, Hang-upEnabling Internet functionality.

TFINetURL: It encapsulates WinInet Uniform Resource Locator functions. Use this component, for manipulation of URLs. It has properties like CanonizedURL, HostName, Port, Username, Password, URL, URLPathScheme. Handling Uniform Resource Locator.

TFINetSession: Enables you to set Internet Initialization parameters. It encapsulates Internet handle returned by InternetOpen WinInet function.

<strong>TFINetHttp Properties<strong>

TFINetHttp Access Resources on the World Wide Web using HTTP Protocol.

2. Drag and Drop TFINetHttp component or alternatively use FWINet.pas file to include.

3.A simple Code snippet to access the Internet resource using the TFINetHttp component.

[crayon-67400135e67dc602125419/]
<strong>TFINetFtp Properties <strong>

TFINetFtp Component to navigate and manipulate directories and files on a FTP Server.

4. Drag and Drop TFINetFTP component or alternatively use FWINet.pas file to include. Code snippet to Connect with FTP and set the current directory. 

[crayon-67400135e67e6351621644/]

5. Creates a Directory with the provided name.

[crayon-67400135e67e8088894296/]

6.Removes the Selected Directory.

[crayon-67400135e67e9939696089/]

7.Puts the File to the current directory.

[crayon-67400135e67ea703516744/]

8.Retrieves a file from the FTP server and stores it under the specified file name, creating a new local file.

[crayon-67400135e67eb725756353/]

9.Renames a file stored on the FTP server.

[crayon-67400135e67ec982295529/]

10.Deletes a file stored on the FTP server.

[crayon-67400135e67ed944742504/]

TFINetCookie SetCookies and retrieve cookies from persistent cookie database. Used to maintain the state. information of the client.

11. To set cookie, 

[crayon-67400135e67ee574946660/]

12.To get cookie,

[crayon-67400135e67ef613774264/]

Sample Application Demo:

WinInet Component Suite for FireMonkey Code Demo

Conclusion:  It’s easy to access internet resources using HTTP and FTP protocols in your applications. WINSOFT helped us to easily configure and use these components to build faster applications.

Head over and check out the full WINSOFT WinInet Component Suite for Access in Delphi and C++Builder FireMonkey Applications.

Exit mobile version