<< Previous | Next >> | |
|
int registry_get( char * basename, char far * section, RegistryEntry * re, ServerContext * sctx, int (*f)(), int keyvalues, void far * ptr);
Description
- Convenience function for reading and/or enumerating registry contents. This basically combines calls to the following functions:
registry_prep_read()
registry_read() and/or registry_enumerate()
registry_finish_read()
- If the field array (re) is not NULL, then
registry_read()
will be called. If the callback function (f) is not NULL, thenregistry_enumerate()
will be called. If both re and f are not NULL, then read will be invoked before enumerate.Parameters
- basename
- Base name of registry file, as a Zserver resource name. This file must not have an extension, since the extensions ".1", ".2" and so on are appended to the name.
- section
- Section name to read (may be NULL to read the anonymous section at the start of the registry file).
- re
- Array of fields to read. See
registry_read()
function description for details.
- sctx
- Server context.
- f()
- Callback function. See
registry_enumerate()
for details.
- keyvalues
- Boolean indicating whether callback receives key=value pairs as well as section headers. If false, it only receives section headers.
- ptr
- Arbitrary application data which will be dutifully passed through to the callback without alteration.
Return Value
<0
: general failure, code will be negative of one of the codes inERRNO.LIB
.
0
: OK
Library
- register.lib
See Also
- registry_prep_read, registry_read, registry_finish_read, registry_enumerate, registry_update
Dynamic C Functions | << Previous | Next >> | rabbit.com |