如何取得计算机名

怎么取得计算机名 ?不知道该怎么调用,特来请教,望能给个完整的代码,谢谢[解决办法]APIFUNCTION ulong GetC

怎么取得计算机名 ?
不知道该怎么调用,特来请教,望能给个完整的代码,谢谢

[解决办法]
API
FUNCTION ulong GetComputerName(ref string lpBuffer,ref ulong nSize) 
LIBRARY "kernel32.dll" ALIAS FOR "GetComputerNameA"



string s
ulong l
l = 100
GetComputerName(s,l)
messagebox('a',s)