DbEnv::get_shm_key()
Prev | Chapter 5. The DbEnv Handle | Next

## DbEnv::get_shm_key()

    #include <db_cxx.h>

    int
    DbEnv::get_shm_key(long *shm_keyp);

The `DbEnv::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 DbEnv::set_shm_key() method.

The `DbEnv::get_shm_key()` method may be called at any time during the life of the application.

The `DbEnv::get_shm_key()` method either returns a non-zero error value or throws an exception that encapsulates a non-zero error value on failure, and returns 0 on success.

### Parameters

#### shm_keyp

The `DbEnv::get_shm_key()` method returns the base segment ID in shm_keyp.

### Class

DbEnv

### See Also

Database Environments and Related Methods, DbEnv::set_shm_key()

Prev | Up | Next
DbEnv::get_open_flags() | Home | DbEnv::get_thread_count()