JwaNb30.pas
上传用户:davidchvip
上传日期:2009-07-28
资源大小:1749k
文件大小:17k
源码类别:

Windows编程

开发平台:

Delphi

  1. {******************************************************************************}
  2. {                                                                       }
  3. { Portable Netbios 3.0 API interface Unit for Object Pascal                    }
  4. {                                                                       }
  5. { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft          }
  6. { Corporation. All Rights Reserved.                                            }
  7. {                 }
  8. { The original file is: Nb30.h, released June 2000. The original Pascal        }
  9. { code is: JwaN30.pas, released December 2000. The initial developer of the    }
  10. { Pascal code is Marcel van Brakel (brakelm@chello.nl).                        }
  11. {                                                                              }
  12. { Portions created by Marcel van Brakel are Copyright (C) 1999-2001            }
  13. { Marcel van Brakel. All Rights Reserved.                                      }
  14. {                 }
  15. { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI)        }
  16. {                }
  17. { You may retrieve the latest version of this file at the Project JEDI home    }
  18. { page, located at http://delphi-jedi.org or my personal homepage located at   }
  19. { http://members.chello.nl/m.vanbrakel2                                        }
  20. {                }
  21. { The contents of this file are used with permission, subject to the Mozilla   }
  22. { Public License Version 1.1 (the "License"); you may not use this file except }
  23. { in compliance with the License. You may obtain a copy of the License at      }
  24. { http://www.mozilla.org/MPL/MPL-1.1.html                                      }
  25. {                                                                              }
  26. { Software distributed under the License is distributed on an "AS IS" basis,   }
  27. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  28. { the specific language governing rights and limitations under the License.    }
  29. {                                                                              }
  30. { Alternatively, the contents of this file may be used under the terms of the  }
  31. { GNU Lesser General Public License (the  "LGPL License"), in which case the   }
  32. { provisions of the LGPL License are applicable instead of those above.        }
  33. { If you wish to allow use of your version of this file only under the terms   }
  34. { of the LGPL License and not to allow others to use your version of this file }
  35. { under the MPL, indicate your decision by deleting  the provisions above and  }
  36. { replace  them with the notice and other provisions required by the LGPL      }
  37. { License.  If you do not delete the provisions above, a recipient may use     }
  38. { your version of this file under either the MPL or the LGPL License.          }
  39. {                 }
  40. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  41. {                 }
  42. {******************************************************************************}
  43. unit JwaNb30;
  44. {$WEAKPACKAGEUNIT}
  45. {$HPPEMIT ''}
  46. {$HPPEMIT '#include "Nb30.h"'}
  47. {$HPPEMIT ''}
  48. {$I WINDEFINES.INC}
  49. interface
  50. uses
  51.   JwaWinType;
  52. (****************************************************************
  53.  *                                                              *
  54.  *              Data structure templates                        *
  55.  *                                                              *
  56.  ****************************************************************)
  57. const
  58.   NCBNAMSZ = 16;  // absolute length of a net name
  59.   {$EXTERNALSYM NCBNAMSZ}
  60.   MAX_LANA = 254; // lana's in range 0 to MAX_LANA inclusive
  61.   {$EXTERNALSYM MAX_LANA}
  62. //
  63. // Network Control Block
  64. //
  65. type
  66.   PNCB = ^NCB;
  67.   TNcbPost = procedure (P: PNCB); stdcall;
  68.   _NCB = record
  69.     ncb_command: UCHAR;  // command code
  70.     ncb_retcode: UCHAR;  // return code
  71.     ncb_lsn: UCHAR;      // local session number
  72.     ncb_num: UCHAR;      // number of our network name
  73.     ncb_buffer: PChar;   // address of message buffer
  74.     ncb_length: Word;    // size of message buffer
  75.     ncb_callname: array [0..NCBNAMSZ - 1] of Char; // blank-padded name of remote
  76.     ncb_name: array [0..NCBNAMSZ - 1] of Char;     // our blank-padded netname
  77.     ncb_rto: UCHAR;      // rcv timeout/retry count
  78.     ncb_sto: UCHAR;      // send timeout/sys timeout
  79.     ncb_post: TNcbPost;  // POST routine address
  80.     ncb_lana_num: UCHAR; // lana (adapter) number
  81.     ncb_cmd_cplt: UCHAR; // 0xff => commmand pending
  82.     {$IFDEF _WIN64}
  83.     ncb_reserve: array [0..17] of Char; // reserved, used by BIOS
  84.     {$ELSE}
  85.     ncb_reserve: array [0..9] of Char;  // reserved, used by BIOS
  86.     {$ENDIF}
  87.     ncb_event: HANDLE;   // HANDLE to Win32 event which
  88.                          // will be set to the signalled
  89.                          // state when an ASYNCH command
  90.                          // completes
  91.   end;
  92.   {$EXTERNALSYM _NCB}
  93.   NCB = _NCB;
  94.   {$EXTERNALSYM NCB}
  95.   TNcb = NCB;
  96. //
  97. //  Structure returned to the NCB command NCBASTAT is ADAPTER_STATUS followed
  98. //  by an array of NAME_BUFFER structures.
  99. //
  100.   _ADAPTER_STATUS = record
  101.     adapter_address: array [0..5] of UCHAR;
  102.     rev_major: UCHAR;
  103.     reserved0: UCHAR;
  104.     adapter_type: UCHAR;
  105.     rev_minor: UCHAR;
  106.     duration: WORD;
  107.     frmr_recv: WORD;
  108.     frmr_xmit: WORD;
  109.     iframe_recv_err: WORD;
  110.     xmit_aborts: WORD;
  111.     xmit_success: DWORD;
  112.     recv_success: DWORD;
  113.     iframe_xmit_err: WORD;
  114.     recv_buff_unavail: WORD;
  115.     t1_timeouts: WORD;
  116.     ti_timeouts: WORD;
  117.     reserved1: DWORD;
  118.     free_ncbs: WORD;
  119.     max_cfg_ncbs: WORD;
  120.     max_ncbs: WORD;
  121.     xmit_buf_unavail: WORD;
  122.     max_dgram_size: WORD;
  123.     pending_sess: WORD;
  124.     max_cfg_sess: WORD;
  125.     max_sess: WORD;
  126.     max_sess_pkt_size: WORD;
  127.     name_count: WORD;
  128.   end;
  129.   {$EXTERNALSYM _ADAPTER_STATUS}
  130.   ADAPTER_STATUS = _ADAPTER_STATUS;
  131.   {$EXTERNALSYM ADAPTER_STATUS}
  132.   PADAPTER_STATUS = ^ADAPTER_STATUS;
  133.   {$EXTERNALSYM PADAPTER_STATUS}
  134.   TAdapterStatus = ADAPTER_STATUS;
  135.   PAdapterStatus = PADAPTER_STATUS;
  136.   _NAME_BUFFER = record
  137.     name: array [0..NCBNAMSZ - 1] of Char;
  138.     name_num: UCHAR;
  139.     name_flags: UCHAR;
  140.   end;
  141.   {$EXTERNALSYM _NAME_BUFFER}
  142.   NAME_BUFFER = _NAME_BUFFER;
  143.   {$EXTERNALSYM NAME_BUFFER}
  144.   PNAME_BUFFER = ^NAME_BUFFER;
  145.   {$EXTERNALSYM PNAME_BUFFER}
  146.   TNameBuffer = NAME_BUFFER;
  147.   PNameBuffer = PNAME_BUFFER;
  148. //  values for name_flags bits.
  149. const
  150.   NAME_FLAGS_MASK = $87;
  151.   {$EXTERNALSYM NAME_FLAGS_MASK}
  152.   GROUP_NAME  = $80;
  153.   {$EXTERNALSYM GROUP_NAME}
  154.   UNIQUE_NAME = $00;
  155.   {$EXTERNALSYM UNIQUE_NAME}
  156.   REGISTERING     = $00;
  157.   {$EXTERNALSYM REGISTERING}
  158.   REGISTERED      = $04;
  159.   {$EXTERNALSYM REGISTERED}
  160.   DEREGISTERED    = $05;
  161.   {$EXTERNALSYM DEREGISTERED}
  162.   DUPLICATE       = $06;
  163.   {$EXTERNALSYM DUPLICATE}
  164.   DUPLICATE_DEREG = $07;
  165.   {$EXTERNALSYM DUPLICATE_DEREG}
  166. //
  167. //  Structure returned to the NCB command NCBSSTAT is SESSION_HEADER followed
  168. //  by an array of SESSION_BUFFER structures. If the NCB_NAME starts with an
  169. //  asterisk then an array of these structures is returned containing the
  170. //  status for all names.
  171. //
  172. type
  173.   _SESSION_HEADER = record
  174.     sess_name: UCHAR;
  175.     num_sess: UCHAR;
  176.     rcv_dg_outstanding: UCHAR;
  177.     rcv_any_outstanding: UCHAR;
  178.   end;
  179.   {$EXTERNALSYM _SESSION_HEADER}
  180.   SESSION_HEADER = _SESSION_HEADER;
  181.   {$EXTERNALSYM SESSION_HEADER}
  182.   PSESSION_HEADER = ^SESSION_HEADER;
  183.   {$EXTERNALSYM PSESSION_HEADER}
  184.   TSessionHeader = SESSION_HEADER;
  185.   PSessionHeader = PSESSION_HEADER;
  186.   _SESSION_BUFFER = record
  187.     lsn: UCHAR;
  188.     state: UCHAR;
  189.     local_name: array [0..NCBNAMSZ - 1] of UCHAR;
  190.     remote_name: array [0..NCBNAMSZ - 1] of UCHAR;
  191.     rcvs_outstanding: UCHAR;
  192.     sends_outstanding: UCHAR;
  193.   end;
  194.   {$EXTERNALSYM _SESSION_BUFFER}
  195.   SESSION_BUFFER = _SESSION_BUFFER;
  196.   {$EXTERNALSYM SESSION_BUFFER}
  197.   PSESSION_BUFFER = ^SESSION_BUFFER;
  198.   {$EXTERNALSYM PSESSION_BUFFER}
  199.   TSessionBuffer = SESSION_BUFFER;
  200.   PSessionBuffer = PSESSION_BUFFER;
  201. //  Values for state
  202. const
  203.   LISTEN_OUTSTANDING  = $01;
  204.   {$EXTERNALSYM LISTEN_OUTSTANDING}
  205.   CALL_PENDING        = $02;
  206.   {$EXTERNALSYM CALL_PENDING}
  207.   SESSION_ESTABLISHED = $03;
  208.   {$EXTERNALSYM SESSION_ESTABLISHED}
  209.   HANGUP_PENDING      = $04;
  210.   {$EXTERNALSYM HANGUP_PENDING}
  211.   HANGUP_COMPLETE     = $05;
  212.   {$EXTERNALSYM HANGUP_COMPLETE}
  213.   SESSION_ABORTED     = $06;
  214.   {$EXTERNALSYM SESSION_ABORTED}
  215. //
  216. //  Structure returned to the NCB command NCBENUM.
  217. //
  218. //  On a system containing lana's 0, 2 and 3, a structure with
  219. //  length =3, lana[0]=0, lana[1]=2 and lana[2]=3 will be returned.
  220. //
  221. type
  222.   _LANA_ENUM = record
  223.     length: UCHAR; // Number of valid entries in lana[]
  224.     lana: array [0..MAX_LANA] of UCHAR;
  225.   end;
  226.   {$EXTERNALSYM _LANA_ENUM}
  227.   LANA_ENUM = _LANA_ENUM;
  228.   {$EXTERNALSYM LANA_ENUM}
  229.   PLANA_ENUM = ^LANA_ENUM;
  230.   {$EXTERNALSYM PLANA_ENUM}
  231.   TLanaEnum = LANA_ENUM;
  232.   PLanaEnum = PLANA_ENUM;
  233. //
  234. //  Structure returned to the NCB command NCBFINDNAME is FIND_NAME_HEADER followed
  235. //  by an array of FIND_NAME_BUFFER structures.
  236. //
  237. type
  238.   _FIND_NAME_HEADER = record
  239.     node_count: WORD;
  240.     reserved: UCHAR;
  241.     unique_group: UCHAR;
  242.   end;
  243.   {$EXTERNALSYM _FIND_NAME_HEADER}
  244.   FIND_NAME_HEADER = _FIND_NAME_HEADER;
  245.   {$EXTERNALSYM FIND_NAME_HEADER}
  246.   PFIND_NAME_HEADER = ^FIND_NAME_HEADER;
  247.   {$EXTERNALSYM PFIND_NAME_HEADER}
  248.   TFindNameHeader = FIND_NAME_HEADER;
  249.   PFindNameHeader = PFIND_NAME_HEADER;
  250.   _FIND_NAME_BUFFER = record
  251.     length: UCHAR;
  252.     access_control: UCHAR;
  253.     frame_control: UCHAR;
  254.     destination_addr: array [0..5] of UCHAR;
  255.     source_addr: array [0..5] of UCHAR;
  256.     routing_info: array [0..17] of UCHAR;
  257.   end;
  258.   {$EXTERNALSYM _FIND_NAME_BUFFER}
  259.   FIND_NAME_BUFFER = _FIND_NAME_BUFFER;
  260.   {$EXTERNALSYM FIND_NAME_BUFFER}
  261.   PFIND_NAME_BUFFER = ^FIND_NAME_BUFFER;
  262.   {$EXTERNALSYM PFIND_NAME_BUFFER}
  263.   TFindNameBuffer = FIND_NAME_BUFFER;
  264.   PFindNameBuffer = PFIND_NAME_BUFFER;
  265. //
  266. //  Structure provided with NCBACTION. The purpose of NCBACTION is to provide
  267. //  transport specific extensions to netbios.
  268. //
  269.   _ACTION_HEADER = record
  270.     transport_id: ULONG;
  271.     action_code: USHORT;
  272.     reserved: USHORT;
  273.   end;
  274.   {$EXTERNALSYM _ACTION_HEADER}
  275.   ACTION_HEADER = _ACTION_HEADER;
  276.   {$EXTERNALSYM ACTION_HEADER}
  277.   PACTION_HEADER = ^ACTION_HEADER;
  278.   {$EXTERNALSYM PACTION_HEADER}
  279.   TActionHeader = ACTION_HEADER;
  280.   PActionHeader = PACTION_HEADER;
  281. //  Values for transport_id
  282. const
  283.   ALL_TRANSPORTS = 'M'#0#0#0;
  284.   {$EXTERNALSYM ALL_TRANSPORTS}
  285.   MS_NBF         = 'MNBF';
  286.   {$EXTERNALSYM MS_NBF}
  287. (****************************************************************
  288.  *                                                              *
  289.  *              Special values and constants                    *
  290.  *                                                              *
  291.  ****************************************************************)
  292. //
  293. //      NCB Command codes
  294. //
  295. const
  296.   NCBCALL        = $10; // NCB CALL
  297.   {$EXTERNALSYM NCBCALL}
  298.   NCBLISTEN      = $11; // NCB LISTEN
  299.   {$EXTERNALSYM NCBLISTEN}
  300.   NCBHANGUP      = $12; // NCB HANG UP
  301.   {$EXTERNALSYM NCBHANGUP}
  302.   NCBSEND        = $14; // NCB SEND
  303.   {$EXTERNALSYM NCBSEND}
  304.   NCBRECV        = $15; // NCB RECEIVE
  305.   {$EXTERNALSYM NCBRECV}
  306.   NCBRECVANY     = $16; // NCB RECEIVE ANY
  307.   {$EXTERNALSYM NCBRECVANY}
  308.   NCBCHAINSEND   = $17; // NCB CHAIN SEND
  309.   {$EXTERNALSYM NCBCHAINSEND}
  310.   NCBDGSEND      = $20; // NCB SEND DATAGRAM
  311.   {$EXTERNALSYM NCBDGSEND}
  312.   NCBDGRECV      = $21; // NCB RECEIVE DATAGRAM
  313.   {$EXTERNALSYM NCBDGRECV}
  314.   NCBDGSENDBC    = $22; // NCB SEND BROADCAST DATAGRAM
  315.   {$EXTERNALSYM NCBDGSENDBC}
  316.   NCBDGRECVBC    = $23; // NCB RECEIVE BROADCAST DATAGRAM
  317.   {$EXTERNALSYM NCBDGRECVBC}
  318.   NCBADDNAME     = $30; // NCB ADD NAME
  319.   {$EXTERNALSYM NCBADDNAME}
  320.   NCBDELNAME     = $31; // NCB DELETE NAME
  321.   {$EXTERNALSYM NCBDELNAME}
  322.   NCBRESET       = $32; // NCB RESET
  323.   {$EXTERNALSYM NCBRESET}
  324.   NCBASTAT       = $33; // NCB ADAPTER STATUS
  325.   {$EXTERNALSYM NCBASTAT}
  326.   NCBSSTAT       = $34; // NCB SESSION STATUS
  327.   {$EXTERNALSYM NCBSSTAT}
  328.   NCBCANCEL      = $35; // NCB CANCEL
  329.   {$EXTERNALSYM NCBCANCEL}
  330.   NCBADDGRNAME   = $36; // NCB ADD GROUP NAME
  331.   {$EXTERNALSYM NCBADDGRNAME}
  332.   NCBENUM        = $37; // NCB ENUMERATE LANA NUMBERS
  333.   {$EXTERNALSYM NCBENUM}
  334.   NCBUNLINK      = $70; // NCB UNLINK
  335.   {$EXTERNALSYM NCBUNLINK}
  336.   NCBSENDNA      = $71; // NCB SEND NO ACK
  337.   {$EXTERNALSYM NCBSENDNA}
  338.   NCBCHAINSENDNA = $72; // NCB CHAIN SEND NO ACK
  339.   {$EXTERNALSYM NCBCHAINSENDNA}
  340.   NCBLANSTALERT  = $73; // NCB LAN STATUS ALERT
  341.   {$EXTERNALSYM NCBLANSTALERT}
  342.   NCBACTION      = $77; // NCB ACTION
  343.   {$EXTERNALSYM NCBACTION}
  344.   NCBFINDNAME    = $78; // NCB FIND NAME
  345.   {$EXTERNALSYM NCBFINDNAME}
  346.   NCBTRACE       = $79; // NCB TRACE
  347.   {$EXTERNALSYM NCBTRACE}
  348.   ASYNCH = $80; // high bit set == asynchronous
  349.   {$EXTERNALSYM ASYNCH}
  350. //
  351. //      NCB Return codes
  352. //
  353.   NRC_GOODRET = $00; // good return also returned when ASYNCH request accepted
  354.   {$EXTERNALSYM NRC_GOODRET}
  355.   NRC_BUFLEN      = $01; // illegal buffer length
  356.   {$EXTERNALSYM NRC_BUFLEN}
  357.   NRC_ILLCMD      = $03; // illegal command
  358.   {$EXTERNALSYM NRC_ILLCMD}
  359.   NRC_CMDTMO      = $05; // command timed out
  360.   {$EXTERNALSYM NRC_CMDTMO}
  361.   NRC_INCOMP      = $06; // message incomplete, issue another command
  362.   {$EXTERNALSYM NRC_INCOMP}
  363.   NRC_BADDR       = $07; // illegal buffer address
  364.   {$EXTERNALSYM NRC_BADDR}
  365.   NRC_SNUMOUT     = $08; // session number out of range
  366.   {$EXTERNALSYM NRC_SNUMOUT}
  367.   NRC_NORES       = $09; // no resource available
  368.   {$EXTERNALSYM NRC_NORES}
  369.   NRC_SCLOSED     = $0a; // session closed
  370.   {$EXTERNALSYM NRC_SCLOSED}
  371.   NRC_CMDCAN      = $0b; // command cancelled
  372.   {$EXTERNALSYM NRC_CMDCAN}
  373.   NRC_DUPNAME     = $0d; // duplicate name
  374.   {$EXTERNALSYM NRC_DUPNAME}
  375.   NRC_NAMTFUL     = $0e; // name table full
  376.   {$EXTERNALSYM NRC_NAMTFUL}
  377.   NRC_ACTSES      = $0f; // no deletions, name has active sessions
  378.   {$EXTERNALSYM NRC_ACTSES}
  379.   NRC_LOCTFUL     = $11; // local session table full
  380.   {$EXTERNALSYM NRC_LOCTFUL}
  381.   NRC_REMTFUL     = $12; // remote session table full
  382.   {$EXTERNALSYM NRC_REMTFUL}
  383.   NRC_ILLNN       = $13; // illegal name number
  384.   {$EXTERNALSYM NRC_ILLNN}
  385.   NRC_NOCALL      = $14; // no callname
  386.   {$EXTERNALSYM NRC_NOCALL}
  387.   NRC_NOWILD      = $15; // cannot put * in NCB_NAME
  388.   {$EXTERNALSYM NRC_NOWILD}
  389.   NRC_INUSE       = $16; // name in use on remote adapter
  390.   {$EXTERNALSYM NRC_INUSE}
  391.   NRC_NAMERR      = $17; // name deleted
  392.   {$EXTERNALSYM NRC_NAMERR}
  393.   NRC_SABORT      = $18; // session ended abnormally
  394.   {$EXTERNALSYM NRC_SABORT}
  395.   NRC_NAMCONF     = $19; // name conflict detected
  396.   {$EXTERNALSYM NRC_NAMCONF}
  397.   NRC_IFBUSY      = $21; // interface busy, IRET before retrying
  398.   {$EXTERNALSYM NRC_IFBUSY}
  399.   NRC_TOOMANY     = $22; // too many commands outstanding, retry later
  400.   {$EXTERNALSYM NRC_TOOMANY}
  401.   NRC_BRIDGE      = $23; // ncb_lana_num field invalid
  402.   {$EXTERNALSYM NRC_BRIDGE}
  403.   NRC_CANOCCR     = $24; // command completed while cancel occurring
  404.   {$EXTERNALSYM NRC_CANOCCR}
  405.   NRC_CANCEL      = $26; // command not valid to cancel
  406.   {$EXTERNALSYM NRC_CANCEL}
  407.   NRC_DUPENV      = $30; // name defined by anther local process
  408.   {$EXTERNALSYM NRC_DUPENV}
  409.   NRC_ENVNOTDEF   = $34; // environment undefined. RESET required
  410.   {$EXTERNALSYM NRC_ENVNOTDEF}
  411.   NRC_OSRESNOTAV  = $35; // required OS resources exhausted
  412.   {$EXTERNALSYM NRC_OSRESNOTAV}
  413.   NRC_MAXAPPS     = $36; // max number of applications exceeded
  414.   {$EXTERNALSYM NRC_MAXAPPS}
  415.   NRC_NOSAPS      = $37; // no saps available for netbios
  416.   {$EXTERNALSYM NRC_NOSAPS}
  417.   NRC_NORESOURCES = $38; // requested resources are not available
  418.   {$EXTERNALSYM NRC_NORESOURCES}
  419.   NRC_INVADDRESS  = $39; // invalid ncb address or length > segment
  420.   {$EXTERNALSYM NRC_INVADDRESS}
  421.   NRC_INVDDID     = $3B; // invalid NCB DDID
  422.   {$EXTERNALSYM NRC_INVDDID}
  423.   NRC_LOCKFAIL    = $3C; // lock of user area failed
  424.   {$EXTERNALSYM NRC_LOCKFAIL}
  425.   NRC_OPENERR     = $3f; // NETBIOS not loaded
  426.   {$EXTERNALSYM NRC_OPENERR}
  427.   NRC_SYSTEM      = $40; // system error
  428.   {$EXTERNALSYM NRC_SYSTEM}
  429.   NRC_PENDING = $ff; // asynchronous command is not yet finished
  430.   {$EXTERNALSYM NRC_PENDING}
  431. (****************************************************************
  432.  *                                                              *
  433.  *              main user entry point for NetBIOS 3.0           *
  434.  *                                                              *
  435.  * Usage: result = Netbios( pncb );                             *
  436.  ****************************************************************)
  437. function Netbios(pncb: PNCB): UCHAR; stdcall;
  438. {$EXTERNALSYM Netbios}
  439. (****************************************************************
  440.  *                                                              *
  441.  *              Prefix for callback routines                    *
  442.  *                                                              *
  443.  * Usage in a declaration: NCB_POST MyPostRoutine( PNCB pncb ); *
  444.  ****************************************************************)
  445. // #define NCB_POST void CALLBACK
  446. implementation
  447. {$IFDEF DYNAMIC_LINK}
  448. var
  449.   _Netbios: Pointer;
  450. function Netbios;
  451. begin
  452.   GetProcedureAddress(_Netbios, 'netapi32.dll', 'Netbios');
  453.   asm
  454.     mov esp, ebp
  455.     pop ebp
  456.     jmp [_Netbios]
  457.   end;
  458. end;
  459. {$ELSE}
  460. function Netbios; external 'netapi32.dll' name 'Netbios';
  461. {$ENDIF DYNAMIC_LINK}
  462. end.