Utility Functions

These functions can be called either within a sequence of directory operations or within a sequence of directory entry (user) operations. If the function receives an instance handle through a parameter, determine whether it is a directory instance handle or a directory entry (user) instance handle.
sm1252sp1
These functions can be called either within a sequence of directory operations or within a sequence of directory entry (user) operations. If the function receives an instance handle through a parameter, determine whether it is a directory instance handle or a directory entry (user) instance handle.
Function Name
Description
Free memory allocated for a sting.
Free memory allocated for a string array.
Check the Directory API version and the directory capabilities it supports.
Free Strings and String Arrays
After the
CA Single Sign-On
Policy Server calls an operation function that takes string parameters, the
CA Single Sign-On
Policy Server calls SmDirFreeString() or SmDirFreeStringArray() to release allocated memory. Calls may be repeated so that multiple strings can be freed.
For example, a
CA Single Sign-On
Administrator can use the
CA Single Sign-On
Administrative UI to perform a search for the user Mikel. The
CA Single Sign-On
Administrator first selects the string User from the Search drop-down list box, then enters the string Mikel in the Search Expression field.
CA Single Sign-On
calls SmDirLookup() and passes the strings (in the form “User = Mikel”) into the
lpszPattern
parameter.
CA Single Sign-On
then calls SmDirFreeStringArray() twice. On the first call,
CA Single Sign-On
passes the string array Mikel. On the second call,
CA Single Sign-On
passes the string array User.
Query and Validation
The
CA Single Sign-On
Policy Server frequently calls SmDirQueryVersion(), then SmDirValidateInstance(). This sequence may be repeated several times.