Rev 71 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
68 | daniel-mar | 1 | library ExecuteAlways; |
2 | |||
3 | uses |
||
4 | Windows, |
||
71 | daniel-mar | 5 | SysUtils, |
68 | daniel-mar | 6 | Classes, |
7 | UD2_PluginIntf in '..\UD2_PluginIntf.pas', |
||
71 | daniel-mar | 8 | UD2_PluginUtils in '..\UD2_PluginUtils.pas', |
9 | UD2_PluginStatus in '..\UD2_PluginStatus.pas'; |
||
68 | daniel-mar | 10 | |
11 | {$R *.res} |
||
12 | |||
13 | const |
||
14 | PLUGIN_GUID: TGUID = '{7A1189CD-8F68-4068-9477-C50B9DCCCECC}'; |
||
15 | |||
16 | function PluginIdentifier: TGUID; cdecl; |
||
17 | begin |
||
18 | result := PLUGIN_GUID; |
||
19 | end; |
||
20 | |||
69 | daniel-mar | 21 | function IdentificationStringW(lpIdentifier: LPWSTR; cchSize: DWORD): UD2_STATUS; cdecl; |
68 | daniel-mar | 22 | var |
23 | stIdentifier: WideString; |
||
24 | begin |
||
82 | daniel-mar | 25 | try |
26 | stIdentifier := 'Always'; |
||
27 | result := UD2_WritePascalStringToPointerW(lpIdentifier, cchSize, stIdentifier); |
||
28 | except |
||
29 | on E: Exception do result := UD2_STATUS_HandleException(E); |
||
30 | end; |
||
68 | daniel-mar | 31 | end; |
32 | |||
69 | daniel-mar | 33 | function PluginNameW(lpPluginName: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUS; cdecl; |
68 | daniel-mar | 34 | var |
35 | stPluginName: WideString; |
||
36 | primaryLangID: Byte; |
||
37 | begin |
||
38 | primaryLangID := wLangID and $00FF; |
||
39 | if primaryLangID = LANG_GERMAN then |
||
40 | stPluginName := 'Immer ausführen' |
||
41 | else |
||
42 | stPluginName := 'Execute always'; |
||
69 | daniel-mar | 43 | result := UD2_WritePascalStringToPointerW(lpPluginName, cchSize, stPluginName); |
68 | daniel-mar | 44 | end; |
45 | |||
69 | daniel-mar | 46 | function PluginVendorW(lpPluginVendor: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUS; cdecl; |
68 | daniel-mar | 47 | begin |
69 | daniel-mar | 48 | result := UD2_WritePascalStringToPointerW(lpPluginVendor, cchSize, 'ViaThinkSoft'); |
68 | daniel-mar | 49 | end; |
50 | |||
69 | daniel-mar | 51 | function PluginVersionW(lpPluginVersion: LPWSTR; cchSize: DWORD; wLangID: LANGID): UD2_STATUS; cdecl; |
68 | daniel-mar | 52 | begin |
69 | daniel-mar | 53 | result := UD2_WritePascalStringToPointerW(lpPluginVersion, cchSize, '1.0'); |
68 | daniel-mar | 54 | end; |
55 | |||
69 | daniel-mar | 56 | function IdentificationMethodNameW(lpIdentificationMethodName: LPWSTR; cchSize: DWORD): UD2_STATUS; cdecl; |
68 | daniel-mar | 57 | var |
58 | stIdentificationMethodName: WideString; |
||
59 | begin |
||
60 | stIdentificationMethodName := 'Execute'; |
||
69 | daniel-mar | 61 | result := UD2_WritePascalStringToPointerW(lpIdentificationMethodName, cchSize, stIdentificationMethodName); |
68 | daniel-mar | 62 | end; |
63 | |||
69 | daniel-mar | 64 | function CheckLicense(lpReserved: LPVOID): UD2_STATUS; cdecl; |
68 | daniel-mar | 65 | begin |
69 | daniel-mar | 66 | result := UD2_STATUS_OK_LICENSED; |
68 | daniel-mar | 67 | end; |
68 | |||
70 | daniel-mar | 69 | function DescribeOwnStatusCodeW(lpErrorDescription: LPWSTR; cchSize: DWORD; statusCode: UD2_STATUS; wLangID: LANGID): BOOL; cdecl; |
70 | begin |
||
71 | // This function does not use non-generic status codes |
||
72 | result := FALSE; |
||
73 | end; |
||
74 | |||
68 | daniel-mar | 75 | exports |
76 | PluginInterfaceID name mnPluginInterfaceID, |
||
77 | PluginIdentifier name mnPluginIdentifier, |
||
78 | PluginNameW name mnPluginNameW, |
||
79 | PluginVendorW name mnPluginVendorW, |
||
80 | PluginVersionW name mnPluginVersionW, |
||
81 | IdentificationMethodNameW name mnIdentificationMethodNameW, |
||
82 | IdentificationStringW name mnIdentificationStringW, |
||
70 | daniel-mar | 83 | CheckLicense name mnCheckLicense, |
84 | DescribeOwnStatusCodeW name mnDescribeOwnStatusCodeW; |
||
68 | daniel-mar | 85 | |
86 | end. |