The Authorization and Authentication API includes a function that helps you manage error messages. When a CA ControlMinder function fails, it returns an error code. The function also writes the error message describing the reason for the failure in the szMsg parameter. The error message (szMsg) is listed for each API.
Note: The SEOSROUTE_ParseApiError function analyzes the error message stored in the szMsg parameter and returns the integer representing the error code. This function is included to provide more information (the real error code from seosd) in case SEOSAPI_AUTH_REMOTE_ERR is returned. This would indicate some error in seosd.
The procedures for compiling and linking in UNIX and in Windows are described in the following sections.
To compile your application with the CA ControlMinder library, include the api_auth.h header file in the C source code that calls the library. You can use any ANSI‑C compliant compiler.
The method used to link your application to the AuthAPI library depends on the operating system you are using, as shown in the following table. Use these lines together with the rest of the command used by your operating system for linking an application.
The examples in the following table assume that CA ControlMinder was installed in the /opt/CA/AccessControl directory. The libraries are therefore assumed to be located in the /opt/CA/AccessControl/lib directory and the header files in the /opt/CA/AccessControl/include/API directory.
Platform |
Command |
---|---|
IBM AIX |
cc sample.c ‑I/opt/CA/AccessControl/include \ ‑bI:/opt/CA/AccessControl/lib/SEOS_binder.exp \ /opt/CA/AccessControl/lib/seadmapi.a ‑o sample |
All other platforms |
cc sample.c ‑I/opt/CA/AccessControl/include \ /opt/CA/AccessControl/lib/seadmapi.a ‑o sample |
Note: The examples shown in this table are shipped with a makefile that you can use to set the various flags required by each environment.
Each sample has a Microsoft makefile. To compile the programs, enter one of the following commands:
NMAKE /f “makefile name“ CFG=“source C code ‑ Win32 Release”
or
NMAKE /f “makefile name“
For example, to build the sample_FetchList sample, change to the sample_FetchList subdirectory:
(..C:\Program Files\CA\Access Control\SDK\ApiSamples\seadmapi\ sample_FetchList)
Then type:
NMAKE /f “sample_FetchList.mak”
Note: Before running the nmake command, run the VCVARS32.BAT file from the Visual C++ BIN directory to set the compiler environment variables, and ensure that the nmake.exe is in your system variable path.
Copyright © 2013 CA Technologies.
All rights reserved.
|
|