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.

576 lines
11 KiB

  1. #include "dspch.h"
  2. #pragma hdrstop
  3. #define _DSGETDCAPI_
  4. #include <dsgetdc.h>
  5. #include <lm.h>
  6. #include <icanon.h>
  7. #include <dsrole.h>
  8. #include <nb30.h>
  9. #include <winsock2.h>
  10. static
  11. DWORD
  12. WINAPI
  13. DsEnumerateDomainTrustsW(
  14. LPWSTR ServerName,
  15. ULONG Flags,
  16. PDS_DOMAIN_TRUSTSW *Domains,
  17. PULONG DomainCount
  18. )
  19. {
  20. *Domains = NULL;
  21. *DomainCount = 0;
  22. return ERROR_PROC_NOT_FOUND;
  23. }
  24. static
  25. DWORD
  26. WINAPI
  27. DsGetDcNameW(
  28. IN LPCWSTR ComputerName OPTIONAL,
  29. IN LPCWSTR DomainName OPTIONAL,
  30. IN GUID *DomainGuid OPTIONAL,
  31. IN LPCWSTR SiteName OPTIONAL,
  32. IN ULONG Flags,
  33. OUT PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo
  34. )
  35. {
  36. return ERROR_PROC_NOT_FOUND;
  37. }
  38. static
  39. DWORD
  40. WINAPI
  41. DsGetDcNameWithAccountW(
  42. IN LPCWSTR ComputerName OPTIONAL,
  43. IN LPCWSTR AccountName OPTIONAL,
  44. IN ULONG AllowableAccountControlBits,
  45. IN LPCWSTR DomainName OPTIONAL,
  46. IN GUID *DomainGuid OPTIONAL,
  47. IN LPCWSTR SiteName OPTIONAL,
  48. IN ULONG Flags,
  49. OUT PDOMAIN_CONTROLLER_INFOW *DomainControllerInfo
  50. )
  51. {
  52. return ERROR_PROC_NOT_FOUND;
  53. }
  54. static
  55. VOID
  56. WINAPI
  57. DsRoleFreeMemory(
  58. IN PVOID Buffer
  59. )
  60. {
  61. return;
  62. }
  63. static
  64. DWORD
  65. WINAPI
  66. DsRoleGetPrimaryDomainInformation(
  67. IN LPCWSTR lpServer OPTIONAL,
  68. IN DSROLE_PRIMARY_DOMAIN_INFO_LEVEL InfoLevel,
  69. OUT PBYTE *Buffer
  70. )
  71. {
  72. return ERROR_PROC_NOT_FOUND;
  73. }
  74. static
  75. DWORD
  76. WINAPI
  77. DsAddressToSiteNamesW(
  78. IN LPCWSTR ComputerName,
  79. IN DWORD EntryCount,
  80. IN PSOCKET_ADDRESS SocketAddresses,
  81. OUT LPWSTR **SiteNames
  82. )
  83. {
  84. return ERROR_PROC_NOT_FOUND;
  85. }
  86. static
  87. DWORD
  88. WINAPI
  89. DsGetDcSiteCoverageW(
  90. IN LPCWSTR ServerName,
  91. OUT PULONG EntryCount,
  92. OUT LPWSTR **SiteNames
  93. )
  94. {
  95. return ERROR_PROC_NOT_FOUND;
  96. }
  97. static
  98. NET_API_STATUS
  99. NET_API_FUNCTION
  100. I_NetNameCanonicalize(
  101. IN LPTSTR ServerName OPTIONAL,
  102. IN LPTSTR Name,
  103. OUT LPTSTR Outbuf,
  104. IN DWORD OutbufLen,
  105. IN DWORD NameType,
  106. IN DWORD Flags
  107. )
  108. {
  109. return ERROR_PROC_NOT_FOUND;
  110. }
  111. static
  112. NET_API_STATUS
  113. NET_API_FUNCTION
  114. I_NetNameValidate(
  115. IN LPWSTR ServerName OPTIONAL,
  116. IN LPWSTR Name,
  117. IN DWORD NameType,
  118. IN DWORD Flags
  119. )
  120. {
  121. return ERROR_PROC_NOT_FOUND;
  122. }
  123. static
  124. NET_API_STATUS NET_API_FUNCTION
  125. NetAlertRaiseEx(
  126. IN LPCWSTR AlertEventName,
  127. IN LPVOID VariableInfo,
  128. IN DWORD VariableInfoSize,
  129. IN LPCWSTR ServiceName
  130. )
  131. {
  132. return ERROR_PROC_NOT_FOUND;
  133. }
  134. static
  135. NET_API_STATUS
  136. NET_API_FUNCTION
  137. NetApiBufferAllocate (
  138. IN DWORD ByteCount,
  139. OUT LPVOID *Buffer
  140. )
  141. {
  142. return ERROR_PROC_NOT_FOUND;
  143. }
  144. static
  145. NET_API_STATUS
  146. NET_API_FUNCTION
  147. NetApiBufferFree (
  148. IN LPVOID Buffer
  149. )
  150. {
  151. return ERROR_PROC_NOT_FOUND;
  152. }
  153. static
  154. NET_API_STATUS NET_API_FUNCTION
  155. NetDfsGetInfo(
  156. IN LPWSTR DfsEntryPath,
  157. IN LPWSTR ServerName OPTIONAL,
  158. IN LPWSTR ShareName OPTIONAL,
  159. IN DWORD Level,
  160. OUT LPBYTE* Buffer
  161. )
  162. {
  163. return ERROR_PROC_NOT_FOUND;
  164. }
  165. static
  166. NTSTATUS
  167. NET_API_FUNCTION
  168. NetEnumerateTrustedDomains (
  169. IN LPWSTR ServerName OPTIONAL,
  170. OUT LPWSTR *DomainNames
  171. )
  172. {
  173. return ERROR_PROC_NOT_FOUND;
  174. }
  175. static
  176. NET_API_STATUS
  177. NET_API_FUNCTION
  178. NetGetJoinInformation(
  179. IN LPCWSTR lpServer OPTIONAL,
  180. OUT LPWSTR *lpNameBuffer,
  181. OUT PNETSETUP_JOIN_STATUS BufferType
  182. )
  183. {
  184. return ERROR_PROC_NOT_FOUND;
  185. }
  186. static
  187. NET_API_STATUS
  188. NET_API_FUNCTION
  189. NetJoinDomain(
  190. IN LPCWSTR lpServer OPTIONAL,
  191. IN LPCWSTR lpDomain,
  192. IN LPCWSTR lpAccountOU, OPTIONAL
  193. IN LPCWSTR lpAccount OPTIONAL,
  194. IN LPCWSTR lpPassword OPTIONAL,
  195. IN DWORD fJoinOptions
  196. )
  197. {
  198. return ERROR_PROC_NOT_FOUND;
  199. }
  200. static
  201. NET_API_STATUS
  202. NET_API_FUNCTION
  203. NetLocalGroupGetMembers(
  204. IN LPCWSTR ServerName OPTIONAL,
  205. IN LPCWSTR LocalGroupName,
  206. IN DWORD Level,
  207. OUT LPBYTE *Buffer,
  208. IN DWORD PrefMaxLen,
  209. OUT LPDWORD EntriesRead,
  210. OUT LPDWORD EntriesLeft,
  211. IN OUT PDWORD_PTR ResumeHandle
  212. )
  213. {
  214. return ERROR_PROC_NOT_FOUND;
  215. }
  216. static
  217. NET_API_STATUS NET_API_FUNCTION
  218. NetMessageBufferSend (
  219. IN LPCWSTR servername OPTIONAL,
  220. IN LPCWSTR msgname,
  221. IN LPCWSTR fromname,
  222. IN LPBYTE buf,
  223. IN DWORD buflen
  224. )
  225. {
  226. return ERROR_PROC_NOT_FOUND;
  227. }
  228. static
  229. NET_API_STATUS NET_API_FUNCTION
  230. NetQueryDisplayInformation(
  231. IN LPCWSTR ServerName OPTIONAL,
  232. IN DWORD Level,
  233. IN DWORD Index,
  234. IN DWORD EntriesRequested,
  235. IN DWORD PreferredMaximumLength,
  236. OUT LPDWORD ReturnedEntryCount,
  237. OUT PVOID *SortedBuffer
  238. )
  239. {
  240. return ERROR_PROC_NOT_FOUND;
  241. }
  242. static
  243. NET_API_STATUS
  244. NET_API_FUNCTION
  245. NetRenameMachineInDomain(
  246. IN LPCWSTR lpServer OPTIONAL,
  247. IN LPCWSTR lpNewMachineName OPTIONAL,
  248. IN LPCWSTR lpAccount OPTIONAL,
  249. IN LPCWSTR lpPassword OPTIONAL,
  250. IN DWORD fRenameOptions
  251. )
  252. {
  253. return ERROR_PROC_NOT_FOUND;
  254. }
  255. static
  256. NET_API_STATUS
  257. NET_API_FUNCTION
  258. NetServerSetInfo (
  259. IN LPWSTR servername OPTIONAL,
  260. IN DWORD level,
  261. IN LPBYTE buf,
  262. OUT LPDWORD ParmError OPTIONAL
  263. )
  264. {
  265. return ERROR_PROC_NOT_FOUND;
  266. }
  267. static
  268. NET_API_STATUS NET_API_FUNCTION
  269. NetSessionEnum (
  270. IN LPTSTR servername,
  271. IN LPTSTR clientname,
  272. IN LPTSTR username,
  273. IN DWORD level,
  274. OUT LPBYTE *bufptr,
  275. IN DWORD prefmaxlen,
  276. OUT LPDWORD entriesread,
  277. OUT LPDWORD totalentries,
  278. IN OUT LPDWORD resume_handle
  279. )
  280. {
  281. return ERROR_PROC_NOT_FOUND;
  282. }
  283. static
  284. NET_API_STATUS NET_API_FUNCTION
  285. NetShareGetInfo(
  286. IN LMSTR servername,
  287. IN LMSTR netname,
  288. IN DWORD level,
  289. OUT LPBYTE *bufptr
  290. )
  291. {
  292. return ERROR_PROC_NOT_FOUND;
  293. }
  294. static
  295. NET_API_STATUS NET_API_FUNCTION
  296. NetShareSetInfo (
  297. IN LMSTR servername,
  298. IN LMSTR netname,
  299. IN DWORD level,
  300. IN LPBYTE buf,
  301. OUT LPDWORD parm_err
  302. )
  303. {
  304. return ERROR_PROC_NOT_FOUND;
  305. }
  306. static
  307. NET_API_STATUS
  308. NET_API_FUNCTION
  309. NetUnjoinDomain(
  310. IN LPCWSTR lpServer OPTIONAL,
  311. IN LPCWSTR lpAccount OPTIONAL,
  312. IN LPCWSTR lpPassword OPTIONAL,
  313. IN DWORD fUnjoinOptions
  314. )
  315. {
  316. return ERROR_PROC_NOT_FOUND;
  317. }
  318. static
  319. NET_API_STATUS NET_API_FUNCTION
  320. NetUserAdd(
  321. IN LPCWSTR ServerName OPTIONAL,
  322. IN DWORD Level,
  323. IN LPBYTE Buffer,
  324. OUT LPDWORD ParmError OPTIONAL
  325. )
  326. {
  327. return ERROR_PROC_NOT_FOUND;
  328. }
  329. static
  330. NET_API_STATUS NET_API_FUNCTION
  331. NetUserChangePassword(
  332. IN LPCWSTR DomainName,
  333. IN LPCWSTR UserName,
  334. IN LPCWSTR OldPassword,
  335. IN LPCWSTR NewPassword
  336. )
  337. {
  338. return ERROR_PROC_NOT_FOUND;
  339. }
  340. static
  341. NET_API_STATUS NET_API_FUNCTION
  342. NetUserDel(
  343. IN LPCWSTR ServerName OPTIONAL,
  344. IN LPCWSTR UserName
  345. )
  346. {
  347. return ERROR_PROC_NOT_FOUND;
  348. }
  349. static
  350. NET_API_STATUS
  351. NET_API_FUNCTION
  352. NetUserGetGroups(
  353. IN LPCWSTR ServerName OPTIONAL,
  354. IN LPCWSTR UserName,
  355. IN DWORD Level,
  356. OUT LPBYTE *Buffer,
  357. IN DWORD PrefMaxLen,
  358. OUT LPDWORD EntriesRead,
  359. OUT LPDWORD EntriesLeft
  360. )
  361. {
  362. return ERROR_PROC_NOT_FOUND;
  363. }
  364. static
  365. NET_API_STATUS
  366. NET_API_FUNCTION
  367. NetUserGetInfo (
  368. IN LPCWSTR servername OPTIONAL,
  369. IN LPCWSTR username,
  370. IN DWORD level,
  371. OUT LPBYTE *bufptr
  372. )
  373. {
  374. return ERROR_PROC_NOT_FOUND;
  375. }
  376. static
  377. NET_API_STATUS
  378. NET_API_FUNCTION
  379. NetUserGetLocalGroups(
  380. IN LPCWSTR ServerName OPTIONAL,
  381. IN LPCWSTR UserName,
  382. IN DWORD Level,
  383. IN DWORD Flags,
  384. OUT LPBYTE *Buffer,
  385. IN DWORD PrefMaxLen,
  386. OUT LPDWORD EntriesRead,
  387. OUT LPDWORD EntriesLeft
  388. )
  389. {
  390. return ERROR_PROC_NOT_FOUND;
  391. }
  392. static
  393. NET_API_STATUS NET_API_FUNCTION
  394. NetUserModalsGet(
  395. IN LPCWSTR ServerName OPTIONAL,
  396. IN DWORD Level,
  397. OUT LPBYTE *Buffer
  398. )
  399. {
  400. return ERROR_PROC_NOT_FOUND;
  401. }
  402. static
  403. NET_API_STATUS NET_API_FUNCTION
  404. NetUserSetInfo(
  405. IN LPCWSTR ServerName OPTIONAL,
  406. IN LPCWSTR UserName,
  407. IN DWORD Level,
  408. IN LPBYTE Buffer,
  409. OUT LPDWORD ParmError OPTIONAL
  410. )
  411. {
  412. return ERROR_PROC_NOT_FOUND;
  413. }
  414. static
  415. NET_API_STATUS
  416. NET_API_FUNCTION
  417. NetValidateName(
  418. IN LPCWSTR lpServer OPTIONAL,
  419. IN LPCWSTR lpName,
  420. IN LPCWSTR lpAccount OPTIONAL,
  421. IN LPCWSTR lpPassword OPTIONAL,
  422. IN NETSETUP_NAME_TYPE NameType
  423. )
  424. {
  425. return ERROR_PROC_NOT_FOUND;
  426. }
  427. static
  428. NET_API_STATUS NET_API_FUNCTION
  429. NetWkstaGetInfo(
  430. IN LPTSTR servername OPTIONAL,
  431. IN DWORD level,
  432. OUT LPBYTE *bufptr
  433. )
  434. {
  435. return ERROR_PROC_NOT_FOUND;
  436. }
  437. static
  438. NET_API_STATUS NET_API_FUNCTION
  439. NetWkstaUserGetInfo (
  440. IN LPWSTR reserved,
  441. IN DWORD level,
  442. OUT LPBYTE *bufptr
  443. )
  444. {
  445. return ERROR_PROC_NOT_FOUND;
  446. }
  447. static
  448. UCHAR
  449. APIENTRY
  450. Netbios(
  451. PNCB pncb
  452. )
  453. {
  454. return NRC_SYSTEM;
  455. }
  456. static
  457. NET_API_STATUS
  458. NET_API_FUNCTION
  459. NetpIsRemote(
  460. IN LPTSTR ComputerName OPTIONAL,
  461. OUT LPDWORD LocalOrRemote,
  462. OUT LPTSTR CanonicalizedName OPTIONAL,
  463. IN DWORD Flags
  464. )
  465. {
  466. return ERROR_PROC_NOT_FOUND;
  467. }
  468. static
  469. NET_API_STATUS
  470. NET_API_FUNCTION
  471. NetpUpgradePreNT5JoinInfo( VOID )
  472. {
  473. return ERROR_PROC_NOT_FOUND;
  474. }
  475. static
  476. NET_API_STATUS
  477. NET_API_FUNCTION
  478. NetServerGetInfo(
  479. IN LMSTR servername OPTIONAL,
  480. IN DWORD level,
  481. OUT LPBYTE *bufptr
  482. )
  483. {
  484. return ERROR_PROC_NOT_FOUND;
  485. }
  486. //
  487. // !! WARNING !! The entries below must be in alphabetical order, and are CASE SENSITIVE (eg lower case comes last!)
  488. //
  489. DEFINE_PROCNAME_ENTRIES(netapi32)
  490. {
  491. DLPENTRY(DsAddressToSiteNamesW)
  492. DLPENTRY(DsEnumerateDomainTrustsW)
  493. DLPENTRY(DsGetDcNameW)
  494. DLPENTRY(DsGetDcNameWithAccountW)
  495. DLPENTRY(DsGetDcSiteCoverageW)
  496. DLPENTRY(DsRoleFreeMemory)
  497. DLPENTRY(DsRoleGetPrimaryDomainInformation)
  498. DLPENTRY(I_NetNameCanonicalize)
  499. DLPENTRY(I_NetNameValidate)
  500. DLPENTRY(NetAlertRaiseEx)
  501. DLPENTRY(NetApiBufferAllocate)
  502. DLPENTRY(NetApiBufferFree)
  503. DLPENTRY(NetDfsGetInfo)
  504. DLPENTRY(NetEnumerateTrustedDomains)
  505. DLPENTRY(NetGetJoinInformation)
  506. DLPENTRY(NetJoinDomain)
  507. DLPENTRY(NetLocalGroupGetMembers)
  508. DLPENTRY(NetMessageBufferSend)
  509. DLPENTRY(NetQueryDisplayInformation)
  510. DLPENTRY(NetRenameMachineInDomain)
  511. DLPENTRY(NetServerGetInfo)
  512. DLPENTRY(NetServerSetInfo)
  513. DLPENTRY(NetSessionEnum)
  514. DLPENTRY(NetShareGetInfo)
  515. DLPENTRY(NetShareSetInfo)
  516. DLPENTRY(NetUnjoinDomain)
  517. DLPENTRY(NetUserAdd)
  518. DLPENTRY(NetUserChangePassword)
  519. DLPENTRY(NetUserDel)
  520. DLPENTRY(NetUserGetGroups)
  521. DLPENTRY(NetUserGetInfo)
  522. DLPENTRY(NetUserGetLocalGroups)
  523. DLPENTRY(NetUserModalsGet)
  524. DLPENTRY(NetUserSetInfo)
  525. DLPENTRY(NetValidateName)
  526. DLPENTRY(NetWkstaGetInfo)
  527. DLPENTRY(NetWkstaUserGetInfo)
  528. DLPENTRY(Netbios)
  529. DLPENTRY(NetpIsRemote)
  530. DLPENTRY(NetpUpgradePreNT5JoinInfo)
  531. };
  532. DEFINE_PROCNAME_MAP(netapi32)