Subversion Repositories currency_converter

Rev

Rev 2 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
2 daniel-mar 1
unit VtsCurConvDLLHeader;
2
 
3
interface
4
 
5
uses
6
  Windows, Controls;
7
 
8
type
9
  TVtsCurConvFlags = type DWORD;
10
 
11
const
12
  CONVERT_DONT_SHOW_ERRORS             {:TVtsCurConvFlags} = 1;
13
  CONVERT_FALLBACK_TO_CACHE            {:TVtsCurConvFlags} = 2;
14
  CONVERT_USE_SSL                      {:TVtsCurConvFlags} = 4;
15
  CONVERT_CONFIRM_WEB_ACCESS           {:TVtsCurConvFlags} = 8;
16
  CONVERT_NO_INTERACTIVE_API_KEY_INPUT {:TVtsCurConvFlags} = 16;
17
 
18
const
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
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
23
 
24
function DeleteAPIKey(UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall;
25
 
26
function WriteAPIKey(key: LPCTSTR; 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;
29
 
30
function ReadAPIKey(key: LPTSTR; DontShowErrors: BOOL): HRESULT; stdcall;
31
function ReadAPIKeyW(key: LPWSTR; DontShowErrors: BOOL): HRESULT; stdcall;
32
function ReadAPIKeyA(key: LPSTR; DontShowErrors: BOOL): HRESULT; stdcall;
33
 
34
function Convert(Value: Double; CurFrom, CurTo: LPCTSTR; MaxAge: integer;
35
                 Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall;
36
function ConvertW(Value: Double; CurFrom, CurTo: LPCWSTR; MaxAge: integer;
37
                  Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall;
38
function ConvertA(Value: Double; CurFrom, CurTo: LPCSTR; MaxAge: integer;
39
                  Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall;
40
 
41
function AcceptedCurrencies(WriteTo: LPTSTR; MaxAge: integer; Flags: TVtsCurConvFlags;
42
                            HistoricDate: TDate): Integer; stdcall;
43
function AcceptedCurrenciesW(WriteTo: LPWSTR; MaxAge: integer; Flags: TVtsCurConvFlags;
44
                             HistoricDate: TDate): Integer; stdcall;
45
function AcceptedCurrenciesA(WriteTo: LPSTR; MaxAge: integer; Flags: TVtsCurConvFlags;
46
                             HistoricDate: TDate): Integer; stdcall;
47
 
48
function DownloadNow(Flags: TVtsCurConvFlags; HistoricDate: TDate): HRESULT; stdcall;
49
 
50
implementation
51
 
52
const
19 daniel-mar 53
 
54
  {$IFDEF WIN32}
2 daniel-mar 55
  curConvDLL = 'CurConv.dll';
19 daniel-mar 56
  {$ENDIF}
2 daniel-mar 57
 
19 daniel-mar 58
  {$IFDEF WIN64}
59
  curConvDLL = 'CurConv.64.dll';
60
  {$ENDIF}
61
 
2 daniel-mar 62
function DeleteAPIKey; external curConvDLL name 'DeleteAPIKey';
63
 
64
{$IFDEF UNICODE}
65
function WriteAPIKey; external curConvDLL name 'WriteAPIKeyW';
66
{$ELSE}
67
function WriteAPIKey; external curConvDLL name 'WriteAPIKeyA';
68
{$ENDIF}
69
function WriteAPIKeyW; external curConvDLL name 'WriteAPIKeyW';
70
function WriteAPIKeyA; external curConvDLL name 'WriteAPIKeyA';
71
 
72
{$IFDEF UNICODE}
73
function ReadAPIKey; external curConvDLL name 'ReadAPIKeyW';
74
{$ELSE}
75
function ReadAPIKey; external curConvDLL name 'ReadAPIKeyA';
76
{$ENDIF}
77
function ReadAPIKeyW; external curConvDLL name 'ReadAPIKeyW';
78
function ReadAPIKeyA; external curConvDLL name 'ReadAPIKeyA';
79
 
80
{$IFDEF UNICODE}
81
function Convert; external curConvDLL name 'ConvertW';
82
{$ELSE}
83
function Convert; external curConvDLL name 'ConvertA';
84
{$ENDIF}
85
function ConvertW; external curConvDLL name 'ConvertW';
86
function ConvertA; external curConvDLL name 'ConvertA';
87
 
88
{$IFDEF UNICODE}
89
function AcceptedCurrencies; external curConvDLL name 'AcceptedCurrenciesW';
90
{$ELSE}
91
function AcceptedCurrencies; external curConvDLL name 'AcceptedCurrenciesA';
92
{$ENDIF}
93
function AcceptedCurrenciesW; external curConvDLL name 'AcceptedCurrenciesW';
94
function AcceptedCurrenciesA; external curConvDLL name 'AcceptedCurrenciesA';
95
 
96
function DownloadNow; external curConvDLL name 'DownloadNow';
97
 
98
end.