IMimeMessageTree::LoadOffsetTable method
Loads an offset table into the message object for quicker loading.
Syntax
HRESULT LoadOffsetTable(
[in] IStream *pStream
);
Parameters
-
pStream [in]
-
Type: IStream*
Specifies a pointer to an IStream that contains the offset table. This stream, which MimeOLE reads from, needs to be positioned at the beginning of the offset table data. When the method returns, the position of the stream is at the end of the offset table. If this method fails, the position of this stream is undefined.
Return value
Type: HRESULT
Returns one of the following values.
Return code | Description |
---|---|
|
Indicates success. |
|
Indicates that an unknown error has occurred. |
|
Indicates that pStream is NULL. |
|
Indicates that the offset table is invalid or corrupt. |
|
Indicates that an attempt to allocate memory failed. |
|
This method may return a failure result from the ISequentialStream::Read method. |
|
Indicates that the version of the offset table is invalid or not supported. |
Remarks
Offset tables are used to improve performance when loading a message. The offset table contains information about the message that enables MimeOLE to quickly load the message. Typically, the first time a client loads a message, they should call IMimeMessageTree::SaveOffsetTable. Then, the next time the client loads the message, they should first call IMimeMessageTree::LoadOffsetTable before loading the actual message into the message object.
For robustness, if a call to IMimeMessageTree::LoadOffsetTable fails, the client should ignore the failure and continue to load the message. If calls to LoadOffsetTable are consistently failing, there is most likely a problem that needs further investigation.
Examples
The following code demonstrates how to save the offset table.
IMimeMessageTree::Load(*pMessageSource);
IMimeMessageTree::SaveOffsetTable(*pOffsetTable);
The following code demonstrates how to load a message with an offset table.
IMimeMessageTree::LoadOffsetTable(*pOffsetTable);
IMimeMessageTree::Load(*pMessageSource);
Requirements
Minimum supported client |
Windows XP [desktop apps only] |
Minimum supported server |
Windows Server 2003 [desktop apps only] |
Product |
Outlook Express 6.0 |
Header |
|
IDL |
|
DLL |
|
See also
-
Reference
-
Other Resources