Public Member Functions | |
| HRESULT | ChunkID ([out, retval] IID *piidChunk) |
| HRESULT | CustomID ([out, retval] RtChunkCustomId *pCustomID) |
| HRESULT | Address ([out, retval] RtQWORD *pqwVal) |
| HRESULT | Length ([out, retval] RtQWORD *pqwVal) |
| HRESULT | SaveToStream ([in] IStream *pStream,[in] RtBOOL bSaveChunkIID,[in] RtBOOL fClearDirty) |
| HRESULT | LoadFromStream ([in] IStream *pStream) |
Each application or package can define its own chunk types as necessary. The chunk object have to aggregate IRsFileChunk that implements these interfaces:
IRsDataObject IRsPersistStream IRsCloneable
So chunk object is a data object. While system is deserializing the chunk, it uses the ChunkID for Data Object Factory to create it. Then it calls the IRsPersistStream interface. If the object is not created, then it is deserialized as Unknown Chunk.
| HRESULT IRsFileChunk::ChunkID | ( | [out, retval] IID * | piidChunk | ) |
Use to get chunk IID. The IID identify chunk type.
| pId | [out, retval] returns the chunk Id. |
| HRESULT IRsFileChunk::CustomID | ( | [out, retval] RtChunkCustomId * | pCustomID | ) |
Use to get chunk's custom IID. The id is an optional identification that can be used by chunk author for quick identification in case stream/file contains more chunks of the same type.
| pId | [out, retval]Returns the chunk Id. |
| HRESULT IRsFileChunk::Address | ( | [out, retval] RtQWORD * | pqwVal | ) |
Use to get chunk's start address.
| pqwVal | [out, retval] Returns start address of the chunk in the stream. If it is unknown or invalid, -1 is returned. |
| HRESULT IRsFileChunk::Length | ( | [out, retval] RtQWORD * | pqwVal | ) |
Use to get chunk's length.
| pqwVal | [out, retval] Returns length of the chunk. If it is unknown or invalid, -1 is returned. |
| HRESULT IRsFileChunk::SaveToStream | ( | [in] IStream * | pStream, | |
| [in] RtBOOL | bSaveChunkIID, | |||
| [in] RtBOOL | fClearDirty | |||
| ) |
Save chunk into stream.
| pStream | [in] The target stream. | |
| bSaveChunkIID | [in] If true, the chunk's IID is extracted and written as well. In case of false length of the chunk and its start address are computed without the chunk's IID size. | |
| fClearDirty | [in] If true, the dirty flag is cleared after successful write operation. |
| HRESULT IRsFileChunk::LoadFromStream | ( | [in] IStream * | pStream | ) |
Load chunk from stream. The stream has to be pointed after the chunk's IID.
| pStream | [in] The source stream. |
1.5.5