The InsertDisk event is triggered whenever a new or different disk is required to be inserted in a drive so that the current operation on a spanned zip file can proceed.
When using the Zip method and the SpanMultipleDisks property is set to span disks, this event is triggered when the current disk being written to gets full. This event allows you to prompt the end-user to insert a new disk. The lDiskNumber parameter provides the number of the current disk being requested. After the user has been queried to insert a new disk, the bDiskInserted parameter, which is modifiable, must be set to True. If it is left to the default value of False, the zipping operation will be aborted. Your application should inform the user to label each disk with the appropriate disk number as soon as it has been filled. If the same disk is still in the drive after the bDiskInserted parameter has been set to True and the InsertDisk event has completed, the InsertDisk event will be triggered again.
If the target disk is write-protected or the drive is empty, an InsertDisk event is also triggered, with lDiskNumber set to 0. This means the target drive cannot be written to.
When using the Unzip, ListZipContents or TestZipFile methods and a spanned zip file is being read, this event will be triggered whenever data must be read from a disk in the disk set other than the one currently in the drive. The nDiskNumber parameter provides the number of the current disk being requested. After the user has been queried to insert a new disk, the bDiskInserted parameter, which is modifiable, must be set to True. If it is left to the default value of False, the unzipping, testing or listing operation will be aborted. If the wrong disk is inserted, or the same disk is still in the drive after the bDiskInserted parameter has been set to True and the InsertDisk event has completed, the InsertDisk event will be triggered again.
Visual Basic | |
---|---|
Private Sub xZip_InsertDisk(ByVal nDiskNumber As Long, bDiskInserted As Boolean) |
Delphi | |
---|---|
procedure TfrmMain.xZipInsertDisk(Sender: TObject; nDiskNumber: Integer; |
Declaration | |
---|---|
Event InsertDisk(lDiskNumber As Long, bDiskInserted As Boolean) |
Declaration (DLL API) | |
---|---|
xcdInsertDiskParams * pParams = ( xcdInsertDiskParams * ) lParam; |
Parameter | Description |
---|---|
lDiskNumber | The number of the requested disk. If nDiskNumber = xcdLastDisk (0) then the last disk of the disk set is requested. |
bDiskInserted | Set this to True to confirm that you have requested the insertion of the appropriate disk. If you leave it to its default value of False, the current operation will terminate and return xerInsertDiskAbort error. |
Zip, Unzip, ListZipContents, TestZipFile