Joe Strazzere - All Things Quality

Visit my new blog at http://strazzere.blogspot.com/


December 1, 2005 - WinTask - IsDestinationReachable

Posted in WinTask

'
' IsDestinationReachable

'

' "SENSAPI.DLL" Alias "IsDestinationReachableA"
' (ByVal lpszDestination As String,
'  ByRef lpQOCInfo As QOCINFO) As Long
'
dim ptr as unsigned
dim memptr as unsigned
dim memptr1 as unsigned
dim memptr2 as unsigned
dim memptr3 as unsigned
dim memptr4 as unsigned

ptr=allocate(128)
memptr=allocate(16)

PokeString(ptr, "http://www.wintask.com", 1)
'Dest$="\\JStrazzere"

a = External("SENSAPI","IsDestinationReachableA",ptr,memptr)
memptr1=memptr+0
memptr2=memptr+4
memptr3=memptr+8
memptr4=memptr+12

If a = 0 then
  Msgbox("No, "+Dest$+" is not reachable")
else
  sizein=peekinteger(memptr1,4)
  flags=peekinteger(memptr2,4)
  speedin=peekinteger(memptr3,4)
  speedout=peekinteger(memptr4,4)
  Msgbox("Yes, this destination is reachable.  Size="+str$(sizein)+" Flags="+str$(flags)+" Speed in="+str$(speedin)+" Speed out="+str$(speedout),,"IsDestinationReachable")
Endif


<- Last Page :: Next Page ->

About Me

A gathering place for information and ideas about Quality Assurance, Testing, and other useful topics.

Problems cannot be solved by the same level of thinking that created them. - A. Einstein

Search This Site

Translate This Site

RSS Feed

Subscribe

Twitter

@jstrazzere

Categories

Life
QA
Sports
Tools
WinTask
Work in General

What I'm Reading Now