Question

IMAPI2 interface IFileSystem uses COM IStream interfaces to represent file data. There is AddTree method that adds specified directory contents to IFileSystem. So AddTree must create IStream's in the process. I wonder what implementation of IStream it uses? If it uses the standard OLE implementation than we have a nasty problem because OLE streams doesn't support files bigger than 4Gb.

Can anyone shed some light on this issue?

Was it helpful?

Solution

IMAPIv2 limits the size of the file on a ISO9660 compatible disc to 2GB.

In order to burn files of more than 2GB you have to set a UDF file system.

 HRESULT hr = FileSystemImage->put_FileSystemsToCreate( FsiFileSystemUDF );

The FsiFileSystems enumeration defines the values for recognized file systems:

typedef enum FsiFileSystems { 
  FsiFileSystemNone     = 0,
  FsiFileSystemISO9660  = 1,
  FsiFileSystemJoliet   = 2,
  FsiFileSystemUDF      = 4,
  FsiFileSystemUnknown  = 0x40000000
} FsiFileSystems;
  • FsiFileSystemNone The disc does not contain a recognized file system.
  • FsiFileSystemISO9660 Standard CD file system.
  • FsiFileSystemJoliet Joliet file system.
  • FsiFileSystemUDF UDF file system.
  • FsiFileSystemUnknown The disc appears to have a file system, but the layout does not match any of the recognized types.

UDF natively supports many modern file systems features:

  • Large partition size (maximum 2TB with 512B block size, or 8TB with 2KB block size) 64-bit file size
  • Extended attributes (e.g., named streams, or forks) without size limitation
  • Long file names (maximum 254 bytes, any character can appear in the name)
  • Unicode encoding of file names
  • Sparse file
  • Hard links
  • Symbolic links
  • Metadata checksum

Limitations:

  • Limited partition size. 32-bit block number limits the partition size to 2TB for 512 sector size.
  • Does not support compressed/encrypted file and directories.

OTHER TIPS

Apparently AddTree uses SHCreateStreamOnFileEx which apparently supports large files. I'll accept my answer when I'll check it.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top