ITnef::Finish
The ITnef::Finish
method finishes processing for all TNEF operations that are queued and waiting.
Quick Info
See ITnef
: IUnknown
HRESULT Finish(
ULONG ulFlags,
|
|
WORD FAR * lpKey, |
|
LPSTnefProblemArray FAR * lpProblem |
|
) |
|
Parameters
ulFlags
Reserved;
must be zero.
lpKey
[out] Pointer
to the PR_ATTACH_NUM
lpProblem
[out] Pointer
to a pointer to a returned STnefProblemArray1_H.24_ structure. The STnefProblemArray
structure indicates which properties were not encoded properly, if any. If NULL
is passed in the lpProblem parameter, no property problem array is
returned.
Return Values
S_OK
The call
succeeded and has returned the expected value or values.
Remarks
Transport
providers, message store providers, and gateways call the ITnef::Finish
method to perform the encoding of all properties for which encoding was requested
in calls to the ITnef::AddProps
After the Finish
call, the pointer to the encapsulation stream is set to the end of the TNEF
data. If the provider or gateway is to use the TNEF stream data, it must reset
the stream pointer to the beginning of the TNEF stream data.
Finish is only supported on objects opened with TNEF_ENCODE
set for OpenTnefStream or OpenTnefStreamEx.
The TNEF
implementation reports TNEF stream encoding problems without halting the Finish
process. The STnefProblemArray
If a provider
or gateway does not work with problem arrays, it can pass NULL in lpProblem;
in this case, no problem array is returned.
The value
returned in lpProblem is only valid if the call returns S_OK. When S_OK
is returned, the provider or gateway should check the values returned in the STnefProblemArray
structure. If an error occurs on the call, then the STnefProblemArray
structure is not filled in and the calling provider or gateway should not use
or free the structure. If no error occurs on the call, the calling provider or
gateway must release the memory for the STnefProblemArray by calling the
MAPIFreeBuffer
See Also