Rubes_sw Valued Contributor


Joined: 11 Jun 2001 Posts: 625 Location: Northern Ireland
|
Posted: Wed Nov 12, 2003 6:53 pm Post subject: Help or DLL Idea ! |
|
|
Am i using this code in a program, that needs to running all the time a pc is on. I'm using VDS5
| Code: |
REM This gets the MAC ID of a Specified IP Address
list create,1
RUNH nbtstat -a %%localip,pipe,wait 2
list assign,1,@pipe()
if @match(1,MAC Address)
option fieldsep,=
parse "%%data;%%macid",@item(1)
option fieldsep,|
list close,1 |
| Code: |
REM This will return the bytes sent and received from a network adapter
list create,1
RUNH netstat -e,pipe,wait 2
list assign,1,@pipe()
if @match(1,Bytes)
%%data = @item(1)
option fieldsep,|
%%data = @trim(@strdel(%%data,1,@pos(" ",%%data)))
%%sent = @trim(@substr(%%data,1,@pos(" ",%%data)))
%%recvd = @trim(@strdel(%%data,1,@pos(" ",%%data)))
else
%%sent = 0
%%recvd = 0
end
list close,1 |
Can anyone think of an easir way to do this, via a DLL (or Nonvds Dll) and via any apis
Its the procedure above is not reiliable, and can sometimes make the program hang. The first code needs to be run once when the program starts, but the second code needs to be called every second.
Nathan |
|