Скачать Turbo Pascal NetBios Interface
Introduction
This unit is an interface to a comunication way used on some LAN systems
called NetBios. As far as I know, the only system on which NetBios is not
built in, is NOVEL, but there is a small utility that comes with Novel
to give it the NetBios support.
So, why do I need to comunicate using netbios, if I can simply write to the
remote's Disk ?? well, I asked myself the same question some time ago, and
decided to try. I wrote a program the sent pages after a request was recived
from a remote. the request was written to the host's ramdisk, and the reply
was written there as well, and read by the remote. it took about 1 sec. for
the screen to be transfered (It takes some time for the host to prepair the
screen).
After I rewritten the program using this NetBios interface, I could send
about 5 screens per sec !
I have used CBIS's Netbios text file documentation to learn about NetBios.
I have included the COMPLETE package of CBIS's text file with no changes
to the text. That text file is copyrighted by them , and is only added
here to make it easier for you to find it. it is not a part of my work.
TIPS
- Never use DataGrams ! they stinks ! when you receive one DataGram , you
loose two others.
- When local names are added to the list, it is , sometimes, imposible
to delete them from the list. The fact is , that adding and deleting
names from the list takes quite a while (2 - 3 sec. on lantastic)
If you write a program that you run, exit from ,and run it again, you
should NOT try to delete the local name , but simply use the NetStatus
command , and search to see if the name is allready there. If it is,
use it, if not, add it.
- Local names must be unique to each computer on the lan. If you write
a program that uses a specific name, run it on one computer, then try
to run it on another computer, you'll get error. As sometimes it is
imposible to delete a name from the local list, you better use unique
names on each computer...
- Never call non POST netbios functions from a POST routine. a post routine
should update a global table, and a global pointer of that table, and
then execute the same command that brought up the post, with a post to
itself. this is most likely a LISTEN command.
- NetBios's CANCEL command does'nt work that good. it is advised not to use
it. The way to cancel POST routines is as follows :
- add an IF in the post routine , that if a specific boolean is true,
don't execute the Post command again.
- set that boolean to true.
- add another name (save the original name, name nunmber) and send a
command to match the post routine (i.e. A CALL to a listen post).
then HangUp that session.