Leaked source code of windows server 2003
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.

174 lines
4.3 KiB

  1. /*++
  2. Copyright (c) 1992-1993 Microsoft Corporation
  3. Module Name:
  4. nwmisc.h
  5. Abstract:
  6. Header which specifies the misc routines used by the workstation service.
  7. Author:
  8. Chuck Y Chan (chuckc) 2-Mar-1994
  9. Revision History:
  10. Glenn A Curtis (glennc) 18-Jul-1995
  11. --*/
  12. #ifndef _NWMISC_INCLUDED_
  13. #define _NWMISC_INCLUDED_
  14. #include <winsock2.h>
  15. #include <basetyps.h>
  16. #include <nspapi.h>
  17. #include "sapcmn.h"
  18. #ifdef __cplusplus
  19. extern "C" {
  20. #endif
  21. //
  22. // RPC pipe name
  23. //
  24. #define NWWKS_INTERFACE_NAME TEXT("nwwks")
  25. DWORD
  26. NwGetGraceLoginCount(
  27. LPWSTR Server,
  28. LPWSTR UserName,
  29. LPDWORD lpResult
  30. );
  31. //
  32. // Commonly reference value for NCP Server name length
  33. //
  34. #define NW_MAX_SERVER_LEN 48
  35. //
  36. // Flags used for the function NwParseNdsUncPath()
  37. //
  38. #define PARSE_NDS_GET_TREE_NAME 0
  39. #define PARSE_NDS_GET_PATH_NAME 1
  40. #define PARSE_NDS_GET_OBJECT_NAME 2
  41. WORD
  42. NwParseNdsUncPath(
  43. IN OUT LPWSTR * Result,
  44. IN LPWSTR ContainerName,
  45. IN ULONG flag
  46. );
  47. //
  48. // NDS Object class type identifiers
  49. //
  50. #define CLASS_TYPE_ALIAS 1
  51. #define CLASS_TYPE_AFP_SERVER 2
  52. #define CLASS_TYPE_BINDERY_OBJECT 3
  53. #define CLASS_TYPE_BINDERY_QUEUE 4
  54. #define CLASS_TYPE_COMPUTER 5
  55. #define CLASS_TYPE_COUNTRY 6
  56. #define CLASS_TYPE_DIRECTORY_MAP 7
  57. #define CLASS_TYPE_GROUP 8
  58. #define CLASS_TYPE_LOCALITY 9
  59. #define CLASS_TYPE_NCP_SERVER 10
  60. #define CLASS_TYPE_ORGANIZATION 11
  61. #define CLASS_TYPE_ORGANIZATIONAL_ROLE 12
  62. #define CLASS_TYPE_ORGANIZATIONAL_UNIT 13
  63. #define CLASS_TYPE_PRINTER 14
  64. #define CLASS_TYPE_PRINT_SERVER 15
  65. #define CLASS_TYPE_PROFILE 16
  66. #define CLASS_TYPE_QUEUE 17
  67. #define CLASS_TYPE_TOP 18
  68. #define CLASS_TYPE_UNKNOWN 19
  69. #define CLASS_TYPE_USER 20
  70. #define CLASS_TYPE_VOLUME 21
  71. #define CLASS_NAME_ALIAS L"Alias"
  72. #define CLASS_NAME_AFP_SERVER L"AFP Server"
  73. #define CLASS_NAME_BINDERY_OBJECT L"Bindery Object"
  74. #define CLASS_NAME_BINDERY_QUEUE L"Bindery Queue"
  75. #define CLASS_NAME_COMPUTER L"Computer"
  76. #define CLASS_NAME_COUNTRY L"Country"
  77. #define CLASS_NAME_DIRECTORY_MAP L"Directory Map"
  78. #define CLASS_NAME_GROUP L"Group"
  79. #define CLASS_NAME_LOCALITY L"Locality"
  80. #define CLASS_NAME_NCP_SERVER L"NCP Server"
  81. #define CLASS_NAME_ORGANIZATION L"Organization"
  82. #define CLASS_NAME_ORGANIZATIONAL_ROLE L"Organizational Role"
  83. #define CLASS_NAME_ORGANIZATIONAL_UNIT L"Organizational Unit"
  84. #define CLASS_NAME_PRINTER L"Printer"
  85. #define CLASS_NAME_PRINT_SERVER L"Print Server"
  86. #define CLASS_NAME_PROFILE L"Profile"
  87. #define CLASS_NAME_QUEUE L"Queue"
  88. #define CLASS_NAME_TOP L"Top"
  89. #define CLASS_NAME_UNKNOWN L"Unknown"
  90. #define CLASS_NAME_USER L"User"
  91. #define CLASS_NAME_VOLUME L"Volume"
  92. //
  93. // Node structure in the registered service link list and
  94. // functions to add/remove items from the link list
  95. //
  96. typedef struct _REGISTERED_SERVICE {
  97. WORD nSapType; // SAP Type
  98. BOOL fAdvertiseBySap; // TRUE if advertise by SAP agent
  99. LPSERVICE_INFO pServiceInfo; // Info about this service
  100. struct _REGISTERED_SERVICE *Next; // Points to the next service node
  101. } REGISTERED_SERVICE, *PREGISTERED_SERVICE;
  102. PREGISTERED_SERVICE
  103. GetServiceItemFromList(
  104. IN WORD nSapType,
  105. IN LPWSTR pServiceName
  106. );
  107. DWORD
  108. NwRegisterService(
  109. IN LPSERVICE_INFO lpServiceInfo,
  110. IN WORD nSapType,
  111. IN HANDLE hEventHandle
  112. );
  113. DWORD
  114. NwDeregisterService(
  115. IN LPSERVICE_INFO lpServiceInfo,
  116. IN WORD nSapType
  117. );
  118. DWORD
  119. NwGetService(
  120. IN LPWSTR Reserved,
  121. IN WORD nSapType,
  122. IN LPWSTR lpServiceName,
  123. IN DWORD dwProperties,
  124. OUT LPBYTE lpServiceInfo,
  125. IN DWORD dwBufferLength,
  126. OUT LPDWORD lpdwBytesNeeded
  127. );
  128. VOID
  129. NwInitializeServiceProvider(
  130. VOID
  131. );
  132. VOID
  133. NwTerminateServiceProvider(
  134. VOID
  135. );
  136. #ifdef __cplusplus
  137. } // extern "C"
  138. #endif
  139. #endif // _NWMISC_INCLUDED_