[This is preliminary documentation and subject to change.]
The EnumerateCabinet method counts the number of files stored within a cabinet file.
object.EnumerateCabinet( sCab, lNumFiles )
Windows NT: Unsupported.
Windows: Requires Windows 98.
Windows CE: Unsupported.
Header: Declared in ipenhsnd.idl.
Import Library: Included as a resource in ipenhsnd.dll.
Unicode: Yes.
The following example counts the number of files stored in the cabinet file, Cab1.cab.
Dim ecab As EnhCab
Set ecab = New EnhCab
'Create a variable to receive the file count.
Dim numFiles As Long
'Count the number of files in the cabinet and
'store the value in the variable numFiles
ecab.EnumerateCabinet "C:\EnhancementFiles\Cab1.cab", numFiles
'Display a message box that informs the user of the file count
Msgbox "There are currently "+ CStr(numFile) + " files in the cabinet file."