Rev 2 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2 | Rev 19 | ||
---|---|---|---|
1 | unit VtsCurConvDLLHeader; |
1 | unit VtsCurConvDLLHeader; |
2 | 2 | ||
3 | interface |
3 | interface |
4 | 4 | ||
5 | uses |
5 | uses |
6 | Windows, Controls; |
6 | Windows, Controls; |
7 | 7 | ||
8 | type |
8 | type |
9 | TVtsCurConvFlags = type DWORD; |
9 | TVtsCurConvFlags = type DWORD; |
10 | 10 | ||
11 | const |
11 | const |
12 | CONVERT_DONT_SHOW_ERRORS {:TVtsCurConvFlags} = 1; |
12 | CONVERT_DONT_SHOW_ERRORS {:TVtsCurConvFlags} = 1; |
13 | CONVERT_FALLBACK_TO_CACHE {:TVtsCurConvFlags} = 2; |
13 | CONVERT_FALLBACK_TO_CACHE {:TVtsCurConvFlags} = 2; |
14 | CONVERT_USE_SSL {:TVtsCurConvFlags} = 4; |
14 | CONVERT_USE_SSL {:TVtsCurConvFlags} = 4; |
15 | CONVERT_CONFIRM_WEB_ACCESS {:TVtsCurConvFlags} = 8; |
15 | CONVERT_CONFIRM_WEB_ACCESS {:TVtsCurConvFlags} = 8; |
16 | CONVERT_NO_INTERACTIVE_API_KEY_INPUT {:TVtsCurConvFlags} = 16; |
16 | CONVERT_NO_INTERACTIVE_API_KEY_INPUT {:TVtsCurConvFlags} = 16; |
17 | 17 | ||
18 | const |
18 | const |
19 | S_VTSCONV_OK: HRESULT = $20000000; // Success, Customer defined, Facility 0, Code 0 |
19 | S_VTSCONV_OK: HRESULT = $20000000; // Success, Customer defined, Facility 0, Code 0 |
20 | S_VTSCONV_NOTHING: HRESULT = $20000001; // Success, Customer defined, Facility 0, Code 1 |
20 | S_VTSCONV_NOTHING: HRESULT = $20000001; // Success, Customer defined, Facility 0, Code 1 |
21 | E_VTSCONV_GENERIC_FAILURE: HRESULT = $A0000000; // Failure, Customer defined, Facility 0, Code 0 |
21 | E_VTSCONV_GENERIC_FAILURE: HRESULT = $A0000000; // Failure, Customer defined, Facility 0, Code 0 |
22 | E_VTSCONV_BAD_ARGS: HRESULT = $A0000001; // Failure, Customer defined, Facility 0, Code 1 |
22 | E_VTSCONV_BAD_ARGS: HRESULT = $A0000001; // Failure, Customer defined, Facility 0, Code 1 |
23 | 23 | ||
24 | function DeleteAPIKey(UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall; |
24 | function DeleteAPIKey(UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall; |
25 | 25 | ||
26 | function WriteAPIKey(key: LPCTSTR; UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall; |
26 | function WriteAPIKey(key: LPCTSTR; UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall; |
27 | function WriteAPIKeyW(key: LPCWSTR; UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall; |
27 | function WriteAPIKeyW(key: LPCWSTR; UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall; |
28 | function WriteAPIKeyA(key: LPCSTR; UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall; |
28 | function WriteAPIKeyA(key: LPCSTR; UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall; |
29 | 29 | ||
30 | function ReadAPIKey(key: LPTSTR; DontShowErrors: BOOL): HRESULT; stdcall; |
30 | function ReadAPIKey(key: LPTSTR; DontShowErrors: BOOL): HRESULT; stdcall; |
31 | function ReadAPIKeyW(key: LPWSTR; DontShowErrors: BOOL): HRESULT; stdcall; |
31 | function ReadAPIKeyW(key: LPWSTR; DontShowErrors: BOOL): HRESULT; stdcall; |
32 | function ReadAPIKeyA(key: LPSTR; DontShowErrors: BOOL): HRESULT; stdcall; |
32 | function ReadAPIKeyA(key: LPSTR; DontShowErrors: BOOL): HRESULT; stdcall; |
33 | 33 | ||
34 | function Convert(Value: Double; CurFrom, CurTo: LPCTSTR; MaxAge: integer; |
34 | function Convert(Value: Double; CurFrom, CurTo: LPCTSTR; MaxAge: integer; |
35 | Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall; |
35 | Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall; |
36 | function ConvertW(Value: Double; CurFrom, CurTo: LPCWSTR; MaxAge: integer; |
36 | function ConvertW(Value: Double; CurFrom, CurTo: LPCWSTR; MaxAge: integer; |
37 | Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall; |
37 | Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall; |
38 | function ConvertA(Value: Double; CurFrom, CurTo: LPCSTR; MaxAge: integer; |
38 | function ConvertA(Value: Double; CurFrom, CurTo: LPCSTR; MaxAge: integer; |
39 | Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall; |
39 | Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall; |
40 | 40 | ||
41 | function AcceptedCurrencies(WriteTo: LPTSTR; MaxAge: integer; Flags: TVtsCurConvFlags; |
41 | function AcceptedCurrencies(WriteTo: LPTSTR; MaxAge: integer; Flags: TVtsCurConvFlags; |
42 | HistoricDate: TDate): Integer; stdcall; |
42 | HistoricDate: TDate): Integer; stdcall; |
43 | function AcceptedCurrenciesW(WriteTo: LPWSTR; MaxAge: integer; Flags: TVtsCurConvFlags; |
43 | function AcceptedCurrenciesW(WriteTo: LPWSTR; MaxAge: integer; Flags: TVtsCurConvFlags; |
44 | HistoricDate: TDate): Integer; stdcall; |
44 | HistoricDate: TDate): Integer; stdcall; |
45 | function AcceptedCurrenciesA(WriteTo: LPSTR; MaxAge: integer; Flags: TVtsCurConvFlags; |
45 | function AcceptedCurrenciesA(WriteTo: LPSTR; MaxAge: integer; Flags: TVtsCurConvFlags; |
46 | HistoricDate: TDate): Integer; stdcall; |
46 | HistoricDate: TDate): Integer; stdcall; |
47 | 47 | ||
48 | function DownloadNow(Flags: TVtsCurConvFlags; HistoricDate: TDate): HRESULT; stdcall; |
48 | function DownloadNow(Flags: TVtsCurConvFlags; HistoricDate: TDate): HRESULT; stdcall; |
49 | 49 | ||
50 | implementation |
50 | implementation |
51 | 51 | ||
52 | const |
52 | const |
- | 53 | ||
- | 54 | {$IFDEF WIN32} |
|
53 | curConvDLL = 'CurConv.dll'; |
55 | curConvDLL = 'CurConv.dll'; |
- | 56 | {$ENDIF} |
|
- | 57 | ||
- | 58 | {$IFDEF WIN64} |
|
- | 59 | curConvDLL = 'CurConv.64.dll'; |
|
- | 60 | {$ENDIF} |
|
54 | 61 | ||
55 | function DeleteAPIKey; external curConvDLL name 'DeleteAPIKey'; |
62 | function DeleteAPIKey; external curConvDLL name 'DeleteAPIKey'; |
56 | 63 | ||
57 | {$IFDEF UNICODE} |
64 | {$IFDEF UNICODE} |
58 | function WriteAPIKey; external curConvDLL name 'WriteAPIKeyW'; |
65 | function WriteAPIKey; external curConvDLL name 'WriteAPIKeyW'; |
59 | {$ELSE} |
66 | {$ELSE} |
60 | function WriteAPIKey; external curConvDLL name 'WriteAPIKeyA'; |
67 | function WriteAPIKey; external curConvDLL name 'WriteAPIKeyA'; |
61 | {$ENDIF} |
68 | {$ENDIF} |
62 | function WriteAPIKeyW; external curConvDLL name 'WriteAPIKeyW'; |
69 | function WriteAPIKeyW; external curConvDLL name 'WriteAPIKeyW'; |
63 | function WriteAPIKeyA; external curConvDLL name 'WriteAPIKeyA'; |
70 | function WriteAPIKeyA; external curConvDLL name 'WriteAPIKeyA'; |
64 | 71 | ||
65 | {$IFDEF UNICODE} |
72 | {$IFDEF UNICODE} |
66 | function ReadAPIKey; external curConvDLL name 'ReadAPIKeyW'; |
73 | function ReadAPIKey; external curConvDLL name 'ReadAPIKeyW'; |
67 | {$ELSE} |
74 | {$ELSE} |
68 | function ReadAPIKey; external curConvDLL name 'ReadAPIKeyA'; |
75 | function ReadAPIKey; external curConvDLL name 'ReadAPIKeyA'; |
69 | {$ENDIF} |
76 | {$ENDIF} |
70 | function ReadAPIKeyW; external curConvDLL name 'ReadAPIKeyW'; |
77 | function ReadAPIKeyW; external curConvDLL name 'ReadAPIKeyW'; |
71 | function ReadAPIKeyA; external curConvDLL name 'ReadAPIKeyA'; |
78 | function ReadAPIKeyA; external curConvDLL name 'ReadAPIKeyA'; |
72 | 79 | ||
73 | {$IFDEF UNICODE} |
80 | {$IFDEF UNICODE} |
74 | function Convert; external curConvDLL name 'ConvertW'; |
81 | function Convert; external curConvDLL name 'ConvertW'; |
75 | {$ELSE} |
82 | {$ELSE} |
76 | function Convert; external curConvDLL name 'ConvertA'; |
83 | function Convert; external curConvDLL name 'ConvertA'; |
77 | {$ENDIF} |
84 | {$ENDIF} |
78 | function ConvertW; external curConvDLL name 'ConvertW'; |
85 | function ConvertW; external curConvDLL name 'ConvertW'; |
79 | function ConvertA; external curConvDLL name 'ConvertA'; |
86 | function ConvertA; external curConvDLL name 'ConvertA'; |
80 | 87 | ||
81 | {$IFDEF UNICODE} |
88 | {$IFDEF UNICODE} |
82 | function AcceptedCurrencies; external curConvDLL name 'AcceptedCurrenciesW'; |
89 | function AcceptedCurrencies; external curConvDLL name 'AcceptedCurrenciesW'; |
83 | {$ELSE} |
90 | {$ELSE} |
84 | function AcceptedCurrencies; external curConvDLL name 'AcceptedCurrenciesA'; |
91 | function AcceptedCurrencies; external curConvDLL name 'AcceptedCurrenciesA'; |
85 | {$ENDIF} |
92 | {$ENDIF} |
86 | function AcceptedCurrenciesW; external curConvDLL name 'AcceptedCurrenciesW'; |
93 | function AcceptedCurrenciesW; external curConvDLL name 'AcceptedCurrenciesW'; |
87 | function AcceptedCurrenciesA; external curConvDLL name 'AcceptedCurrenciesA'; |
94 | function AcceptedCurrenciesA; external curConvDLL name 'AcceptedCurrenciesA'; |
88 | 95 | ||
89 | function DownloadNow; external curConvDLL name 'DownloadNow'; |
96 | function DownloadNow; external curConvDLL name 'DownloadNow'; |
90 | 97 | ||
91 | end. |
98 | end. |
92 | 99 |