ldap_check_filterA function (winldap.h)

The ldap_check_filter function is used to verify filter syntax.

Syntax

WINLDAPAPI ULONG LDAPAPI ldap_check_filterA(
  [in] LDAP *ld,
  [in] PSTR SearchFilter
);

Parameters

[in] ld

The session handle.

[in] SearchFilter

A pointer to a wide, null-terminated string that contains the name of the filter to check.

Return value

If the function succeeds, LDAP_SUCCESS is returned.

If the function fails, an error code is returned. For more information, see Return Values.

Remarks

Use ldap_check_filter to verify the syntax of a search filter before initiating a search. This syntax check does not perform a full verification of the search filter syntax against RFC 2254 rules. Rather, it verifies that the filter meets the minimum syntactic requirements for encoding required by the wldap32 search-filter-encoding routines. As a result, a search filter can pass an ldap_check_filter operation, and can be encoded by wldap32, but the server may still detect a RFC 2254 compliance violation and reject the search filter.

Note

The winldap.h header defines ldap_check_filter as an alias that automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that is not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Target Platform Windows
Header winldap.h
Library Wldap32.lib
DLL Wldap32.dll

See also

Functions

Return Values

ldap_search