1 #ifndef __UNACEDEF_H_BY_K_INABA__
2 #define __UNACEDEF_H_BY_K_INABA__
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
8 //様様様様様様様様=====--- Part 1: different structures ---====様様様様様様様
9 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
10
11 //---------------------------------------------------------------------------
12 //
13 // Here in different structures used at callback functions and
14 // ACE.DLL functions are declared.
15 //
16 //---------------------------------------------------------------------------
17 //
18 // Contents:
19 // Part 1.1: structures used in callback structures
20 // Part 1.2: structures used in function structures
21 //
22 //---------------------------------------------------------------------------
23
24
25 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
26 //========--- Part 1.1: structures used in callback structures ---=========
27 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
28
29 //陳陳陳陳陳陳陳陳陳陳陳 comment buffer structure 陳陳陳陳陳陳陳陳陳陳陳
30 // Used in tACEGlobalDataStruc. Application has to specify where the
31 // comment is or should be stored.
32 //-------------------------------------------------------------------------
33
34 typedef struct sACECommentStruc
35 {
36 LPSTR Buf; // area where the comments are stored
37 // by the application or by the Dll
38 // comments must be zero-terminated
39 ULONG BufSize; // size of this area
40 ULONG State; // state of comment - see ACE_COMMENT
41 // constants below
42 } tACECommentStruc,
43 *pACECommentStruc;
44
45
46 //-----------------------------------------------------------------------
47 // Defines for the tACECommentStruc.State field, which tells about
48 // the result of the last comment extraction.
49 //-----------------------------------------------------------------------
50
51 #define ACE_COMMENT_OK 0 // comment extraction went fine
52
53 #define ACE_COMMENT_SMALLBUF 1 // comment buffer too small to
54 // store the whole comment in
55
56 #define ACE_COMMENT_NONE 255 // No comment present
57
58
59 //陳陳陳陳陳陳陳陳陳陳陳 global data structure 陳陳陳陳陳陳陳陳陳陳陳陳
60 // This structure contains information for the Dll being interesting for
61 // nearly all functions. The Dll has to be initialized with this
62 // structure passed to tACEInitDll(). This structure is also passed
63 // by the callback functions.
64 //-------------------------------------------------------------------------
65
66 //---------------------------------------------------------------
67 // Forward declarations of callback function parameters
68 // used in this structure.
69 //---------------------------------------------------------------
70
71 typedef union sACEInfoCallbackProcStruc
72 *pACEInfoCallbackProcStruc;
73
74 typedef union sACEErrorCallbackProcStruc
75 *pACEErrorCallbackProcStruc;
76
77 typedef union sACERequestCallbackProcStruc
78 *pACERequestCallbackProcStruc;
79
80 typedef union sACEStateCallbackProcStruc
81 *pACEStateCallbackProcStruc;
82
83
84 typedef struct sACEGlobalDataStruc
85 {
86 //------------------------ fields for ACE and UnACE -------------------
87
88 void *Obj; // ---- reserved for application! ----
89 // thought to be used as a pointer to
90 // an object; when a callback-function is
91 // called, the object pointer can be used to
92 // handle the callback in a specific way;
93 // the pointer has to be initialized by
94 // ACEInitDll()
95
96 ULONG MaxArchiveTestBytes;
97
98 // how many bytes of a file should be
99 // looked upon at archive header search?
100
101 ULONG MaxFileBufSize;
102
103 // maximum buffer size for buffered
104 // I/O operations
105
106 tACECommentStruc // used to exchange comment data
107 Comment; // between application and Dll
108 // using callback functions
109
110 LPSTR DecryptPassword;
111
112 // the DecryptPassword specified at
113 // ACEInitDll() is overwritten by the
114 // DecryptPassword field of tACEAddStruc and
115 // other function-specific structures;
116 // but this field can be used to change the
117 // password at callback function calls
118
119 BOOL UseVBStructures; // passes structures to callback functions
120 // much better suited for Visual Basic
121
122 CHAR Reserved1[60]; // has to be filled with zeros
123
124 //--------------------------- fields for ACE only ---------------------
125
126 LPSTR EncryptPassword;
127
128 // things stated at the description of the
129 // DecryptPassword field apply here as well
130
131
132 LPSTR TempDir; // directory to save temporary archive
133
134 //-------- registration (ACE DLLs only, but not used at ACL) ----------
135
136 LPSTR KeyPath; // necessary for reading and writing key file
137
138 LPSTR UserAV; // Dll returns the AV string (if registered)
139 // in this field
140
141 LPSTR IsGeneralKey; // DLL returns the key, if it is a general key
142
143 HWND OwnerWindow; // specifies the applications window to be
144 // parent of the registration reminder dialog
145
146 //--------------------------- fields for ACE only ---------------------
147
148 ULONG CompressionLevel;
149 // contains the currently used compression
150 // level - may be changed during compression
151 // operation
152
153 CHAR Reserved2[56]; // has to be filled with zeros
154
155
156 //---------------------- callback functions (ACE and UnACE) ----------
157
158 INT (__stdcall *InfoCallbackProc)
159 (pACEInfoCallbackProcStruc Info);
160
161 // Informs application about details like the
162 // creation of a temporary archive.
163 // See ACE_CALLBACK_INFO definitions for
164 // more information.
165
166 INT (__stdcall *ErrorCallbackProc)
167 (pACEErrorCallbackProcStruc Error);
168
169 // Called to let the application know about
170 // errors. The Code field of Error will
171 // contain an ACE_CALLBACK_ERROR value.
172
173 INT (__stdcall *RequestCallbackProc)
174 (pACERequestCallbackProcStruc Request);
175
176 // Called to let the application know about
177 // requests for data. Code will contain an
178 // ACE_CALLBACK_REQUEST value.
179
180 INT (__stdcall *StateCallbackProc)
181 (pACEStateCallbackProcStruc State);
182
183 // Called to let the application know about
184 // the progress of operations.
185
186
187 //-------------------------- different new fields ---------------------
188 CHAR Reserved3[64]; // has to be filled with zeros
189 } tACEGlobalDataStruc,
190 *pACEGlobalDataStruc;
191
192
193 //陳陳陳陳陳陳陳陳陳陳陳 archive data structure 陳陳陳陳陳陳陳陳陳陳陳陳
194 // Informs the callback functions about the current archive, its volume
195 // number, the archive-flags (see ACE_FLAG constants), the creation host
196 // system (see ACE_HOST constants) and the AV if present in archive.
197 // Also used at ACEReadArchiveData().
198 //-------------------------------------------------------------------------
199
200 typedef struct sACEArchiveDataStruc
201 {
202 LPSTR ArchiveName;
203 ULONG VolumeNumber,
204 Flags, // see ACE_ARCFLAG defines below
205 HostCreated, // see ACE_HOST defines below
206 TimeCreated, // in MS-DOS format
207 VersionCreated,
208 VersionExtract; // version needed to extract files
209 LPSTR AV; // not used in ACL
210 CHAR Reserved[64]; // filled with zeros
211 } tACEArchiveDataStruc,
212 *pACEArchiveDataStruc;
213
214
215 //-----------------------------------------------------------------------
216 // Flag constants for tACEArchiveDataStruc.Flags field.
217 //-----------------------------------------------------------------------
218
219 #define ACE_ARCFLAG_MAINCOMMENT 2
220 #define ACE_ARCFLAG_SFX 512
221 #define ACE_ARCFLAG_LIMITSFXJR 1024 // is an SFX archive
222 // that supports 256k
223 // dictionary only
224 #define ACE_ARCFLAG_MULTIVOLUME 2048
225 #define ACE_ARCFLAG_AV 4096 // not used in ACL
226 #define ACE_ARCFLAG_RECOVERYREC 8192
227 #define ACE_ARCFLAG_LOCK 16384
228 #define ACE_ARCFLAG_SOLID 32768
229
230
231 //-----------------------------------------------------------------------
232 // Host system used to create an archive. Used at
233 // tACEArchiveDataStruc.HostCreated field.
234 //-----------------------------------------------------------------------
235
236 #define ACE_HOST_MSDOS 0 // archive created by
237 // MSDOS ACE archiver
238 #define ACE_HOST_OS2 1 // created by OS2 ACE
239 #define ACE_HOST_WIN32 2 // created by Win32 ACE
240
241
242 //陳陳陳陳陳陳陳陳陳陳陳陳 file data structure 陳陳陳陳陳陳陳陳陳陳陳陳陳
243 // Contains information about an archived file.
244 //-------------------------------------------------------------------------
245
246 typedef struct sACEFileDataStruc
247 {
248 LPSTR SourceFileName; // relative file name
249 LPSTR DestinationFileName; // absolute file name;
250 // valid for add and extract only!
251 ULONG Flags, // see ACE_FILEFLAG defines below
252 CRC32,
253 Method, // 0=stored, 1=LZ77, 2=V20Compression
254 Dictionary; // DictionarySize = 2^Dictionary
255 DWORDLONG
256 CompressedSize,
257 Size;
258 ULONG Time,
259 Attributes;
260 CHAR Reserved[64]; // filled with zeros
261 } tACEFileDataStruc,
262 *pACEFileDataStruc;
263
264
265 //-----------------------------------------------------------------------
266 // Flag constants for the tACEFileData.Flags field.
267 //-----------------------------------------------------------------------
268
269 #define ACE_FILEFLAG_FILECOMMENT 2 // file has comment
270 #define ACE_FILEFLAG_SPLITBEFORE 4096 // continued from
271 // previous volume
272 #define ACE_FILEFLAG_SPLITAFTER 8192 // continued on
273 // next volume
274 #define ACE_FILEFLAG_PASSWORD 16384 // is encrypted
275 #define ACE_FILEFLAG_SOLID 32768 // uses data of previous
276 // files (solid mode)
277
278
279 //陳陳陳陳陳陳陳陳陳陳陳陳 copy info structure 陳陳陳陳陳陳陳陳陳陳陳陳陳
280 // Is passed to ACEInfoCallbackProc with ACE_CALLBACK_INFO_COPY as code.
281 // Informs application about the progress of copying either an archive to
282 // a temporary archive, or a temporary archive back to a normal archive.
283 //-------------------------------------------------------------------------
284
285 typedef struct sACECopyInfoStruc
286 {
287 LPSTR SourceFileName, // source file
288 DestinationFileName; // the file copying the source to
289 DWORDLONG
290 CopiedBytes, // bytes already copied
291 FileSize; // source file size
292 CHAR Reserved[64]; // filled with zeros
293 } tACECopyInfoStruc,
294 *pACECopyInfoStruc;
295
296
297 //陳陳陳陳陳陳陳陳陳陳 operation progress structure 陳陳陳陳陳陳陳陳陳陳
298 // Used to state the progress of the current operation.
299 //-------------------------------------------------------------------------
300
301 typedef struct sACEProgressDataStruc
302 {
303 LPSTR Addr; // address of uncompressed data block
304 ULONG Size; // size of uncompressed data block
305 DWORDLONG TotalProcessedSize; // counted by Dll:
306 // total uncompressed bytes processed
307 DWORDLONG TotalCompressedSize;// total compressed bytes processed
308 DWORDLONG TotalSize; // total uncompressed bytes to process
309 // (sum of all original file sizes)
310 DWORDLONG FileProcessedSize; // uncompr. bytes of file processed
311 DWORDLONG FileCompressedSize; // compr. bytes of file processed
312 DWORDLONG FileSize; // uncompressed file size
313 } tACEProgressDataStruc,
314 *pACEProgressDataStruc;
315
316
317 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
318 //========--- Part 1.2: structures used in function structures ---=========
319 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
320
321 //陳陳陳陳陳陳陳陳陳陳陳陳 file list structure 陳陳陳陳陳陳陳陳陳陳陳陳
322 // This structure is used in the function specific structures.
323 // The application has to use this structure to indicate which files
324 // have to be processed by the DLL.
325 //-------------------------------------------------------------------------
326
327 typedef struct sACEFilesStruc
328 {
329 LPSTR SourceDir; // maybe a real or an archive directory
330 LPSTR FileList; // pointer to list of files to process;
331 // zero-terminated; files have to be
332 // separated by carriage-return (0xd);
333 // FileList may/will be modified by the
334 // Dll; if nothing is specified, "*"
335 // will be used
336 // (attention at ACEDelete!!)
337 LPSTR ExcludeList; // list of files to exclude from process
338 BOOL FullMatch; // specifications must fully match
339 // (no files with the same name in
340 // subdirs are processed)
341 BOOL RecurseSubDirs; // recurse subdirectories
342 // (valid for add operations only)
343 CHAR Reserved[60] ; // has to be filled with zeros
344 // for future: possibly in-/excluding
345 // file attributes and date/time range
346 } tACEFilesStruc,
347 *pACEFilesStruc;
348
349
350 //陳陳陳陳陳陳陳陳陳陳 V2.0 compression structure 陳陳陳陳陳陳陳陳陳陳陳
351 // Specifies whether to use v2.0 compression or not. If you use v2.0
352 // compression you can also specify which v2.0 compression techniques
353 // you want to use. (ACE only)
354 //-------------------------------------------------------------------------
355
356 typedef struct sACEV20CompressionStruc
357 {
358 BOOL DoUse, // if DoUse=1 and all other fields are
359 DoUseDelta, // zero, then all v2.0 compression
360 DoUseExe, // techniques will be used
361 DoUsePic,
362 DoUseSound;
363 CHAR Reserved[64]; // has to be filled with zeros
364 } tACEV20CompressionStruc,
365 *pACEV20CompressionStruc;
366
367
368 //陳陳陳陳陳陳陳陳陳 compression parameter structure 陳陳陳陳陳陳陳陳陳
369 // Used in tACEAddStruc and tACEDeleteStruc. (ACE only)
370 //-------------------------------------------------------------------------
371
372 typedef struct sACECompressParamsStruc
373 {
374 ULONG Level, // see ACE_LEVEL constants below
375 Dictionary; // 15(32k)..22(4Mb)
376
377 tACEV20CompressionStruc // indicates if (or which) v2.0
378 V20Compression; // compression techniques shall be used
379
380 BOOL TestAfter; // make a test for CRC check errors
381 // after compression
382 CHAR Reserved[64]; // has to be filled with zeros
383 } tACECompressParamsStruc,
384 *pACECompressParamsStruc;
385
386
387 //-----------------------------------------------------------------------
388 // Tells the Dll which compression level to use. (ACE only)
389 //-----------------------------------------------------------------------
390
391 #define ACE_LEVEL_STORE 0 // save file only; do not compress
392 #define ACE_LEVEL_FASTEST 1 // compress very fast
393 #define ACE_LEVEL_FAST 2 // compress fast
394 #define ACE_LEVEL_NORMAL 3 // good compromise between speed and
395 // compression rate
396 #define ACE_LEVEL_GOOD 4 // achieves good compression
397 #define ACE_LEVEL_BEST 5 // best compression; bit slow
398
399
400 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
401 //様様様様様=====--- Part 2: ACE.DLL callback declarations ---====様様様様様
402 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
403
404 //---------------------------------------------------------------------------
405 //
406 // ACE.DLL makes use of four callback functions to exchange data
407 // with the application:
408 //
409 // 1) InfoCallbackProc (pACEInfoCallbackProcStruc Info)
410 // 2) ErrorCallbackProc (pACEErrorCallbackProcStruc Error)
411 // 3) RequestCallbackProc(pACERequestCallbackProcStruc Request)
412 // 4) StateCallbackProc (pACEStateCallbackProcStruc State)
413 //
414 // Meaning of different callback types:
415 // Info - lets the application know about actions that take some
416 // time but are not essential
417 // (Code is one of ACE_CALLBACK_INFO constants)
418 // Error - an error occured; if the reason for this error can
419 // be solved by the application then the Dll can continue
420 // the current operation, otherwise the operation has to
421 // be canceled
422 // (Code is one of ACE_CALLBACK_ERROR constants)
423 // Request - the Dll needs some user input
424 // for ex.: "Overwrite file? (yes/no/cancel)"
425 // (Code is one of ACE_CALLBACK_REQUEST constants)
426 // State - Dll informs application about the progress of an operation
427 // (Code is one of ACE_CALLBACK_STATE constants)
428 //
429 // The pointers to the callback functions has to be set by the application
430 // when calling ACEInitDll(). If the application does not install
431 // a callback function, is has set the corresponding pointer to NULL.
432 // If the ACE.DLL has to call the Error or Request callback function
433 // and they are not installed, the ACE.DLL will cancel the operation.
434 //
435 // The application has the possibility to cancel the current operation
436 // at each callback function call. So if the user clicks on a Cancel-button,
437 // the application should return ACE_CALLBACK_RETURN_CANCEL at the next
438 // callback function call.
439 //
440 // All callback function parameters are declared as unions.
441 // The StructureType field contains he type of the structure which is used.
442 // When the application knows which type of structure it has to use,
443 // it will have to interpret the Code field to get to know the reason
444 // for the callback function call.
445 //
446 //---------------------------------------------------------------------------
447 //
448 // Contents:
449 // Part 2.1: operation types
450 // Part 2.2: callback function return codes
451 // Part 2.3: callback structure types
452 // Part 2.4: callback structures
453 // Part 2.5: info callback function
454 // Part 2.6: error callback function
455 // Part 2.7: request callback function
456 // Part 2.8: state callback function
457 //
458 //---------------------------------------------------------------------------
459
460
461 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
462 //=====================--- Part 2.1: operation codes ---===================
463 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
464 // Passed to callback functions indicating the current operation.
465 //-------------------------------------------------------------------------
466
467 #define ACE_CALLBACK_OPERATION_LIST 0
468 #define ACE_CALLBACK_OPERATION_TEST 1
469 #define ACE_CALLBACK_OPERATION_ANALYZE 2
470 #define ACE_CALLBACK_OPERATION_EXTRACT 3
471 #define ACE_CALLBACK_OPERATION_ADD 4
472 #define ACE_CALLBACK_OPERATION_REPACK 5
473 #define ACE_CALLBACK_OPERATION_DELETE 6
474 #define ACE_CALLBACK_OPERATION_REPAIR 7 // repair without
475 // recovery record
476 #define ACE_CALLBACK_OPERATION_SETCMT 8
477 #define ACE_CALLBACK_OPERATION_ENCRYPT 9
478 #define ACE_CALLBACK_OPERATION_KEEP 10 // file is to be
479 // taken along
480 // without recompress
481 #define ACE_CALLBACK_OPERATION_RECOVER 11 // begin of
482 // recovering archive
483 // by recovery record
484 #define ACE_CALLBACK_OPERATION_HEADSEARCH 12 // begin of searching
485 // for file headers
486 #define ACE_CALLBACK_OPERATION_RECRECSEARCH 13 // begin of searching
487 // for recovery record
488 #define ACE_CALLBACK_OPERATION_ADDSFX 14
489 #define ACE_CALLBACK_OPERATION_LOCK 15
490 #define ACE_CALLBACK_OPERATION_ADDAV 16 // not used in ACL
491 #define ACE_CALLBACK_OPERATION_ADDRECOVREC 17
492 #define ACE_CALLBACK_OPERATION_REGISTER 18 // not used in ACL
493
494
495 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
496 //=============--- Part 2.2: callback function return codes ---============
497 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
498 // One of these result codes has to be returned by the application-based
499 // callback functions.
500 //---------------------------------------------------------------------------
501
502 #define ACE_CALLBACK_RETURN_OK 0 // also "yes" at
503 // requests
504 #define ACE_CALLBACK_RETURN_NO 1 // no, do not/
505 // do not retry
506 #define ACE_CALLBACK_RETURN_CANCEL 2 // abort operation
507
508
509 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
510 //================--- Part 2.3: callback structure types ---===============
511 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
512 // States of which type the passed structure is when a callback function
513 // is called. The type is written to the StructureType field.
514 //---------------------------------------------------------------------------
515
516 #define ACE_CALLBACK_TYPE_GLOBAL 0x0
517
518 // type of structure is
519 // tACECallbackGlobalStruc
520 //-------------------------------------------------------------
521 // callback function | codes using this structure
522 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
523 // InfoCallbackProc | ACE_CALLBACK_INFO_GENERALKEY // not used in ACL
524 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
525 // ErrorCallbackProc | ACE_CALLBACK_ERROR_MEMORY // fr ManyFilesError und ExtractMem andere Codes verwenden!?
526 // | ACE_CALLBACK_ERROR_REGISTER // not used in ACL
527 // | ACE_CALLBACK_ERROR_READKEY // not used in ACL
528 // | ACE_CALLBACK_ERROR_WRITEKEY // not used in ACL
529 // | ACE_CALLBACK_ERROR_NOWINACEKEY // not used in ACL
530 // | ACE_CALLBACK_ERROR_NOACTIVEACEKEY // not used in ACL
531 // | ACE_CALLBACK_ERROR_UNCSPACE // wird noch nicht verwendet!
532 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
533 // RequestCallbackProc | ACE_CALLBACK_REQUEST_REGISTER // not used in ACL
534 //
535
536
537 #define ACE_CALLBACK_TYPE_ARCHIVE 0x1
538
539 // type of structure is
540 // tACECallbackArchiveStruc
541 //-------------------------------------------------------------
542 // callback function | codes using this structure
543 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
544 // InfoCallbackProc | ACE_CALLBACK_INFO_TMPARCCREATE
545 // | ACE_CALLBACK_INFO_TMPARCCREATEEND
546 // | ACE_CALLBACK_INFO_ADDRECREC
547 // | ACE_CALLBACK_INFO_ADDRECRECEND
548 // | ACE_CALLBACK_INFO_RECREC
549 // | ACE_CALLBACK_INFO_NORECREC
550 // | ACE_CALLBACK_INFO_RECOVERED
551 // | ACE_CALLBACK_INFO_NODAMAGE
552 // | ACE_CALLBACK_INFO_FNDMAINHEAD
553 // | ACE_CALLBACK_INFO_FILELISTCREATE
554 // | ACE_CALLBACK_INFO_FILELISTCREATEEND
555 // | ACE_CALLBACK_INFO_FILESORT
556 // | ACE_CALLBACK_INFO_FILESORTEND
557 // | ACE_CALLBACK_INFO_COPYEND
558 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
559 // ErrorCallbackProc | ACE_CALLBACK_ERROR_MODIFYVOLUME
560 // | ACE_CALLBACK_ERROR_MODIFYLOCKEDARCHIVE
561 // | ACE_CALLBACK_ERROR_AV // not used in ACL
562 // | ACE_CALLBACK_ERROR_TOODAMAGED
563 // | ACE_CALLBACK_ERROR_ARCHIVEEXISTS
564 // | ACE_CALLBACK_ERROR_OPENREPAIRARCHIVE
565 // | ACE_CALLBACK_ERROR_OPENARCHIVEREAD
566 // | ACE_CALLBACK_ERROR_OPENARCHIVEWRITE
567 // | ACE_CALLBACK_ERROR_READARCHIVE
568 // | ACE_CALLBACK_ERROR_WRITEARCHIVE
569 // | ACE_CALLBACK_ERROR_ALREADYSFX
570 // | ACE_CALLBACK_ERROR_ADDSFXTOVOLUME
571 // | ACE_CALLBACK_ERROR_ARCHIVEBROKEN
572 // | ACE_CALLBACK_ERROR_ARCHIVESAVE
573 // | ACE_CALLBACK_ERROR_NOFILES
574 // | ACE_CALLBACK_ERROR_ISNOTANARCHIVE
575 // | ACE_CALLBACK_ERROR_TEMPDIRCREATE
576 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
577 // RequestCallbackProc | ACE_CALLBACK_REQUEST_MARKASSOLID
578 // | ACE_CALLBACK_REQUEST_CHANGEVOLUME
579 // | ACE_CALLBACK_REQUEST_ARCHIVEEXISTS
580 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
581 // StateCallbackProc | ACE_CALLBACK_STATE_STARTARCHIVE
582 //
583
584
585 #define ACE_CALLBACK_TYPE_ARCHIVEDFILE 0x2
586
587 // type of structure is
588 // tACECallbackArchivedFileStruc
589 //-------------------------------------------------------------
590 // callback function | codes using this structure
591 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
592 // InfoCallbackProc | ACE_CALLBACK_INFO_TMPARCCREATE
593 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
594 // ErrorCallbackProc | ACE_CALLBACK_ERROR_CREATIONNAMEINUSE
595 // | ACE_CALLBACK_ERROR_HIGHERVERSION
596 // | ACE_CALLBACK_ERROR_ENCRYPTIONCRC
597 // | ACE_CALLBACK_ERROR_WRITE
598 // | ACE_CALLBACK_ERROR_READ
599 // | ACE_CALLBACK_ERROR_OPENREAD
600 // | ACE_CALLBACK_ERROR_OPENWRITE //wird noch gar nich benutzt?? sollte aber - bei extract!
601 // | ACE_CALLBACK_ERROR_FILENAMETOOLONG
602 // | ACE_CALLBACK_ERROR_REPACKCRC
603 // | ACE_CALLBACK_ERROR_EXCLUDEPATH
604 // | ACE_CALLBACK_ERROR_METHOD
605 // | ACE_CALLBACK_ERROR_EXTRACTSPACE
606 // | ACE_CALLBACK_ERROR_CREATION
607 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
608 // RequestCallbackProc | ACE_CALLBACK_REQUEST_OVERWRITE
609 // | ACE_CALLBACK_REQUEST_DELETEARCHIVEDSYSFILE
610 // | ACE_CALLBACK_REQUEST_ADDBROKENFILE
611 // | ACE_CALLBACK_REQUEST_PASSWORD
612 // | ACE_CALLBACK_REQUEST_OVERWRITESYSFILE
613 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
614 // StateCallbackProc | ACE_CALLBACK_STATE_STARTFILE
615 // | ACE_CALLBACK_STATE_ENDNOCRCCHECK
616 //
617
618
619 #define ACE_CALLBACK_TYPE_REALFILE 0x3
620
621 // type of structure is
622 // tACECallbackRealFileStruc
623 //-------------------------------------------------------------
624 // callback function | codes using this structure
625 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
626 // InfoCallbackProc | ACE_CALLBACK_INFO_FILELISTADD
627 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
628 // ErrorCallbackProc | ACE_CALLBACK_ERROR_MOVEDELETE
629 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
630 // RequestCallbackProc | ACE_CALLBACK_REQUEST_MOVEDELETEREALSYSFILE
631 // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
632 // StateCallbackProc | ACE_CALLBACK_STATE_STARTFILE
633 //
634
635
636 #define ACE_CALLBACK_TYPE_SPACE 0x4
637
638 // type of structure is
639 // tACECallbackSpaceStruc
640 //-------------------------------------------------------------
641 // callback function | codes using this structure
642 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
643 // ErrorCallbackProc | ACE_CALLBACK_ERROR_TEMPDIRSPACE
644 // | ACE_CALLBACK_ERROR_ARCHIVESPACE
645 //
646
647
648 #define ACE_CALLBACK_TYPE_SFXFILE 0x5
649
650 // type of structure is
651 // tACECallbackSFXFileStruc
652 //-------------------------------------------------------------
653 // callback function | codes using this structure
654 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
655 // ErrorCallbackProc | ACE_CALLBACK_ERROR_READINGSFXFILE
656 //
657
658
659 #define ACE_CALLBACK_TYPE_COPY 0x6
660
661 // type of structure is
662 // tACECallbackCopyStruc
663 //-------------------------------------------------------------
664 // callback function | codes using this structure
665 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
666 // InfoCallbackProc | ACE_CALLBACK_INFO_COPY
667 //
668
669
670 #define ACE_CALLBACK_TYPE_PROGRESS 0x7
671
672 // type of structure is
673 // tACECallbackProgressStruc
674 //-------------------------------------------------------------
675 // callback function | codes using this structure
676 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
677 // StateCallbackProc | ACE_CALLBACK_STATE_PROGRESS
678 //
679
680
681 #define ACE_CALLBACK_TYPE_CRCCHECK 0x8
682
683 // type of structure is
684 // tACECallbackCRCCheckStruc
685 //-------------------------------------------------------------
686 // callback function | codes using this structure
687 // --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
688 // StateCallbackProc | ACE_CALLBACK_STATE_ENDCRCCHECK
689 //
690
691
692 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
693 //==============--- Part 2.4: different callback structures ---============
694 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
695 // These are the declarations of the different structures used in the
696 // unions passed by the callback functions.
697 //---------------------------------------------------------------------------
698
699 //-----------------------------------------------------------------------
700 // Only the Dll GlobalData is passed to the application.
701 //-----------------------------------------------------------------------
702
703 typedef struct sACECallbackGlobalStruc
704 {
705 ULONG StructureType; // is ACE_CALLBACK_TYPE_GLOBAL
706 ULONG Code; // see definition of
707 // ACE_CALLBACK_TYPE_GLOBAL
708 ULONG Operation; // ACE_CALLBACK_OPERATION constant
709
710 pACEGlobalDataStruc GlobalData; // see tACEGlobalDataStruc
711 } tACECallbackGlobalStruc,
712 *pACECallbackGlobalStruc;
713
714
715 //-----------------------------------------------------------------------
716 // The Dll GlobalData and the ArchiveData are passed.
717 //-----------------------------------------------------------------------
718
719 typedef struct sACECallbackArchiveStruc
720 {
721 ULONG StructureType; // is ACE_CALLBACK_TYPE_ARCHIVE
722 ULONG Code; // see definition of
723 // ACE_CALLBACK_TYPE_ARCHIVE
724 ULONG Operation; // ACE_CALLBACK_OPERATION constant
725
726 pACEGlobalDataStruc GlobalData; // see tACEGlobalDataStruc
727 pACEArchiveDataStruc ArchiveData; // see tACEArchiveDataStruc
728 } tACECallbackArchiveStruc,
729 *pACECallbackArchiveStruc;
730
731
732 //-----------------------------------------------------------------------
733 // GlobalData, ArchiveData and FileData are passed.
734 //-----------------------------------------------------------------------
735
736 typedef struct sACECallbackArchivedFileStruc
737 {
738 ULONG StructureType; // is ACE_CALLBACK_TYPE_ARCHIVEDFILE
739 ULONG Code; // see definition of
740 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
741 ULONG Operation; // ACE_CALLBACK_OPERATION constant
742
743 pACEGlobalDataStruc GlobalData; // see tACEGlobalDataStruc
744 pACEArchiveDataStruc ArchiveData; // see tACEArchiveDataStruc
745 pACEFileDataStruc FileData; // see tACEFileDataStruc
746 } tACECallbackArchivedFileStruc,
747 *pACECallbackArchivedFileStruc;
748
749
750 //-----------------------------------------------------------------------
751 // GlobalData, ArchiveData and a FileName are passed.
752 //-----------------------------------------------------------------------
753
754 typedef struct sACECallbackRealFileStruc
755 {
756 ULONG StructureType; // is ACE_CALLBACK_TYPE_REALFILE
757 ULONG Code; // see definition of
758 // ACE_CALLBACK_TYPE_REALFILE
759 ULONG Operation; // ACE_CALLBACK_OPERATION constant
760
761 pACEGlobalDataStruc GlobalData; // see tACEGlobalDataStruc
762 pACEArchiveDataStruc ArchiveData; // see tACEArchiveDataStruc
763 LPSTR FileName; // name of file
764 } tACECallbackRealFileStruc,
765 *pACECallbackRealFileStruc;
766
767
768 //-----------------------------------------------------------------------
769 // GlobalData, ArchiveData, the path of temp directory and the
770 // bytes required in temp directory (archive size) are passed.
771 //-----------------------------------------------------------------------
772
773 typedef struct sACECallbackSpaceStruc
774 {
775 ULONG StructureType; // is ACE_CALLBACK_TYPE_SPACE
776 ULONG Code; // see definition of
777 // ACE_CALLBACK_TYPE_SPACE
778 ULONG Operation;
779
780 pACEGlobalDataStruc GlobalData; // see tACEGlobalDataStruc
781 pACEArchiveDataStruc ArchiveData; // see tACEArchiveDataStruc
782 LPSTR Directory; // path of directory
783 DWORDLONG ArchiveSize; // bytes required in temp dir
784 } tACECallbackSpaceStruc,
785 *pACECallbackSpaceStruc;
786
787
788 //-----------------------------------------------------------------------
789 // GlobalData, ArchiveData and SFXFileName are passed.
790 //-----------------------------------------------------------------------
791
792 typedef struct sACECallbackSFXFileStruc
793 {
794 ULONG StructureType; // is ACE_CALLBACK_TYPE_SFXFILE
795 ULONG Code; // see definition of
796 // ACE_CALLBACK_TYPE_SFXFILE
797 ULONG Operation; // ACE_CALLBACK_OPERATION constant
798
799 pACEGlobalDataStruc GlobalData; // see tACEGlobalDataStruc
800 pACEArchiveDataStruc ArchiveData; // see tACEArchiveDataStruc
801 LPSTR SFXFileName; // name of SFX
802 } tACECallbackSFXFileStruc,
803 *pACECallbackSFXFileStruc;
804
805
806 //-----------------------------------------------------------------------
807 // GlobalData, ArchiveData and CopyData are passed.
808 //-----------------------------------------------------------------------
809
810 typedef struct sACECallbackCopyStruc
811 {
812 ULONG StructureType; // is ACE_CALLBACK_TYPE_COPY
813 ULONG Code; // see definition of
814 // ACE_CALLBACK_TYPE_COPY
815 ULONG Operation; // ACE_CALLBACK_OPERATION constant
816
817 pACEGlobalDataStruc GlobalData; // see tACEGlobalDataStruc
818 pACEArchiveDataStruc ArchiveData; // see tACEArchiveDataStruc
819 pACECopyInfoStruc CopyData; // see tACECopyInfoStruc
820 } tACECallbackCopyStruc,
821 *pACECallbackCopyStruc;
822
823
824 //-----------------------------------------------------------------------
825 // GlobalData, ArchiveData, FileData and ProgressData are passed.
826 //-----------------------------------------------------------------------
827
828 typedef struct sACECallbackProgressStruc
829 {
830 ULONG StructureType; // is ACE_CALLBACK_TYPE_PROGRESS
831 ULONG Code; // see definition of
832 // ACE_CALLBACK_TYPE_PROGRESS
833 ULONG Operation; // ACE_CALLBACK_OPERATION constant
834
835 pACEGlobalDataStruc GlobalData; // see tACEGlobalDataStruc
836 pACEArchiveDataStruc ArchiveData; // see tACEArchiveDataStruc
837 pACEFileDataStruc FileData; // see tACEFileDataStruc
838 pACEProgressDataStruc ProgressData; // see tACEProgressDataStruc
839 } tACECallbackProgressStruc,
840 *pACECallbackProgressStruc;
841
842
843 //-----------------------------------------------------------------------
844 // GlobalData, ArchiveData, FileData and CRC-check result are passed.
845 //-----------------------------------------------------------------------
846
847 typedef struct sACECallbackCRCCheckStruc
848 {
849 ULONG StructureType; // is ACE_CALLBACK_TYPE_CRCCHECK
850 ULONG Code; // see definition of
851 // ACE_CALLBACK_TYPE_CRCCHECK
852 ULONG Operation; // ACE_CALLBACK_OPERATION constant
853
854 pACEGlobalDataStruc GlobalData; // see tACEGlobalDataStruc
855 pACEArchiveDataStruc ArchiveData; // see tACEArchiveDataStruc
856 pACEFileDataStruc FileData; // see tACEFileDataStruc
857 BOOL CRCOk; // CRC-check result
858 } tACECallbackCRCCheckStruc,
859 *pACECallbackCRCCheckStruc;
860
861
862 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
863 //=================--- Part 2.5: info callback function ---================
864 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
865 // Declaration of ACEInfoCallbackProc() parameter and explanation of
866 // callback info codes.
867 //---------------------------------------------------------------------------
868
869 //-----------------------------------------------------------------------
870 // Union parameter used at ACEInfoCallbackProc().
871 //-----------------------------------------------------------------------
872
873 typedef union sACEInfoCallbackProcStruc
874 {
875 ULONG StructureType; // indicates which of the fol-
876 // lowing structures is used
877 tACECallbackGlobalStruc Global;
878 tACECallbackArchiveStruc Archive;
879 tACECallbackRealFileStruc RealFile;
880 tACECallbackCopyStruc Copy;
881 } tACEInfoCallbackProcStruc;
882
883
884 //-----------------------------------------------------------------------
885 // These values are passed to the ACEInfoCallbackProc callback function
886 // to inform the application about actions (smaller parts of operations)
887 // which may take some time or other things that might be of interest.
888 //-----------------------------------------------------------------------
889
890 #define ACE_CALLBACK_INFO_GENERALKEY 0x100
891
892 // key is a general one (no own AV; own key
893 // is obtainable for a special price!?)
894 // not used in ACL
895 //---------------------------------------------
896 // structure type:
897 // ACE_CALLBACK_TYPE_GLOBAL
898 // operations:
899 // ACERegister
900
901 #define ACE_CALLBACK_INFO_TMPARCCREATE 0x110
902
903 // creating temporary archive for changes
904 //---------------------------------------------
905 // structure type:
906 // ACE_CALLBACK_TYPE_ARCHIVE
907 // operations:
908 // ACEAdd
909 // ACESetComments
910 // ACEEncryptFiles
911 // ACEAddSFX
912 // ACELock
913 // ACEAddAV
914 // ACERepair
915
916
917 #define ACE_CALLBACK_INFO_TMPARCCREATEEND 0x111
918
919 // finished creating temporary archive
920 //---------------------------------------------
921 // structure type:
922 // ACE_CALLBACK_TYPE_ARCHIVE
923 // operations:
924 // ACEAdd
925 // ACESetComments
926 // ACEEncryptFiles
927 // ACEAddSFX
928 // ACELock
929 // ACEAddAV
930 // ACERepair
931
932
933 #define ACE_CALLBACK_INFO_ADDRECREC 0x112
934
935 // adding recovery record
936 //---------------------------------------------
937 // structure type:
938 // ACE_CALLBACK_TYPE_ARCHIVE
939 // operations:
940 // ACEAdd
941 // ACESetComments
942 // ACEEncryptFiles
943 // ACEAddSFX
944 // ACELock
945 // ACEAddAV
946 // ACEAddRecoveryRecord
947 // ACERepair
948
949
950 #define ACE_CALLBACK_INFO_ADDRECRECEND 0x113
951
952 // finished adding recovery record
953 //---------------------------------------------
954 // structure type:
955 // ACE_CALLBACK_TYPE_ARCHIVE
956 // operations:
957 // ACEAdd
958 // ACESetComments
959 // ACEEncryptFiles
960 // ACEAddSFX
961 // ACELock
962 // ACEAddAV
963 // ACEAddRecoveryRecord
964 // ACERepair
965
966
967 #define ACE_CALLBACK_INFO_RECREC 0x114
968
969 // trying to recover files by recovery
970 // record; end indicated by
971 // ACE_CALLBACK_INFO_RECOVERED or
972 // ACE_CALLBACK_INFO_NODAMAGE
973 //---------------------------------------------
974 // structure type:
975 // ACE_CALLBACK_TYPE_ARCHIVE
976 // operations:
977 // ACERepair
978
979
980 #define ACE_CALLBACK_INFO_NORECREC 0x115
981
982 // found no recovery record
983 //---------------------------------------------
984 // structure type:
985 // ACE_CALLBACK_TYPE_ARCHIVE
986 // operations:
987 // ACERepair
988
989
990 #define ACE_CALLBACK_INFO_RECOVERED 0x116
991
992 // archive has been fully recovered
993 //---------------------------------------------
994 // structure type:
995 // ACE_CALLBACK_TYPE_ARCHIVE
996 // operations:
997 // ACERepair
998
999
1000 #define ACE_CALLBACK_INFO_NODAMAGE 0x117
1001
1002 // ACERepair detected by recovery record that
1003 // the archive is not damaged
1004 //---------------------------------------------
1005 // structure type:
1006 // ACE_CALLBACK_TYPE_ARCHIVE
1007 // operations:
1008 // ACERepair
1009
1010
1011 #define ACE_CALLBACK_INFO_FNDMAINHEAD 0x118
1012
1013 // found archive header
1014 //---------------------------------------------
1015 // structure type:
1016 // ACE_CALLBACK_TYPE_ARCHIVE
1017 // operations:
1018 // ACERepair
1019
1020
1021 #define ACE_CALLBACK_INFO_FILELISTCREATE 0x119
1022
1023 // creating a file list of specified files
1024 //---------------------------------------------
1025 // structure type:
1026 // ACE_CALLBACK_TYPE_ARCHIVE
1027 // operations:
1028 // ACEList
1029 // ACEDelete
1030 // ACETest
1031 // ACEExtract
1032 // ACEAdd
1033 // ACESetComments
1034 // ACEEncryptFiles
1035
1036
1037 #define ACE_CALLBACK_INFO_FILELISTCREATEEND 0x11a
1038
1039 // sent when creating the list of files
1040 // is finished
1041 //---------------------------------------------
1042 // structure type:
1043 // ACE_CALLBACK_TYPE_ARCHIVE
1044 // operations:
1045 // ACEList
1046 // ACEDelete
1047 // ACETest
1048 // ACEExtract
1049 // ACEAdd
1050 // ACESetComments
1051 // ACEEncryptFiles
1052
1053
1054 #define ACE_CALLBACK_INFO_FILESORT 0x11b
1055
1056 // sorting files (for solid compression)
1057 //---------------------------------------------
1058 // structure type:
1059 // ACE_CALLBACK_TYPE_ARCHIVE
1060 // operations:
1061 // ACEAdd
1062
1063
1064 #define ACE_CALLBACK_INFO_FILESORTEND 0x11c
1065
1066 // sorting files (for solid compression)
1067 //---------------------------------------------
1068 // structure type:
1069 // ACE_CALLBACK_TYPE_ARCHIVE
1070 // operations:
1071 // ACEAdd
1072
1073
1074 #define ACE_CALLBACK_INFO_COPYEND 0x11d
1075
1076 // copying a file finished
1077 //---------------------------------------------
1078 // structure type:
1079 // ACE_CALLBACK_TYPE_ARCHIVE
1080 // operations:
1081 // ACEAdd
1082 // ACESetComments
1083 // ACEEncryptFiles
1084 // ACEAddSFX
1085 // ACELock
1086 // ACEAddAV
1087 // ACERepair
1088
1089
1090 #define ACE_CALLBACK_INFO_FILELISTADD 0x140
1091
1092 // called at creation of file list; the name
1093 // of the file just added to file list is
1094 // passed in tACECallbackRealFileStruc
1095 //---------------------------------------------
1096 // structure type:
1097 // ACE_CALLBACK_TYPE_REALFILE
1098 // operations:
1099 // ACEList
1100 // ACEDelete
1101 // ACETest
1102 // ACEExtract
1103 // ACEAdd
1104 // ACESetComments
1105 // ACEEncryptFiles
1106
1107
1108 #define ACE_CALLBACK_INFO_COPY 0x150
1109
1110 // copying a file; file name, file size and
1111 // copied bytes are passed via
1112 // tACECallbackCopyStruc
1113 //---------------------------------------------
1114 // structure type:
1115 // ACE_CALLBACK_TYPE_COPY
1116 // operations:
1117 // ACEAdd
1118 // ACESetComments
1119 // ACEEncryptFiles
1120 // ACEAddSFX
1121 // ACELock
1122 // ACEAddAV
1123 // ACERepair
1124
1125
1126 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
1127 //=================--- Part 2.6: error callback function ---===============
1128 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
1129 // Declaration of ACEErrorCallbackProc() parameter and explanation of
1130 // callback error codes.
1131 //---------------------------------------------------------------------------
1132
1133 //-----------------------------------------------------------------------
1134 // Union parameter used at ACEErrorCallbackProc().
1135 //-----------------------------------------------------------------------
1136
1137 typedef union sACEErrorCallbackProcStruc
1138 {
1139 ULONG StructureType; // indicates which of the fol-
1140 // lowing structures is used
1141 tACECallbackGlobalStruc Global;
1142 tACECallbackArchiveStruc Archive;
1143 tACECallbackArchivedFileStruc ArchivedFile;
1144 tACECallbackRealFileStruc RealFile;
1145 tACECallbackSpaceStruc Space;
1146 tACECallbackSFXFileStruc SFXFile;
1147 } tACEErrorCallbackProcStruc;
1148
1149
1150 //-----------------------------------------------------------------------
1151 // This structure is used by the ACEErrorCallback function to inform
1152 // the application about errors. The Code field of the used structure
1153 // contains an ACE_CALLBACK_ERROR value. At most problems modifications
1154 // to the passed structure can be made to fix it. Other problems can not
1155 // be solved and cause an operation abort immediately.
1156 // ErrorCallbackProc() has to return either ACE_CALLBACK_RETURN_OK or
1157 // ACE_CALLBACK_RETURN_CANCEL.
1158 //-----------------------------------------------------------------------
1159
1160 #define ACE_CALLBACK_ERROR_MEMORY 0x200
1161
1162 // not enough memory to perform operation
1163 // (dictionary too large?)
1164 //---------------------------------------------
1165 // structure type:
1166 // ACE_CALLBACK_TYPE_GLOBAL
1167 // operations:
1168 // all
1169
1170
1171 #define ACE_CALLBACK_ERROR_REGISTER 0x201
1172
1173 // registration key is invalid (or wrong
1174 // format?); not used in ACL
1175 //---------------------------------------------
1176 // structure type:
1177 // ACE_CALLBACK_TYPE_GLOBAL
1178 // operations:
1179 // ACERegister
1180
1181
1182 #define ACE_CALLBACK_ERROR_READKEY 0x202
1183
1184 // key could not be read (does not exist or
1185 // is invalid); not used in ACL
1186 //---------------------------------------------
1187 // structure type:
1188 // ACE_CALLBACK_TYPE_GLOBAL
1189 // operations:
1190 // ACEInitDll
1191
1192
1193 #define ACE_CALLBACK_ERROR_WRITEKEY 0x203
1194
1195 // could not write key; not used in ACL
1196 //---------------------------------------------
1197 // structure type:
1198 // ACE_CALLBACK_TYPE_GLOBAL
1199 // operations:
1200 // ACERegister
1201
1202
1203 #define ACE_CALLBACK_ERROR_NOWINACEKEY 0x204
1204
1205 // key not valid for WinACE; not used in ACL
1206 //---------------------------------------------
1207 // structure type:
1208 // ACE_CALLBACK_TYPE_GLOBAL
1209 // operations:
1210 // ACERegister
1211
1212
1213 #define ACE_CALLBACK_ERROR_NOACTIVEACEKEY 0x205
1214
1215 // key not valid for ActiveACE; not used in ACL
1216 //---------------------------------------------
1217 // structure type:
1218 // ACE_CALLBACK_TYPE_GLOBAL
1219 // operations:
1220 // ACERegister
1221
1222
1223 #define ACE_CALLBACK_ERROR_UNCSPACE 0x206
1224
1225 // Win95_OSR1-bug: it is impossible to
1226 // get available space of network drives by
1227 // an UNC name; ACE will not stop but
1228 // assumes there are 4Gb free
1229 // --> the operation might fail if free
1230 // disk space is low
1231 //---------------------------------------------
1232 // structure type:
1233 // ACE_CALLBACK_TYPE_GLOBAL
1234 // operations:
1235 // all
1236
1237
1238 #define ACE_CALLBACK_ERROR_MODIFYVOLUME 0x220
1239
1240 // modification of volumes not possible
1241 //---------------------------------------------
1242 // structure type:
1243 // ACE_CALLBACK_TYPE_ARCHIVE
1244 // operations:
1245 // ACEAdd
1246 // ACESetComments
1247 // ACEEncryptFiles
1248 // ACEAddSFX
1249 // ACELock
1250 // ACEAddAV
1251 // ACEAddRecoveryRecord
1252
1253
1254 #define ACE_CALLBACK_ERROR_MODIFYLOCKEDARCHIVE 0x221
1255
1256 // modification of locked archive not possible
1257 //---------------------------------------------
1258 // structure type:
1259 // ACE_CALLBACK_TYPE_ARCHIVE
1260 // operations:
1261 // ACEAdd
1262 // ACESetComments
1263 // ACEEncryptFiles
1264 // ACEAddSFX
1265 // ACELock
1266 // ACEAddAV
1267 // ACEAddRecoveryRecord
1268
1269
1270 #define ACE_CALLBACK_ERROR_AV 0x222
1271
1272 // AV of archive is NOT ok or does not match
1273 // to the users AV (not used in ACL)
1274 //---------------------------------------------
1275 // structure type:
1276 // ACE_CALLBACK_TYPE_ARCHIVE
1277 // operations:
1278 // ACEReadArchiveData
1279 // ACEList
1280 // ACEDelete
1281 // ACETest
1282 // ACEExtract
1283 // ACEAdd
1284 // ACERepair
1285 // ACESetComments
1286 // ACEEncryptFiles
1287 // ACEAddSFX
1288 // ACEAddAV
1289 // ACELock
1290 // ACEAddRecoveryRecord
1291
1292
1293 #define ACE_CALLBACK_ERROR_TOODAMAGED 0x223
1294
1295 // can not repair by recovery record but
1296 // can continue with normal repair
1297 //---------------------------------------------
1298 // structure type:
1299 // ACE_CALLBACK_TYPE_ARCHIVE
1300 // operations:
1301 // ACERepair
1302
1303
1304 #define ACE_CALLBACK_ERROR_ARCHIVEEXISTS 0x224
1305
1306 // destination file name already used;
1307 // may occur if at
1308 // ACE_CALLBACK_ERROR_ARCHIVESPACE a
1309 // direcory is specified where a file
1310 // with the same name as the current archive
1311 // already exists
1312 //---------------------------------------------
1313 // structure type:
1314 // ACE_CALLBACK_TYPE_ARCHIVE
1315 // operations:
1316 // ACEAdd
1317
1318
1319 #define ACE_CALLBACK_ERROR_OPENREPAIRARCHIVE 0x225
1320
1321 // could not create archive for repairing
1322 //---------------------------------------------
1323 // structure type:
1324 // ACE_CALLBACK_TYPE_ARCHIVE
1325 // operations:
1326 // ACERepair
1327
1328
1329 #define ACE_CALLBACK_ERROR_OPENARCHIVEREAD 0x226
1330
1331 // could not open archive/volume for reading
1332 //---------------------------------------------
1333 // structure type:
1334 // ACE_CALLBACK_TYPE_ARCHIVE
1335 // operations:
1336 // ACEReadArchiveData
1337 // ACEList
1338 // ACETest
1339 // ACEExtract
1340 // ACERepair
1341
1342
1343 #define ACE_CALLBACK_ERROR_OPENARCHIVEWRITE 0x227
1344
1345 // could not open archive/volume for writing
1346 //---------------------------------------------
1347 // structure type:
1348 // ACE_CALLBACK_TYPE_ARCHIVE
1349 // operations:
1350 // ACEDelete
1351 // ACEAdd
1352 // ACESetComments
1353 // ACEEncryptFiles
1354 // ACEAddSFX
1355 // ACELock
1356 // ACEAddAV
1357 // ACEAddRecoveryRecord
1358 // ACERepair
1359
1360
1361 #define ACE_CALLBACK_ERROR_READARCHIVE 0x228
1362
1363 // error reading from archive
1364 // (source disk removed?)
1365 //---------------------------------------------
1366 // structure type:
1367 // ACE_CALLBACK_TYPE_ARCHIVE
1368 // operations:
1369 // ACEReadArchiveData
1370 // ACEList
1371 // ACEDelete
1372 // ACETest
1373 // ACEExtract
1374 // ACEAdd
1375 // ACERepair
1376 // ACESetComments
1377 // ACEEncryptFiles
1378 // ACEAddSFX
1379 // ACEAddAV
1380 // ACELock
1381 // ACEAddRecoveryRecord
1382
1383
1384 #define ACE_CALLBACK_ERROR_WRITEARCHIVE 0x229
1385
1386 // error writing to archive
1387 // (destination disk removed?)
1388 //---------------------------------------------
1389 // structure type:
1390 // ACE_CALLBACK_TYPE_ARCHIVE
1391 // operations:
1392 // ACEDelete
1393 // ACEAdd
1394 // ACESetComments
1395 // ACEEncryptFiles
1396 // ACEAddSFX
1397 // ACELock
1398 // ACEAddAV
1399 // ACEAddRecoveryRecord
1400 // ACERepair
1401
1402
1403 #define ACE_CALLBACK_ERROR_ALREADYSFX 0x22a
1404
1405 // ca not make to SFX: is already SFX
1406 //---------------------------------------------
1407 // structure type:
1408 // ACE_CALLBACK_TYPE_ARCHIVE
1409 // operations:
1410 // ACEAddSFX
1411
1412
1413 #define ACE_CALLBACK_ERROR_ADDSFXTOVOLUME 0x22b
1414
1415 // adding SFX to volumes not possible
1416 //---------------------------------------------
1417 // structure type:
1418 // ACE_CALLBACK_TYPE_ARCHIVE
1419 // operations:
1420 // ACEAddSFX
1421
1422
1423 #define ACE_CALLBACK_ERROR_ARCHIVEBROKEN 0x22c
1424
1425 // archive is broken (damaged)
1426 //---------------------------------------------
1427 // structure type:
1428 // ACE_CALLBACK_TYPE_ARCHIVE
1429 // operations:
1430 // ACEReadArchiveData
1431 // ACEList
1432 // ACEDelete
1433 // ACETest
1434 // ACEExtract
1435 // ACEAdd
1436 // ACERepair
1437 // ACESetComments
1438 // ACEEncryptFiles
1439 // ACEAddSFX
1440 // ACEAddAV
1441 // ACELock
1442 // ACEAddRecoveryRecord
1443
1444 #define ACE_CALLBACK_ERROR_ARCHIVESAVE 0x22d
1445
1446 // not enough space to save archive;
1447 // but normally
1448 // ACE_CALLBACK_ERROR_ARCHIVESPACE
1449 // should allow to change destination
1450 //---------------------------------------------
1451 // structure type:
1452 // ACE_CALLBACK_TYPE_ARCHIVE
1453 // operations:
1454 // ACEAdd
1455 // ACESetComments
1456 // ACEEncryptFiles
1457 // ACEAddSFX
1458 // ACELock
1459 // ACEAddAV
1460 // ACEAddRecoveryRecord
1461 // ACERepair
1462
1463
1464 #define ACE_CALLBACK_ERROR_NOFILES 0x22e
1465
1466 // no files specified/could not find files
1467 //---------------------------------------------
1468 // structure type:
1469 // ACE_CALLBACK_TYPE_ARCHIVE
1470 // operations:
1471 // ACEList
1472 // ACEDelete
1473 // ACETest
1474 // ACEExtract
1475 // ACEAdd
1476 // ACESetComments
1477 // ACEEncryptFiles
1478
1479
1480 #define ACE_CALLBACK_ERROR_ISNOTANARCHIVE 0x22f
1481
1482 // specified archive file is not an
1483 // ACE archive
1484 //---------------------------------------------
1485 // structure type:
1486 // ACE_CALLBACK_TYPE_ARCHIVE
1487 // operations:
1488 // ACEReadArchiveData
1489 // ACEList
1490 // ACEDelete
1491 // ACETest
1492 // ACEExtract
1493 // ACEAdd
1494 // ACERepair
1495 // ACESetComments
1496 // ACEEncryptFiles
1497 // ACEAddSFX
1498 // ACEAddAV
1499 // ACELock
1500 // ACEAddRecoveryRecord
1501
1502
1503 #define ACE_CALLBACK_ERROR_TEMPDIRCREATE 0x230
1504
1505 // could not create file in temp directory
1506 // (write protected or directory does
1507 // not exist)
1508 //---------------------------------------------
1509 // structure type:
1510 // ACE_CALLBACK_TYPE_ARCHIVE
1511 // operations:
1512 // ACEAdd
1513 // ACESetComments
1514 // ACEEncryptFiles
1515 // ACEAddSFX
1516 // ACELock
1517 // ACEAddAV
1518 // ACEAddRecoveryRecord
1519 // ACERepair
1520
1521
1522 #define ACE_CALLBACK_ERROR_HIGHERVERSION 0x231
1523
1524 // this Dll version is not able to handle
1525 // the archive
1526 //---------------------------------------------
1527 // structure type:
1528 // ACE_CALLBACK_TYPE_ARCHIVE
1529 // operations:
1530 // ACEAdd
1531 // ACESetComments
1532 // ACEEncryptFiles
1533 // ACEAddSFX
1534 // ACELock
1535 // ACEAddAV
1536 // ACEAddRecoveryRecord
1537
1538
1539 #define ACE_CALLBACK_ERROR_CREATIONNAMEINUSE 0x240
1540
1541 // name used by directory
1542 //---------------------------------------------
1543 // structure type:
1544 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1545 // operations:
1546 // ACEExtract
1547
1548
1549 #define ACE_CALLBACK_ERROR_ENCRYPTIONCRC 0x242
1550
1551 // encryption failed because of CRC-Error at
1552 // decompression
1553 //---------------------------------------------
1554 // structure type:
1555 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1556 // operations:
1557 // ACEEncryptFiles
1558
1559
1560 #define ACE_CALLBACK_ERROR_READ 0x243
1561
1562 // error reading file to be added
1563 // (source disk removed?)
1564 //---------------------------------------------
1565 // structure type:
1566 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1567 // operations:
1568 // ACEAdd
1569
1570
1571 #define ACE_CALLBACK_ERROR_WRITE 0x244
1572
1573 // error at extraction
1574 // (destination disk removed?)
1575 //---------------------------------------------
1576 // structure type:
1577 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1578 // operations:
1579 // ACEExtract
1580
1581
1582 #define ACE_CALLBACK_ERROR_OPENREAD 0x245
1583
1584 // error opening file for reading
1585 //---------------------------------------------
1586 // structure type:
1587 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1588 // operations:
1589 // ACEAdd
1590
1591
1592 #define ACE_CALLBACK_ERROR_OPENWRITE 0x246
1593
1594 // error opening file for writing
1595 //---------------------------------------------
1596 // structure type:
1597 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1598 // operations:
1599 // ACEExtract
1600
1601
1602 #define ACE_CALLBACK_ERROR_FILENAMETOOLONG 0x247
1603
1604 // resulting file name too long
1605 //---------------------------------------------
1606 // structure type:
1607 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1608 // operations:
1609 // ACEAdd
1610
1611
1612 #define ACE_CALLBACK_ERROR_REPACKCRC 0x248
1613
1614 // CRC-check error at recompression
1615 // (archive broken or wrong password)
1616 //---------------------------------------------
1617 // structure type:
1618 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1619 // operations:
1620 // ACEDelete
1621 // ACEAdd
1622
1623
1624 #define ACE_CALLBACK_ERROR_EXCLUDEPATH 0x249
1625
1626 // could not exclude path of file names; two
1627 // or more files would have the same name
1628 //---------------------------------------------
1629 // structure type:
1630 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1631 // operations:
1632 // ACEAdd
1633
1634
1635 #define ACE_CALLBACK_ERROR_METHOD 0x24a
1636
1637 // compression method not known to this
1638 // Dll version
1639 //---------------------------------------------
1640 // structure type:
1641 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1642 // operations:
1643 // ACEDelete
1644 // ACETest
1645 // ACEExtract
1646 // ACEAdd
1647 // ACEEncryptFiles
1648
1649
1650 #define ACE_CALLBACK_ERROR_EXTRACTSPACE 0x24b
1651
1652 // not enough space to extract file
1653 //---------------------------------------------
1654 // structure type:
1655 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1656 // operations:
1657 // ACEExtract
1658
1659
1660 #define ACE_CALLBACK_ERROR_CREATION 0x24c
1661
1662 // creation failed (write-protection?)
1663 //---------------------------------------------
1664 // structure type:
1665 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1666 // operations:
1667 // ACEExtract
1668
1669
1670 #define ACE_CALLBACK_ERROR_OVERWRITEDELETE 0x24d
1671
1672 // could not overwrite because deletion of
1673 // file failed
1674 //---------------------------------------------
1675 // structure type:
1676 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1677 // operations:
1678 // ACEExtract
1679
1680
1681 #define ACE_CALLBACK_ERROR_MOVEDELETE 0x260
1682
1683 // deletion of file or directory failed
1684 // (move operation)
1685 //---------------------------------------------
1686 // structure type:
1687 // ACE_CALLBACK_TYPE_REALFILE
1688 // operations:
1689 // ACEAdd
1690
1691 #define ACE_CALLBACK_ERROR_TEMPDIRSPACE 0x270
1692
1693 // not enough space at current temp directory
1694 //---------------------------------------------
1695 // structure type:
1696 // ACE_CALLBACK_TYPE_SPACE
1697 // operations:
1698 // ACEAdd
1699 // ACESetComments
1700 // ACEEncryptFiles
1701 // ACEAddSFX
1702 // ACEAddAV
1703
1704
1705 #define ACE_CALLBACK_ERROR_ARCHIVESPACE 0x271
1706
1707 // not enough space to save archive
1708 //---------------------------------------------
1709 // structure type:
1710 // ACE_CALLBACK_TYPE_SPACE
1711 // operations:
1712 // ACEDelete
1713 // ACEAdd
1714 // ACESetComments
1715 // ACEEncryptFiles
1716 // ACEAddSFX
1717 // ACELock
1718 // ACEAddAV
1719 // ACEAddRecoveryRecord
1720 // ACERepair
1721
1722
1723 #define ACE_CALLBACK_ERROR_READINGSFXFILE 0x280
1724
1725 // error reading SFX file:
1726 // is no SFX file,
1727 // file does not exist or could not be opened
1728 // for reading
1729 //---------------------------------------------
1730 // structure type:
1731 // ACE_CALLBACK_TYPE_SFXFILE
1732 // operations:
1733 // ACEAdd
1734 // ACEAddSFX
1735
1736
1737 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
1738 //================--- Part 2.7: request callback function ---==============
1739 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
1740 // Declaration of ACERequestCallbackProc() parameter and explanation of
1741 // callback request codes.
1742 //---------------------------------------------------------------------------
1743
1744 //-----------------------------------------------------------------------
1745 // Union parameter used at ACERequestCallbackProc().
1746 //-----------------------------------------------------------------------
1747
1748 typedef union sACERequestCallbackProcStruc
1749 {
1750 ULONG StructureType; // indicates which of the fol-
1751 // lowing structures is used
1752 tACECallbackGlobalStruc Global;
1753 tACECallbackArchiveStruc Archive;
1754 tACECallbackArchivedFileStruc ArchivedFile;
1755 tACECallbackRealFileStruc RealFile;
1756 } tACERequestCallbackProcStruc;
1757
1758
1759 //-----------------------------------------------------------------------
1760 // Question constants are passed to the RequestCallbackProc callback
1761 // function to request further data.
1762 // RequestCallbackProc may return ACE_CALLBACK_RETURN_OK,
1763 // ACE_CALLBACK_RETURN_NO or ACE_CALLBACK_RETURN_CANCEL.
1764 //-----------------------------------------------------------------------
1765
1766 #define ACE_CALLBACK_REQUEST_REGISTER 0x300
1767
1768 // Global.UserAV has to be set
1769 // to continue registration process;
1770 // not used in ACL
1771 //---------------------------------------------
1772 // structure type:
1773 // ACE_CALLBACK_TYPE_GLOBAL
1774 // operations:
1775 // ACERegister
1776
1777
1778 #define ACE_CALLBACK_REQUEST_MARKASSOLID 0x320
1779
1780 // ArchiveHeader damaged,
1781 // set solid flag for the new archive?
1782 // (in case of doubt return yes!)
1783 //---------------------------------------------
1784 // structure type:
1785 // ACE_CALLBACK_TYPE_ARCHIVE
1786 // operations:
1787 // ACERepair
1788
1789
1790 #define ACE_CALLBACK_REQUEST_CHANGEVOLUME 0x321
1791 // Asks for permission to process next volume.
1792 // If operation is ACE_CALLBACK_OPERATION_ADD
1793 // then a new volume will be created.
1794 // The application may change the name
1795 // of the archive by modifying
1796 // ArchiveData->ArchiveName
1797 //---------------------------------------------
1798 // structure type:
1799 // ACE_CALLBACK_TYPE_ARCHIVE
1800 // operations:
1801 // ACEDelete
1802 // ACEAdd
1803 // ACESetComments
1804 // ACEEncryptFiles
1805 // ACEList
1806 // ACETest
1807 // ACEExtract
1808
1809
1810 #define ACE_CALLBACK_REQUEST_ARCHIVEEXISTS 0x322
1811 // Asks whether to overwrite a file with
1812 // the same name as the archive.
1813 //---------------------------------------------
1814 // structure type:
1815 // ACE_CALLBACK_TYPE_ARCHIVE
1816 // operations:
1817 // ACEDelete
1818 // ACEAdd
1819 // ACESetComments
1820 // ACEEncryptFiles
1821
1822
1823 #define ACE_CALLBACK_REQUEST_OVERWRITE 0x340
1824
1825 // Overwrite existing file?
1826 //---------------------------------------------
1827 // structure type:
1828 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1829 // operations:
1830 // ACEAdd
1831 // ACEExtract
1832
1833
1834 #define ACE_CALLBACK_REQUEST_DELARCHIVEDSYSFILE 0x341
1835
1836 // Delete rdonly/hidden/system file
1837 //---------------------------------------------
1838 // structure type:
1839 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1840 // operations:
1841 // ACEDelete
1842
1843
1844 #define ACE_CALLBACK_REQUEST_ADDBROKENFILE 0x342
1845
1846 // repair function found file with
1847 // broken header, add file?
1848 //---------------------------------------------
1849 // structure type:
1850 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1851 // operations:
1852 // ACERepair
1853
1854
1855 #define ACE_CALLBACK_REQUEST_PASSWORD 0x343
1856
1857 // password required; attention: may be
1858 // decryption _and_ encryption; but passwords
1859 // can be different --> better changing
1860 // passwords at StateCallbackProc
1861 //---------------------------------------------
1862 // structure type:
1863 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1864 // operations:
1865 // ACEDelete
1866 // ACETest
1867 // ACEExtract
1868 // ACEAdd
1869 // ACEEncryptFiles
1870
1871
1872 #define ACE_CALLBACK_REQUEST_OVERWRITESYSFILE 0x344
1873
1874 // Overwrite rdonly/hidden/system file
1875 //---------------------------------------------
1876 // structure type:
1877 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1878 // operations:
1879 // ACEAdd
1880 // ACEExtract
1881
1882
1883 #define ACE_CALLBACK_REQUEST_MOVEDELREALSYSFILE 0x360
1884
1885 // Delete rdonly/hidden/system file
1886 // (move to archive operation)
1887 //---------------------------------------------
1888 // structure type:
1889 // ACE_CALLBACK_TYPE_REALFILE
1890 // operations:
1891 // ACEAdd
1892
1893
1894 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
1895 //=================--- Part 2.8: state callback function ---===============
1896 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
1897 // Declaration of ACEStateCallbackProc() parameter and explanation of
1898 // callback state codes.
1899 //---------------------------------------------------------------------------
1900
1901 //-----------------------------------------------------------------------
1902 // Union parameter used at ACEStateCallbackProc().
1903 //-----------------------------------------------------------------------
1904
1905 typedef union sACEStateCallbackProcStruc
1906 {
1907 ULONG StructureType; // indicates which of the fol-
1908 // lowing structures is used
1909 tACECallbackArchiveStruc Archive;
1910 tACECallbackArchivedFileStruc ArchivedFile;
1911 tACECallbackArchivedFileStruc RealFile;
1912 tACECallbackProgressStruc Progress;
1913 tACECallbackCRCCheckStruc CRCCheck;
1914 } tACEStateCallbackProcStruc;
1915
1916
1917 //-----------------------------------------------------------------------
1918 // Calls to (*StateCallbackProc)() with ACE_CALLBACK_STATE values in the
1919 // Code field are made to enable the application to show the progress of
1920 // an operation.
1921 //-----------------------------------------------------------------------
1922
1923 #define ACE_CALLBACK_STATE_STARTARCHIVE 0x400
1924
1925 // procession of archive is about to begin
1926 //---------------------------------------------
1927 // structure type:
1928 // ACE_CALLBACK_TYPE_ARCHIVE
1929 // operations:
1930 // ACEList
1931 // ACEDelete
1932 // ACETest
1933 // ACEExtract
1934 // ACEAdd
1935 // ACERepair
1936 // ACESetComments
1937 // ACEEncryptFiles
1938 // ACEAddSFX
1939 // ACEAddAV
1940 // ACELock
1941 // ACEAddRecoveryRecord
1942
1943
1944 #define ACE_CALLBACK_STATE_STARTFILE 0x410
1945
1946 // procession of file is about to begin
1947 //---------------------------------------------
1948 // structure type:
1949 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1950 // operations:
1951 // ACEList
1952 // ACEDelete
1953 // ACETest
1954 // ACEExtract
1955 // ACEAdd
1956 // ACERepair
1957 // ACESetComments
1958 // ACEEncryptFiles
1959
1960
1961 #define ACE_CALLBACK_STATE_ENDNOCRCCHECK 0x411
1962
1963 // end of file procession
1964 // (no CRC chceck for this operation)
1965 //---------------------------------------------
1966 // structure type:
1967 // ACE_CALLBACK_TYPE_ARCHIVEDFILE
1968 // operations:
1969 // ACEList
1970 // ACEDelete
1971 // ACEAdd
1972 // ACERepair
1973 // ACESetComments
1974 // ACEEncryptFiles
1975
1976
1977 #define ACE_CALLBACK_STATE_PROGRESS 0x420
1978
1979 // informs about the progress of a file
1980 // operation
1981 //---------------------------------------------
1982 // structure type:
1983 // ACE_CALLBACK_TYPE_PROGRESS
1984 // operations:
1985 // ACEDelete
1986 // ACETest
1987 // ACEExtract
1988 // ACEAdd
1989 // ACERepair
1990 // ACEEncryptFiles
1991
1992
1993 #define ACE_CALLBACK_STATE_ENDCRCCHECK 0x430
1994
1995 // end of file procession, CRC-check
1996 // result is passed
1997 //---------------------------------------------
1998 // structure type:
1999 // ACE_CALLBACK_TYPE_CRCCHECK
2000 // operations:
2001 // ACETest
2002 // ACEExtract
2003 // ACEDelete
2004 // ACEAdd
2005
2006
2007
2008
2009 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
2010 //様様様様=====--- Part 3: Functions supported by UNAceV2.Dll ---====様様様様様様
2011 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
2012
2013 //---------------------------------------------------------------------------
2014 //
2015 // UnAceV2.Dll supports the following functions:
2016 //
2017 // ACEInitDll
2018 // ACEReadArchiveData
2019 // ACEList
2020 // ACETest
2021 // ACEExtract
2022 //
2023 // First of all - before any other function is called - the Dll has to be
2024 // initialized by ACEInitDll(). Using this function the application has
2025 // to set temporary directory, key file path, comment buffer and
2026 // callback function pointers.
2027 // (callback function pointers can be set to NULL for first-try-runs)
2028 //
2029 // See description of each function for details about their task, input and
2030 // output. Return codes of those functions are listed in part 3.1.
2031 //
2032 //---------------------------------------------------------------------------
2033 //
2034 // Contents:
2035 // Part 3.1: ACE.DLL function return codes
2036 // Part 3.2: functions and parameter structures
2037 //
2038 //---------------------------------------------------------------------------
2039
2040
2041 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
2042 //=============--- Part 3.1: ACE.DLL function return codes ---=============
2043 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
2044
2045 //-----------------------------------------------------------------------
2046 // These error codes are returned by the ACE.DLL-functions. The meanings
2047 // of the codes are the same, as they are for the exit codes of ACE.EXE.
2048 //-----------------------------------------------------------------------
2049
2050 #define ACE_ERROR_NOERROR 0 // no error; operation succesful
2051 #define ACE_ERROR_MEM 1 // insufficient memory
2052 #define ACE_ERROR_FILES 2 // no files specified
2053 #define ACE_ERROR_FOUND 3 // specified archive not found
2054 #define ACE_ERROR_FULL 4 // disk full
2055 #define ACE_ERROR_OPEN 5 // could not open file
2056 #define ACE_ERROR_READ 6 // read error
2057 #define ACE_ERROR_WRITE 7 // write error
2058 #define ACE_ERROR_CLINE 8 // invalid command line
2059 #define ACE_ERROR_CRC 9 // CRC error
2060 #define ACE_ERROR_OTHER 10 // other error
2061 #define ACE_ERROR_EXISTS 11 // file already exists
2062 #define ACE_ERROR_USER 255 // user break (application
2063 // returned cancel code at
2064 // callback function)
2065
2066
2067 //-----------------------------------------------------------------------
2068 // These error codes are returned by the ACE.DLL-functions. They are not
2069 // used by ACE.EXE yet.
2070 //-----------------------------------------------------------------------
2071
2072 #define ACE_ERROR_PARAM 128 // might be used later
2073
2074
2075 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
2076 //============--- Part 3.2: functions and parameter structures ---==========
2077 //様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様様
2078
2079 //陳陳陳陳陳陳陳陳陳陳陳陳陳 ACEInitDll 陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳
2080 // Initializes ACE dynamic link library. Has to be called before any
2081 // other function call. May be called more than one time.
2082 //-------------------------------------------------------------------------
2083 // Input :
2084 // Output:
2085 //-------------------------------------------------------------------------
2086
2087 //-----------------------------------------------------------------------
2088 // ACEInitDll() parameter structure.
2089 //-----------------------------------------------------------------------
2090
2091 typedef struct sACEInitDllStruc
2092 {
2093 tACEGlobalDataStruc
2094 GlobalData;
2095 CHAR Reserved[64]; // has to be filled with zeroes
2096 } tACEInitDllStruc,
2097 *pACEInitDllStruc;
2098
2099
2100 //-----------------------------------------------------------------------
2101 // ACEInitDll() function declaration.
2102 //-----------------------------------------------------------------------
2103
2104 INT __stdcall ACEInitDll(pACEInitDllStruc DllData);
2105
2106
2107 //陳陳陳陳陳陳陳陳陳陳陳 ACEReadArchiveData 陳陳陳陳陳陳陳陳陳陳陳陳陳陳
2108 // Tests a file whether it is an archive or not and reads out the archive
2109 // data.
2110 //-------------------------------------------------------------------------
2111
2112 //-----------------------------------------------------------------------
2113 // ACEReadArchiveData() parameter structure.
2114 //-----------------------------------------------------------------------
2115
2116 typedef struct sACEReadArchiveDataStruc
2117 {
2118 pACEArchiveDataStruc // if this pointer is NULL, the
2119 ArchiveData; // file passed to ACEReadArchiveData
2120 // is no archive; otherwise it points
2121 // to a tACEArchiveDataStruc structure
2122 // that contains information about the
2123 // archive
2124 CHAR Reserved[64]; // has to be filled with zeroes
2125 } tACEReadArchiveDataStruc,
2126 *pACEReadArchiveDataStruc;
2127
2128
2129 //-----------------------------------------------------------------------
2130 // ACEReadArchiveData() function declaration.
2131 //-----------------------------------------------------------------------
2132
2133 INT __stdcall ACEReadArchiveData(LPSTR ArchiveName,
2134 pACEReadArchiveDataStruc ArchiveData);
2135
2136
2137 //陳陳陳陳陳陳陳陳陳陳陳陳陳陳 ACEList 陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳
2138 // Passes the specified files in the archive to StateCallbackProc().
2139 //-------------------------------------------------------------------------
2140
2141 //-----------------------------------------------------------------------
2142 // ACEList() parameter structure.
2143 //-----------------------------------------------------------------------
2144
2145 typedef struct sACEListStruc
2146 {
2147 tACEFilesStruc // specifies files to be listed;
2148 Files; // see tACEFilesStruc structure
2149 CHAR Reserved[64]; // has to be filled with zeroes
2150 } tACEListStruc,
2151 *pACEListStruc;
2152
2153
2154 //-----------------------------------------------------------------------
2155 // ACEList() function declaration.
2156 //-----------------------------------------------------------------------
2157
2158 INT __stdcall ACEList(LPSTR ArchiveName, pACEListStruc List);
2159
2160
2161 //陳陳陳陳陳陳陳陳陳陳陳陳陳陳 ACETest 陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳
2162 // Tests specified files in archive.
2163 //-------------------------------------------------------------------------
2164
2165 //-----------------------------------------------------------------------
2166 // ACETest() parameter structure.
2167 //-----------------------------------------------------------------------
2168
2169 typedef struct sACETestStruc
2170 {
2171 tACEFilesStruc // specifies files to test;
2172 Files; // see tACEFilesStruc structure
2173 LPSTR DecryptPassword; // zero-terminated string,
2174 // case-sensitive (maxlen=56)
2175 CHAR Reserved[64]; // has to be filled with zeroes
2176 } tACETestStruc,
2177 *pACETestStruc;
2178
2179
2180 //-----------------------------------------------------------------------
2181 // ACETest() function declaration.
2182 //-----------------------------------------------------------------------
2183
2184 INT __stdcall ACETest(LPSTR ArchiveName, pACETestStruc Test);
2185
2186
2187 //陳陳陳陳陳陳陳陳陳陳陳陳陳 ACEExtract 陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳陳
2188 // Extracts specified files.
2189 //-------------------------------------------------------------------------
2190
2191 //-----------------------------------------------------------------------
2192 // ACEExtract() parameter structure.
2193 //-----------------------------------------------------------------------
2194
2195 typedef struct sACEExtractStruc
2196 {
2197 tACEFilesStruc // specifies files to extract;
2198 Files; // see tACEFilesStruc structure
2199 LPSTR DestinationDir; // directory to extract files to
2200 BOOL ExcludePath; // extract files without path
2201 LPSTR DecryptPassword; // password for decryption (if files
2202 // are encrypted);
2203 // zero-terminated string,
2204 // case-sensitive (maxlen=56)
2205 CHAR Reserved[64]; // has to be filled with zeroes
2206 } tACEExtractStruc,
2207 *pACEExtractStruc;
2208
2209
2210 //-----------------------------------------------------------------------
2211 // ACEExtract() function declaration.
2212 //-----------------------------------------------------------------------
2213
2214 INT __stdcall ACEExtract(LPSTR ArchiveName,
2215 pACEExtractStruc Extract);
2216
2217
2218 #ifdef __cplusplus
2219 }
2220 #endif
2221 #endif
2222