Copyright: Copyright ® 1996 Greenleaf Software, Inc.


Contents
 Simplified Interface

 Introduction

 Functions

 Technical Support


Introduction

Greenleaf ArchiveLib v2.0 supports a simplified interface that is designed to get simple archiving projects up and running quickly.  With the Simplified Interface, you can easily do the following:

•	Manipulate directories of PKWare format archives.  This includes modifying dates, time stamps, permissions, names, etc.

•	Create ZIP files.

•	Append to ZIP files.

•	Extract selected files from ZIP files.

•	Delete selected files from ZIP files.

•	Monitor the progress of your operations.

All this is done with an API of no more than eight function calls.  The only data structure you need to use is a simple representation of the ZIP directory, which is conveniently stored in an array.

Data Structures

When working with ZIP files, you will frequently need to manipulate the archive's directory.  In particular, you need a copy of the directory in order to extract or delete files from an archive.  You can also change some of the items saved in the directory, such as comments, file names, and time stamps.

With the Simplified Interface, getting the contents of an existing archive is done with a call to ALReadDir().  This function returns an ALZipDir array containing a simple representation of the contents of your ZIP file.

The elements of the array have the same names for programmers in C++, C, Visual Basic, and Delphi.  The languages have slightly different conventions for accessing and modifying structure members, but the semantics of the members are identical.

Any modifications you make to the directory array will be written out to the archive when you perform an ALExtract(), ALDelete(), or ALWriteDir() operation.

Callbacks / Message Handlers

ArchiveLib provides a monitor class that can be used to update user interfaces during archive maintenance.  The Simplified Interface takes a slightly different approach.  C and C++ programmers simply write and supply a callback function that will get called periodically during archive operations.  Visual Basic and Delphi programmers specify three window handles that get updated with text during archive operations.  These three window handles will usually be for controls.

Regardless of which type of monitor you are using, you only have to deal with three pieces of information.  ArchiveLib will send your application the names of files as they are opened, as well as percentage updates on both file and overall job progress.  You can then manage this data and give it to your users in whatever fashion you choose.

Invisible Windows

Under Visual Basic and Delphi, the windows that receive this monitoring data are frequently made invisible.  You can then create an OnChange() function for the invisible window, and use it to update your user interface in whatever fashion you please.  The invisible window gets a simple ASCII number ranging from 0 to 100, which you can then use to update a gauge control.

Monitors are used by ALAppend(), ALCreate(), ALDelete(), and ALExtract().  For C and C++ programmers, the callback function is passed as the last argument to these functions. For Visual Basic and Delphi programmers, the last three arguments of these commands consist of window handles that will receive progress information.

The prototype for a callback function is shown below:

#if defined( __cplusplus )

extern "C"

#endif

void (AL_DLL_FAR * CALLBACK_FN )( const char AL_DLL_FAR *file_name,

              int file_ratio,

              int job_ratio );

The AL_DLL_FAR specifiers are only necessary when you are calling a 16-bit DLL from a small, medium, or compact model program.  In all other cases you can drop or ignore that macro.

The callback function gets called in two different modes.  When a new file is opened, the callback function is called with a valid file name in the name parameter, and with -1 in the other two parameters.  At other times, the callback function is called to update progress information.  When this is the case, the name is passed with a value of 0 (the NULL pointer value), and the two ratios are set to numbers between 0 and 100.

The file ratio number is updated periodically during the processing of an individual file.  This means that it might go from 0 to 100 many times during an entire job.  However, the job ratio number goes from 0 to 100 only once during an entire job.  It is based on the total byte count for all of the files collectively, not the file count.

The window handles that Visual Basic and Delphi programmers must specify are for the file names, the file ratio, and the job ratio.  The file names are sent in ASCII using a SetWindowText() function call.  This function call triggers the OnChange() methods for both Visual Basic and Delphi.  The ratios are also sent as ASCII using SetWindowText().

You may have to convert the control contents to an integer by using the Val() function in order to update progress gauges or other controls that expect numeric data.

Accessing the array

The ALReadDir() function returns an array that contains one entry for each item in the ZIP file.  Additionally, a single entry at the end of the array holds the comment field for the archive itself.  There are two ways to know how many entries are present in the array.

1.   Get a count of items from the ALReadDir() function itself.

2.   If you don't have the count, scan through the array and look for the first element with a size of -1.  That is the last element in the array, and it holds the archive comment.  The record before the comment contains the last directory entry from the archive.  If the archive was completely empty, ALReadDir() will return a count of 0, and the ALZipDir array will have exactly one entry.


Functions

ALAppend()	Append a batch of files to an existing ZIP file

ALCreate()	Create a new ZIP archive with a specified set of files

ALDelete()	Delete a set of files from a ZIP file

ALExtract()	Extract a batch of files from a ZIP file

ALFreeDir()	Free all the storage used by an ALZipDir array

ALReadDir()	Reads the directory from a ZIP file and places it into an ALZipDir array

ALSetName()	Modify the name of a file stored in a ZIP archive

ALSetComment()	Modify the comment of a file stored in a ZIP archive

ALWriteDir()	Update the directory stored in a ZIP archive


ALAppend()

see also	example

Append a batch of files to an existing ZIP file

Synopsis

#include "alsimple.h"

 int ALAppend( char *archive_name, char *input_files, int strip_path, CALLBACK_FN callback )

 int ALAppend( char *archive_name, char *input_files, int strip_path, CALLBACK_FN callback )

 Function ALAppend Lib "AL20LW" ( ByVal archive_name$, ByVal input_files$, ByVal strip_path%, ByVal text_window%, ByVal file_progress_window%, ByVal job_progress_window% ) As Integer

 function ALAppend( archive_name : String; input_files : String; strip_path : integer; text_window : Hwnd; file_progress_window : Hwnd; job_progress_window : Hwnd ) : integer;

Arguments

archive_name

The name of an existing ZIP file to be modified.  This function will add the list of files to the existing ZIP file, after any duplicate file names are removed from the list.

input_files

This is a list of input files, delimited by commas or spaces.  Any wild card names are expanded before appending to the ZIP file.

strip_path

If this flag is set, ArchiveLib will strip path names from files before they are appended to the archive.  If you decide to leave path names on the files, you can still delete them upon extraction by using a similar flag.

callback

C and C++ programmers can track progress of the ZIP file creation through a callback function.  The callback function is called each time a file is opened, and periodically during the archiving.  Pass 0 here if you don't want to do any monitoring.

text_window

Visual Basic and Delphi programmers pass this argument to perform progress monitoring.  Each time a file is opened, the name of the file is sent to this window using a call to the Windows API function SetWindowText().  If you don't like the unadorned file name in an edit control, make the control invisible, then process it in an OnChange() event handler.  Pass 0 if you don't want to receive the file names.

file_progress_window

Visual Basic and Delphi programmers pass this argument to perform progress monitoring.  As each file is inserted into the archive, this window gets a text message with a number ranging from 0 to 100.  This indicates what percent of the file is complete.  Pass 0 if you do not want any file progress messages.

job_progress_window

Visual Basic and Delphi programmers pass this argument to perform progress monitoring.  As the entire archiving job is performed, this window gets a text message with a number ranging from 0 to 100.  This indicates what percent of the job is complete.  Pass 0 if you do not want any job progress messages.

You might want to consider handling the file_progress_window and the job_progress_window by using the invisible window technique discussed earlier in this help file.

Function

This function appends files to a ZIP file, with a list of selected input files.  Once this function is complete, you can check the contents of the resulting ZIP file with a call to ALReadDir().

If for some reason you have an existing ALZipDir array for the archive before the append operation, this function call has the effect of invalidating it.

A sample piece of code including ALAppend() is shown below.

i = ALAppend( "libs.zip", "*.tr?", my_callback );

printf( "\n" );

return i;

Returns

ALAppend() returns 0 if the function was successful.  If an error occurs, a value less than 0 is returned.


ALAppend() see also
See Also

ALReadDir(), ALCreate()


ALAppend() example
See example programs EX25CON.CPP, EX25VB.FRM, and EX24UNIT.PAS.


ALCreate()

see also	example

Create a new ZIP archive with a specified set of files

Synopsis

#include "alsimple.h"

 int ALCreate( char *archive_name, char *input_files, int strip_path, CALLBACK_FN callback )

 int ALCreate( char *archive_name, char *input_files, int strip_path, CALLBACK_FN callback )

 Function ALCreate Lib "AL20LW" ( ByVal archive_name$, ByVal input_files$, ByVal strip_path%, ByVal text_window%, ByVal file_progress_window%, ByVal job_progress_window%) As Integer

 function ALCreate( archive_name : String; input_files : String; strip_path : integer; text_window : Hwnd; file_progress_window : Hwnd; job_progress_window : Hwnd ) : integer;

Arguments

archive_name

The name of the ZIP archive file to be created.  This function will overwrite any existing ZIP archive with this name, so be sure you take any necessary backup measures.

input_files

This is a list of input files delimited by commas or spaces.  Any wild card names are expanded before insertion into the ZIP file.

strip_path

If this flag is set, ArchiveLib will strip path names from files before they are inserted into the archive.  If you decide to leave path names on the files, you can still delete them upon extraction by using a similar flag.

callback

C and C++ programmers can track progress of the ZIP file creation through a callback function.  The callback function is called each time a file is opened, and periodically during the archiving.  Pass 0 here if you don't want to do any monitoring.

text_window

Visual Basic and Delphi programmers pass this argument to perform progress monitoring.  Each time a file is opened, the name of the file is sent to this window using a call to the Windows API function SetWindowText().  If you don't like the unadorned file name in an edit control, make the control invisible, then process it in an OnChange() event handler.  Pass 0 if you don't want to receive the file names.

file_progress_window

Visual Basic and Delphi programmers pass this argument to perform progress monitoring.  As each file is inserted into the archive, this window gets a text message with a number ranging from 0 to 100.  This indicates what percent of the file is complete.  Pass 0 if you do not want any file progress messages.

job_progress_window

Visual Basic and Delphi programmers pass this argument to perform progress monitoring.  As the entire archiving job is performed, this window gets a text message with a number ranging from 0 to 100.  This indicates what percent of the job is complete.  Pass 0 if you do not want any job progress messages.

You might want to consider handling the file_progress_window and the job_progress_window by using the invisible window technique discussed earlier in this help file.

Function

This function creates a ZIP file, with a list of selected input files.  Once this function is complete, you can check the contents of the resulting ZIP file with a call to ALReadDir().

A sample piece of code including ALCreate() is shown below.

int i;

struct ALZipDir *z;

i = ALCreate( "libs.zip", "*.bak, build.*", my_callback );

printf( "\nALCreate() returned %d\n", i );

Returns

ALCreate() returns 0 if the function was successful.  If an error occurs, a value less than 0 is returned.


ALCreate() see also
See Also

ALReadDir(), ALAppend()


ALCreate() example
See example programs EX24WIN.C, EX25CON.CPP, EX23VB.FRM, and EX24UNIT.PAS.


ALDelete()

see also	example

Delete a set of files from a ZIP file

Synopsis

#include "alsimple.h"

 int ALDelete( ALZipDir *z, CALLBACK_FN callback )

 int ALDelete( ALZipDir *z, CALLBACK_FN callback )

 Function ALDelete( z() As ALZipDir, ByVal text_window%, ByVal file_progress_window%, ByVal job_progress_window% ) As Integer

 function ALDelete( z : ALZipDir; text_window : Hwnd; file_progress_window : Hwnd; job_progress_window : Hwnd ) : integer;

Arguments

z

An ALZipDir array.  This array should have been created with a call to ALReadDir().  The files that are going to be deleted will have their mark members set to a non-zero value.  Files in the array that have their marks cleared will not be deleted.

The marks are all set to a true value immediately after the array is created by ALReadDir().

callback

C and C++ programmers can track progress of the ZIP file deletion through a callback function.  The callback function is called each time a compressed file is copied.

text_window

Visual Basic and Delphi programmers pass this argument to perform progress monitoring.  Each time a compressed file is copied, the name of the file is sent to this window using a call to the Windows API function SetWindowText().  However, the file names that are passed to the window are not the names of the files being deleted.  Instead, you will see the names of the files in the archive that are being preserved.  It works this way because a deletion operation is really just a copy of a batch of compressed files.  The deletion takes place because the selected files don't get copied.

file_progress_window

Visual Basic and Delphi programmers pass this argument to perform progress monitoring.  As each compressed file is copied from the archive, this window gets a text message with a number ranging from 0 to 100.  This indicates what percent of the file is complete.  Pass 0 if you do not want any file progress messages.

job_progress_window

Visual Basic and Delphi programmers pass this argument to perform progress monitoring.  As the entire deletion job is performed, this window gets a text message with a number ranging from 0 to 100.  This indicates what percent of the job is complete.  Pass 0 if you do not want any job progress messages.

You might want to consider handling the file_progress_window and the job_progress_window by using the invisible window technique discussed earlier in this help file.

Function

This function deletes files from a ZIP file.  The list of files to delete is determined by marks set in the ALZipDir array.  Every file with a non-zero mark will be deleted.

This function invalidates any existing ALZipDir array.  Therefore, once the function is complete, you should call ALFreeDir() to free up the resource being used by the list.

A sample piece of code including ALDelete() is shown below.

z = ALReadDir( "libs.zip" );

if ( z != 0 ) {

     for ( i = 0 ; z[ i ].name ; i++ )

           if ( i % 2 )

                 z[ i ].mark = 0;

     ALDelete( z, my_callback );

     ALFreeDir( z );

} else

     cout << "Error reading zip file directory\n";

return 0;

Returns

ALDelete() returns 0 if the function was successful.  If an error occurs, a value less than 0 is returned.


ALDelete() see also
See Also

ALReadDir(), ALExtract()


ALDelete() example
See example programs EX27CON.CPP, EX26VB.FRM, and EX24UNIT.PAS.


ALExtract()

see also	example

Extract a batch of files from a ZIP file

Synopsis

#include "alsimple.h"

 int ALExtract( ALZipDir *z, int strip_path, CALLBACK_FN callback )

 int ALExtract( ALZipDir *z, int strip_path, CALLBACK_FN callback )

 Function ALExtract( z() As ALZipDir, ByVal strip_path, ByVal text_window%, ByVal file_progress_window%, ByVal job_progress_window% ) As Integer

 function ALExtract( z : ALZipDir; strip_path : integer; text_window : Hwnd; file_progress_window : Hwnd; job_progress_window : Hwnd ) : integer;

Arguments

z

An ALZipDir array.  This array should have been created with a call to ALReadDir().  The files that are going to be extracted will have their mark members set to a non-zero value.  Files in the array that have their marks cleared will not be extracted.

The marks are all set to a true value immediately after the array is created by ALReadDir().

strip_path

If this flag is set, ArchiveLib will strip path names from files as they are extracted from the archive.

callback

C and C++ programmers can track progress of the ZIP file creation through a callback function.  The callback function is called each time a file is opened, and periodically during the archiving.  Pass 0 here if you don't want to do any monitoring.

text_window

Visual Basic and Delphi programmers pass this argument to perform progress monitoring.  Each time a file is opened, the name of the file is sent to this window using a call to the Windows API function SetWindowText().  If you don't like the unadorned file name in an edit control, make the control invisible, then process it in an OnChange() event handler.  Pass 0 if you don't want to receive the file names.

file_progress_window

Visual Basic and Delphi programmers pass this argument to perform progress monitoring.  As each file is extracted from the archive, this window gets a text message with a number ranging from 0 to 100.  This indicates what percent of the file is complete.  Pass 0 if you do not want any file progress messages.

job_progress_window

Visual Basic and Delphi programmers pass this argument to perform progress monitoring.  As the entire extraction job is performed, this window gets a text message with a number ranging from 0 to 100.  This indicates what percent of the job is complete.  Pass 0 if you do not want any job progress messages.

You might want to consider handling the file_progress_window and the job_progress_window by using the invisible window technique discussed earlier in this help file.

Function

This function extracts files from a ZIP file.  The list of files to extract is determined by marks set in the ALZipDir array.

A sample piece of code including ALExtract() is shown below.

z = ALReadDir( "..\\libs.zip" );

if ( z != 0 ) {

     ALExtract( z, 0, my_callback );

     ALFreeDir( z );

} else

     cout << "Error reading zip file directory\n";

chdir( ".." );

return 0;

Returns

ALExtract() returns 0 if the function was successful.  If an error occurs, a value less than 0 is returned.


ALExtract() see also
See Also

ALReadDir(), ALDelete()


ALExtract() example
See example programs EX26CON.CPP, EX26VB.FRM, and EX24UNIT.PAS.


ALFreeDir()

see also	example

Free all the storage used by an ALZipDir array

Synopsis

#include "alsimple.h"

 void ALFreeDir( ALZipDir *z )

 void ALFreeDir( ALZipDir *z )

 Sub ALFreeDir(z() As ALZipDir)

 procedure ALFreeDir( z : ALZipDir );

Arguments

  z

An ALZipDir array.  This contains the complete contents of the directory of the ZIP file.

Function

When you read in an ALZipDir array with a call to ALReadDir(), ArchiveLib will allocate storage for the array itself, plus all of the strings contained in the array (file names and comments).  In addition, ArchiveLib creates an internal object used to interface to the archive.

When you are finished with this array, you need to free all of this space by using ALFreeDir().  Once you have called ALFreeDir(), the ALZipDir is invalidated, and you should not try to access it any more.

A sample piece of code including ALFreeDir() is shown below.

z = ALReadDir( "..\\libs.zip" );

if ( z != 0 ) {

     ALExtract( z, 0, my_callback );

     ALFreeDir( z );

} else

     cout << "Error reading zip file directory\n";

chdir( ".." );

return 0;

Returns

None


ALFreeDir() see also
See Also

ALReadDir(), ALWriteDir()


ALFreeDir() example
See example programs EX25CON.CPP, EX26VB.FRM, and EX23UNIT.PAS.


ALReadDir()

see also	example

Reads the directory from a ZIP file and places it into an ALZipDir array

Synopsis

#include "alsimple.h"

 struct ALZipDir * ALReadDir( char *filename, int *count, int *error )

 struct ALZipDir * ALReadDir( char *filename, int *count, int *error )

 Sub ALReadDir(z() As ALZipDir, filename As String, count%, error% )

 function ALReadDir( filename : string; var count : integer; var error : integer ) : ALZipDir;

Arguments

z

An ALZipDir array.  This argument is passed in Visual Basic only as an empty array.

filename

The name of the ZIP file.  This name should be represented using the native string type of your language.

count

The count variable will be returned with a count of the number of files in the directory.  The array will actually have count+1 entries (with the last entry containing a size value of -1, and the comment for the entire archive).  If you pass 0 in C or C++, the count will not be returned.

error

The status of the read directory operation is returned in this integer.  Status codes are 0 for a successful operation, and less than zero when an error occurs.

Function

This function opens up a ZIP file, reads in a complete copy of the  directory, and formats it to fit in an ALZipDir array.  Placing all of the information into an array gives you easy access to this directory information.

You should call this function when:

•	You are going to call ALExtract() or ALDelete().  Both of these functions require a complete ALZipDir array as an argument.

•	You want to examine or display the contents of an archive.  There are no other functions in the Simplified Interface that let you look at the contents of a ZIP file.

•	You want to modify the name, permissions, time/date stamp, or comment for a given file.  Perform any modifications needed to the ALZipDir array, then write the changed data back to the ZIP file with a call to ALWriteDir().

When you are finished using the ALZipDir array, it is critical that you free its storage with a call to ALFreeDir().  The array consumes many system resources, including the space for the array itself, all the string space for names and comments, and an internal ArchiveLib object referring to the archive.  If you don't call ALFreeDir(), your system will suffer from memory leaks.

A sample piece of code including ALReadDir() is shown below.

if Z <> nil then ALFreeDir( Z );

Z := ALReadDir( ArchiveListBox.Items[ ArchiveListBox.ItemIndex ],

Count,

error );

Returns

For all languages except Visual Basic, this function returns a pointer to an ALZipDir structure.  Visual Basic users must pass an empty ALZipDir array as the first argument to this function, since Visual Basic doesn't allow a function to return an array of a user defined type.  The ALZipDir array contains the directory information upon return from ALReadDir().


ALReadDir() see also
See Also

ALFreeDir(), ALSetComment(), ALSetName(), ALWriteDir()


ALReadDir() example
See example programs EX25CON.CPP, EX25VB.FRM, and EX24UNIT.PAS.


ALSetName()

see also	example

Modify the name of a file stored in a ZIP archive

Synopsis

#include "alsimple.h"

 void ALSetName( ALZipDir *z, char *name )

 void ALSetName( ALZipDir *z, char *name )

Arguments

z

A pointer to a specific array element.  To modify element i of the array returned by ALReadDir(), you could pass &z[i] or z + i.

name

The new name you want stored in the name member of the directory entry.

Function

The name member of the ALZipDir structure contains a pointer to a dynamically allocated string buffer. The buffer is allocated when the directory is read in, and will be freed when the directory is freed with a call to ALFreeDir().

Because the library code treats name as a dynamically allocated buffer, there are certain problems that need to be avoided.  Under normal circumstances, you could change the contents of the name member using code like this:

char *p = new char[ 1000 ];

strcpy( p, "My new file.ZIP" );

delete[] z[ 20 ].name;

z[ 20 ].name = p;

However, if you are calling ArchiveLib code in a DLL, you won't be sharing a heap with the DLL.  In that case, your call to delete[] may cause a failure.  Likewise, when ArchiveLib attempts to delete the pointer that you allocated in the above code, it may cause a fatal error.

The solution is to use ALSetName().  This insures that all heap manipulation is done inside the DLL, which circumvents these problems.

You can ignore ALSetName() and perform direct manipulation of these elements on your own if the following circumstances are true:

•	You are sharing the same heap as the ArchiveLib code.  For some DLL implementations, this will not be the case.  You should check your compiler documentation to be sure.

•	The pointers you allocate for string storage can be safely deleted with calls to delete[].  For example, if you are a C programmer, memory allocated with malloc() might not work with delete[].

•	You ensure that you don't leave any memory leaks by failing to free up the name member before you replace it.  You should free the storage using a call to delete[].

A sample piece of code including ALSetName() is shown below.

ALSetName( z + i, "TEMP.BAK" );

Returns

None


ALSetName() see also
See Also

ALSetComment()


ALSetName() example
See example program EX28CON.CPP.


ALSetComment()

see also	example

Modify the comment of a file stored in a ZIP archive

Synopsis

#include "alsimple.h"

 void ALSetComment( ALZipDir *z, char *comment )

 void ALSetComment( ALZipDir *z, char *comment )

Arguments

z

A pointer to a specific array element.  To modify element i of the array returned by ALReadDir(), you could pass &z[i] or z + i.

comment

The new comment you want to be stored in the comment member of the directory entry.

Function

The comment member of the ALZipDir structure contains a pointer to a dynamically allocated string buffer. The buffer is allocated when the directory is read in, and will be freed when the directory is freed with a call to ALFreeDir().

Since the library code is going to treat comment as a dynamically allocated buffer, there are certain problems that need to be avoided.  Under normal circumstances, you could change the contents of the comment member using code like this:

char *p = new char[ 1000 ];

strcpy( p, "My new comment" );

delete[] z[ 20 ].comment;

z[ 20 ].comment = p;

However, if you are calling ArchiveLib code in a DLL, you won't be sharing a heap with the DLL.  In that case, your call to delete[] may cause a failure.  Likewise, when ArchiveLib attempts to delete the pointer that you allocated in the above code, it may cause a fatal error.

The solution is to use ALSetComment().  This insures that all heap manipulation is done inside the DLL, which circumvents these problems.

You can ignore ALSetComment() and perform direct manipulation of these elements on your own if the following circumstances are true:

•	You are sharing the same heap as the ArchiveLib code.  For some DLL implementations, this will not be the case.  You should check your compiler documentation to be sure.

•	The pointers you allocate for string storage can be safely deleted with calls to delete[].  For example, if you are a C programmer, memory allocated with malloc() might not work with delete[].

•	You ensure that you don't leave any memory leaks by failing to free up the comment member before you replace it.  You should free the storage using a call to delete[].

A sample piece of code including ALSetComment() is shown below.

ALSetComment( z + i, "Delete this file!" );

Returns

None


ALSetComment() see also
See Also

ALSetName()


ALSetComment() example
See example program EX28CON.CPP.


ALWriteDir()

see also	example

Update the directory stored in a ZIP archive

Synopsis

#include "alsimple.h"

 int ALWriteDir( ALZipDir *z )

 int ALWriteDir( ALZipDir *z )

 Function ALWriteDir(z() As ALZipDir) As Integer

 function ALWriteDir( z : ALZipDir ) : integer;

Arguments

z

An ALZipDir array.  This array contains the complete contents of the directory of the ZIP file.

Function

This function completely rewrites the ZIP file directory with the information stored in the ALZipDir array.  You only need to call this function if you need to modify the file names, comment, permissions, or time/date stamps for any of the files in the ZIP file.

A sample piece of code including ALWriteDir() is shown below.

begin

   if (not Busy) and (z <> nil) then

   begin

      Busy := true;

      ALWriteDir( z );

      Busy := false;

   end

end;

Returns

ALWriteDir() returns 0 if the function was successful.  If an error occurs, a value less than 0 is returned.


ALWriteDir() see also
See Also

ALReadDir(), ALFreeDir(), ALSetName(), ALSetComment()


ALWriteDir() example
See example programs EX28CON.CPP and EX23UNIT.PAS.


Zork

You are [image] a maze of [image] y passages all alike.


French

Quelle surprise!  Vous-avez trouvè le secret!


Technical Support
  Tech Support

With each product purchased, you receive thirty (30) days of technical support FREE.  Your free 30 days begins with  your first call to Tech Support.  During the 30 days, you may call in at 214-248-2561 and receive unlimited technical support.  After the 30 days, you can choose between the following methods of support (or combine Options 1 and 2).

Tech Support Options

1.  Online Support	Technical support is offered FREE throught the BBS, Internet, CompuServe, or FAX.

2.  Professional Support	This level offers you the ability to call in on a toll-free 800 number.  Using a major credit card, the cost for Tech Support will be $2 per minute.

3.  Premier Support	Our new Premier Support option gives you unlimited telephone support on a toll-free line and a toll-free 800 number for the Greenleaf BBS - as many times as you require throughout the year.  The cost for Greenleaf Premier Support is $300 per product per year.

Hours

Monday - Friday

8:00 am - 5:00 pm

Central Standard Time

Important Numbers and Addresses

30-Days Free Support	214-248-2561

Professional Support Toll-Free Line	800-771-2757

Greenleaf Premier Toll-Free Line	800-523-9830

Greenleaf FAX	214-248-7830

Greenleaf BBS	214-250-3778

e-mail Address	support@gleaf.com

Web Page	http://www.gleaf.com/~gleaf

CompuServe	GO GREENLEAF