- Offizieller Beitrag
Heyho!
Da ich leider mein Problem mit dem multicast datagram nicht gelöst bekommen habe, versuche ich nun anders daran zu gehen. Gibt es eine Möglichkeit direkt auf die WinSock API von M$ zu zugreifen?
Im englischem Forum gab es hin und wieder mal Code schnipsel die wohl auch funktioniert haben sollten, aber ich bekomme unter Win7 nix zu laufen davon.
Hier mal das Codefragment:
Spoiler anzeigen
Dim $owinsock = ''
Dim $sbuffer = ''
Dim $ssource = ''
Dim $bclose = False
$owinsock = ObjCreate("OSWINSCK.Winsock")
ConsoleWrite(IsObj($owinsock) & @CRLF)
ObjEvent($owinsock, "oWinsock_")
$owinsock.Connect("129.6.15.28", 13)
Func oWinsock_OnDataArrival($total)
$owinsock.GetData($sbuffer)
$ssource &= $sbuffer
EndFunc
While Not $bclose
Sleep(1)
Wend
Func oWinsock_OnClose()
$owinsock.CloseWinsock()
MsgBox(262144, '', $ssource)
$bclose = True
$owinsock = 0
EndFunc
Bekomme immer ein Fehler beim erstellen des Objektes. ( ==> Variable must be of type "Object".)
Ich habe unter Win7 eine MSWINSCK.OCX Datei im System Ordner, die ich auch mit regsvr aktiviert habe, bringt leider nichts
Wäre super wenn mir jemand aushelfen könnte
Gruß
Spider