# Create a KeyView Session

To use the C++ Filter SDK, link the library built in Build the C++ API, and include the following headers in your code:

    #include "Keyview_FilterSDK.hpp"
    #include "Keyview_IO.hpp"

To use the SDK, you must create a KeyView session:

    auto KV = keyview::Session{bin_path};

`bin_path` should be an `std::string` that holds the location of the KeyView Filter SDK binaries.

The `Session` class provides methods to detect, filter, get metatdata, and open container files. It also maintains a configuration state that can affect the behaviour of the other API methods.

## Configure your session

You can set additional optional configuration options by using the `config()` method of the `Session` object, which returns a reference to the active configuration. The following example provides a password for filtering password-protected files:

    KV.config().password("myPassword");

You can also chain configuration options:

    KV.config().password("abcde").hidden_text(true).header_and_footer(true);

The full set of configuration options you can set are documented in The Configuration Class.

© Copyright 2016-2020 Micro Focus or one of its affiliates | Send documentation feedback Close Send documentation feedback To open the configured email client on this computer, open an email window. Otherwise, copy the information below to a mail client, and then send this email to swpdl.idoldocsfeedback@microfocus.com. We appreciate your feedback! Product: Topic Title: Help Topic: Feedback:

_FT_HTML5_bannerTitle.htm