KeyView 24.1

# KVPDFState

This structure is returned by PDF export functions to indicate whether they were successful, and if they failed to give the reason why.

    typedef struct
    {
        KVErrorCode	eErrorCode;
        KVErrorCodeEx	eErrorCodeEx;
    }
    KVPDFState;

## Member Descriptions

`eErrorCode` | The error code returned by KeyView. This enumerated type is defined in `kverrorcodes.h`.
`eErrorCodeEx` | The extended error code returned by KeyView. This enumerated type is defined in `kverrorcodes.h`.

## Discussion

To evaluate a `KVPDFState` object, check `eErrorCode` first. A value of `KVERR_Success (0)` indicates success. Any other value indicates failure.

You can ignore `eErrorCodeEx` unless `eErrorCode` is `KVERR_General`. In this case, `eKVErrorCodeEx` might contain an extended error code that gives more information. If no more detail is available, `eKVErrorCodeEx` is set to 0.

## Example

In this example, a state object is used to obtain the error code as an integer.

    int convertStateToError(const KVPDFState state)
    {
    	if (state.eErrorCode == KVERR_General && state.eErrorCodeEx != (KVErrorCodeEx)0)
    	{
    		return state.eErrorCodeEx;
    	}

    	return state.eErrorCode;
    }

Copyright 1997-2023 Open Text
Version 24.1 | Last updated December 2023

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.1

Topic Title: KVPDFState