# IRpFileIOPck Interface Reference

Inherits IRsObject.

List of all members.

## Public Member Functions
HRESULT | GetFileIOHelper ([out, retval] IRfFileIOHelper **ppFileIOHelper)
HRESULT | GetObsFileIOHelper ([out, retval] IRfObsFileIO **ppRfObsFileIO)
HRESULT | CreateDiskFileSupport ([out, retval] IRfFileSupport **ppiFileSupport)
HRESULT | CreateRsFileHandle ([in] BSTR bszFileName,[in] RtDWORD dwFlags,[out, retval] IRsFileHandle **ppRsFileHandle)
HRESULT | CreateRsFileHandleForStream ([in] IStream *pStm,[in] BSTR bszName,[in] RtDWORD dwFlags,[out, retval] IRsFileHandle **ppRsFileHandle)
HRESULT | CreateRsFileChunk ([in] IUnknown *pOuter,[out, retval] IUnknown **ppRsFileChunk)
HRESULT | GetFileIOGenericHelper ([out, retval] IRsFileIOGeneric **ppFileIOGeneric)

## Detailed Description

The File IO package interface access you all the file-IO functions set provided by this package.

## Member Function Documentation

HRESULT IRpFileIOPck::GetFileIOHelper | ( | [out, retval] IRfFileIOHelper ** | ppFileIOHelper | ) |

Method create the IRfFileIOHelper helper.

Returns:
  ppFileIOHelper [out, retval] Returns object with the IRfFileIOHelper interface.

  Standard HRESULT processing can be applied to the result.

HRESULT IRpFileIOPck::GetObsFileIOHelper | ( | [out, retval] IRfObsFileIO ** | ppRfObsFileIO | ) |

Create File IO helper for obsolete file formats (tS7.0 - tS7.11).

Returns:
  ppRfObsFileIO [out, retval] Returns object with the IRfObsFileIO interface.

  Standard HRESULT processing can be applied to the result.

HRESULT IRpFileIOPck::CreateDiskFileSupport | ( | [out, retval] IRfFileSupport ** | ppiFileSupport | ) |

Create disk file helper.

Returns:
  ppiFileSupport [out, retval] Returns object with the IRfFileSupport interface.

  Standard HRESULT processing can be applied to the result.

HRESULT IRpFileIOPck::CreateRsFileHandle | ( | [in] BSTR | bszFileName,
|  | [in] RtDWORD | dwFlags,
|  | [out, retval] IRsFileHandle ** | ppRsFileHandle |
| ) |  |  |

Method creates File Handle object for Rosetta file access and open the file.

- File is closed automatically as "force close" when File Handle object is released.
- To control the close action calls Close method before you release the handle.

Parameters:

  | bszFileName | [in] filename for which the handle will be created.
  | dwFlags | [in] IRsFileHandle::ReFileHandleOpenFlags Possible values: RSFHNDO_READ - If set mean you can read from opened file. RSFHNDO_WRITE - Specify if you want to modify the file. Note: If only RSFHNDO_WRITE is specified, you can only write into the file. If the file exist, it will be replaced. RSFHNDO_NO_CHNK_LIST - Don't add chunks list or remove it if the file was created or modified.

Returns:
  ppRsFileHandle [out, retval] Returns created handle object.

  Standard HRESULT processing can be applied to the result.

Remarks:
  If you modify the file, all the changes are not saved immediately but only when the FileHandle object is closed.
  - To do it manually call Close method.

HRESULT IRpFileIOPck::CreateRsFileHandleForStream | ( | [in] IStream * | pStm,
|  | [in] BSTR | bszName,
|  | [in] RtDWORD | dwFlags,
|  | [out, retval] IRsFileHandle ** | ppRsFileHandle |
| ) |  |  |

Create file handle and assign specified stream to it.

- Behave similarly as CreateRsFileHandle, but works only with attached stream.

Parameters:

  | pStm | [in] Stream for which the handle will be created.
  | bszName | [in] Stream's name.
  | dwFlags | [in] IRsFileHandle::ReFileHandleOpenFlags Possible values: RSFHNDO_READ - If set means you can read from opened stream. RSFHNDO_WRITE - Specify if you want to modify the stream. Note: If only RSFHNDO_WRITE is specified, you can only write into the stream. RSFHNDO_NO_CHNK_LIST - Don't add chunks list or remove it if the stream was created or modified.

Returns:
  ppRsFileHandle [out, retval] Returns created handle object.

  Standard HRESULT processing can be applied to the result.

Remarks:
  If you modify the file, all the changes are not saved immediately, rather only when the FileHandle object is closed.
  - To do it manually call Close method.

HRESULT IRpFileIOPck::CreateRsFileChunk | ( | [in] IUnknown * | pOuter,
|  | [out, retval] IUnknown ** | ppRsFileChunk |
| ) |  |  |

Method creates file chunk object that have to be aggregated to your custom chunk object.

Parameters:

  | pOuter | [in] Specify the object object.

Returns:
  ppRsFileChunk [out, retval] Returned object or NULL if failed.

  Standard HRESULT processing can be applied to the result.

HRESULT IRpFileIOPck::GetFileIOGenericHelper | ( | [out, retval] IRsFileIOGeneric ** | ppFileIOGeneric | ) |

Get generic FileIO helper.

- Through this helper you can execute serialization/deserialization actions with all registered file types.

Returns:
  ppFileIOGeneric [out,retval] Returns generic file IO helper.

  Standard HRESULT processing can be applied to the result.