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