Subversion Repositories userdetect2

Rev

Rev 69 | Go to most recent revision | 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;
  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.  
  25. {$IF not Declared(LPVOID)}
  26. type
  27.   LPVOID = Pointer;
  28. {$IFEND}
  29.  
  30. type
  31.   UD2_STATUSCODE = DWORD;
  32.  
  33. const
  34.   // We have chosen these numbers, to avoid that people use
  35.   // "return FALSE" ("return 0") to declare an error, and
  36.   // "return TRUE" ("return 1") to declare a successful operation.
  37.   // TODO: visible und invisible module errors, z.b. unavailable wegen winapi etc.
  38.   // --> mask machen: sucessful, failed, failed hard, official oder userdefined
  39.   UD2_STATUS_OK               : UD2_STATUSCODE = $10000000;
  40.   UD2_STATUS_BUFFER_TOO_SMALL : UD2_STATUSCODE = $00001000;
  41.   UD2_STATUS_INVALID_ARGS     : UD2_STATUSCODE = $00001001;
  42.   UD2_STATUS_NOT_LICENSED     : UD2_STATUSCODE = $00001002;
  43.  
  44. type
  45.   TFuncPluginInterfaceID = function(): TGUID; cdecl;
  46.   TFuncPluginIdentifier = function(): TGUID; cdecl;
  47.   TFuncPluginNameW = function(lpPluginName: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUSCODE; cdecl;
  48.   TFuncPluginVersionW = function(lpPluginVersion: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUSCODE; cdecl;
  49.   TFuncPluginVendorW = function(lpPluginVendor: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUSCODE; cdecl;
  50.   TFuncCheckLicense = function(lpReserved: LPVOID): UD2_STATUSCODE; cdecl;
  51.   TFuncIdentificationMethodNameW = function(lpIdentificationMethodName: LPWSTR; cchSize: DWORD): UD2_STATUSCODE; cdecl;
  52.   TFuncIdentificationStringW = function(lpIdentifier: LPWSTR; cchSize: DWORD): UD2_STATUSCODE; cdecl;
  53.  
  54. const
  55.   UD2_MULTIPLE_ITEMS_DELIMITER = #10;
  56.  
  57. function PluginInterfaceID: TGUID; cdecl;
  58.  
  59. implementation
  60.  
  61. function PluginInterfaceID: TGUID; cdecl;
  62. begin
  63.   result := GUID_USERDETECT2_IDPLUGIN_V1;
  64. end;
  65.  
  66. end.
  67.