Device Function

Get Device Name

dev_GetDeviceName()

Retrieve the name of the device.

Syntax
#include "device.h"

LResult  dev_GetDeviceName
    (
         LDevice        device,
         LCtlBuffer     buffer,
         LBufferSize    size
    );
devicedevice to get name of
bufferoutput buffer for the device name
sizesize of the buffer in bytes
Description

dev_GetDeviceName() retrieves the name the device was created with. The device name is stored in the output parameter buffer.

Return Values

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

See Also

dev_DatabaseName()
dev_DeviceName()
dev_GetDatabaseName()

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

if (dev_GetDeviceName(device, size) > 0)
{
    LOG("Device '%s' loaded.", device);
}
else
{
    LOG("Error getting device name.");
}