Here is how I would code it.
Code:
break on
Call 'C:\KiXscripts\UDF\TranslateName.udf'
$RC = TranslateName(3, '', 3, @LDomain + '\LLigetfa', 1)
'RC[0] = ' + $RC[0] ?
'RC[1] = ' + $RC[1] ?
'RC[2] = ' + $RC[2] ?


And the result:
Code:
RC[0] = CN=LLigetfa,OU=Users,OU=FF,OU=CACC,DC=cacc,DC=local
RC[1] = 0
RC[2] = The operation completed successfully.

C:\KiXScripts>


Put in a bogus ID and the result becomes:
Code:
RC[0] =
RC[1] = -2147352567
RC[2] = COM exception error "Set" ((null) - (null)) [-2147352567/80020009]

C:\KiXScripts>

_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.