Subversion Repositories userdetect2

Rev

Rev 83 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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