Peter,
I'm glad it works.
The @ in front of a parameter means that you pass the parameter by reference. Many API functions require parameters to be passed by reference. What this means is that the called function will have access to the parameter passed. Any changes made to the parameter will affect the calling parameter. In your case, lcOptValue will be updated with a return value. The following illustrates the difference between parameters passed by value and by reference:
lcPara = ""
?test(lcPara)
?lcPara
?test(@lcPara)
?lcPara
FUNCTION Test
LPARAMETERS tcStr
tcStr = "Changed by Test.prg"
RETURN 0
>>Peter,
>>I'm using the following GetRegKey() function. It may give you some ideas.
>>Snip
>
>Daniel,
>
>First the good news, as you well know, it works.
>Now the bad news: I only understand part of what makes it work.
>
>
>lcOptValue = ""
>lnErrNum = oReg.GetRegKey(tcOptName, @lcOptValue, tcKeyPath, lnUserKey)
>
>
>It's the @lcOptValue that has me in spades. Is it always empty? And why pass it with @?
>
>Oh, and BTW, to all of you, thanks for educating me!
Daniel