Rev 68 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 68 | Rev 69 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | #ifndef _UD2_API_H_ |
1 | #ifndef _UD2_API_H_ |
2 | #define _UD2_API_H_ |
2 | #define _UD2_API_H_ |
3 | 3 | ||
4 | #include <windows.h> |
4 | #include <windows.h> |
5 | 5 | ||
- | 6 | #include "ud2_status.h" |
|
6 | #include "ud2_utils.h" |
7 | #include "ud2_utils.h" |
7 | 8 | ||
8 | #define GUID_USERDETECT2_IDPLUGIN_V1 __GUID("{6C26245E-F79A-416C-8C73-BEA3EC18BB6E}") |
9 | #define GUID_USERDETECT2_IDPLUGIN_V1 __GUID("{6C26245E-F79A-416C-8C73-BEA3EC18BB6E}") |
9 | 10 | ||
10 | const char UD2_MULTIPLE_ITEMS_DELIMITER = 0x10; |
11 | const char UD2_MULTIPLE_ITEMS_DELIMITER = 0x10; |
11 | 12 | ||
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 |
13 | #ifdef BUILDING_DLL |
25 | #define UD2_API extern "C" __cdecl __declspec(dllexport) |
14 | #define UD2_API extern "C" __cdecl __declspec(dllexport) |
26 | #else |
15 | #else |
27 | #define UD2_API extern "C" __cdecl __declspec(dllimport) |
16 | #define UD2_API extern "C" __cdecl __declspec(dllimport) |
28 | #endif |
17 | #endif |
29 | 18 | ||
30 | UD2_API GUID PluginIdentifier(); |
19 | UD2_API GUID PluginIdentifier(); |
31 | UD2_API UD2_STATUSCODE PluginNameW(LPWSTR lpPluginName, DWORD cchSize, LANGID wLangID); |
20 | UD2_API UD2_STATUS PluginNameW(LPWSTR lpPluginName, DWORD cchSize, LANGID wLangID); |
32 | UD2_API UD2_STATUSCODE PluginVersionW(LPWSTR lpPluginVersion, DWORD cchSize, LANGID wLangID); |
21 | UD2_API UD2_STATUS PluginVersionW(LPWSTR lpPluginVersion, DWORD cchSize, LANGID wLangID); |
33 | UD2_API UD2_STATUSCODE PluginVendorW(LPWSTR lpPluginVendor, DWORD cchSize, LANGID wLangID); |
22 | UD2_API UD2_STATUS PluginVendorW(LPWSTR lpPluginVendor, DWORD cchSize, LANGID wLangID); |
34 | UD2_API UD2_STATUSCODE CheckLicense(LPVOID lpReserved); |
23 | UD2_API UD2_STATUS CheckLicense(LPVOID lpReserved); |
35 | UD2_API UD2_STATUSCODE IdentificationMethodNameW(LPWSTR lpIdentificationMethodName, DWORD cchSize); |
24 | UD2_API UD2_STATUS IdentificationMethodNameW(LPWSTR lpIdentificationMethodName, DWORD cchSize); |
36 | UD2_API UD2_STATUSCODE IdentificationStringW(LPWSTR lpIdentifier, DWORD cchSize); |
25 | UD2_API UD2_STATUS IdentificationStringW(LPWSTR lpIdentifier, DWORD cchSize); |
37 | 26 | ||
38 | #ifdef BUILDING_DLL |
27 | #ifdef BUILDING_DLL |
39 | UD2_API GUID PluginInterfaceID() { |
28 | UD2_API GUID PluginInterfaceID() { |
40 | return GUID_USERDETECT2_IDPLUGIN_V1; |
29 | return GUID_USERDETECT2_IDPLUGIN_V1; |
41 | } |
30 | } |