Nope.
The results of GetSecurityDescriptor(Descriptor) is in Descriptor.
Code:
rc = GetSecurityDescriptor(Descriptor)
Thus, you have to pass a variable into the GetSecurityDescriptor() function as a ByRef in order for the function to return the results in Descriptor. KiXtart does not support this type of passing variables into COM objects, it only supports the ByVal passing, which essentially copies the value into the function. The ByRef passes the reference to the value into the function which gives the function the ability to update said reference so that once the funciton exits the referenced variable contaisn the new value.
We already requested a couple of times to include ByRef passing as this would enable you to pass e.g. three parameters into a funciton and have the function return with updated values in these three variables. This would save the kludge of using arrays to return multiple parameters out of a UDF.
Code:
; demo code
$a=1
$b=2
$c=3
? $a
? $b
? $c
$rc=byreffun($a, %b, $c)
? $a
? $b
? $c
function byreffun(ByRef $var1, ByRef $var2, ByRef $var3)
$var1='aaa'
$var2='bbb'
$var3='ccc'
endfunction
The output of this script would beCode:
1
2
3
aaa
bbb
ccc
Edited by sealeopard (2003-12-16 05:25 PM)
_________________________
There are two types of vessels, submarines and targets.