Library Version 12.1.6.2

DB_ENV->get_shm_key()
Prev | Chapter 5. The DB_ENV Handle | Next

## DB_ENV->get_shm_key()

    #include <db.h>

    int
    DB_ENV->get_shm_key(DB_ENV *dbenv, long *shm_keyp);

The `DB_ENV->get_shm_key()` method returns the base segment ID. This is used for Berkeley DB environment shared memory regions created in system memory on VxWorks or systems supporting X/Open-style shared memory interfaces. It may be specified using the DB_ENV->set_shm_key() method.

The `DB_ENV->get_shm_key()` method may be called at any time during the life of the application.

The `DB_ENV->get_shm_key()` method returns a non-zero error value on failure and 0 on success.

### Parameters

#### shm_keyp

The `DB_ENV->get_shm_key()` method returns the base segment ID in shm_keyp.

### Class

DB_ENV

### See Also

Database Environments and Related Methods, DB_ENV->set_shm_key()

Prev | Up | Next
DB_ENV->get_open_flags() | Home | DB_ENV->get_slices()