IFileSystemImage::ImportSpecificFileSystem method

Import a specific file system from disc.


HRESULT ImportSpecificFileSystem(
  FsiFileSystems fileSystemToUse



Identifies the file system to import. For possible values, see the FsiFileSystems enumeration type.

Return Value

S_OK is returned on success, but other success codes may be returned as a result of implementation. The following error codes are commonly returned on operation failure, but do not represent the only possible error values:

Return code Description
The value specified for parameter %1!ls! is not valid.

Value: 0xC0AAB101

MultisessionInterfaces property must be set prior calling this method.

Value: 0xC0AAB15D

A boot object can only be included in an initial disc image.

Value: 0xC0AAB149

Optical media is empty.

Value: 0xC0AAB150

Failed to allocate the required memory.

Value: 0x8007000E

IMAPI supports none of the multisession type(s) provided on the current media.

Value: 0xC0AAB15C

Note  IFileSystemImage::ImportFileSystem method returns this error if there is no media in the recording device.
Operation failed because of incompatible layout of the previous session imported from the medium.

Value: 0xC0AAB133

The specified disc does not contain a '%1!ls!' file system.

Value: 0xC0AAB152

The file system specified for import contains an invalid file name.

Value: 0xC0AAB110


You must call IFileSystemImage::put_MultisessionInterfaces prior to calling IFileSystemImage::ImportSpecificFileSystem. Additionally, it is recommended that IDiscFormat2::get_MediaHeuristicallyBlank is called before IFileSystemImage::put_MultisessionInterfaces to verify that the media is not blank.

You may call this method at any time during the construction of the in-memory file system. If, during import, a file or directory already exists in the in-memory copy, the in-memory version will be retained; the imported file will be discarded.

On re-writable media (DVD+/-RW, DVDRAM, BD-RE), import or burning a second session is not support if the first session has an ISO9660 file system, due to file system limitations.

This method only reads the file information. If the item is a file, the file data is copied when calling IFsiDirectoryItem::AddFile, IFsiDirectoryItem::AddTree, or IFsiDirectoryItem::Add method.

this method returns IMAPI_E_INCOMPATIBLE_PREVIOUS_SESSION if the layout of the file system in the last session is incompatible with the layout used by IMAPI for the creation of requested file systems for the result image. For more details see the IFileSystemImage::put_FileSystemsToCreate method documention. If the file system specified by fileSystemToUse has not been found, this method returns IMAPI_E_FILE_SYSTEM_NOT_FOUND.


Minimum supported client Windows Vista, Windows XP with SP2 [desktop apps only]
Minimum supported server Windows Server 2003 [desktop apps only]
Target Platform Windows
Header imapi2fs.h

See Also