This documentation supports the 19.08 version of Remedy Action Request System.

To view an earlier version, select the version from the Product version menu.

Program structure

The BMC Remedy AR System C API programs consist of the following sections:


Call ARInitialization to perform server- and network-specific initialization operations for connecting to the BMC Remedy AR System servers (required).

System Work

Call one or more C API functions to perform the specific work of your program.

Free Allocated Memory

Call one or more of the FreeAR (or use the free function) to free all allocated memory associated with a specific data structure (see Freeing allocated memory).


Call to perform environment-specific cleanup routines and disconnect from the BMC Remedy AR System servers (required). If you are using floating licenses and do not disconnect from the server, your license token is unavailable for other users for the defined time-out interval.

The following code fragment provides an example of the generic program structure. Because almost every BMC Remedy AR System C API function has a control parameter as its first input argument, the template includes code for loading the ARControlStruct structure (see Login and session information).


ARInitialization does not use login information from the control structure, so you can load it into the control structure either before or after you issue the ARInitialization call. In the example, it is done after.

ARControlStruct   control;
ARStatusList      status;
int			rtn;

/* Perform Startup                                              */
if (ARInitialization(&control, &status) >= AR_RETURN_ERROR){
	printf("\n **** initialization error ****\n");
FreeARStatusList(&status, FALSE);

/* Load ARControlStruct                                         */
strncpy(control.user, "Demo", AR_MAX_ACCESS_NAME_SIZE);
                                               /* use Demo user */
control.user[AR_MAX_ACCESS_NAME_SIZE] = '\0';
strcpy(control.password, "");           /* could load from file */
memset(&control.localeinfo, 0, sizeof(ARLocalizationInfo));
                                          /* use default locale */
strncpy(control.server, argv[1], AR_MAX_SERVER_SIZE);
control.server[AR_MAX_SERVER_SIZE] = '\0';
strcpy(control.authString, "");         /* could load from file */

/* Perform System Work                                          */
rtn = ARGetEntry(&control, ..., &status);
if( rtn ... )

/* Perform Cleanup                                              */
(&control, &status);
FreeARStatusList(&status, FALSE);
Was this page helpful? Yes No Submitting... Thank you