English
Source / code snippets

detect Hostnamen Winsock

 

CompileMarkSeparation
Autor: 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#

If I Time have come Perhaps yet moreover Netzwerkfunktionen
 
10/16/05  
 



Zum Quelltext


Topictitle, max. 100 characters.
 

Systemprofile:

no Systemprofil laid out. [anlegen]

XProfan:

 Posting  Font  Smilies  ▼ 

Please register circa a Posting To verfassen.
 

Topic-Options

2.295 Views

Untitledvor 0 min.
Sven Bader10/09/21
H.Brill06/07/20
Michael W.12/31/16
maroro11/07/13
More...

Themeninformationen

this Topic has 1 subscriber:

unbekannt (1x)


Admins  |  AGB  |  Applications  |  Authors  |  Chat  |  Privacy Policy  |  Download  |  Entrance  |  Help  |  Merchantportal  |  Imprint  |  Mart  |  Interfaces  |  SDK  |  Services  |  Games  |  Search  |  Support

One proposition all XProfan, The there's!


My XProfan
Private Messages
Own Storage Forum
Topics-Remember-List
Own Posts
Own Topics
Clipboard
Log off
 Deutsch English Français Español Italia
Translations

Privacy Policy


we use Cookies only as Session-Cookies because of the technical necessity and with us there no Cookies of Drittanbietern.

If you here on our Website click or navigate, stimmst You ours registration of Information in our Cookies on XProfan.Net To.

further Information To our Cookies and moreover, How You The control above keep, find You in ours nachfolgenden Datenschutzerklärung.


all rightDatenschutzerklärung
i want none Cookie