NWDSPutFilter(3nw)
NWDSPutFilter --
prepares search filter expression tree for use by NWDSSearch
Synopsis
#include <nwnet.h>
or
#include <nwdsfilt.h>
NWDSCCODE N_API NWDSPutFilter
(NWDSContextHandle context,
pBuf_T buf,
pFilter_Cursor_T cur,
void (N_FAR N_CDECL
freeVal)(nuint32 syntax, nptr val);
Description
The parameters are as follows:
- context
-
(IN) Specifies the Directory context for the request.
- buf
-
(IN) Points to the request buffer being prepared.
- cur
-
(IN) Points to a cursor to the filter expression tree being stored in the buffer.
- freeVal
-
(IN) Points to the function used to free the attribute values.
Return values
- 0x0000
-
SUCCESSFUL
- Negative Value
-
Negative values indicate errors. For errors returned by Directory Services,
see ``Directory Services OS Errors'' (-001 to -255), ``Directory Services
Client Library Errors'' (-301 to -399), or ``Directory Services Agent in the
Server Errors'' (-601 to -699).
Notices
buf points to a Buf_T which is allocated by NWDSAllocBuf and initialized for a DSV_SEARCH operation by NWDSInitBuf.
NWDSPutFilter frees the area allocated to the expression tree,
including the area referenced by cur. If the application needs to
retain the expression tree,
the application should save the tree in some form before calling NWDSPutFilter.
NOTE:
NWDSPutFilter always frees the memory allocated to the expression tree, even if NWDSPutFilter returns an error. Do not call NWDSFreeFilter to free
the filter if NWDSPutFilter returns an error. Doing so will corrupt memory since the filter will already have been freed.
freeVal points to a function freeing the attribute values. The function is passed the syntax attribute ID and the address of the area to free. freeVal can be
NULL, in which case no attribute values are freed.
Services
Directory
NCP calls
None
References
NWDSAddFilterToken(3nw),
NWDSAllocFilter(3nw),
NWDSDelFilterToken(3nw),
NWDSFreeFilter(3nw)
30 January 1998
© 1998 The Santa Cruz Operation, Inc. All rights reserved.