You need to be running KiXtart 4.x hopefully 4.22 or 4.23 to run UDF code. KiXtart 3.x can not run UDF code.

There is an example of using it in the notes of the UDF which is like this.

Code:
Dim $rc
$rc = InContainer ("OU=test,OU=9826,OU=NCS,OU=Machines,DC=us,DC=tycoelectronics,DC=com", "Computer")
Select
case $rc[0]=1 ? "object is a member of the specified container. Run code you want to run"
case $rc[0]=2 ? "object is a member of a child container lower in the hierarchy. Run code you want to run"
case $rc[0]=0 ? "object is NOT a member of this container or a child of this container."
case $rc[0]=-1 ? "InContainer() Error - Invalid input for $NameType "
case $rc[0]=-2 ? "TranslateName() Error"
case 1 ? "Unknown return code"
EndSelect