wsnetbs.inc
上传用户:hndmjx
上传日期:2014-09-16
资源大小:3369k
文件大小:1k
源码类别:

Delphi控件源码

开发平台:

Delphi

  1. // wsnetbs.h
  2. // Copyright (c) 1994-1999, Microsoft Corp. All rights reserved.
  3. //
  4. // Windows Sockets include file for NETBIOS.  This file contains all
  5. // standardized NETBIOS information.  Include this header file after
  6. // winsock.h.
  7. // To open a NetBIOS socket, call the socket() function as follows:
  8. //
  9. // s = socket( AF_NETBIOS, {SOCK_SEQPACKET|SOCK_DGRAM}, -Lana );
  10. //
  11. // where Lana is the NetBIOS Lana number of interest.  For example, to
  12. // open a socket for Lana 2, specify -2 as the "protocol" parameter
  13. // to the socket() function.
  14. // This is the structure of the SOCKADDR structure for NETBIOS.
  15. const
  16.  NETBIOS_NAME_LENGTH = 16;
  17. type
  18. SOCKADDR_NB = packed record
  19. snb_family : Smallint;
  20. snb_type   : u_short;
  21. snb_name   : array[0..NETBIOS_NAME_LENGTH-1] of Char;
  22. end;
  23.   TSockAddr_NB  = SOCKADDR_NB;
  24.   PSOCKADDR_NB  = ^SOCKADDR_NB;
  25.   LPSOCKADDR_NB = ^PSOCKADDR_NB;
  26. // Bit values for the snb_type field of SOCKADDR_NB.
  27. const
  28. NETBIOS_UNIQUE_NAME       = $0000;
  29. NETBIOS_GROUP_NAME        = $0001;
  30. NETBIOS_TYPE_QUICK_UNIQUE = $0002;
  31. NETBIOS_TYPE_QUICK_GROUP  = $0003;
  32. // A macro convenient for setting up NETBIOS SOCKADDRs.
  33. procedure SET_NETBIOS_SOCKADDR( snb : PSOCKADDR_NB; const SnbType : Word; const Name : PChar; const Port : Char );