Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
C++CodeDelphiTech Partner

Easily Access Storage Devices Information In Your Delphi Windows Apps With Robust Component Suite

demo05diskstorage

Do you need to identify Storage Devices available or connected to the machine and perform some programmatically actions to the Storage Devices? How do enumerate among the Storage Devices quickly? Don’t know how to do it? Don’t worry. MiTec’s System Information Management Suite component helps to enumerate the available Internal or External Storage devices, and we will learn how to use the TMiTec_Storage, TMiTeC_Disk component in this blog post.

Platforms: Windows.

Installation Steps:  

You can easily install this Component Suite from GetIt Package Manager. The steps are as follows.

  1. Navigate In RAD Studio IDE->Tools->GetIt Package Manager->select Components in Categories->Components->Trail -MiTec system Information Component Suite 14.3 and click Install Button.
  2. Read the license and Click Agree All. An Information dialog saying ‘Requires a restart of RAD studio at the end of the process. Do you want to proceed? click yes and continue.
  3. It will download the plugin and installs it. Once installed Click Restart now.

How to run the Demo app: 

  • Navigate to the System Information Management Suite trails setup, Demos folder which is installed during Get It installation e.g) C:UsersDocumentsEmbarcaderoStudio21.0CatalogRepositoryMiTeC-14.3DemosDelphi5
  • Open the DiskView project in RAD studio 10.4.1 Compile and Run the application.
  • This Demo App shows how to list down the internal and external storage devices, enumerate among them and access its properties.

Components used in MSIC DiskView Demo App:

diskproperties 4257673
<strong>TMiTeC Disk Properties<strong>
  • TMiTeC_Disk: Detects properties of given logical disk.
  • TMiTeC_Storage: Enumerates logical drives and physical storage devices as disks, tapes, CD/DVD etc.
  • TMiTeC_DeviceMonitor : Catches USB, Bluetooth devices or TV/monitor connection/disconnection, volumes mount/unmount, CD/DVD insert/eject and other events from other devices
  • TTreeView to list the Storage Device nodes and TListView to show the Selected Storage Device properties.
  • TButton’s to save and refresh.

Implementation Details:

storageproperties 5590263
<strong>TMiTeC Storage Properties<strong>
  • An instance is created Storage of TMiTeC_Storage, Disk of TMiTeC_Disk and DeviceMonitor of TMiTeC_DeviceMonitor were created. Call cmRefresh where list of Storage devices were added to the tree node by loop through Storage.PhysicalCount. Further the list of Logical partitions were added to the physical tree node by loop through storage.LogicalCount. For each logical partitions, some of the logical storage device properties were listed in the list view.

  • Display the selected Disk View properties on TreeChange event as shown below.
  • Use DeviceMonitor events OnVolumeConnect,OnVolumeDisconnect to identify the Storage device arrival/removal and refresh the tree view accordingly.
diskview 2116782
<strong>DiskView Demo<strong>

It’s that simple to enumerate Storage Devices connected and list their properties for your application. Use this MiTeC component suite and get the job done quickly.

Learn how you can take advantage of a powerful and flexible hard disk space manager called TreeSize in this article.

Head over and check out the full MiTec System Information Management Suite for Access System Information for Windows in Delphi Applications

With the use of a Windows IDE, you can easily access storage device information in your Delphi Windows apps with a component suite. Try your Free Trial here.

See What's New in 12.2 Athens See What's New in 12.2 Athens Dev Days of Summer 2-24

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES