Use the function SmDirSearchCount() to return a count of the entries retrieved through the search criteria specified in lpszSearchFilter, subject to the restrictions specified in the directory search parameters. See the Remarks section for more information.
Syntax
int SM_EXTERN SmDirSearchCount ( const Sm_Api_Context_t* lpApiContext, void* pHandle, void* pInstanceHandle, int* pnCount, const char* lpszSearchFilter, const char* lpszSearchRoot, const int nSearchResults, const int nSearchTimeout, const int nSearchScope );
Parameter |
I/O |
Description |
---|---|---|
lpApiContext |
I |
Pointer to the API context structure. |
pHandle |
I |
The address of the pointer returned by SmDirInit(). |
pInstanceHandle |
I |
The address of a pointer to the directory instance handle. |
pnCount |
O |
Number of entries returned by the search |
lpszSearchFilter |
I |
Buffer containing search expression. |
lpszSearchRoot |
I |
This parameter is designed to hold the search root, or the starting point for the search. In a hierarchical directory, when authenticating a user, SiteMinder starts at the root and works down the tree. |
nSearchResults |
I |
The parameter holds the maximum number of records that can be returned for a single search of the directory. |
nSearchTimeout |
I |
This parameter holds the maximum time in seconds that the API should keep searching the directory for results. |
nSearchScope |
I |
This parameter indicates how far below the root (lpszSearchRoot) the API will query the directory to find a match. Depending on the value in nSearchScope, the search could go down only one level or through the entire subtree. The default value is 2. |
Returns
Returns 0 if successful or -1 if not successful.
Remarks
In the SiteMinder Policy Server User Interface, on the Directory Setup tab, parameters can be specified in the following fields:
Note: The string entered in the Parameter field is also passed to lpszParameter for use with SmDirInit() and SmDirInitDirInstance(). If your code for SmDirInit() needs to use lpszParameter and your code for SmDirSearchCount() needs a search root, you will have to parse the string from the Parameter field.
Copyright © 2014 CA.
All rights reserved.
|
|