### Function

# Gck Session from_handle

#### Declaration [src]

    GckSession*
    gck_session_from_handle (
      GckSlot* slot,
      gulong session_handle,
      GckSessionOptions options
    )

#### Description [src]

Initialize a session object from a raw PKCS#11 session handle. Usually one would use the `gck_slot_open_session()` function to create a session.

#### Parameters

`slot`

  Type: `GckSlot`

  The slot which the session belongs to.

  The data is owned by the caller of the function.

`session_handle`

  Type: `gulong`

  The raw PKCS#11 handle of the session.

`options`

  Type: `GckSessionOptions`

  Session options. Those which are used during opening a session have no effect.

#### Return value

Type: `GckSession`

The new GckSession object.

The caller of the function takes ownership of the data, and is responsible for freeing it.