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

Powerful Internet Resource Access Components For Delphi/C++ Applications On Windows

Accessing internet resources becomes a common feature in modern desktop windows applications. Thinking how to build these capabilities in your Delphi/C++ 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 5 – Delphi 10.4/C++ and Lazarus 2.0.8

Platforms: Windows;  

Installation Steps:  

Prerequisites: Ensure 6.7 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.

TINetConnection: Connected 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-up. Enabling Internet functionality.

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

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

TINetHttp : Access Resources on the World Wide Web using HTTP Protocol.

<strong>TINetHttp Properties<strong>

2.Drag and Drop TINetHttp component or alternatively use WINet.pas file to include.

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

[crayon-67687c8a23a22827001869/]
<strong>TINetFtp Properties<strong>

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

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

[crayon-67687c8a23a2b440491026/]

5.Creates a directory with the provided name.

[crayon-67687c8a23a2d884472547/]

6.Removes the Selected Directory.

[crayon-67687c8a23a2e102871852/]

7.Puts the file to the current directory.

[crayon-67687c8a23a2f069417796/]

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

[crayon-67687c8a23a31317704553/]

9.Renames a file stored on the FTP server.

[crayon-67687c8a23a32279761088/]

10.Deletes a file stored on the FTP server.

[crayon-67687c8a23a33160335452/]

[crayon-67687c8a23a34323628511-i/]TINetCookie : SetCookies and retrieve cookes from persistent cookie database. Used to maintain the state. information of the client.

11.To set cookie,

[crayon-67687c8a23a35582848379/]

12.To get cookie,

[crayon-67687c8a23a36950789261/]

Sample Application 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.

Exit mobile version