Subversion Repositories userdetect2

Rev

Rev 68 | Rev 70 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 68 Rev 69
Line 16... Line 16...
16
function PluginIdentifier: TGUID; cdecl;
16
function PluginIdentifier: TGUID; cdecl;
17
begin
17
begin
18
  result := PLUGIN_GUID;
18
  result := PLUGIN_GUID;
19
end;
19
end;
20
 
20
 
21
function IdentificationStringW(lpIdentifier: LPWSTR; cchSize: DWORD): UD2_STATUSCODE; cdecl;
21
function IdentificationStringW(lpIdentifier: LPWSTR; cchSize: DWORD): UD2_STATUS; cdecl;
22
var
22
var
23
  sl, sl2: TStringList;
23
  sl, sl2: TStringList;
24
  i: integer;
24
  i: integer;
25
  ip, mac: string;
25
  ip, mac: string;
26
begin
26
begin
Line 36... Line 36...
36
         (sl2.IndexOf(mac) = -1) then
36
         (sl2.IndexOf(mac) = -1) then
37
      begin
37
      begin
38
        sl2.add(mac);
38
        sl2.add(mac);
39
      end;
39
      end;
40
    end;
40
    end;
41
    result := WriteStringListToPointerW(lpIdentifier, cchSize, sl2);
41
    result := UD2_WriteStringListToPointerW(lpIdentifier, cchSize, sl2);
42
  finally
42
  finally
43
    sl.Free;
43
    sl.Free;
44
    sl2.Free;
44
    sl2.Free;
45
  end;
45
  end;
46
end;
46
end;
47
 
47
 
48
function PluginNameW(lpPluginName: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUSCODE; cdecl;
48
function PluginNameW(lpPluginName: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUS; cdecl;
49
var
49
var
50
  stPluginName: WideString;
50
  stPluginName: WideString;
51
  primaryLangID: Byte;
51
  primaryLangID: Byte;
52
begin
52
begin
53
  primaryLangID := wLangID and $00FF;
53
  primaryLangID := wLangID and $00FF;
54
  if primaryLangID = LANG_GERMAN then
54
  if primaryLangID = LANG_GERMAN then
55
    stPluginName := 'MAC-Adressen der Gateways'
55
    stPluginName := 'MAC-Adressen der Gateways'
56
  else
56
  else
57
    stPluginName := 'Gateway MAC addresses';
57
    stPluginName := 'Gateway MAC addresses';
58
  result := WritePascalStringToPointerW(lpPluginName, cchSize, stPluginName);
58
  result := UD2_WritePascalStringToPointerW(lpPluginName, cchSize, stPluginName);
59
end;
59
end;
60
 
60
 
61
function PluginVendorW(lpPluginVendor: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUSCODE; cdecl;
61
function PluginVendorW(lpPluginVendor: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUS; cdecl;
62
begin
62
begin
63
  result := WritePascalStringToPointerW(lpPluginVendor, cchSize, 'ViaThinkSoft');
63
  result := UD2_WritePascalStringToPointerW(lpPluginVendor, cchSize, 'ViaThinkSoft');
64
end;
64
end;
65
 
65
 
66
function PluginVersionW(lpPluginVersion: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUSCODE; cdecl;
66
function PluginVersionW(lpPluginVersion: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUS; cdecl;
67
begin
67
begin
68
  result := WritePascalStringToPointerW(lpPluginVersion, cchSize, '1.0');
68
  result := UD2_WritePascalStringToPointerW(lpPluginVersion, cchSize, '1.0');
69
end;
69
end;
70
 
70
 
71
function IdentificationMethodNameW(lpIdentificationMethodName: LPWSTR; cchSize: DWORD): UD2_STATUSCODE; cdecl;
71
function IdentificationMethodNameW(lpIdentificationMethodName: LPWSTR; cchSize: DWORD): UD2_STATUS; cdecl;
72
var
72
var
73
  stIdentificationMethodName: WideString;
73
  stIdentificationMethodName: WideString;
74
begin
74
begin
75
  stIdentificationMethodName := 'GatewayMAC';
75
  stIdentificationMethodName := 'GatewayMAC';
76
  result := WritePascalStringToPointerW(lpIdentificationMethodName, cchSize, stIdentificationMethodName);
76
  result := UD2_WritePascalStringToPointerW(lpIdentificationMethodName, cchSize, stIdentificationMethodName);
77
end;
77
end;
78
 
78
 
79
function CheckLicense(lpReserved: LPVOID): UD2_STATUSCODE; cdecl;
79
function CheckLicense(lpReserved: LPVOID): UD2_STATUS; cdecl;
80
begin
80
begin
81
  result := UD2_STATUS_OK;
81
  result := UD2_STATUS_OK_LICENSED;
82
end;
82
end;
83
 
83
 
84
exports
84
exports
85
  PluginInterfaceID         name mnPluginInterfaceID,
85
  PluginInterfaceID         name mnPluginInterfaceID,
86
  PluginIdentifier          name mnPluginIdentifier,
86
  PluginIdentifier          name mnPluginIdentifier,