Device Function
dev_GetDatabaseName()
Retrieve the name of the current device database.
#include "device.h"
LResult dev_GetDatabaseName
(
LCtlBuffer buffer,
LBufferSize size
);
| buffer | output buffer for the database name |
| size | size of the buffer in bytes |
dev_GetDatabaseName() retrieves the name the currently loaded device database. The database name is stored in the output parameter buffer.
If successful, dev_GetDatabaseName() returns the length in bytes of the database name stored in the output parameter buffer.
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.");
}
}