Public Member Functions | |
| HRESULT | Open ([in] RtDWORD dwFlags) |
| HRESULT | GetStreamName ([out, retval] BSTR *pbstrStreamName) |
| HRESULT | GetStream ([out, retval] IStream **ppStm) |
| HRESULT | GetFlags ([out, retval] RtDWORD *pdwFlags) |
| HRESULT | GetChunksList ([in] RtBOOL bCheckConsistency,[out, retval] IRdChunksList **ppChunksList) |
| HRESULT | ScanChunksList ([out, retval] IRdChunksList **ppChunksList) |
| HRESULT | GetChunk ([in] RtDWORD dwIndex,[in] RtDWORD dwFlags,[out, retval] IRsFileChunk **ppRsFileChunk) |
| HRESULT | FindChunk ([in] IID iid,[in] RtDWORD dwFromIndex,[out, retval] RtDWORD *pdwIndex) |
| HRESULT | AddChunk ([in] IRsFileChunk *pRsFileChunk,[in] RtBOOL bMakeCopy) |
| HRESULT | ReplaceChunk ([in] RtDWORD dwIndex,[in] IRsFileChunk *pRsFileChunk,[in] RtBOOL bMakeCopy) |
| HRESULT | InsertChunk ([in] RtDWORD dwIndex,[in] IRsFileChunk *pRsFileChunk,[in] RtBOOL bMakeCopy) |
| HRESULT | DeleteChunk ([in] RtDWORD dwIndex) |
| HRESULT | FlushToStream ([in] RtBOOL bIgnoreBadChunks) |
| HRESULT | Close ([in] RtBOOL bForce) |
| HRESULT IRsFileHandle::Open | ( | [in] RtDWORD | dwFlags | ) |
Use this method to re-open the file if you call the close method or you need change the read-write flags.
| dwFlags | [in] IRsFileHandle::ReFileHandleOpenFlags Possible values:
|
| HRESULT IRsFileHandle::GetStreamName | ( | [out, retval] BSTR * | pbstrStreamName | ) |
Returns file name of the stream/file that is handled.
| pbstrFileName | [out, retval] - handled file file name. |
| HRESULT IRsFileHandle::GetStream | ( | [out, retval] IStream ** | ppStm | ) |
Access the opened stream. You get the same stream interface that is used by the IRsFileHandle. If you want the stream don't interfere with chunks, use RSFHNDO_NO_CHNK_SUPP flag in Open method.
| ppStm | [out, retval] - Returns opened stream. |
| HRESULT IRsFileHandle::GetFlags | ( | [out, retval] RtDWORD * | pdwFlags | ) |
Returns flags of the stream/file.
| pdwFlags | [out, retval] - returned flags. See Open method for details. |
| HRESULT IRsFileHandle::GetChunksList | ( | [in] RtBOOL | bCheckConsistency, | |
| [out, retval] IRdChunksList ** | ppChunksList | |||
| ) |
Get current chunks list for stream and check stream consistency.
| bCheckConsistency | [out, retval] If true then check the stream consistency too, so the loaded chunk list is compared with the scanned one. If you specify false, then the chunk list will be loaded from stream. If you are in write mode, you will get current chunk list that could not be consistent with the one stored in the stream. Thus it hasn't sense to specify in this case. If you delete a chunk and set true, then the deleted chunk will be again added. | |
| ppRsFileChunk | [out, retval] returned chunks list. |
| HRESULT IRsFileHandle::ScanChunksList | ( | [out, retval] IRdChunksList ** | ppChunksList | ) |
Scan chunks from the current stream. Use this method to detect really written chunks.
| ppRsFileChunk | [out, retval] returned chunks list. |
| HRESULT IRsFileHandle::GetChunk | ( | [in] RtDWORD | dwIndex, | |
| [in] RtDWORD | dwFlags, | |||
| [out, retval] IRsFileChunk ** | ppRsFileChunk | |||
| ) |
Get specified chunk from stream. Next predefined chunks implements appropriated access interface that you can use to read its data or to modify them:
| dwIndex | [in] Index of the chunk you want to read. | |
| dwFlags | [in] Get chunk flags (see IRsFileHandle::ReFHndGetChunFlags):
| |
| ppRsFileChunk | [out, retval] contains the chunk if it is found. |
| HRESULT IRsFileHandle::FindChunk | ( | [in] IID | iid, | |
| [in] RtDWORD | dwFromIndex, | |||
| [out, retval] RtDWORD * | pdwIndex | |||
| ) |
Find specified by its ID.
| iid | [in] Class ID of the chunk. | |
| dwFromIndex | [in] from which chunk index it will be searched. Specify -1 to search from the first chunk. | |
| pdwIndex | [out, retval] contains the chunk index if it is found, -1 if it was not found. |
| HRESULT IRsFileHandle::AddChunk | ( | [in] IRsFileChunk * | pRsFileChunk, | |
| [in] RtBOOL | bMakeCopy | |||
| ) |
Add chunk to end of the stream.
| pRsFileChunk | [in] the chunk you want to add. | |
| bMakeCopy | [in] If true, a copy of the chunk will be added. |
| HRESULT IRsFileHandle::ReplaceChunk | ( | [in] RtDWORD | dwIndex, | |
| [in] IRsFileChunk * | pRsFileChunk, | |||
| [in] RtBOOL | bMakeCopy | |||
| ) |
Replace specified chunk.
| dwIndex | [in] Specify index of the chunk you want to replace. | |
| pRsFileChunk | [in] The new chunk. | |
| bMakeCopy | [in] If true, a copy of the chunk will replace the existing chunk. |
| HRESULT IRsFileHandle::InsertChunk | ( | [in] RtDWORD | dwIndex, | |
| [in] IRsFileChunk * | pRsFileChunk, | |||
| [in] RtBOOL | bMakeCopy | |||
| ) |
Insert new chunk at specified position.
| dwIndex | [in] position when the chunk will be inserted. | |
| pRsFileChunk | [in] the chunk you want to add. | |
| bMakeCopy | [in] If true, a copy of the chunk will be inserted. |
| HRESULT IRsFileHandle::DeleteChunk | ( | [in] RtDWORD | dwIndex | ) |
Delete specified chunk from stream.
| dwIndex | [in] index of the chunk that will be deleted. |
| HRESULT IRsFileHandle::FlushToStream | ( | [in] RtBOOL | bIgnoreBadChunks | ) |
Save all the chunks into the stream.
| [in] | bIgnoreBadChunks | If true, then all the chunks will be written even if some bad or missing are found. |
| HRESULT IRsFileHandle::Close | ( | [in] RtBOOL | bForce | ) |
Close stream. If you were creating or modifying the stream,
then call Close method all the changes will be written.
If you don't call this method, then the stream will be closed anyway but as force close.
| bForce | [in] If true the the handle will be closed even an error occurs: (e.g. missing chunks or save errors). |
1.5.5