-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathisxdl.htm
More file actions
406 lines (353 loc) · 10.8 KB
/
isxdl.htm
File metadata and controls
406 lines (353 loc) · 10.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
body {
font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif;
font-size: 1rem;
margin: 0;
color: #212529;
}
h1 {
font-size: 2rem;
}
h2 {
font-size: 1.75rem;
}
h3 {
font-size: 1.5rem;
font-weight: normal;
}
h3 {
margin: 0.5rem 0;
}
ul {
margin: 0.3rem 0;
}
pre {
background-color: #F0F0F0;
padding: 4px;
}
hr {
color: #000000;
height: 1px;
}
.container {
max-width: 1140px;
margin: 0 auto;
padding: 0px 20px;
}
footer {
text-align: center;
margin-top: 20px;
padding: 20px;
background-color: #F0F0F0;
border-top: 1px solid #bba9a9;
}
a {
color: #0000FF;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
.border-bottom {
border-bottom: 1px solid #dee2e6;
padding-bottom: 6px;
}
header {
background: #185886;
color: #bcdef5;
padding: 16px 0;
text-align: center;
font-size: 2rem;
font-weight: bold;
}
pre {
background-color: #F0F0F0;
padding: 8px 20px;
border-left: 4px solid #04AA6D;
font-size: 1rem;
overflow: auto;
font-family: monospace;
margin-left: 40px;
tab-size: 4;
}
dt {
font-style: italic;
}
.ml-40 {
margin-left: 40px;
}
table {
border-collapse: collapse;
width: 100%;
}
td, th {
border: 1px solid #dddddd;
text-align: left;
padding: 8px;
}
</style>
<title>IS Download DLL Documentation</title>
</head>
<body>
<header>
<div class="container">
Download DLL
</div>
</header>
<main class="container">
<h1 class="border-bottom">About</h1>
<p>
IS Download DLL is a "plugin" for <a href="https://www.innosetup.com/" title="by Jordan Russell and Martijn Laan">Inno Setup</a>
that allows you to download files from the Internet during the installation process.
</p>
<p>
Primarily written to be used from Inno Setup,
but can be used by any software that can call DLL's. If you have the declarations needed for
VB or other languages, please send them to me to include them on this page.
</p>
<h2 class="border-bottom">Exported Functions</h2>
<ul>
<li><a href="#isxdl_download">isxdl_Download</a></li>
<li><a href="#isxdl_addfile">isxdl_AddFile</a></li>
<li><a href="#isxdl_addfilesize">isxdl_AddFileSize</a></li>
<li><a href="#isxdl_downloadfiles">isxdl_DownloadFiles</a></li>
<li><a href="#isxdl_clearfiles">isxdl_ClearFiles</a></li>
<li><a href="#isxdl_isconnected">isxdl_IsConnected</a></li>
<li><a href="#isxdl_setoption">isxdl_SetOption</a></li>
<li><a href="#isxdl_getfilename">isxdl_GetFileName</a></li>
</ul>
<h2 class="border-bottom">Definitions for Inno Setup Pascal Scripting</h2>
<pre>
function isxdl_Download(hWnd: Integer; URL, Filename: String): Integer;
external 'isxdl_Download@files:isxdl.dll stdcall';
procedure isxdl_AddFile(URL, Filename: String);
external 'isxdl_AddFile@files:isxdl.dll stdcall';
procedure isxdl_AddFileSize(URL, Filename: String; Size: Cardinal);
external 'isxdl_AddFileSize@files:isxdl.dll stdcall';
function isxdl_DownloadFiles(hWnd: Integer): Integer;
external 'isxdl_DownloadFiles@files:isxdl.dll stdcall';
procedure isxdl_ClearFiles;
external 'isxdl_ClearFiles@files:isxdl.dll stdcall';
function isxdl_IsConnected: Integer;
external 'isxdl_IsConnected@files:isxdl.dll stdcall';
function isxdl_SetOption(Option, Value: String): Integer;
external 'isxdl_SetOption@files:isxdl.dll stdcall';
function isxdl_GetFileName(URL: String): String;
external 'isxdl_GetFileName@files:isxdl.dll stdcall';
</pre>
<h2 class="border-bottom">Definitions for Visual Basic</h2>
<pre>
Public Declare Function isxdl_Download Lib "isxdl.dll" _
(ByVal ihWnd As Integer, ByVal strURL As String, ByVal strFilename As String) As Integer
Public Declare Function isxdl_AddFile Lib "isxdl.dll" _
(ByVal strURL As String, ByVal strFilename As String) As Integer
Public Declare Function isxdl_AddFileSize Lib "isxdl.dll" _
(ByVal strURL As String, ByVal strFilename As String, ByVal lngSize As Long) As Integer
Public Declare Function isxdl_DownloadFiles Lib "isxdl.dll" _
(ByVal ihWnd As Integer) As Integer
Public Declare Sub isxdl_ClearFiles Lib "isxdl.dll" ()
Public Declare Function isxdl_IsConnected Lib "isxdl.dll" () As Integer
Public Declare Function isxdl_SetOption Lib "isxdl.dll" _
(ByVal strOption As String, ByVal strValue As String) As Integer
Public Declare Function isxdl_GetFileName Lib "isxdl.dll" _
(ByVal strRL As String) As String
</pre>
<h2 class="border-bottom">Definitions for C++</h2>
<pre>
extern "C" {
int isxdl_Download(HWND hWndParent, LPCWSTR pszURL, LPCWSTR pszFileName);
void isxdl_AddFile(LPCWSTR pszURL, LPCWSTR pszFileName);
void isxdl_AddFileSize(LPCWSTR pszURL, LPCWSTR pszFileName, DWORD dwSize);
int isxdl_DownloadFiles(HWND hWndParent);
void isxdl_ClearFiles(void);
int isxdl_IsConnected(void);
int isxdl_SetOption(LPCWSTR pszOption, LPCWSTR pszValue);
LPCWSTR isxdl_GetFileName(LPCWSTR pszURL);
};</pre>
<h2 id="isxdl_download" class="border-bottom">isxdl_Download</h2>
<p>
Immediately downloads a file from the Internet.
</p>
<h3>Syntax</h3>
<pre>
int isxdl_Download(
HWND hWndParent,
LPCWSTR pszURL,
LPCWSTR pszFileName
);</pre>
<h3>Parameters</h3>
<ol>
<dt>hWndParent</dt>
<dd>Handle to parent window.</dd>
<dt>pszURL</dt>
<dd>The URL to be downloaded.</dd>
<dt>pszFileName</dt>
<dd>The name of the file on the local machine.</dd>
</ol>
<h3>Return Value</h3>
<p class="ml-40">
Returns 1 if all files where downloaded successfully, otherwise 0.
</p>
<h2 id="isxdl_addfile" class="border-bottom">isxdl_AddFile</h2>
<p>
Adds a file to the internal file list.
</p>
<h3>Syntax</h3>
<pre>
void isxdl_AddFile(
LPCWSTR pszURL,
LPCWSTR pszFileName
);</pre>
<h3>Parameters</h3>
<ol>
<dt>pszURL</dt>
<dd>The URL to be downloaded.</dd>
<dt>pszFileName</dt>
<dd>The name of the file on the local machine.</dd>
</ol>
<h3>Return Value</h3>
<p class="ml-40">
Returns nothing.
</p>
<h3>Remarks</h3>
<p class="ml-40">
To access a url with basic password protection, enter something like
<em>http://username:password@www.domain.com/path/page.html</em> as url.
</p>
<h2 id="isxdl_addfilesize" class="border-bottom">isxdl_AddFileSize</h2>
<p>
Adds a file to the internal file list, and tells how big the file is. Use this if you know
the size of the file, and know that it will not change. Means that the DLL won't have to
find the size, which can take some time if you have many files to download.
</p>
<h3>Syntax</h3>
<pre>
void isxdl_AddFileSize(
LPCWSTR pszURL,
LPCWSTR pszFileName,
DWORD dwSize
); </pre>
<h3>Parameters</h3>
<ol>
<dt>pszURL</dt>
<dd>The URL to be downloaded.</dd>
<dt>pszFileName</dt>
<dd>The name of the file on the local machine.</dd>
<dt>dwSize</dt>
<dd>The size of the file.</dd>
</ol>
<h3>Return Value</h3>
<p class="ml-40">
Returns nothing.
</p>
<h2 id="isxdl_downloadfiles" class="border-bottom">isxdl_DownloadFiles</h2>
<p>
Downloads all files added with <a href="#isxdl_addfile">isxdl_AddFile</a> or
<a href="#isxdl_addfilesize">isxdl_AddFileSize</a>.
</p>
<h3>Syntax</h3>
<pre>
int isxdl_DownloadFiles(
HWND hWndParent
);</pre>
<h3>Parameters</h3>
<ol>
<dt>hWndParent</dt>
<dd>Handle to the parent window.</dd>
</ol>
<h3>Return Value</h3>
<p class="ml-40">
Returns 1 if all files where downloaded successfully, otherwise 0.
</p>
<h2 id="isxdl_clearfiles" class="border-bottom">isxdl_ClearFiles</h2>
<p>
Clears the internal file list. Shouldn't be necessary since files will be removed
as they are successfully downloaded.
</p>
<h3>Syntax</h3>
<pre>
void isxdl_ClearFiles();</pre>
<h3>Return Value</h3>
<p class="ml-40">
Returns nothing.
</p>
<h2 id="isxdl_isconnected" class="border-bottom">isxdl_IsConnected</h2>
<p>
Tells wether the computer is connected to the Internet or not. This is kind
of experimental, and very little tested.
</p>
<h3>Syntax</h3>
<pre>
int isxdl_IsConnected();</pre>
<h3>Return Value</h3>
<p class="ml-40">
Returns 1 if connected to the Internet, otherwise it returns 0.
</p>
<h2 id="isxdl_setoption" class="border-bottom">isxdl_SetOption</h2>
<p>
Set various options.
</p>
<h3>Syntax</h3>
<pre>
int isxdl_SetOption(
LPCWSTR pszOption,
LPCWSTR pszValue
);</pre>
<h3>Parameters</h3>
<ol>
<dt>pszOption</dt>
<dd>The option to be modified.</dd>
<dt>pszValue</dt>
<dd>The value of the option. Note that this must always be given as a string.</dd>
</ol>
<h3>Return Value</h3>
<p class="ml-40">
Returns 1 if the option was set successfully. Returns 0 if the option was unknown, or
the option could not be set.
</p>
<h3>Remarks</h3>
<div class="ml-40">
Currently these options can be set:
<table border="1" cellpadding="5" cellspacing="0">
<tr><th><b>Option</b></th><th><b>Value</b></th></tr>
<tr><td>title</td><td>The title to use for the download window.</td></tr>
<tr><td>debug</td><td>Not used. Valid values are "true" and "false".</td></tr>
<tr><td>simple</td><td>Turns on simple mode if the value is a string, turns off simple mode if the value is an empty string.</td></tr>
<tr><td>label</td><td>Text for header label.</td></tr>
<tr><td>description</td><td>Text for header description.</td></tr>
<tr><td>language</td><td>Language file to get texts from.</td></tr>
<tr><td>resume</td><td>Tell it to use resume. Default is true. (Disabled.)</td></tr>
<tr><td>smallwizardimage</td><td>The image to display if you want something other than the default.</td></tr>
</table>
</div>
<h2 id="isxdl_getfilename" class="border-bottom">isxdl_GetFileName</h2>
<p>
Get the real file name of a downloaded file. The URL to download ISTool is
'http://www.istool.org/getistool.aspx', and before downloading isxdl_GetFileName
returns 'getistool.aspx'. After downloading, the result will be 'istool-5.0.6.1.exe'.
</p>
<h3>Syntax</h3>
<pre>
LPCWSTR GetFileName(
LPCWSTR pszURL
);</pre>
<h3>Parameters</h3>
<ol>
<dt>pszURL</dt>
<dd>The URL to get the file name for.</dd>
</ol>
<h3>Return Value</h3>
<p class="ml-40">
Returns the file name if the URL was found, otherwise returns NULL.
</p>
</main>
<footer>
Copyright © 2002-2009 Bjørnar Henden
</footer>
</body>
</html>