Subversion Repositories currency_converter

Rev

Rev 13 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13 Rev 15
1
<!DOCTYPE html>
1
<!DOCTYPE html>
2
<html>
2
<html>
3
 
3
 
4
<head>
4
<head>
5
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
6
        <title>ViaThinkSoft Currency Converter - DLL specification</title>
6
        <title>ViaThinkSoft Currency Converter - DLL specification</title>
7
        <style type="text/css">
7
        <style type="text/css">
8
                pre { white-space: pre-wrap !important; }
8
                pre { white-space: pre-wrap !important; }
9
                body { font-family:system, -apple-system, ".SFNSText-Regular", "San Francisco", "Oxygen", "Ubuntu", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; }
9
                body { font-family:system, -apple-system, ".SFNSText-Regular", "San Francisco", "Oxygen", "Ubuntu", "Roboto", "Segoe UI", "Helvetica Neue", "Lucida Grande", sans-serif; }
10
        </style>
10
        </style>
11
</head>
11
</head>
12
 
12
 
13
<body>
13
<body>
14
 
14
 
15
<h1>ViaThinkSoft Currency Converter - DLL specification</h1>
15
<h1>ViaThinkSoft Currency Converter - DLL specification</h1>
16
 
16
 
17
<h2>Table of Contents</h2>
17
<h2>Table of Contents</h2>
18
 
18
 
19
<p>These methods are exported by <b>CurConv.dll</b>:</p>
19
<p>These methods are exported by <b>CurConv.dll</b>:</p>
20
 
20
 
21
<ul>
21
<ul>
22
        <li><a href="#DeleteAPIKey">DeleteAPIKey</a></li>
22
        <li><a href="#DeleteAPIKey">DeleteAPIKey</a></li>
23
        <li><a href="#WriteAPIKey">WriteAPIKey</a></li>
23
        <li><a href="#WriteAPIKey">WriteAPIKey</a></li>
24
        <li><a href="#ReadAPIKey">ReadAPIKey</a></li>
24
        <li><a href="#ReadAPIKey">ReadAPIKey</a></li>
25
        <li><a href="#Convert">Convert</a></li>
25
        <li><a href="#Convert">Convert</a></li>
26
        <li><a href="#AcceptedCurrencies">AcceptedCurrencies</a></li>
26
        <li><a href="#AcceptedCurrencies">AcceptedCurrencies</a></li>
27
        <li><a href="#DownloadNow">DownloadNow</a></li>
27
        <li><a href="#DownloadNow">DownloadNow</a></li>
28
</ul>
28
</ul>
29
 
29
 
30
<h2 id="DeleteAPIKey">DeleteAPIKey</h2>
30
<h2 id="DeleteAPIKey">DeleteAPIKey</h2>
31
 
31
 
32
<h3>Syntax</h3>
32
<h3>Syntax</h3>
33
<h4>Delphi</h4>
33
<h4>Delphi</h4>
34
<pre>function DeleteAPIKey(UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall;
34
<pre>function DeleteAPIKey(UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall;
35
</pre>
35
</pre>
36
<h4>C</h4>
36
<h4>C</h4>
37
<pre>HRESULT __stdcall DeleteAPIKey(BOOL UserMode, BOOL DontShowErrors);
37
<pre>HRESULT __stdcall DeleteAPIKey(BOOL UserMode, BOOL DontShowErrors);
38
</pre>
38
</pre>
39
 
39
 
40
<h3>Description</h3>
40
<h3>Description</h3>
41
<p>Deletes the API key from the registry.</p>
41
<p>Deletes the API key from the registry.</p>
42
 
42
 
43
<h3>Parameters</h3>
43
<h3>Parameters</h3>
44
<ul>
44
<ul>
45
        <li>UserMode: If true, the API key will be deleted from <code>HKEY_LOCAL_USER</code>, otherwise it will be deleted on <code>HKEY_LOCAL_MACHINE</code>.</li>
45
        <li>UserMode: If true, the API key will be deleted from <code>HKEY_LOCAL_USER</code>, otherwise it will be deleted on <code>HKEY_LOCAL_MACHINE</code>.</li>
46
        <li>DontShowErrors: If true, no errors will be displayed, otherwise, errors will result in a dialog box, in addition to the result code.</li>
46
        <li>DontShowErrors: If true, no errors will be displayed, otherwise, errors will result in a dialog box, in addition to the result code.</li>
47
</ul>
47
</ul>
48
 
48
 
49
<h3>Returns</h3>
49
<h3>Returns</h3>
50
<ul>
50
<ul>
51
        <li>S_VTSCONV_OK (0x20000000) if the key could be successfully deleted.</li>
51
        <li>S_VTSCONV_OK (0x20000000) if the key could be successfully deleted.</li>
52
        <li>S_VTSCONV_NOTHING (0x20000001) if no key could be found.</li>
52
        <li>S_VTSCONV_NOTHING (0x20000001) if no key could be found.</li>
53
        <li>E_VTSCONV_GENERIC_FAILURE (0xA0000000) if an error occured.</li>
53
        <li>E_VTSCONV_GENERIC_FAILURE (0xA0000000) if an error occured.</li>
54
</ul>
54
</ul>
55
 
55
 
56
<h2 id="WriteAPIKey">WriteAPIKey</h2>
56
<h2 id="WriteAPIKey">WriteAPIKey</h2>
57
 
57
 
58
<h3>Syntax</h3>
58
<h3>Syntax</h3>
59
<h4>Delphi</h4>
59
<h4>Delphi</h4>
60
<pre>function WriteAPIKey(key: LPCTSTR; UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall;
60
<pre>function WriteAPIKey(key: LPCTSTR; UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall;
61
function WriteAPIKeyW(key: LPCWSTR; UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall;
61
function WriteAPIKeyW(key: LPCWSTR; UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall;
62
function WriteAPIKeyA(key: LPCSTR; UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall;
62
function WriteAPIKeyA(key: LPCSTR; UserMode: BOOL; DontShowErrors: BOOL): HRESULT; stdcall;
63
</pre>
63
</pre>
64
<h4>C</h4>
64
<h4>C</h4>
65
<pre>HRESULT __stdcall WriteAPIKeyW(LPCWSTR key, BOOL UserMode, BOOL DontShowErrors);
65
<pre>HRESULT __stdcall WriteAPIKeyW(LPCWSTR key, BOOL UserMode, BOOL DontShowErrors);
66
HRESULT __stdcall WriteAPIKeyA(LPCSTR key, BOOL UserMode, BOOL DontShowErrors);
66
HRESULT __stdcall WriteAPIKeyA(LPCSTR key, BOOL UserMode, BOOL DontShowErrors);
67
</pre>
67
</pre>
68
 
68
 
69
<h3>Description</h3>
69
<h3>Description</h3>
70
<p>Writes the API key into the registry. This is usually not necessary, since the Convert() method is able to query the key from the user using the GUI.</p>
70
<p>Writes the API key into the registry. This is usually not necessary, since the Convert() method is able to query the key from the user using the GUI.</p>
71
 
71
 
72
<h3>Parameters</h3>
72
<h3>Parameters</h3>
73
<ul>
73
<ul>
74
        <li>key: The 32 digit key you received from currencylayer.com</li>
74
        <li>key: The 32 digit key you received from currencylayer.com</li>
75
        <li>UserMode: If true, the API key will be written to <code>HKEY_LOCAL_USER</code>, otherwise it will be written to <code>HKEY_LOCAL_MACHINE</code>.</li>
75
        <li>UserMode: If true, the API key will be written to <code>HKEY_LOCAL_USER</code>, otherwise it will be written to <code>HKEY_LOCAL_MACHINE</code>.</li>
76
        <li>DontShowErrors: If true, no errors will be displayed. If true, errors will result in a dialog box, in addition to the result code.</li>
76
        <li>DontShowErrors: If true, no errors will be displayed. If true, errors will result in a dialog box, in addition to the result code.</li>
77
</ul>
77
</ul>
78
 
78
 
79
<h3>Returns</h3>
79
<h3>Returns</h3>
80
<ul>
80
<ul>
81
        <li>S_VTSCONV_OK (0x20000000) if the key could be successfully deleted.</li>
81
        <li>S_VTSCONV_OK (0x20000000) if the key could be successfully deleted.</li>
82
        <li>E_VTSCONV_GENERIC_FAILURE (0xA0000000) if an error occured, e.g. if the registry is write protected.</li>
82
        <li>E_VTSCONV_GENERIC_FAILURE (0xA0000000) if an error occured, e.g. if the registry is write protected.</li>
83
        <li>E_VTSCONV_BAD_ARGS (0xA0000001) if the key is invalid.</li>
83
        <li>E_VTSCONV_BAD_ARGS (0xA0000001) if the key is invalid.</li>
84
</ul>
84
</ul>
85
 
85
 
86
<h2 id="ReadAPIKey">ReadAPIKey</h2>
86
<h2 id="ReadAPIKey">ReadAPIKey</h2>
87
 
87
 
88
<h3>Syntax</h3>
88
<h3>Syntax</h3>
89
<h4>Delphi</h4>
89
<h4>Delphi</h4>
90
<pre>function ReadAPIKey(key: LPTSTR; DontShowErrors: BOOL): HRESULT; stdcall;
90
<pre>function ReadAPIKey(key: LPTSTR; DontShowErrors: BOOL): HRESULT; stdcall;
91
function ReadAPIKeyW(key: LPWSTR; DontShowErrors: BOOL): HRESULT; stdcall;
91
function ReadAPIKeyW(key: LPWSTR; DontShowErrors: BOOL): HRESULT; stdcall;
92
function ReadAPIKeyA(key: LPSTR; DontShowErrors: BOOL): HRESULT; stdcall;
92
function ReadAPIKeyA(key: LPSTR; DontShowErrors: BOOL): HRESULT; stdcall;
93
</pre>
93
</pre>
94
<h4>C</h4>
94
<h4>C</h4>
95
<pre>HRESULT __stdcall ReadAPIKeyW(LPWSTR key, BOOL DontShowErrors);
95
<pre>HRESULT __stdcall ReadAPIKeyW(LPWSTR key, BOOL DontShowErrors);
96
HRESULT __stdcall ReadAPIKeyA(LPSTR key, BOOL DontShowErrors);
96
HRESULT __stdcall ReadAPIKeyA(LPSTR key, BOOL DontShowErrors);
97
</pre>
97
</pre>
98
 
98
 
99
<h3>Description</h3>
99
<h3>Description</h3>
100
<p>Reads the API key from the registry.</p>
100
<p>Reads the API key from the registry.</p>
101
 
101
 
102
<h3>Parameters</h3>
102
<h3>Parameters</h3>
103
<ul>
103
<ul>
104
        <li>key: A buffer where the 32 digit key will be written to. There should be at least 33 chars memory reserved (32 chars key + 1 char zero termination).</li>
104
        <li>key: A buffer where the 32 digit key will be written to. There should be at least 33 chars memory reserved (32 chars key + 1 char zero termination).</li>
105
        <li>UserMode: If true, the API key will be written into <code>HKEY_LOCAL_USER</code>, otherwise it will be written to <code>HKEY_LOCAL_MACHINE</code>.</li>
-
 
106
        <li>DontShowErrors: If true, no errors will be displayed. If true, errors will result in a dialog box, in addition to the result code.</li>
105
        <li>DontShowErrors: If true, no errors will be displayed. If true, errors will result in a dialog box, in addition to the result code.</li>
107
</ul>
106
</ul>
108
 
107
 
109
<h3>Returns</h3>
108
<h3>Returns</h3>
110
<ul>
109
<ul>
111
        <li>S_VTSCONV_OK (0x20000000) if the key could be successfully deleted.</li>
110
        <li>S_VTSCONV_OK (0x20000000) if the key could be successfully deleted.</li>
112
        <li>E_VTSCONV_GENERIC_FAILURE (0xA0000000) if an error occured, e.g. if the registry is write protected.</li>
111
        <li>E_VTSCONV_GENERIC_FAILURE (0xA0000000) if an error occured, e.g. if the registry is write protected.</li>
113
        <li>E_VTSCONV_STOREDKEY_INVALID (0xA0000002) if the key stored in the registry is invalid.</li>
112
        <li>E_VTSCONV_STOREDKEY_INVALID (0xA0000002) if the key stored in the registry is invalid.</li>
114
        <li>E_VTSCONV_NO_STOREDKEY (0xA0000003) if there is no key stored in the registry.</li>
113
        <li>E_VTSCONV_NO_STOREDKEY (0xA0000003) if there is no key stored in the registry.</li>
115
</ul>
114
</ul>
116
 
115
 
117
<h2 id="Convert">Convert</h2>
116
<h2 id="Convert">Convert</h2>
118
 
117
 
119
<h3>Syntax</h3>
118
<h3>Syntax</h3>
120
<h4>Delphi</h4>
119
<h4>Delphi</h4>
121
<pre>function Convert(Value: Double; CurFrom, CurTo: LPCTSTR; MaxAge: integer; Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall;
120
<pre>function Convert(Value: Double; CurFrom, CurTo: LPCTSTR; MaxAge: integer; Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall;
122
function ConvertW(Value: Double; CurFrom, CurTo: LPCWSTR; MaxAge: integer; Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall;
121
function ConvertW(Value: Double; CurFrom, CurTo: LPCWSTR; MaxAge: integer; Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall;
123
function ConvertA(Value: Double; CurFrom, CurTo: LPCSTR; MaxAge: integer; Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall;
122
function ConvertA(Value: Double; CurFrom, CurTo: LPCSTR; MaxAge: integer; Flags: TVtsCurConvFlags; HistoricDate: TDate): Double; stdcall;
124
</pre>
123
</pre>
125
<h4>C</h4>
124
<h4>C</h4>
126
<pre>double __stdcall ConvertW(double Value, LPCWSTR CurFrom, LPCWSTR CurTo, int MaxAge, CURCONV_FLAGS Flags, DATE HistoricDate);
125
<pre>double __stdcall ConvertW(double Value, LPCWSTR CurFrom, LPCWSTR CurTo, int MaxAge, CURCONV_FLAGS Flags, DATE HistoricDate);
127
double __stdcall ConvertA(double Value, LPCSTR CurFrom, LPCSTR CurTo, int MaxAge, CURCONV_FLAGS Flags, DATE HistoricDate);
126
double __stdcall ConvertA(double Value, LPCSTR CurFrom, LPCSTR CurTo, int MaxAge, CURCONV_FLAGS Flags, DATE HistoricDate);
128
</pre>
127
</pre>
129
 
128
 
130
<h3>Description</h3>
129
<h3>Description</h3>
131
<p>Converts into a differnt currency.</p>
130
<p>Converts into a differnt currency.</p>
132
 
131
 
133
<h3>Parameters</h3>
132
<h3>Parameters</h3>
134
<ul>
133
<ul>
135
        <li>Value: The amount of money in the source currency you want to convert into the target currency.</li>
134
        <li>Value: The amount of money in the source currency you want to convert into the target currency.</li>
136
        <li>CurFrom: The source currency, formatted as defined in ISO-4217 (3 chars, e.g. "USD")</li>
135
        <li>CurFrom: The source currency, formatted as defined in ISO-4217 (3 chars, e.g. "USD")</li>
137
        <li>CurTo: The target currency, formatted as defined in ISO-4217 (3 chars, e.g. "USD")</li>
136
        <li>CurTo: The target currency, formatted as defined in ISO-4217 (3 chars, e.g. "USD")</li>
138
        <li>MaxAge: Defines, after which amount of time the exchange data needs to be re-downloaded from the server.<ul>
137
        <li>MaxAge: Defines, after which amount of time the exchange data needs to be re-downloaded from the server.<ul>
139
                <li>-1: Only download once</li>
138
                <li>-1: Only download once</li>
140
                <li>0: Always download, on each request (attention: API keys may have limited amount of accesses per month)</li>
139
                <li>0: Always download, on each request (attention: API keys may have limited amount of accesses per month)</li>
141
                <li>&gt;0: Download after the supplied amount of time (in seconds)</li>
140
                <li>&gt;0: Download after the supplied amount of time (in seconds)</li>
142
        </ul></li>
141
        </ul></li>
143
        <li>Flags: Is a sum of following components:<ul>
142
        <li>Flags: Is a sum of following components:<ul>
144
                <li>CONVERT_DONT_SHOW_ERRORS (1): Don't show errors in a dialog box.</li>
143
                <li>CONVERT_DONT_SHOW_ERRORS (1): Don't show errors in a dialog box.</li>
145
                <li>CONVERT_FALLBACK_TO_CACHE (2): If download failed, use the previous downloaded cache file, even if it is older than MaxAge.</li>
144
                <li>CONVERT_FALLBACK_TO_CACHE (2): If download failed, use the previous downloaded cache file, even if it is older than MaxAge.</li>
146
                <li>CONVERT_USE_SSL (4): Use SSL to download the data. Note that only a paid subscription allows download via SSL.</li>
145
                <li>CONVERT_USE_SSL (4): Use SSL to download the data. Note that only a paid subscription allows download via SSL.</li>
147
                <li>CONVERT_CONFIRM_WEB_ACCESS (8): Ask the user each time the API tries to download from the web.</li>
146
                <li>CONVERT_CONFIRM_WEB_ACCESS (8): Ask the user each time the API tries to download from the web.</li>
148
                <li>CONVERT_NO_INTERACTIVE_API_KEY_INPUT (16): Don't ask the user for an API key in case the API key is missing or invalid.</li>
147
                <li>CONVERT_NO_INTERACTIVE_API_KEY_INPUT (16): Don't ask the user for an API key in case the API key is missing or invalid.</li>
149
        </ul></li>
148
        </ul></li>
150
        <li>HistoricDate:<ul>
149
        <li>HistoricDate:<ul>
151
                <li>0: Use the current exchange data</li>
150
                <li>0: Use the current exchange data</li>
152
                <li>any valid DATE: use an historic exchange</li>
151
                <li>any valid DATE: use an historic exchange</li>
153
        </ul></li>
152
        </ul></li>
154
</ul>
153
</ul>
155
 
154
 
156
<h3>Returns</h3>
155
<h3>Returns</h3>
157
<ul>
156
<ul>
158
        <li>-1 if an error occured</li>
157
        <li>-1 if an error occured</li>
159
        <li>&gt;=0 the amount of money in the target currency</li>
158
        <li>&gt;=0 the amount of money in the target currency</li>
160
</ul>
159
</ul>
161
 
160
 
162
<h2 id="AcceptedCurrencies">AcceptedCurrencies</h2>
161
<h2 id="AcceptedCurrencies">AcceptedCurrencies</h2>
163
 
162
 
164
<h3>Syntax</h3>
163
<h3>Syntax</h3>
165
<h4>Delphi</h4>
164
<h4>Delphi</h4>
166
<pre>function AcceptedCurrencies(WriteTo: LPTSTR; MaxAge: integer; Flags: TVtsCurConvFlags; HistoricDate: TDate): Integer; stdcall;
165
<pre>function AcceptedCurrencies(WriteTo: LPTSTR; MaxAge: integer; Flags: TVtsCurConvFlags; HistoricDate: TDate): Integer; stdcall;
167
function AcceptedCurrenciesW(WriteTo: LPWSTR; MaxAge: integer; Flags: TVtsCurConvFlags; HistoricDate: TDate): Integer; stdcall;
166
function AcceptedCurrenciesW(WriteTo: LPWSTR; MaxAge: integer; Flags: TVtsCurConvFlags; HistoricDate: TDate): Integer; stdcall;
168
function AcceptedCurrenciesA(WriteTo: LPSTR; MaxAge: integer; Flags: TVtsCurConvFlags; HistoricDate: TDate): Integer; stdcall;
167
function AcceptedCurrenciesA(WriteTo: LPSTR; MaxAge: integer; Flags: TVtsCurConvFlags; HistoricDate: TDate): Integer; stdcall;
169
</pre>
168
</pre>
170
<h4>C</h4>
169
<h4>C</h4>
171
<pre>int __stdcall AcceptedCurrenciesW(LPWSTR WriteTo, int MaxAge, CURCONV_FLAGS Flags, DATE HistoricDate);
170
<pre>int __stdcall AcceptedCurrenciesW(LPWSTR WriteTo, int MaxAge, CURCONV_FLAGS Flags, DATE HistoricDate);
172
int __stdcall AcceptedCurrenciesA(LPSTR WriteTo, int MaxAge, CURCONV_FLAGS Flags, DATE HistoricDate);
171
int __stdcall AcceptedCurrenciesA(LPSTR WriteTo, int MaxAge, CURCONV_FLAGS Flags, DATE HistoricDate);
173
</pre>
172
</pre>
174
 
173
 
175
<h3>Description</h3>
174
<h3>Description</h3>
176
<p>Shows a list of available currencies.</p>
175
<p>Shows a list of available currencies.</p>
177
 
176
 
178
<h3>Parameters</h3>
177
<h3>Parameters</h3>
179
<ul>
178
<ul>
180
        <li>WriteTo: A pointer to which the available currencies will be written to. Please reserve at least (NumOfCurrencies*3+1) characters of memory. To query how many currencies are available, please invoke the method once and set this parameter to NULL. All currencies will be appended in the format as defined in ISO-4217. Example: "USDEURCAD\0" will be a list of USD, EUR and CAD.</li>
179
        <li>WriteTo: A pointer to which the available currencies will be written to. Please reserve at least (NumOfCurrencies*3+1) characters of memory. To query how many currencies are available, please invoke the method once and set this parameter to NULL. All currencies will be appended in the format as defined in ISO-4217. Example: "USDEURCAD\0" will be a list of USD, EUR and CAD.</li>
181
        <li>MaxAge: Defines, after which amount of time the exchange data needs to be re-downloaded from the server.<ul>
180
        <li>MaxAge: Defines, after which amount of time the exchange data needs to be re-downloaded from the server.<ul>
182
                <li>-1: Only download once</li>
181
                <li>-1: Only download once</li>
183
                <li>0: Always download, on each request (attention: API keys may have limited amount of accesses per month)</li>
182
                <li>0: Always download, on each request (attention: API keys may have limited amount of accesses per month)</li>
184
                <li>&gt;0: Download after the supplied amount of time (in seconds)</li>
183
                <li>&gt;0: Download after the supplied amount of time (in seconds)</li>
185
        </ul></li>
184
        </ul></li>
186
        <li>Flags: Is a sum of following components:<ul>
185
        <li>Flags: Is a sum of following components:<ul>
187
                <li>CONVERT_DONT_SHOW_ERRORS (1): Don't show errors in a dialog box.</li>
186
                <li>CONVERT_DONT_SHOW_ERRORS (1): Don't show errors in a dialog box.</li>
188
                <li>CONVERT_FALLBACK_TO_CACHE (2): If download failed, use the previous downloaded cache file, even if it is older than MaxAge.</li>
187
                <li>CONVERT_FALLBACK_TO_CACHE (2): If download failed, use the previous downloaded cache file, even if it is older than MaxAge.</li>
189
                <li>CONVERT_USE_SSL (4): Use SSL to download the data. Note that only a paid subscription allows download via SSL.</li>
188
                <li>CONVERT_USE_SSL (4): Use SSL to download the data. Note that only a paid subscription allows download via SSL.</li>
190
                <li>CONVERT_CONFIRM_WEB_ACCESS (8): Ask the user each time the API tries to download from the web.</li>
189
                <li>CONVERT_CONFIRM_WEB_ACCESS (8): Ask the user each time the API tries to download from the web.</li>
191
                <li>CONVERT_NO_INTERACTIVE_API_KEY_INPUT (16): Don't ask the user for an API key in case the API key is missing or invalid.</li>
190
                <li>CONVERT_NO_INTERACTIVE_API_KEY_INPUT (16): Don't ask the user for an API key in case the API key is missing or invalid.</li>
192
        </ul></li>
191
        </ul></li>
193
        <li>HistoricDate:<ul>
192
        <li>HistoricDate:<ul>
194
                <li>0: Use the current exchange data</li>
193
                <li>0: Use the current exchange data</li>
195
                <li>any valid DATE: use an historic exchange</li>
194
                <li>any valid DATE: use an historic exchange</li>
196
        </ul></li>
195
        </ul></li>
197
</ul>
196
</ul>
198
 
197
 
199
<h3>Returns</h3>
198
<h3>Returns</h3>
200
<ul>
199
<ul>
201
        <li>-1 if an error occured</li>
200
        <li>-1 if an error occured</li>
202
        <li>&gt;=0 the number of currencies found/written</li>
201
        <li>&gt;=0 the number of currencies found/written</li>
203
</ul>
202
</ul>
204
 
203
 
205
<h2 id="DownloadNow">DownloadNow</h2>
204
<h2 id="DownloadNow">DownloadNow</h2>
206
 
205
 
207
<h3>Syntax</h3>
206
<h3>Syntax</h3>
208
<h4>Delphi</h4>
207
<h4>Delphi</h4>
209
<pre>function DownloadNow(Flags: TVtsCurConvFlags; HistoricDate: TDate): HRESULT; stdcall;
208
<pre>function DownloadNow(Flags: TVtsCurConvFlags; HistoricDate: TDate): HRESULT; stdcall;
210
</pre>
209
</pre>
211
<h4>C</h4>
210
<h4>C</h4>
212
<pre>HRESULT __stdcall DownloadNow(CURCONV_FLAGS Flags, DATE HistoricDate);
211
<pre>HRESULT __stdcall DownloadNow(CURCONV_FLAGS Flags, DATE HistoricDate);
213
</pre>
212
</pre>
214
 
213
 
215
<h3>Description</h3>
214
<h3>Description</h3>
216
<p>Forces the framework to download the currency table.</p>
215
<p>Forces the framework to download the currency table.</p>
217
 
216
 
218
<h3>Parameters</h3>
217
<h3>Parameters</h3>
219
<ul>
218
<ul>
220
        <li>Flags: Is a sum of following components:<ul>
219
        <li>Flags: Is a sum of following components:<ul>
221
                <li>CONVERT_DONT_SHOW_ERRORS (1): Don't show errors in a dialog box.</li>
220
                <li>CONVERT_DONT_SHOW_ERRORS (1): Don't show errors in a dialog box.</li>
222
                <li>CONVERT_FALLBACK_TO_CACHE (2): If download failed, use the previous downloaded cache file, even if it is older than MaxAge.</li>
221
                <li>CONVERT_FALLBACK_TO_CACHE (2): If download failed, use the previous downloaded cache file, even if it is older than MaxAge.</li>
223
                <li>CONVERT_USE_SSL (4): Use SSL to download the data. Note that only a paid subscription allows download via SSL.</li>
222
                <li>CONVERT_USE_SSL (4): Use SSL to download the data. Note that only a paid subscription allows download via SSL.</li>
224
                <li>CONVERT_CONFIRM_WEB_ACCESS (8): Ask the user each time the API tries to download from the web.</li>
223
                <li>CONVERT_CONFIRM_WEB_ACCESS (8): Ask the user each time the API tries to download from the web.</li>
225
                <li>CONVERT_NO_INTERACTIVE_API_KEY_INPUT (16): Don't ask the user for an API key in case the API key is missing or invalid.</li>
224
                <li>CONVERT_NO_INTERACTIVE_API_KEY_INPUT (16): Don't ask the user for an API key in case the API key is missing or invalid.</li>
226
        </ul></li>
225
        </ul></li>
227
        <li>HistoricDate:<ul>
226
        <li>HistoricDate:<ul>
228
                <li>0: Use the current exchange data</li>
227
                <li>0: Use the current exchange data</li>
229
                <li>any valid DATE: use an historic exchange</li>
228
                <li>any valid DATE: use an historic exchange</li>
230
        </ul></li>
229
        </ul></li>
231
</ul>
230
</ul>
232
 
231
 
233
<h3>Returns</h3>
232
<h3>Returns</h3>
234
<ul>
233
<ul>
235
        <li>S_VTSCONV_OK (0x20000000) if the download was successful.</li>
234
        <li>S_VTSCONV_OK (0x20000000) if the download was successful.</li>
236
        <li>E_VTSCONV_GENERIC_FAILURE (0xA0000000) if an error occured.</li>
235
        <li>E_VTSCONV_GENERIC_FAILURE (0xA0000000) if an error occured.</li>
237
</ul>
236
</ul>
238
 
237
 
239
<hr>
238
<hr>
240
 
239
 
241
<p><i>Last change: 27 Aug 2017</i></p>
240
<p><i>Last change: 27 Aug 2017</i></p>
242
 
241
 
243
</body>
242
</body>
244
 
243
 
245
</html>
244
</html>