LBR$Ini_Control
Initialize library access
LBR$Ini_Control initializes access to a library.
Format:
LBR$Ini_Control context function {type} {name} {default} {result} {length}
Returns:
Returns a condition code.
Arguments:
context
The address of a 64-bit integer to receive the context created by this call.
function
The address of a 64-bit value indicating the access type. The values are:
Mnuemonic |
Meaning |
LBR_C_Create |
Create a new library file. |
LBR_C_Read |
Open library for reads only. |
LBR_C_Update |
Open library for reads and writes. |
type
The address of a 64-bit value indicating the type of library. The value must be one of the following:
Mneumonic |
Description |
LBR_C_TYP_OBJ |
Objects |
LBR_C_TYP_SHSTB |
Sharable image |
LBR_C_TYP_MLB |
Macros |
LBR_C_TYP_HLP |
Help |
LBR_C_TYP_TXT |
Text |
LBR_C_TYP_UNK |
Unknown |
LBR_C_TYP_NCS |
NCS |
A negative integer indicates a user-developed library.
name
The address of a TSRB structure that points to the name of the library.
default
The address of a TSRB structure that points to the default name of the library. Any missing fields in the name are substituted from this specification.
result
The address of a TSRB structure that points to the a buffer to receive the full filename of the library file.
length
The address of a 64-bit integer to receive the length of the result filename. Note that this will not exceed the length specified in the TSRB pointed to by the result argument.
Description
LBR_Ini_Control must be called before any other LBR_ service, except for LBR_OUTPUT_HELP. After calling, the LBR_OPEN service must be used to open or create the library. When done, the library should be closed with LBR_Close. If the call fails, the returned context is 0 and the service returns a condition code indicating the problem. Otherwise, the returned context is the value that must be used for other LBR_ calls.
Condition Codes Returned:
Code |
Meaning |
LBR_ILLFUNC |
Requested function is not valid. |
LBR_ILLTYP |
Specified library type is not valid. |
LBR_NOFILNAM |
Error. No filename was specified. |
SS_NORMAL |
Successful completion. |