Subversion Repositories delphiutils

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. #ifndef _UD2_API_H_
  2. #define _UD2_API_H_
  3.  
  4. #include <windows.h>
  5.  
  6. #include "ud2_utils.h"
  7.  
  8. #define GUID_USERDETECT2_IDPLUGIN_V1 __GUID("{6C26245E-F79A-416C-8C73-BEA3EC18BB6E}")
  9.  
  10. const char UD2_MULTIPLE_ITEMS_DELIMITER = 0x10;
  11.  
  12. typedef DWORD UD2_STATUSCODE;
  13.  
  14. // We have chosen these numbers, to avoid that people use
  15. // "return FALSE" ("return 0") to declare an error, and
  16. // "return TRUE" ("return 1") to declare a successful operation.
  17. const UD2_STATUSCODE UD2_STATUS_OK               = 0x10000000;
  18. const UD2_STATUSCODE UD2_STATUS_BUFFER_TOO_SMALL = 0x00001000;
  19. const UD2_STATUSCODE UD2_STATUS_INVALID_ARGS     = 0x00001001;
  20. const UD2_STATUSCODE UD2_STATUS_NOT_LICENSED     = 0x00001002;
  21.  
  22. // ---
  23.  
  24. #ifdef BUILDING_DLL
  25. #define UD2_API extern "C" __cdecl __declspec(dllexport)
  26. #else
  27. #define UD2_API extern "C" __cdecl __declspec(dllimport)
  28. #endif
  29.  
  30. UD2_API GUID PluginIdentifier();
  31. UD2_API UD2_STATUSCODE PluginNameW(LPWSTR lpPluginName, DWORD cchSize, LANGID wLangID);
  32. UD2_API UD2_STATUSCODE PluginVersionW(LPWSTR lpPluginVersion, DWORD cchSize, LANGID wLangID);
  33. UD2_API UD2_STATUSCODE PluginVendorW(LPWSTR lpPluginVendor, DWORD cchSize, LANGID wLangID);
  34. UD2_API UD2_STATUSCODE CheckLicense(LPVOID lpReserved);
  35. UD2_API UD2_STATUSCODE IdentificationMethodNameW(LPWSTR lpIdentificationMethodName, DWORD cchSize);
  36. UD2_API UD2_STATUSCODE IdentificationStringW(LPWSTR lpIdentifier, DWORD cchSize);
  37.  
  38. #ifdef BUILDING_DLL
  39. UD2_API GUID PluginInterfaceID() {
  40.         return GUID_USERDETECT2_IDPLUGIN_V1;   
  41. }
  42. #else
  43. UD2_API GUID PluginInterfaceID();
  44. #endif
  45.  
  46. #endif
  47.