Subversion Repositories userdetect2

Rev

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

  1. unit UD2_PluginIntf;
  2.  
  3. interface
  4.  
  5. {$IF CompilerVersion >= 25.0}
  6. {$LEGACYIFEND ON}
  7. {$IFEND}
  8.  
  9. uses
  10.   Windows, SysUtils, UD2_PluginStatus;
  11.  
  12. const
  13.   GUID_USERDETECT2_IDPLUGIN_V1: TGUID = '{6C26245E-F79A-416C-8C73-BEA3EC18BB6E}';
  14.  
  15. const
  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';
  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;
  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;
  41.   TFuncDescribeOwnStatusCodeW = function(lpErrorDescription: LPWSTR; cchSize: DWORD; statusCode: UD2_STATUS; wLangID: LANGID): BOOL; cdecl;
  42.  
  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
  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.
  47.   TFuncDynamicIdentificationStringW = function(lpIdentifier: LPWSTR; cchSize: DWORD; lpDynamicData: LPWSTR): UD2_STATUS; cdecl;
  48.  
  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.
  62.