dev_GetDeviceName()
Retrieve the name of the device.
#include "device.h" LResult dev_GetDeviceName ( LDevice device, LCtlBuffer buffer, LBufferSize size );
device | device to get name of |
buffer | output buffer for the device name |
size | size of the buffer in bytes |
dev_GetDeviceName() retrieves the name the device was created with. The device name is stored in the output parameter buffer.
If successful, dev_GetDeviceName() returns the length in bytes of the device name stored in the output parameter buffer.
LBufferSize size = 32; char device[size]; if (dev_GetDeviceName(device, size) > 0) { LOG("Device '%s' loaded.", device); } else { LOG("Error getting device name."); }