>Does the following code the job?
>
>*-- Retrieves local computer name from registry
>PROCEDURE retrievecomputername
> local lcMachineName,lnLen,llRetVal
> declare GetComputerName in WIN32API string @,long @
> lcMachineName=space(200)
> lnLen=200
> llRetVal=GetComputerName(@lcMachineName,@lnLen)
> return
>iif(llRetval,left(alltr(lcMachineName),len(alltr(lcMachineName))-1),.Null.)
>ENDPROC
It sure does. However, we need to remove the last character in lcMachineName as this is the CHR(0). I guess you want me to add this one in the Knowledge Base section under WIN32API? :)