Subversion Repositories delphiutils

Rev

Rev 68 | 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: TStringList;
23
  sl: TStringList;
24
begin
24
begin
25
  sl := TStringList.Create;
25
  sl := TStringList.Create;
26
  try
26
  try
27
    GetLocalIPAddressList(sl);
27
    GetLocalIPAddressList(sl);
28
    result := WriteStringListToPointerW(lpIdentifier, cchSize, sl);
28
    result := UD2_WriteStringListToPointerW(lpIdentifier, cchSize, sl);
29
  finally
29
  finally
30
    sl.Free;
30
    sl.Free;
31
  end;
31
  end;
32
end;
32
end;
33
 
33
 
34
function PluginNameW(lpPluginName: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUSCODE; cdecl;
34
function PluginNameW(lpPluginName: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUS; cdecl;
35
var
35
var
36
  stPluginName: WideString;
36
  stPluginName: WideString;
37
  primaryLangID: Byte;
37
  primaryLangID: Byte;
38
begin
38
begin
39
  primaryLangID := wLangID and $00FF;
39
  primaryLangID := wLangID and $00FF;
40
  if primaryLangID = LANG_GERMAN then
40
  if primaryLangID = LANG_GERMAN then
41
    stPluginName := 'IP-Adressen'
41
    stPluginName := 'IP-Adressen'
42
  else
42
  else
43
    stPluginName := 'IP addresses';
43
    stPluginName := 'IP addresses';
44
  result := WritePascalStringToPointerW(lpPluginName, cchSize, stPluginName);
44
  result := UD2_WritePascalStringToPointerW(lpPluginName, cchSize, stPluginName);
45
end;
45
end;
46
 
46
 
47
function PluginVendorW(lpPluginVendor: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUSCODE; cdecl;
47
function PluginVendorW(lpPluginVendor: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUS; cdecl;
48
begin
48
begin
49
  result := WritePascalStringToPointerW(lpPluginVendor, cchSize, 'ViaThinkSoft');
49
  result := UD2_WritePascalStringToPointerW(lpPluginVendor, cchSize, 'ViaThinkSoft');
50
end;
50
end;
51
 
51
 
52
function PluginVersionW(lpPluginVersion: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUSCODE; cdecl;
52
function PluginVersionW(lpPluginVersion: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUS; cdecl;
53
begin
53
begin
54
  result := WritePascalStringToPointerW(lpPluginVersion, cchSize, '1.0');
54
  result := UD2_WritePascalStringToPointerW(lpPluginVersion, cchSize, '1.0');
55
end;
55
end;
56
 
56
 
57
function IdentificationMethodNameW(lpIdentificationMethodName: LPWSTR; cchSize: DWORD): UD2_STATUSCODE; cdecl;
57
function IdentificationMethodNameW(lpIdentificationMethodName: LPWSTR; cchSize: DWORD): UD2_STATUS; cdecl;
58
var
58
var
59
  stIdentificationMethodName: WideString;
59
  stIdentificationMethodName: WideString;
60
begin
60
begin
61
  stIdentificationMethodName := 'LAN_IP';
61
  stIdentificationMethodName := 'LAN_IP';
62
  result := WritePascalStringToPointerW(lpIdentificationMethodName, cchSize, stIdentificationMethodName);
62
  result := UD2_WritePascalStringToPointerW(lpIdentificationMethodName, cchSize, stIdentificationMethodName);
63
end;
63
end;
64
 
64
 
65
function CheckLicense(lpReserved: LPVOID): UD2_STATUSCODE; cdecl;
65
function CheckLicense(lpReserved: LPVOID): UD2_STATUS; cdecl;
66
begin
66
begin
67
  result := UD2_STATUS_OK;
67
  result := UD2_STATUS_OK_LICENSED;
68
end;
68
end;
69
 
69
 
70
exports
70
exports
71
  PluginInterfaceID         name mnPluginInterfaceID,
71
  PluginInterfaceID         name mnPluginInterfaceID,
72
  PluginIdentifier          name mnPluginIdentifier,
72
  PluginIdentifier          name mnPluginIdentifier,