12,6 → 12,11 |
Windows, SysUtils, Classes, IniFiles, Contnrs, Dialogs, UD2_PluginIntf, |
UD2_PluginStatus, UD2_Utils; |
|
const |
cchBufferSize = 32768; |
|
dynamicDataDelim = '|||'; |
|
type |
TUD2IdentificationEntry = class; |
|
76,7 → 81,7 |
property Errors: TStrings read FErrors; |
property LoadedPlugins: TObjectList{<TUD2Plugin>} read FLoadedPlugins; |
property IniFile: TMemIniFile read FIniFile; |
procedure GetAllDetectedIDs(outSL: TStrings); |
procedure GetAllIdNames(outSL: TStrings); |
function FulfilsEverySubterm(idTerm: WideString; slIdNames: TStrings=nil): boolean; |
procedure CheckTerm(idTermAndCmd: string; commandSLout: TStrings; slIdNames: TStrings=nil); |
function FindPluginByMethodNameOrGuid(idMethodName: string): TUD2Plugin; |
97,9 → 102,6 |
uses |
Math; |
|
const |
cchBufferSize = 32768; |
|
type |
TUD2PluginLoader = class(TThread) |
protected |
253,8 → 255,8 |
begin |
if DynamicDataUsed then |
begin |
sl.Add(Plugin.IdentificationMethodName+'('+DynamicData+'):'+IdentificationString); |
sl.Add(Plugin.PluginGUIDString+'('+DynamicData+'):'+IdentificationString); |
sl.Add(DynamicData+dynamicDataDelim+Plugin.IdentificationMethodName+':'+IdentificationString); |
sl.Add(DynamicData+DynamicDataDelim+Plugin.PluginGUIDString+':'+IdentificationString); |
end |
else |
begin |
414,9 → 416,9 |
|
(* |
|
NAMING EXAMPLE: $CASESENSITIVE$ComputerName(dynXYZ):ABC&&User:John=calc.exe$RIOD$ |
NAMING EXAMPLE: dynXYZ|||ComputerName:ABC&&User:John=calc.exe |
|
idTerm: ComputerName(dynXYZ):ABC&&User:John |
idTerm: dynXYZ|||ComputerName:ABC&&User:John |
idName: ComputerName:ABC |
IdMethodName: ComputerName |
IdStr ABC |
425,7 → 427,7 |
|
*) |
|
procedure TUD2.GetAllDetectedIDs(outSL: TStrings); |
procedure TUD2.GetAllIdNames(outSL: TStrings); |
var |
i, j: integer; |
pl: TUD2Plugin; |
446,7 → 448,7 |
const |
CASE_SENSITIVE_FLAG = '$CASESENSITIVE$'; |
var |
x, a, b: TArrayOfString; |
x, y, z: TArrayOfString; |
i: integer; |
p: TUD2Plugin; |
idName: WideString; |
460,7 → 462,7 |
if cleanUpStringList then |
begin |
slIdNames := TStringList.Create; |
GetAllDetectedIDs(slIdNames); |
GetAllIdNames(slIdNames); |
end; |
|
SetLength(x, 0); |
478,21 → 480,17 |
|
/// --- Start Dynamic Extension |
|
// xxxxxx ( xxxxx ): xxxxxxxxxxxx |
// xxxxx ( xx:xx ): xxxxx:xxx(x) |
// xxxxxxxxxxxx : xxxxx(xxx)xx |
SetLength(y, 0); |
y := SplitString(dynamicDataDelim, idName); |
|
SetLength(a, 0); |
a := SplitString('(', idName); |
if (Length(a) >= 2) and (Pos(':', a[0]) = 0) then |
if Length(y) >= 2 then |
begin |
SetLength(b, 0); |
b := SplitString('):', a[1]); |
if Length(b) >= 2 then |
begin |
dynamicData := b[0]; |
idMethodName := a[0]; |
dynamicData := y[0]; |
|
SetLength(z, 0); |
z := SplitString(':', y[1]); |
idMethodName := z[0]; |
|
p := FindPluginByMethodNameOrGuid(idMethodName); |
if Assigned(p) then |
begin |
500,11 → 498,10 |
begin |
// Reload the identifications |
slIdNames.Clear; |
GetAllDetectedIDs(slIdNames); |
GetAllIdNames(slIdNames); |
end; |
end; |
end; |
end; |
|
/// --- End Dynamic Extension |
|
556,7 → 553,7 |
begin |
slIdNames := TStringList.Create; |
try |
GetAllDetectedIDs(slIdNames); |
GetAllIdNames(slIdNames); |
|
slSV := TStringList.Create; |
try |
585,7 → 582,7 |
begin |
slIdNamesCreated := true; |
slIdNames := TStringList.Create; |
GetAllDetectedIDs(slIdNames); |
GetAllIdNames(slIdNames); |
end; |
|
SetLength(nameVal, 0); |