Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

102 lines
2.3 KiB

  1. /*++
  2. Copyright (c) 1994 Microsoft Corporation
  3. Copyright (c) 1993 Micro Computer Systems, Inc.
  4. Module Name:
  5. net\svcdlls\nwsap\saplpc.h
  6. Abstract:
  7. Author:
  8. Brian Walker (MCS) 06-30-1993
  9. Revision History:
  10. --*/
  11. #ifndef _NWSAP_LPC_
  12. #define _NWSAP_LPC_
  13. /**
  14. Structure used to pass LPC messages between the client
  15. library and the main server. Note the the PORT_MESSAGE is first
  16. and that the request and reply structures are VERY similar.
  17. **/
  18. typedef struct _NWSAP_REQUEST_MESSAGE {
  19. PORT_MESSAGE PortMessage;
  20. ULONG MessageType;
  21. union {
  22. struct {
  23. USHORT ServerType;
  24. UCHAR ServerName[48];
  25. UCHAR ServerAddr[12];
  26. BOOL RespondNearest;
  27. } AdvApi;
  28. struct {
  29. ULONG ObjectID;
  30. UCHAR ObjectName[48];
  31. USHORT ObjectType;
  32. UCHAR ObjectAddr[12];
  33. USHORT ScanType;
  34. } BindLibApi;
  35. } Message;
  36. } NWSAP_REQUEST_MESSAGE, *PNWSAP_REQUEST_MESSAGE;
  37. typedef struct _NWSAP_REPLY_MESSAGE {
  38. PORT_MESSAGE PortMessage;
  39. ULONG Error;
  40. union {
  41. struct {
  42. USHORT ServerType;
  43. UCHAR ServerName[48];
  44. UCHAR ServerAddr[12];
  45. BOOL RespondNearest;
  46. } AdvApi;
  47. struct {
  48. ULONG ObjectID;
  49. UCHAR ObjectName[48];
  50. USHORT ObjectType;
  51. UCHAR ObjectAddr[12];
  52. USHORT ScanType;
  53. } BindLibApi;
  54. } Message;
  55. } NWSAP_REPLY_MESSAGE, *PNWSAP_REPLY_MESSAGE;
  56. /** Message Types **/
  57. #define NWSAP_LPCMSG_ADDADVERTISE 0
  58. #define NWSAP_LPCMSG_REMOVEADVERTISE 1
  59. #define NWSAP_LPCMSG_GETOBJECTID 2
  60. #define NWSAP_LPCMSG_GETOBJECTNAME 3
  61. #define NWSAP_LPCMSG_SEARCH 4
  62. #define NWSAP_LPCMSG_STOP 0xFFFFFFFF
  63. /** Name of our port **/
  64. #define NWSAP_BIND_PORT_NAME_W L"\\BaseNamedObjects\\NwSapLpcPort"
  65. #define NWSAP_BIND_PORT_NAME_A "\\BaseNamedObjects\\NwSapLpcPort"
  66. /** Max message length we need **/
  67. #define NWSAP_BS_PORT_MAX_MESSAGE_LENGTH \
  68. ( sizeof(NWSAP_REQUEST_MESSAGE) > sizeof(NWSAP_REPLY_MESSAGE) ? \
  69. sizeof(NWSAP_REQUEST_MESSAGE) : sizeof(NWSAP_REPLY_MESSAGE) )
  70. #endif