KeyView 24.2

# KVXMLEndOOPSession()

This function terminates the current out-of-process conversion session, and releases the source data and resources related to the session.

## Syntax

    BOOL pascal KVXMLEndOOPSession(
        void            *pContext,
        BOOL             bKeepServantAlive,
        KVErrorCodeEx   *pError
        DWORD            dwOptions,
        void            *pReserved1,
        void            *pReserved2 );

## Arguments

`pContext` | A pointer to a KeyView Export session that you initialized by calling fpInit().
`bKeepServantAlive` | Set `bKeepServantAlive` to `TRUE` to keep a Servant process active after the Export out-of-process session is terminated. If the Servant remains active, subsequent conversion requests are processed more quickly because the Servant is already prepared to receive data. Set `bKeepServantAlive` to `FALSE` to terminate the Export out-of-process session and the associated Servant process.
`pError` | A pointer to an error code defined in `KVErrorCodeEx` in `kverrorcodes.h`.
`dwOptions` | Reserved for future use.
`pReserved1` | Reserved for future use.
`pReserved2` | 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 `cnv2xmloop` sample program:

    /* declare endsession function pointer */
    BOOL (pascal *fpKVXMLEndOOPSession)( void  *,
                    BOOL                 ,
                    KVErrorCode         *,
                    DWORD                ,
                    void                *,
                    void                *);
    /* assign OOP endsession function pointer */
    fpKVXMLEndOOPSession = (BOOL (pascal *)( void  *,
                    BOOL                 ,
                    KVErrorCode         *,
                    DWORD                ,
                    void                *,
                    void                * ))mpGetProcAddress(hKVXML, "KVXMLEndOOPSession");
    if(!fpKVXMLEndOOPSession)
    {
       printf("Error assigning KVXMLEndOOPSession() pointer\n");
       (*KVXMLInt.fpFileToInputStreamFree)(pKVXML, &Input);
       (*KVXMLInt.fpFileToOutputStreamFree)(pKVXML, &Output);
       mpFreeLibrary(hKVXML);
       return 8;
    }
    /********END OOP SESSION, DO NOT KEEP SERVANT ALIVE *********/
    if(!(*fpKVXMLEndOOPSession)(pKVXML,
            FALSE,
            &error,
            0,
            NULL,
            NULL))
    {
       printf("Error calling fpKVXMLEndOOPSession \n");
       (*KVXMLInt.fpFileToInputStreamFree)(pKVXML, &Input);
       (*KVXMLInt.fpFileToOutputStreamFree)(pKVXML, &Output);
       (*KVXMLInt.fpShutDown)(pKVXML);
       mpFreeLibrary(hKVXML);
       return 10;
    }

Copyright 1997-2024 Open Text
Version 24.2 | Last updated March 2024

Send documentation feedback

Close

Send documentation feedback

To send feedback using your default email client, open an email window.

Otherwise, send your feedback and the information below to MFI-swpdl.idoldocsfeedback@opentext.com.

We appreciate your feedback!

Product: IDOL KeyView 24.2

Topic Title: KVXMLEndOOPSession()