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.

283 lines
4.3 KiB

  1. //
  2. // NCP wrappers.
  3. //
  4. HRESULT
  5. NWApiGetProperty(
  6. BSTR bstrObjectName,
  7. char *PropertyName,
  8. NWOBJ_TYPE dwOT_ID,
  9. NWCONN_HANDLE hConn,
  10. LPP_RPLY_SGMT_LST lppReplySegment,
  11. LPDWORD pdwNumSegment
  12. );
  13. HRESULT
  14. NWApiWriteProperty(
  15. NWCONN_HANDLE hConn,
  16. BSTR bstrObjectName,
  17. NWOBJ_TYPE wObjType,
  18. LPSTR lpszPropertyName,
  19. NWSEGMENT_DATA *SegmentData
  20. );
  21. HRESULT
  22. NWApiGetFileServerVersionInfo(
  23. NWCONN_HANDLE hConn,
  24. VERSION_INFO *pVersionInfo
  25. );
  26. HRESULT
  27. NWApiIsObjectInSet(
  28. NWCONN_HANDLE hConn,
  29. LPWSTR lpszObjectName,
  30. NWOBJ_TYPE wObjType,
  31. LPSTR lpszPropertyName,
  32. LPSTR lpszMemberName,
  33. NWOBJ_TYPE wMemberType
  34. );
  35. HRESULT
  36. NWApiGetObjectID(
  37. NWCONN_HANDLE hConn,
  38. LPWSTR lpszObjectName,
  39. NWOBJ_TYPE wObjType,
  40. NWOBJ_ID *pObjectID
  41. );
  42. HRESULT
  43. NWApiGetObjectName(
  44. NWCONN_HANDLE hConn,
  45. DWORD dwObjectID,
  46. LPWSTR *lppszObjectName
  47. );
  48. HRESULT
  49. NWApiGroupGetMembers(
  50. NWCONN_HANDLE hConn,
  51. LPWSTR szGroupName,
  52. LPBYTE *lppBuffer
  53. );
  54. HRESULT
  55. NWApiAddGroupMember(
  56. NWCONN_HANDLE hConn,
  57. LPWSTR pszGroupName,
  58. LPWSTR pszMemberName
  59. );
  60. HRESULT
  61. NWApiRemoveGroupMember(
  62. NWCONN_HANDLE hConn,
  63. LPWSTR pszGroupName,
  64. LPWSTR pszMemberName
  65. );
  66. HRESULT
  67. NWApiGetLOGIN_CONTROL(
  68. NWCONN_HANDLE hConn,
  69. LPWSTR lpszUserName,
  70. LPLC_STRUCTURE lpLoginCtrlStruct
  71. );
  72. HRESULT
  73. NWApiSetDefaultAcctExpDate(
  74. DOUBLE * pdTime,
  75. SYSTEMTIME SysTime
  76. );
  77. HRESULT
  78. NWApiUserAsSupervisor(
  79. NWCONN_HANDLE hConn,
  80. LPWSTR lpszUserName,
  81. BOOL fSupervisor
  82. );
  83. HRESULT
  84. NWApiGetVolumeNumber(
  85. NWCONN_HANDLE hConn,
  86. LPWSTR lpszVolumeName,
  87. NWVOL_NUM *pVolumeNumber
  88. );
  89. HRESULT
  90. NWApiGetVolumeName(
  91. NWCONN_HANDLE hConn,
  92. NWVOL_NUM bVolNum,
  93. LPWSTR *lppszVolName
  94. );
  95. //
  96. // Win32 wrappers.
  97. //
  98. HRESULT
  99. NWApiGetPrinter(
  100. HANDLE hPrinter,
  101. DWORD dwLevel,
  102. LPBYTE *lplpbPrinters
  103. );
  104. HRESULT
  105. NWApiUncFromADsPath(
  106. LPWSTR lpszADsPath,
  107. LPWSTR lpszUncName
  108. );
  109. HRESULT
  110. NWApiMakeUserInfo(
  111. LPWSTR lpszBinderyName,
  112. LPWSTR lpszUserName,
  113. LPWSTR lpszPassword,
  114. PNW_USER_INFO pNwUserInfo
  115. );
  116. HRESULT
  117. NWApiFreeUserInfo(
  118. PNW_USER_INFO pNwUserInfo
  119. );
  120. HRESULT
  121. NWApiCreateUser(
  122. PNW_USER_INFO pNwUserInfo
  123. );
  124. HRESULT
  125. NWApiDeleteUser(
  126. POBJECTINFO pObjectInfo
  127. );
  128. HRESULT
  129. NWApiCreateBinderyObject(
  130. NWCONN_HANDLE hConn,
  131. LPWSTR lpszObjectName,
  132. NWOBJ_TYPE wObjType,
  133. NWFLAGS ucObjectFlags,
  134. NWFLAGS usObjSecurity
  135. );
  136. HRESULT
  137. NWApiDeleteBinderyObject(
  138. NWCONN_HANDLE hConn,
  139. LPWSTR lpszObjectName,
  140. NWOBJ_TYPE wObjType
  141. );
  142. HRESULT
  143. NWApiSetUserPassword(
  144. PNW_USER_INFO pNwUserInfo,
  145. DWORD *pdwUserObjID,
  146. LPWSTR pszOldPassword
  147. );
  148. HRESULT
  149. NWApiCreateMailDirectory(
  150. PNW_USER_INFO pNwUserInfo,
  151. NWOBJ_ID UserObjID
  152. );
  153. HRESULT
  154. NWApiSetLoginCtrlAndAcctBalance(
  155. PNW_USER_INFO pNwUserInfo
  156. );
  157. HRESULT
  158. NWApiCreateGroup(
  159. POBJECTINFO pObjectInfo
  160. );
  161. HRESULT
  162. NWApiDeleteGroup(
  163. POBJECTINFO pObjectInfo
  164. );
  165. HRESULT
  166. NWApiCreatePrinter(
  167. POBJECTINFO pObjectInfo
  168. );
  169. HRESULT
  170. NWApiDeletePrinter(
  171. POBJECTINFO pObjectInfo
  172. );
  173. HRESULT
  174. NWApiCreatePrintQueue(
  175. NWCONN_HANDLE hConn,
  176. LPWSTR lpszQueueName
  177. );
  178. HRESULT
  179. NWApiDestroyPrintQueue(
  180. NWCONN_HANDLE hConn,
  181. LPWSTR lpszQueueName
  182. );
  183. //
  184. // Conversion functions.
  185. //
  186. DWORD
  187. NWApiMapNtStatusToDosError(
  188. IN NTSTATUS NtStatus
  189. );
  190. HRESULT
  191. NWApiConvertToAddressFormat(
  192. LP_RPLY_SGMT_LST lpReplySegment,
  193. LPWSTR *lppszAddresses
  194. );
  195. HRESULT
  196. NWApiMakeVariantTime(
  197. DOUBLE * pdTime,
  198. WORD wDay, // Day = 1..31
  199. WORD wMonth, // Month = 1..12
  200. WORD wYear, // Year = 19XX - 1980, e.g. 1996 is 16
  201. WORD wSecond, // Second = 0..30, Second divided by 2
  202. WORD wMinute, // Minute = 0..59
  203. WORD wHour // Hour = 0..23
  204. );
  205. HRESULT
  206. NWApiBreakVariantTime(
  207. DOUBLE daDate,
  208. PWORD pwDay,
  209. PWORD pwMonth,
  210. PWORD pwYear
  211. );
  212. WORD
  213. NWApiReverseWORD(
  214. WORD wWORD
  215. );
  216. HRESULT
  217. NWApiUserGetGroups(
  218. NWCONN_HANDLE hConn,
  219. LPWSTR szUserName,
  220. LPBYTE *lppBuffer
  221. );
  222. //
  223. // Misc functions to login to a NW server.
  224. //
  225. HRESULT
  226. NWApiLoginToServer(
  227. LPWSTR pszServerName,
  228. LPWSTR pszUserName,
  229. LPWSTR pszPassword
  230. );
  231. HRESULT
  232. NWApiLogoffServer(
  233. LPWSTR pszServerName
  234. );