KVHTMLEndOOPSession()
This function terminates the current out-of-process conversion session, and releases the source data and resources related to the session.
Syntax
BOOL pascal KVHTMLEndOOPSession( void *pContext, BOOL bKeepServantAlive, KVErrorCodeEx *pError DWORD dwOptions, void *pReserved1, void *pReserved2 );
Arguments
|
|
A pointer to a KeyView Export session that you initialized by calling fpInit(). |
|
Set this to Set this to |
|
|
|
A pointer to an error code defined in |
|
|
Reserved for future use. |
|
|
Reserved for future use. |
|
|
Reserved for future use. |
Returns
-
If the call is successful, the return value is
TRUE. -
If the call is unsuccessful, the return value is
FALSE.
Example
The following sample code is from the cnv2htmloop sample program:
/* declare endsession function pointer */
BOOL (pascal *fpKVHTMLEndOOPSession)( void *,
BOOL ,
KVErrorCode *,
DWORD ,
void *,
void *);
/* assign OOP endsession function pointer */
fpKVHTMLEndOOPSession = (BOOL (pascal *)( void *,
BOOL ,
KVErrorCode *,
DWORD ,
void *,
void * ))mpGetProcAddress(hKVHTML, "KVHTMLEndOOPSession");
if(!fpKVHTMLEndOOPSession)
{
printf("Error assigning KVHTMLEndOOPSession() pointer\n");
(*KVHTMLInt.fpFileToInputStreamFree)(pKVHTML, &Input);
(*KVHTMLInt.fpFileToOutputStreamFree)(pKVHTML, &Output);
mpFreeLibrary(hKVHTML);
return 8;
}
/********END OOP SESSION, DO NOT KEEP SERVANT ALIVE *********/
if(!(*fpKVHTMLEndOOPSession)(pKVHTML,
FALSE,
&error,
0,
NULL,
NULL))
{
printf("Error calling fpKVHTMLEndOOPSession \n");
(*KVHTMLInt.fpFileToInputStreamFree)(pKVHTML, &Input);
(*KVHTMLInt.fpFileToOutputStreamFree)(pKVHTML, &Output);
(*KVHTMLInt.fpShutDown)(pKVHTML);
mpFreeLibrary(hKVHTML);
return 10;
}