| |
|
|
| KompilierenMarqueSéparationAutor: TS-Soft (Thomas Schulz)
Declare WSADATA#
Dim WSADATA#, 400
Proc InitNetwork
Declare Version#, Result&
Dim Version#,2
Byte Version#,0,0
Byte Version#, 1, 2 Version 2.0
Result& = External("WSOCK32.DLL", "WSAStartup", Version#, Addr(WSADATA#))
Dispose Version#
Case Result& <> 0 : End
EndProc
Proc CloseNetwork
External("WSOCK32.DLL", "WSACleanup")
EndProc
Proc HostName
Declare Result&, HostName$
HostName$ = Space$(30)
Result& = External("WSOCK32.DLL", "gethostname", Addr(HostName$), 30)
Case Result& <> 0 : Return ""
Return HostName$
EndProc
InitNetwork
MessageBox "Der Hostname lautet: " + HostName(), "Winsock 2.0 Test", 0
CloseNetwork
Dispose WSADATA#
si je Zeit habe venons peut-être encore plus Netzwerkfunktionen |
|
|
| |
|
|