==========================================================================
UNLHA32.DLL Ver 0.97E API Manual
Copyright(C)1998 by Micco
Translated by Hitoshi Ozawa
Release 1998/01/17
==========================================================================
%1. API Description
%a UnlhaGetVersion
%b UnlhaGetRunning
%c UnlhaGetBackGroundMode
%d UnlhaSetBackGroundMode
%e UnlhaGetCursorMode
%f UnlhaSetCursorMode
%h UnlhaSetCursorInterval
%i Unlha
%j UnlhaCheckArchive
%k UnlhaGetFileCount
%l UnlhaQueryFunctionList
%m UnlhaConfigDialog
%o UnlhaExtractMem
%p UnlhaCompressMem
%q UnlhaOpenArchive
%r UnlhaCloseArchive
%s UnlhaFindFirst
%t UnlhaFindNext
%u UnlhaGetArcFileName
%v UnlhaGetArcFileSize
%w UnlhaGetArcOriginalSize
%x UnlhaGetArcCompressedSize
%y UnlhaGetArcRatio
%z UnlhaGetArcDate
%A UnlhaGetArcTime
%B UnlhaGetArcOSType
%C UnlhaIsSFXFile
%D UnlhaGetFileName
%E UnlhaGetMethod
%F UnlhaGetOriginalSize
%G UnlhaGetCompressedSize
%H UnlhaGetRatio
%I UnlhaGetDate
%J UnlhaGetTime
%K UnlhaGetWriteTime
%L UnlhaGetCreateTime
%M UnlhaGetAccessTime
%N UnlhaGetCRC
%O UnlhaGetAttribute
%P UnlhaGetOSType
%2. INDIVIDUALINFO data structure
%3. Windows Registry
%4. Error Codes
%5. Miscellaneous
-----------------------------------------------------------------------
@Information on message handling is in WINMESE.TXT
-----------------------------------------------------------------------
%1. API Description
-----------------------------------------------------------------------
-----------------------------------------------------------------------
%a WORD WINAPI UnlhaGetVersion(VOID)
-----------------------------------------------------------------------
Description
Return current UNLHA32.DLL version. Return code is used to
update the Registry.
Return Code
Current UNLHA.DLL version 1 -> Version 0.01
100 -> Version 1.00
NOTE:
It is recommended to check version to avoid error caused by
specification changes.
-----------------------------------------------------------------------
%b BOOL WINAPI UnlhaGetRunning(VOID)
-----------------------------------------------------------------------
Description
Check if UNLHA32.DLL is currently running.
It is recommended to use this routine to check that UNLHA32.DLL
is not already running.
Return Code
TRUE Currently running
FALSE Not running
-----------------------------------------------------------------------
%c BOOL WINAPI UnlhaGetBackGroundMode(VOID)
-----------------------------------------------------------------------
Description
Checks if UNLHA32.DLL is set to background mode.
Return Code
TRUE UNLHA32.DLL set to background mode
FALSE UNLHA32.DLL not set to background mode
-----------------------------------------------------------------------
%d BOOL WINAPI UnlhaSetBackGroundMode(const BOOL _bBackGroundMode)
-----------------------------------------------------------------------
Description
Set UNLHA32.DLL to run in background mode.
Parameters
TRUE Background mode
FALSE Foreground mode
Return Code
TRUE Mode set
FALSE Error - UNLHA32.DLL is currently compressing/extracting
file
- Illegal parameter
WARNING:
Background mode means looping for messages in UNLHA32.DLL.
Windows95/NT is already a multitasking OS allowing other processes
to execute while UNLHA32.DLL is executing. On these OS's this
function should be thought to be available only to maintain
compatibility with LHA.DLL.
This function, however, is still necessary on Win32s systems to
loop for messages. If the application is to be used on Win32s
system, this function should still be used to set to run in
background mode.
Finally, even is parameter is set to FALSE, UNLHA32.DLL will
still poll for messages but in less frequency.
-----------------------------------------------------------------------
%e BOOL WINAPI UnlhaGetCursorMode(void)
-----------------------------------------------------------------------
Description
Check if cursor is to be displayed when compressing/extracting
file.
Return Code
TRUE Display cursor mode
FALSE Not display cursor mode
-----------------------------------------------------------------------
%f BOOL WINAPI UnlhaSetCursorMode(const BOOL _CursorMode);
-----------------------------------------------------------------------
Description
Set to display cursor when compressing/extracting file.
Parameters
TRUE Display cursor
FALSE Do not display cursor
Return Code
TRUE Mode set
FALSE Error - UNLHA32.DLL iw currently compressing/
extracting file
- Illegal parameter
NOTE:
UNLHA32.DLL only changes shape of a cursor and do not display
rotating cursor like LHA.DLL.
-----------------------------------------------------------------------
%g WORD WINAPI UnlhaGetCursorInterval(VOID);
-----------------------------------------------------------------------
Description
Get cursor rotation speed.
Return Code
Cursor rotation speed in milliseconds
NOTE:
This functions is currently only supported to have
compatibility with LHA.DLL. Current version of UNLHA32.DLL
does not support rotating cursor.
-----------------------------------------------------------------------
%h BOOL WINAPI UnlhaSetCursorInterval(const WORD _Interval);
-----------------------------------------------------------------------
Description
Set cursor rotation speed.
Current version of UNLHA32.DLL do not support rotating cursor.
Parameters
Cursor rotation speed (msec). Default: 80 msec
Return Code
TRUE Cursor rotation speed set
FALSE Error - UNLHA.DLL currently compressing/extracting file
NOTE:
This functions is currently only supported to have
compatibility with LHA.DLL. Current version of UNLHA32.DLL
does not support rotating cursor.
-----------------------------------------------------------------------
%i int WINAPI Unlha(const HWND _hwnd, LPCSTR _szCmdLine,
LPSTR _szOutput, const DWORD _dwSize)
-----------------------------------------------------------------------
Description
Execute UNLHA32 command.
Parameters
_hwnd Windows handle of application calling UNLHA32.DLL.
UNLHA32.DLL calls EnableWindow() function using this
handle. If application does not use any windows
such as those that run in DOS prompt, set this
parameter to NULL.
_szCmdLine Command line to pass to UNLHA32.DLL. Command line
is compatible with LHA.EXE.
However, option and directory to extract files can
not be specified for each file.
Format:
[<command>] [-<option>] <LZH FILE> [<directory>\]
[<file list>...]
(Refer to COMMAN_E.TXT for additional UNLHA.DLL
commands.)
_szOutput Buffer to return extracted files.
_dwSize Size of _szOutput buffer.
If buffer size is less than the size of the
extracted file, it will be truncated.
Return Code
0 No error
other Error executing command. Refer to UNLHA32.H file for
a listing of error codes.
NOTE:
If directory to extract files do not exist, a dialog box will
appear asking whether to create a new directory. If 'NO' is
selected, ERROR_MAKEDIRECTORY is returned.
-----------------------------------------------------------------------
%j BOOL WINAPI UnlhaCheckArchive(LPCSTR _szFileName,
const int _iMode)
-----------------------------------------------------------------------
Description
Check if the selected file is a LZH file.
Parameters
_szFileName File name to check
_iMode Mode
CHECKARCHIVE_RAPID Check only first 3 file headers. If
there is no header, first 128K bytes
are used.
(0) Used to rapidly check files on a FD.
CHECKARCHIVE_BASIC Check all file headers.
(1)
CHECKARCHIVE_FULLCRC Execute CRC on file.
(2)
Following flags may also be used in combination with flags
above.
CHECKARCHIVE_RECOVERY Ignore corrupt header. When this flag is
(4) set, data in the archive file may directly
be accessed without using information from
the header.
CHECKARCHIVE_SFX Check if self-extracting archive.
(8) When this flag is not set, all self-extraction
files only return TRUE. When this flag is
set, it returns value corresponding to
CHECKARCHIVE_ALL When this flag is set with CHECKARCHIVE_RAPID
(16) flag, search is conducted on all files.
Return Code
TRUE LZH file.
FALSE not a LZH file or corrupt file
other value When CHECKARCHIVE_SFX flag is set, value
is equalled to return code from UnlhaIsSFXFile()
plus 0x8000.
NOTE
CHECKARCHIVE_RECOVERY is only supported in this function to allow
extraction using '-jc' option.
WARNING
Self-extracting archive file does not contain information specifying
itself as a self-extracting file nor does it contain information
such as version number on utility that created the self-extracting
file. Thus, this function may not return a proper value because
of format differences between versions.
-----------------------------------------------------------------------
%k int WINAPI UnlhaGetFileCount(LPCSTR _szArcFile)
-----------------------------------------------------------------------
Description
Get number of files in an archive.
Parameters
_szArcFile Archive file name
Return Code
0<= Number of files in an archive
-1 Error
-----------------------------------------------------------------------
%l BOOL WINAPI UnlhaQueryFunctionList(const int _iFunction)
-----------------------------------------------------------------------
Description
Check if API is supported.
Parameters
_iFunction Number corresponding to a API.
(Refer to UNLHA32.H to find the number)
Return Code
TRUE API supported by UNLHA32.DLL
FALSE - API not supported by UNLHA32.DLL
- Illegal parameter
-----------------------------------------------------------------------
%m BOOL WINAPI UnlhaConfigDialog(const HWND _hwnd,
LPSTR _szOptionBuffer, const int _iMode)
-----------------------------------------------------------------------
Description
Set default directory and options.
Default conditions that may be set:
1. Default directory to extract files. Whether to use
specified directory.
2. Whether to use absolute directory specification or
relative directory specification. (-jf0 | -jf1)
3. Overwrite option (-jyo1 | -jyo0 | -jn)
4. Whether to extract file with attributes (eg. System or
Hidden attributes.) (-a0 | -a1)
5. Whether to conduct CRC.(-p0 | -p1)
6. Whether to prompt to create directory when it does not exist.
(-jyd0 | -jyd1)
7. Whether to check extraction directory for free disk space
before extracting files.(-f0 | -f1)
8. Whether to use directory information in the archive file.
(-gj0 | -gj1)
9. Whether to display execution progress bar.(-gn0 | -gn1)
10. Whether to display simple dialog to show execution progress.(-gn2)
Parameters
_hwnd Window handle of application that is calling
UNLHA32.DLL.
_szOptionBuffer Same as is written in the Registry.
Buffer size must be equal to or larger than
513 bytes.
_iMode Specify whether the setting is for file compression
or file extraction. (In the current version,
this parameter does not work.)
UNPACK_CONFIG_MODE 1 File extraction
PACK_CONFIG_MODE 2 File compression
Return Code
ERROR_ALREADY_RUNNING UNLHA32.DLL is currently executing
TRUE Conditions set
FALSE Error or cancel
WARNING:
UnlhaConfigDialog() does not return Extract-Attribute and
RegardECommand commands. Furthermore, default directory
specified from a command line is also not included.
NOTE:
Specified settings are written to Software\ArchiverDll field in
the Registry file. Entries in Archiver\Common will be also be
used with other DLL supported by Standard Archiver Format
specification such as UNARJ32.DLL.
UNLHA32.DLL will use values specified in the Registry fields if
if options such as directory to extract files are not specified
during execution. If a directory is explicitly specified in a
command line, default specification will be overrided and files
will be extracted with the specified settings. If options are
not specified and no default settings are specified in the
Registry file, files are extracted using default settings
specified in the UNLHA32.DLL codes.
To disable Registry settings, set the "-+" option. Return string
from UnlhaConfigDialog() will contain the "-+" option.
-----------------------------------------------------------------------
%o int WINAPI UnlhaExtractMem(const HWND _hwnd, LPCSTR _szCmdLine,
LPBYTE _szBuffer, const DWORD _dwSize, time_t *_lpTime,
LPWORD _lpwAttr, LPDWORD _lpdwWriteSize)
-----------------------------------------------------------------------
Description
Extract to memory buffer.
Parameters
_hwnd Windows handle of application calling UNLHA32.DLL.
UNLHA32.DLL calls EnableWindow() function using this
handle. If application does not use any windows
such as those that run in DOS prompt, set this
parameter to NULL.
_szCmdLine Command line to pass to UNLHA32.DLL. Parameters are
same as Unlha() but commands will be ignored.
_lpBuffer Buffer to store compression image.
_dwSize Size of buffer. Result of UNLHA32.DLL will be
truncated to this size.
_lpTime Time of extracted file in Greenwich time. Set to
NULL if value is not necessary.
_lpwAttr Attribute of extracted file. Set to NULL if value
is not necessary.
_lpdwWriteSize
Size written to buffer. Set to NULL if value is not
necessary.
Return Code
0 No error
other Error executing command. Refer to UNLHA32.H file for
a listing of error codes.
Note
It probably does not make too much sense to use wild card
characters in archive file name and file name.
-----------------------------------------------------------------------
%p int WINAPI UnlhaCompressMem(const HWND _hwnd, LPCSTR _szCmdLine,
const LPBYTE _szBuffer, const DWORD _dwSize,
const time_t *_lpTime, const LPWORD _lpwAttr,
LPDWORD _lpdwWriteSize)
-----------------------------------------------------------------------
Description
Compress content of memory buffer and output to archive file.
Parameters
_hwnd Windows handle of application calling UNLHA32.DLL.
UNLHA32.DLL calls EnableWindow() function using this
handle. If application does not use any windows
such as those that run in DOS prompt, set this
parameter to NULL.
_szCmdLine Command line to pass to UNLHA32.DLL. Specified file
name will be the name used during archive.
_lpBuffer Buffer to store compressed file image.
_dwSize Size of image
_lpTime Time in Greenwich time. Set to NULL to use system
time during compression.
_lpwAttr File attribute. NULL archives files as FA_ARCH.
_lpdwWriteSize
Pointer to buffer to return size after compression.
If size is not needed, set to NULL.
Return Code
0 No error
other Error executing command. Refer to UNLHA32.H file for
a listing of error codes.
Note
It probably does not make too much sense to use wild card
characters in archive file name and file name.
--------------------------------------------------------------------------
Following OpenArchive functions may not be used with Unlha functions.
--------------------------------------------------------------------------
-----------------------------------------------------------------------
%q HARC WINAPI UnlhaOpenArchive(const HWND _hwnd, LPCSTR _szFileName,
const DWORD _dwMode)
-----------------------------------------------------------------------
Description
Assign an handle to an archive file.
Parameters
_hwnd Handle of an application window calling
UNLHA32.DLL.
_szFileName Archive file name.
_dwMode Initialization mode such as UnlhaFindFirst().
M_INIT_FILE_USE Use Registry file settings.
M_REGARDLESS_INIT_FILE Do not use Registry file
settings. Same as specifying
"-+" option.
M_CHECK_ALL_PATH Use full pathname. Same as
specifying "-p" option.
M_CHECK_FILENAME_ONLY Use only file name. Same as
specifying "-p-" option.
M_USE_DRIVE_LETTER Include drive in pathname
inside archive file. Same as
"-jf" option.
M_NOT_USE_DRIVE_LETTER Do not include drive in
pathname inside archive file.
M_ERROR_MESSAGE_ON Display error message. Same as
"-gm-" option.
M_ERROR_MESSAGE_OFF Do not display error message.
Same as "-gm" option.
Return Code
Handle of archive file. Returns NULL when there is an error.
WARNING:
Multiple handle are not returned in the current version because
global variables are currently used.
-----------------------------------------------------------------------
%r int WINAPI _export UnlhaCloseArchive(HARC _harc)
-----------------------------------------------------------------------
Description
Release handle attached by calling UnlhaOpenArchive() function.
Parameters
_harc handle returned by UnlhaOpenArchive() function.
Return Code
0 No error
-----------------------------------------------------------------------
%s int WINAPI UnlhaFindFirst(HARC _harc, LPCSTR _szWildName,
INDIVIDUALINFO FAR *lpSubInfo)
-----------------------------------------------------------------------
Description
Get information on first file in an archive.
Parameters
_harc handle returned by UnlhaOpenArchive() function.
_szWildName File name to search. Several file names may be
specified.
_lpSubInfo pointer to INDIVIDUALINFO structured variable
to return result. If result is not necessary,
set _lpSubInfo to NULL.
Return Code
0 Normal end. File information returned to
variable pointed to by _lpSubInfo.
-1 Search finished.
Warning
UnlhaFindFirst() and UnlhaFindNext() will close archive file
pointed by _harc after execution. Thus, archive file must be
reopened if the archive file is to be processed further. This
closing and reopening of files will be extensively slow on some
systems.
-----------------------------------------------------------------------
%t int WINAPI UnlhaFindNext(HARC _harc,
INDIVIDUALINFO FAR *_lpSubInfo)
-----------------------------------------------------------------------
Description
Get information on files after the first file in an archive.
Parameters
_harc handle returned by UnlhaOpenArchive() function
_lpSubInfo pointer to INDIVIDUALINFO structured variable
to return result. If result is not necessary,
set _lpSubInfo to NULL.
Return Code
0 Normal end. File information returned
to variable pointed to by _lpSubInfo.
-1 Search finished.
-----------------------------------------------------------------------
%u int WINAPI UnlhaGetArcFileName(HARC _harc,
LPSTR _lpBuffer, const int _nSize)
-----------------------------------------------------------------------
Description
Get name of archive file.
Parameters
_lpBuffer buffer to contain file name
_nSize buffer size
Return Code
0 no error
-----------------------------------------------------------------------
%v DWORD WINAPI UnlhaGetArcFileSize(HARC _harc)
-----------------------------------------------------------------------
Description
Get size of archive file.
Return Code
Size of archive file
-1 error
-----------------------------------------------------------------------
%w DWORD WINAPI UnlhaGetArcOriginalSize(HARC _harc)
-----------------------------------------------------------------------
Description
Get total size of files matching file name when they are
extracted.
UnlhaFindNext() must be called before calling this function.
If the UnlhaFindNext function is still running when this
function is called, it will only be the total of all currently
processed files that matched. To obtain the complete total
file size, make sure to run this function after UnlhaFindNext
function finishes execution.
Return Code
Total size
-1 error
-----------------------------------------------------------------------
%x DWORD WINAPI UnlhaGetArcCompressedSize(HARC _harc)
-----------------------------------------------------------------------
Description
Get total size of compressed file matching file name
specification.
Return Code
Total file size of compressed files
-1 error
WARNING:
UnlhaFindNext() must be called and finished executing before
calling this function.
-----------------------------------------------------------------------
%y WORD WINAPI UnlhaGetArcRatio(HARC _harc)
-----------------------------------------------------------------------
Description
Get total compression rate of specified files.
Return Code
Total compression rate
-1 error
WARNING:
UnlhaFindNext() must be called and finished executing before
calling this function.
-----------------------------------------------------------------------
%z WORD WINAPI UnlhaGetArcDate(HARC _harc)
-----------------------------------------------------------------------
Description
Get last modification date of archive file.
Return Code
Last modification date in INDIVIDUALINFO structure
-1 error
-----------------------------------------------------------------------
%A WORD WINAPI UnlhaGetArcTime(HARC _harc)
-----------------------------------------------------------------------
Description
Get last modification time of archive file.
Return Code
Last modification time in INDIVIDUALINFO structure
-1 error
-----------------------------------------------------------------------
%B UINT WINAPI UnlhaGetArcOSType(HARC _harc)
-----------------------------------------------------------------------
Description
Get OS type when archive file was created.
Return Code
OS type:
0 MS-DOS
2 UNIX
4 MAC-OS
5 OS/2
10 others
11 OS9
12 OS/68K
13 OS/386
14 HUMAN
15 CP/M
16 FLEX
17 Runser
18 WindowsNT
19 Windows95
-1 error
-----------------------------------------------------------------------
%C int WINAPI UnlhaIsSFXFile(HARC _harc)
-----------------------------------------------------------------------
Description
Check if archive file is a self-extracting file.
Return Code
Return code will be one of the following value. In case of
an error, return code will be -1.
SFX_NOT 0 Not a self-extracting file(SFX)
SFX_DOS_213S 1 LHA's SFX 2.13 or later small DosSFX
SFX_DOS_250S 2 LHA's SFX 2.50 or later small DosSFX
SFX_DOS_265S 3 LHA's SFX 2.65 or later small DosSFX
SFX_DOS_213L 51 LHA's SFX 2.13 or later large DosSFX
SFX_DOS_250L 52 LHA's SFX 2.50 or later large DosSFX
SFX_DOS_265L 53 LHA's SFX 2.65 or later large DosSFX
SFX_WIN16_213_1 1001 LHA's SFX 2.13.w16.1 or later WinSFX
SFX_WIN16_213_2 1002 LHA's SFX 2.13.w16.2 or later WinSFX
SFX_WIN16_213_3 1003 Revised LHA's SFX 2.13.w16.3 WinSFX
SFX_WIN16_250_1 1011 Proprietary UNLHA32.DLL revised WinSFXM 2.50
SFX_WIN16_255_1 1021 WinSFXM 2.55.w16.4 or later
SFX_WIN32_213_1 2001 LHA's SFX 2.13.w32.1 or later WinSFX32
SFX_WIN32_213_3 2002 Revised LHA's SFX 2.13.w32.3 WinSFX32
SFX_WIN32_250_1 2011 Proprietary UNLHA32.DLL revised WinSFX32M
SFX_WIN32_250_6 2012 WinSFX32M 2.50.w32.6 or later
SFX_LZHSFX_1002 2051 LZHSFX 1.0.0.2 or later WinSFX32 created
by Explorer extended menu
SFX_LZHSFX_1100 2052 LZHSFX 1.1.0.0 or later WinSFX32 created
by Explorer extended menu
SFX_LZHAUTO_0002 2101 LZHAUTO 0.0.0.2 or later WinSFX32 created
by Explorer extended menu
SFX_LZHAUTO_1002 2102 LZHAUTO 1.0.0.2 or later WinSFX32 created
by Explorer extended menu
SFX_LZHAUTO_1100 2103 LZHAUTO 1.1.0.0 or later WinSFX32 created
by Explorer extended menu
Warning
Self-extracting archive file does not contain information specifying
itself as a self-extracting file nor does it contain information
such as version number on utility that created the self-extracting
file. Thus, this function may not return a proper value because
of format differences between versions.
Furthermore, UNLHA32.DLL is only able to recognize self-archiving
format created by LHA.EXE. FileManager extension utility,
Explorer Extension utility, and by UNLHA32.DLL.
-----------------------------------------------------------------------
%D int WINAPI UnlhaGetFileName(HARC _harc,
LPSTR _lpBuffer, const int _nSize)
-----------------------------------------------------------------------
Description
Get names of files stored in an archive file.
Parameters
_lpBuffer buffer to store file names
_nSize buffer size
Return Code
0 No error. File name is returned in _lpBuffer.
-----------------------------------------------------------------------
%E int WINAPI UnlhaGetMethod(HARC _harc,
LPSTR _lpBuffer, const int _nSize)
-----------------------------------------------------------------------
Description
Get file compression method of archive file.
Parameters
_lpBuffer buffer to store file compresssion method
_nSize buffer size
Return Code
0 No error. _lpBuffer contains archive method as a string.
(eg. "lh5")
-----------------------------------------------------------------------
%F DWORD WINAPI UnlhaGetOriginalSize(HARC _harc)
-----------------------------------------------------------------------
Description
Get size of files in archive file when they are extracted.
Return Code
Size of files in archive file
-1 error
-----------------------------------------------------------------------
%G DWORD WINAPI UnlhaGetCompressedSize(HARC _harc)
-----------------------------------------------------------------------
Description
Get size of files in compressed format in an archive file.
Return Code
file size of files in archive file
-1 error
-----------------------------------------------------------------------
%H WORD WINAPI UnlhaGetRatio(HARC _harc)
-----------------------------------------------------------------------
Description
Get compression ratio of files in the archive file.
Return Code
compression ratio of files in the archive file
-1 error
-----------------------------------------------------------------------
%I WORD WINAPI UnlhaGetDate(HARC _harc)
-----------------------------------------------------------------------
Description
Get last modification date of files in the archive file.
Return Code
last modification day of files in the archive file
-1 error
-----------------------------------------------------------------------
%J WORD WINAPI UnlhaGetTime(HARC _harc)
-----------------------------------------------------------------------
Description
Get last modification time of files in the archive file.
Return Code
last modification time of files in the archive file.
-1 error
-----------------------------------------------------------------------
%K DWORD WINAPI UnlhaGetWriteTime(HARC _harc)
-----------------------------------------------------------------------
Description
Get time of the last modification in an archive file.
Return Code
last modification time of files in the archive file in UNIX
UTC format.
-1 error
WARNING: Similar to UnlhaGetCreateTime() and UnlhaGetAccessTime(),
this function uses information stored in the archive header file
which is not yet official. Please try not to use it.
-----------------------------------------------------------------------
%L DWORD WINAPI UnlhaGetCreateTime(HARC _harc)
-----------------------------------------------------------------------
Description
Get time when the archive file was created.
Return Code
last modification time of files in the archive file in UNIX
UTC format.
-1 error
-----------------------------------------------------------------------
%M DWORD WINAPI UnlhaGetAccessTime(HARC _harc)
-----------------------------------------------------------------------
Description
Get time of the last modification in an archive file.
Return Code
last modification time of files in the archive file in UNIX
UTC format.
-1 error
-----------------------------------------------------------------------
%N DWORD WINAPI UnlhaGetCRC(HARC _harc)
-----------------------------------------------------------------------
Description
Get CRC of files in archive file.
Return Code
CRC of files in archive file
-1 error
-----------------------------------------------------------------------
%O int WINAPI UnlhaGetAttribute(HARC _harc)
-----------------------------------------------------------------------
Description
Attribute of files in archive file.
Return Code
-1 error
file attribute:
1 FA_RDONLY read only
2 FA_HIDDEN hidden
4 FA_SYSTEM system
8 FA_LABEL volume label
16 FA_DIREC directory
32 FA_ARCH archive bit
-----------------------------------------------------------------------
%P UINT WINAPI UnlhaGetOSType(HARC _harc)
-----------------------------------------------------------------------
Description
Get OS which the files in archive file was created.
Return Code
OS type code (refer to UnlhaGetArcOSType() function.)
-----------------------------------------------------------------------
%2. INDIVIDUALINFO Structure
-----------------------------------------------------------------------
Structure
typedef struct {
DWORD dwOriginalSize;
DWORD dwCompressedSize;
DWORD dwCRC;
UINT uFlag;
UINT uOSType;
WORD wRatio;
WORD wDate;
WORD wTime;
char szFileName[FNAME_MAX32 + 1];
char dummy1[3];
char szAttribute[8];
char szMode[8];
}@INDIVIDUALINFO;
Members
dwOriginalSize file size when uncompressed
dwCompressedSize file size of compressed file
dwCRC CRC of files in archive. Upper 16 bits
are always set to 0.
uFlag Extracting/testing result on each file
in the archive. Code is same as those
returned by Unlha() function.
0 otherwise.
uOSType OS used when creating file
wRatio compression rate
wDate date. Upper 7 bits represents number of
years since 1980. Next 4 bits represents
month, remaining 5 bits represents days.
wTime time. Upper 5 bits represents hour. Next
6 bits represents minutes. Remaining 5
bits are seconds divided by 2.
szFileName archive file name
szAttribute file attribute of file in attribute.
Same as those returned by 'l' option.
szMode string representing compression method.
eg. "lh5"
-----------------------------------------------------------------------
%3. Windows Registry
-----------------------------------------------------------------------
@On a Win32s system, all names are treated as a key and all values
are in type REG_SZ.
HKEY_CURRENT_USER\\Software\\ArchiverDll\\Common
DefaultDir : REG_SZ
Default directory. Must end with either
'\' or ':' character.
DirectoryMode : REG_DWORD
Flag representing whether to use full
or relative path name when extracting
files.
0 : relative directory. Same as
specifying "-jf0" option.
1 : absolute directory.(default)
OverWriteMode : REG_DWORD
Flag representing what to do when file
with similar name already exists.
0 : Always overwrite. Same as
specifying "-jyo" option.
1 : Confirm overwrite (default)
2 : Do not overwrite. Same as
specifying "-jn" option.
ExtractAttribute : REG_DWORD
Flag representing whether to extract files
with hidden and system attributes.
0 : Do not extract hidden and system
files.
1 : Extract hidden and system files.
(default)
JunkDirectory : REG_DWORD
Flag representing whether to recognize 'x'
command as 'e' command.
0 : Execute as 'x' command. (default)
1 : Execute as 'e' command. Same as
specifying "-gj" option.
HKEY_CURRENT_USER\\Software\\ArchiverDll\\UNLHA32
MatchLevel : REG_DWORD
Flag representing whether to execute
complete file search.
0 : No not search. (default)
1 : Search. Same as specifying "-p"
option.
DiskSpaceCheck : REG_DWORD
Flag representing whether to check for
free disk space before extracting files.
0 : Do not check. (default)
1 : Check. Same as specifying "-jd"
option.
MakeDirectoryMode : REG_DWORD
Flag representing whether to confirm when
creating directory.
0 : Confirm. (default)
1 : Do not confirm. Same as specifying
"-jyc" option.
TotalBar : REG_DWORD
Flag representing whether to represent total
files as 100% in a graph when extracting
files from an archive. When set to 1,
extraction will require more time because
archive file is read twice.
0 : Do not set to total files.(default)
1 : Set to total files.
FDDCheck : REG_DWORD
Flag representing whether to make ToolBar
setting effective also for files on FD.
On a hard disk, it may not require too much time
to reread files twice, but on a FD it may be
very slow.
0 : Make ToolBar flag effective even
for files on FD.
1 : Override ToolBar flag for files on
FD. (default)
FVMode : REG_DWORD
Flag representing whether to display only
file name and graph while extracting files.
0 : Normal display. (default)
1 : Display only file name and graph.
UnlhaVersion : REG_DWORD
Value to return when UnlhaGetVersion()
function is called.
eg.
119 : Return 119 when UnlhaGetVersion()
is called.
InitOption : REG_SZ
Default parameters to be used by UNLHA()
type functions. Refer to COMMAN_E.TXT file
for parameter values.
Values set to this variable will have lower
precedent than those specified by
UnlhaConfigDialog() function.
CauseOption : REG_SZ
Override options. Parameters set to this variable
will override values set even during program
execution. This variable may be used to always
use h0 format header.
-----------------------------------------------------------------------
%4. Error Codes
-----------------------------------------------------------------------
** WARNING : When following error is encountered, process will still
continue execution skipping the processing in error.
ERROR_DISK_SPACE
Not enough disk space to extract file
ERROR_READ_ONLY
Directory to extract file is read-only
ERROR_USER_SKIP
Skipped extraction by user request
ERROR_FILE_CRC
Archive file CRC error
ERROR_FILE_OPEN
Can not open file to extraction
ERROR_MORE_FRESH
More recent file already exists
ERROR_NOT_EXIST
File not found at extraction directory
** ERROR : Unrecoverable error. Process terminated.
ERROR_MAKEDIRECTORY
Can not make directory
ERROR_CANNOT_WRITE
Write error detected when extracting files
ERROR_HUFFMAN_CODE
Broken Huffman code in archive file
ERROR_COMMENT_HEADER
Broken comment header in archive file
ERROR_HEADER_CRC
CRC error in archive file
ERROR_HEADER_BROKEN
Broken header in archive file
ERROR_ARC_FILE_OPEN
Can not open archive file
ERROR_NOT_ARC_FILE
Archive file not in LZH format
ERROR_CANNOT_READ
Error reading archive file
ERROR_FILE_STYLE
File not in LZH format
ERROR_COMMAND_NAME
Illegal command
ERROR_MORE_HEAP_MEMORY
Unable to allocate work heap memory
ERROR_ENOUGH_MEMORY
Unable to allocate global memory
ERROR_ALREADY_RUNNING
UNLHA.DLL already running
ERROR_USER_CANCEL
User cancel detected while extracting
ERROR_HARC_ISNOT_OPENED
UnlhaFindFirst() called before archive
file handle assigned by UnlhaOpenArchive()
ERROR_NOT_SEARCH_MODE
UnlhaFindNext() called before funUnlhaFindFirst().
Or UnlhaGetFileName() function called before
these functions.
ERROR_NOT_SUPPORT
Unsupported function called
ERROR_TIME_STAMP
Illegal date or time format
ERROR_TMP_OPEN
Unable to open temporary file
ERROR_LONG_FILE_NAME
Directory path too long
ERROR_ARC_READ_ONLY
Archive file is read only
ERROR_SAME_NAME_FILE
File already exists in the archive file
ERROR_NOT_FIND_ARC_FILE
Can not find LZH file in the specified directory
ERROR_RESPONSE_READ
Error reading batch file
ERROR_NOT_FILENAME
File name required
ERROR_TMP_COPY
Can not write back to temporary archive file
-----------------------------------------------------------------------
%5. Miscellaneous
-----------------------------------------------------------------------
Please lock GMEM_MOVEABLE variable in the global memory. It is used to
return handle when function UnlhaOpenArchive is called.
There isn't any need to execute GlobalFree from an application, but
freeing this memory prevents memory waste a little bit.
-----------------------------------------------------------------------
Download Driver Pack
After your driver has been downloaded, follow these simple steps to install it.
Expand the archive file (if the download file is in zip or rar format).
If the expanded file has an .exe extension, double click it and follow the installation instructions.
Otherwise, open Device Manager by right-clicking the Start menu and selecting Device Manager.
Find the device and model you want to update in the device list.
Double-click on it to open the Properties dialog box.
From the Properties dialog box, select the Driver tab.
Click the Update Driver button, then follow the instructions.
Very important: You must reboot your system to ensure that any driver updates have taken effect.
For more help, visit our Driver Support section for step-by-step videos on how to install drivers for every file type.