Subversion Repositories userdetect2

Rev

Rev 83 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
68 daniel-mar 1
unit UD2_PluginIntf;
2
 
3
interface
4
 
5
{$IF CompilerVersion >= 25.0}
6
{$LEGACYIFEND ON}
7
{$IFEND}
8
 
9
uses
71 daniel-mar 10
  Windows, SysUtils, UD2_PluginStatus;
68 daniel-mar 11
 
12
const
13
  GUID_USERDETECT2_IDPLUGIN_V1: TGUID = '{6C26245E-F79A-416C-8C73-BEA3EC18BB6E}';
14
 
15
const
83 daniel-mar 16
  mnPluginInterfaceID            = 'PluginInterfaceID';
17
  mnPluginIdentifier             = 'PluginIdentifier';
18
  mnPluginNameW                  = 'PluginNameW';
19
  mnPluginVersionW               = 'PluginVersionW';
20
  mnPluginVendorW                = 'PluginVendorW';
21
  mnCheckLicense                 = 'CheckLicense';
22
  mnIdentificationMethodNameW    = 'IdentificationMethodNameW';
23
  mnIdentificationStringW        = 'IdentificationStringW';
24
  mnDescribeOwnStatusCodeW       = 'DescribeOwnStatusCodeW';
25
  mnDynamicIdentificationStringW = 'DynamicIdentificationStringW';
68 daniel-mar 26
 
27
{$IF not Declared(LPVOID)}
28
type
29
  LPVOID = Pointer;
30
{$IFEND}
31
 
32
type
33
  TFuncPluginInterfaceID = function(): TGUID; cdecl;
34
  TFuncPluginIdentifier = function(): TGUID; cdecl;
69 daniel-mar 35
  TFuncPluginNameW = function(lpPluginName: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUS; cdecl;
36
  TFuncPluginVersionW = function(lpPluginVersion: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUS; cdecl;
37
  TFuncPluginVendorW = function(lpPluginVendor: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUS; cdecl;
38
  TFuncCheckLicense = function(lpReserved: LPVOID): UD2_STATUS; cdecl;
39
  TFuncIdentificationMethodNameW = function(lpIdentificationMethodName: LPWSTR; cchSize: DWORD): UD2_STATUS; cdecl;
40
  TFuncIdentificationStringW = function(lpIdentifier: LPWSTR; cchSize: DWORD): UD2_STATUS; cdecl;
70 daniel-mar 41
  TFuncDescribeOwnStatusCodeW = function(lpErrorDescription: LPWSTR; cchSize: DWORD; statusCode: UD2_STATUS; wLangID: LANGID): BOOL; cdecl;
68 daniel-mar 42
 
88 daniel-mar 43
  // Extension of the plugin API starting with version v2.2.
83 daniel-mar 44
  // We don't assign a new PluginIdentifier GUID since the methods of the old API
88 daniel-mar 45
  // are still valid, so an UserDetect2 v2.0/v2.1 plugin can be still used with UserDetect2 v2.2.
83 daniel-mar 46
  // Therefore, this function *MUST* be optional and therefore it may only be imported dynamically.
47
  TFuncDynamicIdentificationStringW = function(lpIdentifier: LPWSTR; cchSize: DWORD; lpDynamicData: LPWSTR): UD2_STATUS; cdecl;
48
 
68 daniel-mar 49
const
50
  UD2_MULTIPLE_ITEMS_DELIMITER = #10;
51
 
52
function PluginInterfaceID: TGUID; cdecl;
53
 
54
implementation
55
 
56
function PluginInterfaceID: TGUID; cdecl;
57
begin
58
  result := GUID_USERDETECT2_IDPLUGIN_V1;
59
end;
60
 
61
end.