Getting the Client ID
ruiGetClientId() will always allocate memory (regardless of return code) and the client application is responsible for freeing that memory via ruiFree() when the memory is no longer needed.
ruiGetClientId() can be called between ruiCreateInstance() and ruiDestroyInstance() and can be called more than once.
ruiGetClientId() is a synchronous function returning when all functionality is completed.
RUIRESULT ruiGetClientId(RUIINSTANCE* ruiInstance, char** clientID)
Parameters
The ruiGetClientId() function has the following parameters.
Parameter |
Description |
ruiInstance (RUIINSTANCE*) |
Pointer to the Usage Intelligence instance created via ruiCreateInstance(). |
clientId (char**) |
Receives the client ID string allocation by the SDK. Must be freed via ruiFree(). Returns the string “0”, if the client ID is not available. |
Returns
The ruiGetClientId() function returns one of the return status constants below.
Return |
Description |
RUI_OK |
Function successful. |
RUI_INVALID_SDK_OBJECT |
SDK Instance parameter is NULL or invalid. |
RUI_SDK_INTERNAL_ERROR_FATAL |
Irrecoverable internal fatal error. No further API calls should be made. |
RUI_INVALID_PARAMETER_EXPECTED_NON_NULL |
Some API parameter is expected to be non-NULL and is not. |