[This is preliminary documentation and subject to change.]
The NewCabinet method creates a new cabinet file.
object.NewCabinet( sCab, lMediaSize, lFolderSize, iSetID )
Once your application has created a new cabinet file, it can use the EnhCab.AddFile method to store files in the cabinet file.
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.
EnhCab.AddFile, EnhCab.CloseCabinet
The following example creates a new cabinet file, Cab1.cab, and stores two files in it.
'Create an instance of an EnhCab object
'and store it in the ecab variable
Dim ecab As EnhCab
Set ecab = New EnhCab
'Create the cabinet file
ecab.NewCabinet "Cab1.cab", 2000000, 2000000, 1
'Add files to the cabinet file
ecab.AddFile "C:\File1.htm", "File1.htm"
ecab.AddFile "C:\File2.htm", "File2.htm"
'Close the cabinet and write it to disk
ecab.CloseCabinet