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.

211 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1989 Microsoft Corporation.
  3. Module Name:
  4. header.h
  5. Abstract:
  6. This module contains the main infrastructure for mup data structures.
  7. Revision History:
  8. Uday Hegde (udayh) 11\10\1999
  9. NOTES:
  10. */
  11. #ifndef __DFS_MISC_H__
  12. #define __DFS_MISC_H__
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16. VOID
  17. DfsGetNetbiosName(
  18. PUNICODE_STRING pName,
  19. PUNICODE_STRING pNetbiosName,
  20. PUNICODE_STRING pRemaining );
  21. DFSSTATUS
  22. DfsGetPathComponents(
  23. PUNICODE_STRING pName,
  24. PUNICODE_STRING pServerName,
  25. PUNICODE_STRING pShareName,
  26. PUNICODE_STRING pRemaining);
  27. DFSSTATUS
  28. DfsGetFirstComponent(
  29. PUNICODE_STRING pName,
  30. PUNICODE_STRING pFirstName,
  31. PUNICODE_STRING pRemaining);
  32. DFSSTATUS
  33. DfsIsThisAMachineName(LPWSTR MachineName);
  34. DFSSTATUS
  35. DfsIsThisADomainName(LPWSTR DomainName);
  36. DFSSTATUS
  37. DfsGenerateUuidString(LPWSTR *UuidString );
  38. VOID
  39. DfsReleaseUuidString(LPWSTR *UuidString );
  40. DFSSTATUS
  41. DfsCreateUnicodeString(
  42. PUNICODE_STRING pDest,
  43. PUNICODE_STRING pSrc );
  44. DFSSTATUS
  45. DfsCreateUnicodeStringFromString(
  46. PUNICODE_STRING pDest,
  47. LPWSTR pSrcString );
  48. DFSSTATUS
  49. DfsCreateUnicodePathString(
  50. PUNICODE_STRING pDest,
  51. ULONG NumberOfLeadingSeperators,
  52. LPWSTR pFirstComponent,
  53. LPWSTR pRemaining );
  54. DFSSTATUS
  55. DfsCreateUnicodePathStringFromUnicode(
  56. PUNICODE_STRING pDest,
  57. ULONG NumberOfLeadingSeperators,
  58. PUNICODE_STRING pFirst,
  59. PUNICODE_STRING pRemaining );
  60. VOID
  61. DfsFreeUnicodeString(
  62. PUNICODE_STRING pDfsString );
  63. DFSSTATUS
  64. DfsGetSharePath(
  65. IN LPWSTR ServerName,
  66. IN LPWSTR ShareName,
  67. OUT PUNICODE_STRING pPathName );
  68. ULONG
  69. DfsSizeUncPath(
  70. PUNICODE_STRING FirstComponent,
  71. PUNICODE_STRING SecondComponent );
  72. VOID
  73. DfsCopyUncPath(
  74. LPWSTR NewPath,
  75. PUNICODE_STRING FirstComponent,
  76. PUNICODE_STRING SecondComponent );
  77. ULONG
  78. DfsApiSizeLevelHeader(
  79. ULONG Level );
  80. NTSTATUS
  81. AddNextPathComponent(
  82. PUNICODE_STRING pPath );
  83. NTSTATUS
  84. StripLastPathComponent(
  85. PUNICODE_STRING pPath );
  86. DFSSTATUS
  87. PackGetULong(
  88. PULONG pValue,
  89. PVOID *ppBuffer,
  90. PULONG pSizeRemaining );
  91. DFSSTATUS
  92. PackSetULong(
  93. ULONG Value,
  94. PVOID *ppBuffer,
  95. PULONG pSizeRemaining );
  96. ULONG
  97. PackSizeULong();
  98. DFSSTATUS
  99. PackGetUShort(
  100. PUSHORT pValue,
  101. PVOID *ppBuffer,
  102. PULONG pSizeRemaining );
  103. DFSSTATUS
  104. PackSetUShort(
  105. USHORT Value,
  106. PVOID *ppBuffer,
  107. PULONG pSizeRemaining );
  108. ULONG
  109. PackSizeUShort();
  110. DFSSTATUS
  111. PackGetString(
  112. PUNICODE_STRING pString,
  113. PVOID *ppBuffer,
  114. PULONG pSizeRemaining );
  115. DFSSTATUS
  116. PackSetString(
  117. PUNICODE_STRING pString,
  118. PVOID *ppBuffer,
  119. PULONG pSizeRemaining );
  120. ULONG
  121. PackSizeString(
  122. PUNICODE_STRING pString);
  123. DFSSTATUS
  124. PackGetGuid(
  125. GUID *pGuid,
  126. PVOID *ppBuffer,
  127. PULONG pSizeRemaining );
  128. DFSSTATUS
  129. PackSetGuid(
  130. GUID *pGuid,
  131. PVOID *ppBuffer,
  132. PULONG pSizeRemaining );
  133. ULONG
  134. PackSizeGuid();
  135. #define UNICODE_PATH_SEP L'\\'
  136. #define IsEmptyString(_str) \
  137. ( ((_str) == NULL) || ((_str)[0] == UNICODE_NULL) )
  138. #define IsLocalName(_pUnicode) \
  139. ( (((_pUnicode)->Length == sizeof(WCHAR)) && ((_pUnicode)->Buffer[0] == L'.')) || \
  140. (((_pUnicode)->Length == 2 * sizeof(WCHAR)) && ((_pUnicode)->Buffer[0] == L'.') && ((_pUnicode)->Buffer[1] == UNICODE_NULL)) )
  141. #ifdef __cplusplus
  142. }
  143. #endif
  144. #endif /* __DFS_MISC_H__ */