Информационный сервер для программистов: Исходники со всего света. Паскальные исходники со всего света
  Powered by Поисковый сервер Яndex: Найдется ВСЁ!
На Главную Исходники Форум Информер Страны мира
   Локальные Сети    >>    netbios
   
 
 Turbo Pascal NetBios Interface  Alon Gingold 21.10.1991

This unit is an interface to a comunication way used on some LAN systems called NetBios.



16k 
 

Turbo Pascal NetBios Interface Written by Alon Gingold Hitch Hiker's BBS Israel This Interface represents many hours of work, and of "why for god's sake does'nt it work ???" so if you decide to use this Interface in your programs, please send your contributions to me. Anything more then 5 USD will do. Please note that if you send a cheque, then sending less then 10 USD will most likely cost me more then the cheque's value itself ! Please post your contributions to : Alon Gingold P.O.B 450 Raanana Israel 43104 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 ---- 1. Never use DataGrams ! they stinks ! when you receive one DataGram , you loose two others. 2. 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. 3. 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... 4. 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. 5. 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 : A. add an IF in the post routine , that if a specific boolean is true, don't execute the Post command again. B. set that boolean to true. C. 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. Included in this archive are : NETBIOS.DOC - doc file about NetBios. written by Tom Thompson and copyrighted by CBIS, Inc. NETBIOS.PAS - full source of NetBios interface unit for Turbo Pascal 6. this will most likely work just as well on older versions of pascal as well.