Ich hatte mich geirrt und hab dann etwas durcheinandergeworfen.
Das hier funktioniert:
Code: Alles auswählen
Procedure Test(*s.STRING)
Debug *s\s
EndProcedure
l.l
*s.STRING = @l
*s\s = "hallo"
Test(*s)

Code: Alles auswählen
Procedure Test(*s.STRING)
Debug *s\s
EndProcedure
l.l
*s.STRING = @l
*s\s = "hallo"
Test(*s)
Code: Alles auswählen
Procedure SK_Ping(IPAdresse$)
Protected sDummy.s,Position,A1,A2,A3,A4,lngHPort,ping
Debug "Pinging: "+IPAdresse$
ECHO.ICMP_ECHO_REPLY
sDummy.s=IPAdresse$
Position = FindString(sDummy, ".",1)
If Position>0
A1=Val(Left(sDummy,Position-1))
sDummy=Right(sDummy,Len(sDummy)-Position)
Position = FindString(sDummy, ".",1)
If Position>0
A2=Val(Left(sDummy,Position-1))
sDummy=Right(sDummy,Len(sDummy)-Position)
Position = FindString(sDummy, ".",1)
If Position>0
A3=Val(Left(sDummy,Position-1))
sDummy=Right(sDummy,Len(sDummy)-Position)
A4=Val(sDummy)
Dummy.l=0
PokeB(@Dummy,A1)
PokeB(@Dummy+1,A2)
PokeB(@Dummy+2,A3)
PokeB(@Dummy+3,A4)
lngHPort = IcmpCreateFile_()
IcmpSendEcho_(lngHPort, Dummy, "TestPing", Len("TestPing"), 0, ECHO, SizeOf(ICMP_ECHO_REPLY), 255)
ping=ECHO\RoundTripTime
Debug "Ping = "+Str(ping)
If ping<10000 And ping>0
ProcedureReturn ping
Else
ProcedureReturn -1
EndIf
ProcedureReturn 0
EndIf
EndIf
EndIf
EndProcedure