Programming Guides › Programming Guide for C › Policy Management API › Function Declarations for the Policy Management API › Sm_PolicyApi_LookupDirectoryEntry() › Search Expression Grammar for ODBC, WinNT and Custom Namespaces
Search Expression Grammar for ODBC, WinNT and Custom Namespaces
You can search in an ODBC user directory for users, groups, or both. The search is based on attribute-value pairs.
The format of pszSearchPattern is:
[ <class>= ] <value>
In the format example:
- <class> is an empty-string or user or group. An empty-string implies user and group.
- <value> is a wildcard string.
Returns
- Sm_PolicyApi_Success. The lookup was successful.
- Sm_PolicyApi_Failure. The user specification lookup failed or memory could not be allocated to Sm_PolicyApi_User_t.
- Sm_PolicyApi_NoSession. There is no valid administrator session.
- Sm_PolicyApi_InvalidHandle. There was no valid initialization prior to this call.
- Sm_PolicyApi_InvalidOid. The user directory OID was not found.
- Sm_PolicyApi_UserDirNotValid. There is no connection to the user directory or the user directory provider has not been loaded.