StarBurn SDK (Software Development Kit)
ContentsIndexHome
Example

This example gets device name by device address. 

 

// Somewhere in the data region
EXCEPTION_NUMBER l__EXCEPTION_NUMBER;
CHAR l__CHAR__DeviceName[ MAX_PATH ];

// Prepare device name
RtlZeroMemory(
    &l__CHAR__DeviceName,
    sizeof( l__CHAR__DeviceName )
    );

// Try to get device name by device address 0:0:1:0
l__EXCEPTION_NUMBER =
StarBurn_GetDeviceNameByDeviceAddress(
    0,
    1,
    0,
    0,
    ( PCHAR )( &l__CHAR__DeviceName )
    );

// Check for correct reply
if ( l__EXCEPTION_NUMBER != EN_SUCCESS )
{
// Handle error here...
}

// Perform actions with device name here...