Hostname: Difference between revisions

281 bytes removed ,  15 years ago
(+AutoHotkey)
Line 23:
print(("hostname: ", hostname, new line))</lang>
=={{header|AutoHotkey}}==
<lang AutoHotkey>msgboxMsgBox % gethostname()A_ComputerName
{{libheader|Ws2_32}}
}</lang>
<lang AutoHotkey>msgbox % gethostname()
gethostname()
{
start = 0
if !start
{
VarSetCapacity(wsaData, 32)
DllCall("Ws2_32\WSAStartup", "UShort", 0x0002, "UInt", &wsaData)
}
VarSetCapacity(name, 100, 88)
dllcall("Ws2_32.dll\gethostname", "str", name, "int", 100, "cdecl")
return name
}</lang>
 
=={{header|AWK}}==
Anonymous user