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.

259 lines
5.0 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. canon.c
  5. Abstract:
  6. Stubs for server side of internal canonicalization RPC. These routines
  7. just call the local versions of the routines which live in NetLib.LIB
  8. Moved from cansvc
  9. Author:
  10. Richard Firth (rfirth) 20-May-1991
  11. Revision History:
  12. --*/
  13. #include <windows.h>
  14. #include <lmcons.h>
  15. #include <netcan.h>
  16. NET_API_STATUS
  17. NetprPathType(
  18. IN LPTSTR ServerName,
  19. IN LPTSTR PathName,
  20. IN LPDWORD PathType,
  21. IN DWORD Flags
  22. )
  23. /*++
  24. Routine Description:
  25. Stub function for NetpPathType - calls local version
  26. Arguments:
  27. ServerName - identifies this server
  28. PathName - path name to check
  29. PathType - assumed type of PathName
  30. Flags - controlling flags for NetpPathType
  31. Return Value:
  32. NET_API_STATUS
  33. Success = 0
  34. Failure = (return code from NetpPathType)
  35. --*/
  36. {
  37. UNREFERENCED_PARAMETER(ServerName);
  38. return NetpwPathType(PathName, PathType, Flags);
  39. }
  40. NET_API_STATUS
  41. NetprPathCanonicalize(
  42. IN LPTSTR ServerName,
  43. IN LPTSTR PathName,
  44. OUT LPTSTR Outbuf,
  45. IN DWORD OutbufLen,
  46. IN LPTSTR Prefix,
  47. OUT LPDWORD PathType,
  48. IN DWORD Flags
  49. )
  50. /*++
  51. Routine Description:
  52. Stub function for NetpPathCanonicalize - calls local version
  53. Arguments:
  54. ServerName - identifies this server
  55. PathName - path name to canonicalize
  56. Outbuf - where to place canonicalized path
  57. OutbufLen - size of Outbuf
  58. Prefix - (historical) prefix for path
  59. PathType - type of PathName
  60. Flags - controlling flags for NetpPathCanonicalize
  61. Return Value:
  62. NET_API_STATUS
  63. Success = 0
  64. Failure = (return code from NetpPathCanonicalize)
  65. --*/
  66. {
  67. UNREFERENCED_PARAMETER(ServerName);
  68. return NetpwPathCanonicalize(PathName,
  69. Outbuf,
  70. OutbufLen,
  71. Prefix,
  72. PathType,
  73. Flags
  74. );
  75. }
  76. LONG
  77. NetprPathCompare(
  78. IN LPTSTR ServerName,
  79. IN LPTSTR PathName1,
  80. IN LPTSTR PathName2,
  81. IN DWORD PathType,
  82. IN DWORD Flags
  83. )
  84. /*++
  85. Routine Description:
  86. Stub function for NetpPathCompare - calls local version
  87. Arguments:
  88. ServerName - identifies this server
  89. PathName1 - path name to compare
  90. PathName2 - path name to compare
  91. PathType - type of PathName1, PathName2
  92. Flags - controlling flags for NetpPathCompare
  93. Return Value:
  94. LONG
  95. -1 - Name1 < Name2
  96. 0 - Name1 = Name2
  97. +1 - Name1 > Name2
  98. --*/
  99. {
  100. UNREFERENCED_PARAMETER(ServerName);
  101. return NetpwPathCompare(PathName1, PathName2, PathType, Flags);
  102. }
  103. NET_API_STATUS
  104. NetprNameValidate(
  105. IN LPTSTR ServerName,
  106. IN LPTSTR Name,
  107. IN DWORD NameType,
  108. IN DWORD Flags
  109. )
  110. /*++
  111. Routine Description:
  112. Stub function for NetpNameValidate - calls local version
  113. Arguments:
  114. ServerName - identifies this server
  115. Name - to validate
  116. NameType - type of Name
  117. Flags - controlling flags for NetpNameValidate
  118. Return Value:
  119. NET_API_STATUS
  120. Success = 0
  121. Failure = (return code from NetpNameValidate)
  122. --*/
  123. {
  124. UNREFERENCED_PARAMETER(ServerName);
  125. return NetpwNameValidate(Name, NameType, Flags);
  126. }
  127. NET_API_STATUS
  128. NetprNameCanonicalize(
  129. IN LPTSTR ServerName,
  130. IN LPTSTR Name,
  131. OUT LPTSTR Outbuf,
  132. IN DWORD OutbufLen,
  133. IN DWORD NameType,
  134. IN DWORD Flags
  135. )
  136. /*++
  137. Routine Description:
  138. Stub function for NetpNameCanonicalize - calls local version
  139. Arguments:
  140. ServerName - identifies this server
  141. Name - to canonicalize
  142. Outbuf - where to place canonicalized name
  143. OutbufLen - size of Outbuf
  144. NameType - type of Name
  145. Flags - controlling flags for NetpNameCanonicalize
  146. Return Value:
  147. NET_API_STATUS
  148. Success = 0
  149. Failure = (return code from NetpNameCanonicalize)
  150. --*/
  151. {
  152. UNREFERENCED_PARAMETER(ServerName);
  153. return NetpwNameCanonicalize(Name, Outbuf, OutbufLen, NameType, Flags);
  154. }
  155. LONG
  156. NetprNameCompare(
  157. IN LPTSTR ServerName,
  158. IN LPTSTR Name1,
  159. IN LPTSTR Name2,
  160. IN DWORD NameType,
  161. IN DWORD Flags
  162. )
  163. /*++
  164. Routine Description:
  165. Stub function for NetpNameCompare - calls local version
  166. Arguments:
  167. ServerName - identifies this server
  168. Name1 - name to compare
  169. Name2 - "
  170. NameType - type of names
  171. Flags - controlling flags for NetpNameCompare
  172. Return Value:
  173. LONG
  174. -1 - Name1 < Name2
  175. 0 - Name1 = Name2
  176. +1 - Name1 > Name2
  177. --*/
  178. {
  179. UNREFERENCED_PARAMETER(ServerName);
  180. return NetpwNameCompare(Name1, Name2, NameType, Flags);
  181. }