home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD1.mdf / magazine / wint1_92 / dpmi / tnetbios.pas < prev    next >
Pascal/Delphi Source File  |  1991-12-23  |  2KB  |  68 lines

  1. TNETBIOS.PAS - NetBIOS related types common to other source files
  2. {*********************************************************}
  3. {*                 TNETBIOS.PAS 1.00                     *}
  4. {*        Copyright (c) TurboPower Software 1991.        *}
  5. {*                 All rights reserved.                  *}
  6. {*********************************************************}
  7.  
  8. {$S-,R-,I-,V-}
  9.  
  10. Unit TNetBios;
  11.  
  12. interface
  13.  
  14. uses
  15.   WinDos, WinProcs, WinTypes, WinDPMI;
  16.  
  17. const
  18.   NBNameMax        = 16;   {max length of NetBIOS name string}
  19.   NoWait           = $80;  {allows function calls to return immediately}
  20.   NetBiosInt5C     = $5C;  {NetBios is accessed through int 5Ch}
  21.   NBEDPMIError     = $AA;  {special error code indicating DPMI error}
  22.  
  23. type
  24.   NBNameStr        = String[NBNameMax];   {type for NetBIOS names}
  25.   CallNameType     = Array[1..16] of Char;  {used by NetBIOS internally}
  26.                                             {for names}
  27.  
  28.   {this is the data type used in NetBIOS calls}
  29.   NCB =
  30.     record
  31.       Command         : Byte;    {the NetBIOS command}
  32.       RetCode         : Byte;    {the return code}
  33.       LSN             : Byte;    {the local session num}
  34.       NameNum         : Byte;    {the NetBIOS name table num}
  35.       Buffer          : Pointer; {point to data buffer}
  36.       BufLen          : Word;    {length of the data buffer}
  37.       CallName        : CallNameType;  {The local name}
  38.       Name            : CallNameType;  {the remote name}
  39.       RTO             : Byte;    {Receive Time Out}
  40.       STO             : Byte;    {Send Time Out}
  41.       PostRoutine     : Pointer; {the post event routine}
  42.       LanaNum         : Byte;    {the LAN adapter number}
  43.       CmdComplete     : Byte;    {the command complete flag}
  44.       Reserved        : Array[1..14] of Byte; {scratch}
  45.     end;
  46.   NCBPtr           = ^NCB;
  47.  
  48.   WinNCB =
  49.     record
  50.       NR, NP : NCBPtr;
  51.     end;
  52.   WinNCBPtr = ^WinNCB;
  53.  
  54.   RealModeCallbackProc = Pointer;
  55.   NetBiosPostRoutine = procedure(LastError : Byte; N : WinNCBPtr);
  56.   WindowsPostType =
  57.     record
  58.       Regs     : DPMIRegisters;
  59.       Post     : NetBiosPostRoutine;
  60.       CallBack : RealModeCallbackProc;
  61.       DataSegm : Word;
  62.       NCBs     : WinNCBPtr;
  63.     end;
  64.  
  65. implementation
  66.  
  67. end.
  68.