Reads the defined client name for a given client Id.
All clients that connect to an EDM Server will have assigned a unique numeric client Id. Defining a client name, however, is optional. If defined, this function will return the client name. The host name will also be returned.
Related functions: edmiGetClientId, edmiGetMyClientId.
Header:
#include "sdai.h"
Prototype:
EdmiError edmiGetClientNames(SdaiClientId clientId,
SdaiString *hostName,
SdaiString *clientName);
Arguments:
clientId |
The unique numeric id that identifies the connected client. |
*hostName |
Address of a string pointer that will receive the host name at which the client process is running. |
*clientName |
Address of a string that will receive the optionally defined client name of the client process. |
Returns:
A completion code of datatype EdmiError is the returned function value. The completion code has the following values:
Completion code = 0 : Operation successfully performed.
Completion code != 0: Error in operation. Completion code is an EDMinterface error code. Use edmiGetErrorText to get the error text corresponding to the error code.
EXAMPLE
EdmiError rstat;
SdaiClientId clientId;
SdaiString hostName;
SdaiString clientName;
. . .
if (rstat = edmiGetClientNames(clientId, hostName, &clientName)) {
printf("\nError %d in edmiGetClientNames: %s", rstat,
edmiGetErrorText(rstat));
goto error:
}