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.

153 lines
3.5 KiB

  1. /*++
  2. Copyright (c) 1991-1999 Microsoft Corporation
  3. Module Name:
  4. nspapip.h
  5. Abstract:
  6. Internel Name Space Provider API prototypes and manifests. This
  7. header file should only be included by name space providers. NSPAPI
  8. users should include only nspapi.h See the "Windows NT NameSpace
  9. Provider Specification" document for details.
  10. Author:
  11. David Treadwell (davidtr) 28-Apr-1994
  12. Environment:
  13. User Mode -Win32
  14. Notes:
  15. Revision History:
  16. 28-Apr-1994 DavidTr Created first cut.
  17. --*/
  18. #ifndef _NSPAPIP_INCLUDED
  19. #define _NSPAPIP_INCLUDED
  20. #if _MSC_VER > 1000
  21. #pragma once
  22. #endif
  23. //
  24. // Standard priority values for the dwPriority field of NS_ROUTINE.
  25. //
  26. #define NS_STANDARD_FAST_PRIORITY (500)
  27. #define NS_MAX_FAST_PRIORITY (999)
  28. #define NS_STANDARD_PRIORITY (2000)
  29. //
  30. // Indices for the alpfnFunctions array field of NS_ROUTINE.
  31. //
  32. #define NSPAPI_GET_ADDRESS_BY_NAME (0x00000000)
  33. #define NSPAPI_GET_SERVICE (0x00000001)
  34. #define NSPAPI_SET_SERVICE (0x00000002)
  35. //
  36. // Structures used by the provider interface.
  37. //
  38. typedef
  39. INT
  40. (APIENTRY *LPGET_ADDR_BY_NAME_PROC) (
  41. IN LPGUID lpServiceType,
  42. IN LPWSTR lpServiceName,
  43. IN LPDWORD lpdwProtocols,
  44. IN DWORD dwResolution,
  45. IN OUT LPVOID lpCsaddrBuffer,
  46. IN OUT LPDWORD lpdwBufferLength,
  47. IN OUT LPWSTR lpAliasBuffer,
  48. IN OUT LPDWORD lpdwAliasBufferLength,
  49. IN HANDLE hCancellationEvent
  50. );
  51. typedef struct _NS_ROUTINE {
  52. DWORD dwFunctionCount;
  53. LPFN_NSPAPI *alpfnFunctions;
  54. DWORD dwNameSpace;
  55. DWORD dwPriority;
  56. } NS_ROUTINE, *PNS_ROUTINE, * FAR LPNS_ROUTINE;
  57. typedef
  58. DWORD
  59. (APIENTRY *LPLOAD_NAME_SPACE_PROC) (
  60. IN OUT LPDWORD lpdwVersion,
  61. IN OUT LPNS_ROUTINE nsrBuffer,
  62. IN OUT LPDWORD lpdwBufferLength
  63. );
  64. typedef
  65. INT
  66. (APIENTRY *LPGET_SERVICE_PROC) (
  67. IN LPGUID lpServiceType,
  68. IN LPWSTR lpServiceName,
  69. IN DWORD dwProperties,
  70. IN BOOL fUnicodeBlob,
  71. OUT LPSERVICE_INFO lpServiceInfo,
  72. IN OUT LPDWORD lpdwBufferLen
  73. );
  74. typedef
  75. DWORD
  76. (APIENTRY *LPSET_SERVICE_PROC) (
  77. IN DWORD dwOperation,
  78. IN DWORD dwFlags,
  79. IN BOOL fUnicodeBlob,
  80. IN LPSERVICE_INFO lpServiceInfo
  81. );
  82. //
  83. // Internal Functions
  84. //
  85. DWORD
  86. APIENTRY
  87. NPGetService (
  88. IN LPGUID lpServiceType,
  89. IN LPWSTR lpServiceName,
  90. IN DWORD dwProperties,
  91. IN BOOL fUnicodeBlob,
  92. OUT LPSERVICE_INFO lpServiceInfo,
  93. IN OUT LPDWORD lpdwBufferLen
  94. );
  95. DWORD
  96. APIENTRY
  97. NPSetService (
  98. IN DWORD dwOperation,
  99. IN DWORD dwFlags,
  100. IN BOOL fUnicodeBlob,
  101. IN LPSERVICE_INFO lpServiceInfo
  102. );
  103. INT
  104. APIENTRY
  105. NPGetAddressByName (
  106. IN LPGUID lpServiceType,
  107. IN LPWSTR lpServiceName,
  108. IN LPDWORD lpdwProtocols,
  109. IN DWORD dwResolution,
  110. IN OUT LPVOID lpCsaddrBuffer,
  111. IN OUT LPDWORD lpdwBufferLength,
  112. IN OUT LPWSTR lpAliasBuffer,
  113. IN OUT LPDWORD lpdwAliasBufferLength,
  114. IN HANDLE hCancellationEvent
  115. );
  116. INT
  117. APIENTRY
  118. NPLoadNameSpaces (
  119. IN OUT LPDWORD lpdwVersion,
  120. IN OUT LPNS_ROUTINE nsrBuffer,
  121. IN OUT LPDWORD lpdwBufferLength
  122. );
  123. #endif // _NSPAPIP_INCLUDED