DeviceHelper
似乎是一个没有包含在链接代码中的类或记录,但它在其他任何地方也不会被使用,除了在您发布的行中(为了方便其他人,我会提到的是该代码的底部)。所以,你可以声明为局部变量代替,指定要用于InfName
和InfSection
值,并进行无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);
我删除了C#标签,因为没有什么,甚至远程与C#在这个问题上。 – 2012-08-11 20:29:16