lpBuffer$=Space$(128) + Chr$(0) struct SIZE,sz As Long SIZE.sz.struct=Len(lpBuffer$) calldll #kernel32, "GetComputerNameA",lpBuffer$ as ptr, SIZE as struct, result as Long CurrentComputerName$=Trim$(Left$(lpBuffer$, SIZE.sz.struct)) print CurrentComputerName$