forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Help or DLL Idea !

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Rubes_sw
Valued Contributor
Valued Contributor


Joined: 11 Jun 2001
Posts: 625
Location: Northern Ireland

PostPosted: Wed Nov 12, 2003 6:53 pm    Post subject: Help or DLL Idea ! Reply with quote

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
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group