![]() |
![]() |
After BSAInit is called to start a session, the application can make a call to BSAGetEnvironment to determine the parameters set for the session. The BSAGetEnvironment call returns such items as the node, owner, and server names used for the session, and the maximum number of objects that can be created in a single transaction.
The objectOwner.bsaObjectOwner field contains the TSM node name. This corresponds to the BSAObjOwner field when passwordaccess is set to prompt. When passwordaccess is set to generate, this field contains the machine name.
The objectOwner.appObjectOwner field contains the TSM owner name. This corresponds to the AppObjOwner field when passwordaccess is set to prompt. When passwordaccess is set to generate, this field contains the login name.
The calling application must allocate an array of ADSM_ENV_STRS elements with strings of size BSA_MAX_DESC for the environment output. The application must also allocate an array of character pointers with ADSM_ENV_STRS+1 elements. The extra element is for the NULL termination pointer.
Figure 21. An Example of BSAGetEnvironment
char *envP[ADSM_ENV_STRS+1]; char envStrs[ADSM_ENV_STRS] [BSA_MAX_DESC]; for (i=0; i<ADSM_ENV_STRS; i++) envP[i] = envStrs[i]; envP[i] = NULL; rc = BSAGetEnvironment(bsaHandle, &objOwner, envP);
The format of the output is:
envStrs[0] = "TSMSRVR=xxx" envStrs[1] = "TSMMAXOBJ=xx" envStrs[1] = "TSMSRVRSTANZA=xx"
where: