Sometimes developers want to list down or identify the Devices in a Windows machine programmatically. How do enumerate the devices and resources quickly? Don’t know how to do it? Don’t worry. MiTec’s System Information Management Suite’s component helps to do that effectively, and we will learn how to retrieve devices similar to Windows device manager.
Platforms: Windows.
Installation Steps:
You can easily install this Component Suite from GetIt Package Manager. The steps are as follows.
- 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.
- 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.
- 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.3DemosDelphi13
- Open the DeviceBrowser project in RAD studio 10.4.1 compile and Run the application.
- This Demo App shows how to list down the known windows devices, device resources, enumerate among them and access its properties.
Components used in MSIC DeviceBrowser Demo App:
- TMiTeC_Devices Enumerates all known devices and their properties. (It does the same as Windows Device Manager)
- 2 TTabsheet’s one for viewing Devices list in TTreeView and other for viewing Resources in TListView.
- TButton to view the details, resources of the device in a new child form.
Implementation Details:
- An instance Devices of TMiTeC_Devices Call RefreshData where list of Windows devices was added to the tree node by a loop through DeviceCount property. A list of resources was added to the listview items from the GetResourceList procedure.
- On clicking the Properties button for the selected tree node item, its properties such as Class Description, GUID, Manufacturer, Hardware ID etc were displayed in a child form.
- Similarly, On Clicking Resources , the selected tree node TDeviceResources properties were shown.
These simple steps is sufficient to retrieve Devices and its properties in your application. Use this MiTeC component suite and get the job done quickly.
With the use of Windows tools for developers, you can easily browse your Windows devices from your Delphi app with various powerful components. Try your Free Trial here.