|
VMS Help DCE, DCE_SECURITY, API Routines, sec_rgy_cursor_reset *Conan The Librarian |
NAME
sec_rgy_cursor_reset - Resets the registry database cursor
SYNOPSIS
#include <dce/misc.h>
void sec_rgy_cursor_reset(
sec_rgy_cursor_t *cursor);
PARAMETERS
Input/Output
cursor A pointer into the registry database.
DESCRIPTION
The sec_rgy_cursor_reset() routine resets the database cursor to
return the first suitable entry. A cursor is a pointer into the
registry. It serves as a place holder when returning successive
items from the registry.
A cursor is bound to a particular server. In other words, a cursor
that is in use with one replica of the registry has no meaning for
any other replica. If a calling program attempts to use a cursor
from one replica with another, the cursor is reset and the routine
for which the cursor was specified returns the first item in the
database.
A cursor that is in use with one call cannot be used with another.
For example, you cannot use the same cursor on a call to
sec_rgy_acct_get_projlist() and sec_rgy_pgo_get_next(). The behavior
in this case is undefined.
FILES
SYS$COMMON:[DCE$LIBRARY]MISC.IDL
The idl file from which dce/misc.h was derived.
EXAMPLES
The following example illustrates use of the cursor within a loop.
The initial sec_rgy_cursor_reset() call resets the cursor to point
to the first item in the registry. Successive calls to
sec_rgy_pgo_get_next() return the next PGO item and update the cursor
to reflect the last item returned. When the end of the list of PGO
items is reached, the routine returns the value sec_rgy_no_more_entries
in the status parameter.
sec_rgy_cursor_reset(&cursor);
do {
sec_rgy_pgo_get_next(context, domain, scope, &cursor,
&item, name &status);
if (status == error_status_ok) {
/* Print formatted PGO item info */
}
} while (status == error_status_ok);
RELATED INFORMATION
Functions: sec_intro
sec_rgy_acct_get_projlist
sec_rgy_acct_lookup
sec_rgy_pgo_get_by_id
sec_rgy_pgo_get_by_name
sec_rgy_pgo_get_by_unix_num
sec_rgy_pgo_get_members
sec_rgy_pgo_get_next
|
|