Device Function

Get Database Name

dev_GetDatabaseName()

Retrieve the name of the current device database.

Syntax
#include "device.h"

LResult dev_GetDatabaseName
    (
        LCtlBuffer     buffer,
        LBufferSize    size
    );
bufferoutput buffer for the database name
sizesize of the buffer in bytes
Description

dev_GetDatabaseName() retrieves the name the currently loaded device database. The database name is stored in the output parameter buffer.

Return Values

If successful, dev_GetDatabaseName() returns the length in bytes of the database name stored in the output parameter buffer.

See Also

dev_DatabaseName()
dev_DeviceName()
dev_GetDeviceName()

Example
LBufferSize    size = 32;
char           database[size];

if (dev_Initialize(NULL) < 0)
{
    LOG("Failure loading default database.");
}
else
{
    if (dev_GetDatabaseName(database, size) > 0)
    {
         LOG("Device database '%s' loaded", database);
    }
    else
    {
        LOG("Error getting database name.");
    }
}