DeviceHelper
appears to be a class or record that isn't included in the linked code, but it's also not used anywhere else except in the line you posted (which, for ease of others I'll mention is at the very bottom of that code). So you can just declare them as local variables instead, assign the values you want for InfName
and InfSection
, and proceed without DeviceHelper
:
var
InfName, InfSection: string;
begin
InfName := 'WhatEver.Inf';
InfSection := 'WhatEverSection`;
Paths := TStringList.Create();
try
ParseInfFile(LocateInfFile(InfName), InfSection);
...
// You'll need to remove these lines, too. They add the returned items
// to a TListView using functionality that's available in Vista and above
ListView_InsertGroup(lvAdvancedInfo.Handle, 'Driver Files', 2);
for I := 0 to Paths.Count - 1 do
ListView_AddItemsInGroup(lvAdvancedInfo, '', Paths[I], 2);