ds_initialize(3xds) — Subroutines
(c) Digital Equipment Corporation. 1994. All rights reserved.
Name
ds_initialize − Initializes the interface.
Syntax
Workspace = ds_initialize(void)
Argument@Data Type@Access
Workspace@T{ OM_workspace T}
C Binding
OM_workspace ds_initialize(void)
Description
This function performs any necessary initialization of the X.500 API including the creation of a workspace. You must call this function before you call any other X.500 API functions. It may be called multiple times, in which case each call returns a workspace which is distinct from other workspaces created by the Initialize function but not yet deleted by the Shutdown function.
Return Value
Workspace
Upon successful completion this function returns a pointer to a workspace in which OM objects can be created and manipulated. Only objects created in this workspace can be used as arguments to the other directory interface functions. This function returns NULL if it fails.
Errors
This function does not return any errors.
Example
The following code extract shows an example of a call to the Initialize function. The Initialize function is used to initialize the X.500 API and create a workspace which can then be used by other functions.
Exhibit 0-0.
OM_workspace workspace;
{
if ((workspace = ds_initialize()) != NULL)
{
printf("INITIALIZE was successful0);
}
else
{
printf("INITIALIZE failed0);
}
}
The Initialize function establishes the workspace that you can then use to communicate with the directory, for the remainder of the session.