Device Function

Initialize

dev_Initialize()

Initialize the library with the name of the device database.

Syntax
#include "device.h"

LResult dev_Initialize
    (
        LFileName    database
    );
databasename of device database file
Description

dev_Initialize() establishes the device database to use for subsequent calls to dev_New(). If this function is not called before calling dev_New(), the default database will be used.

Return Values

If successful, dev_Initialize() returns a non-negative value. Otherwise, it returns a negative value indicating the reason it failed. Possible unsuccessful return values are:

See Also

dev_IsInitialized()
dev_Uninitialized()

Example
if ((result = dev_Initialize("default.db")) < 0)
{
    LOG("Initialization failure: ", dev_ErrorMessage(result));
    exit(EXIT_FAILURE);
}