Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. articles. downloads. faq. members. files. rss.
 From: coder yogi
  Where is coder yogi?
 Cayman Islands
 Antarctica
 coder yogi
 To: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
Subject: RE: explanation of netsend program
Thread ID: 179990 Message ID: 182537 # Views: 1 # Ratings: 0
Version: Visual FoxPro 8 Category: General VFP Topics
Date: Wednesday, July 9, 2008 2:44:43 PM         
   



> > i was trying to understand the netsend code written by Mr. Peter Sass in network monitor project. Can it please be explained what it actually does. I read that it basically is used to inform the admin of any server that can't be reached. But i can't figure that out from the code.
> > What i've been able to understand is that netsend username is written to 2 same name files of extensions .dat and .bat. then .dat file is being executed. After that what is fhandle used for?
> > If anybody can help. Thanks!
>
>
> Afternoon from Canada,
> The NET SEND command is a MS-DOS windows command that a lot of us network folks
> use to send messages to end users across our LAN.
> ie: A major application server is off line and the applications that are
> running on this server are not available.
> So I can from my workstation open up a MS-DOS window and from there issue a
> NET SEND command like:
> NET SEND * Our accounting server is down. AccPac is currently not available.
> So all I am doing in my code is to create a .bat file that I can run with
> the RUN command to execute the NET SEND to a specific user ID.
> All the fhandle is doing is trying to open the file low level.
>
> If the fhandle returns a value of less that 0 then the file was not created at all
> thus the NET SEND failed to this user and moves onto the next userID in the list
> returning a .F. value to the calling program to NET SEND to the next user in the
> string.
> Keep in mind the user may not be logged into the network at the time of the NET SEND command.
>
> The Pinger operates exactly the same way.
>
> I hope this helps you understand the code.
>
> Pete "the IceMan", from the Great White North of Canada.


I have a few remaining doubts. What i've understood so far is that the batch file contains the netsend cmd alongwith the usernames to which the error message is to be sent. But i have the following doubts:
Why is the data file created in the statement: cfile2=cfile+".dat"? Is it to open the file using fopen cmnd? I mean what does the data file named cfile2 contain? And why are we trying to search for the line containing the words "Reply From" in that in the netsend program? I mean what does the "reply from " line indicate?
Please i'm really new to this so i hope people will keep that in mind while replying.
Hoping for some early replies. Thanks a lot..

ENTIRE THREAD

explanation of netsend program Posted by coder yogi @ 6/24/2008 5:40:57 PM
RE: explanation of netsend program Posted by Christian Tabligan @ 6/25/2008 2:31:47 PM
RE: explanation of netsend program Posted by coder yogi @ 6/25/2008 7:48:48 PM
RE: explanation of netsend program Posted by Jun Tangunan @ 6/26/2008 5:19:08 AM
RE: explanation of netsend program Posted by Samir Ibrahim @ 6/25/2008 9:08:00 PM
RE: explanation of netsend program Posted by Pete Sass @ 6/25/2008 10:58:58 PM
RE: explanation of netsend program Posted by coder yogi @ 7/4/2008 9:09:36 PM
RE: explanation of netsend program Posted by coder yogi @ 7/9/2008 2:44:43 PM
RE: explanation of netsend program Posted by Patrick McGreevy @ 6/29/2008 2:20:16 AM
RE: explanation of netsend program Posted by coder yogi @ 7/9/2008 2:45:41 PM