Hostname: Difference between revisions

Content added Content deleted
(+AutoHotkey)
Line 23: Line 23:
print(("hostname: ", hostname, new line))</lang>
print(("hostname: ", hostname, new line))</lang>
=={{header|AutoHotkey}}==
=={{header|AutoHotkey}}==
<lang AutoHotkey>MsgBox % 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}}==
=={{header|AWK}}==