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.

501 lines
7.3 KiB

  1. #include "dspch.h"
  2. #pragma hdrstop
  3. #define _WINLDAP_
  4. #define LDAP_UNICODE 0
  5. #include <winldap.h>
  6. static
  7. WINLDAPAPI
  8. ULONG LDAPAPI
  9. ldap_unbind(
  10. LDAP *ld
  11. )
  12. {
  13. return LDAP_NO_MEMORY;
  14. }
  15. static
  16. WINLDAPAPI
  17. ULONG LDAPAPI
  18. ldap_unbind_s(
  19. LDAP *ld
  20. )
  21. {
  22. return LDAP_NO_MEMORY;
  23. }
  24. static
  25. WINLDAPAPI
  26. ULONG LDAPAPI
  27. LdapMapErrorToWin32(
  28. ULONG LdapError
  29. )
  30. {
  31. return ERROR_PROC_NOT_FOUND;
  32. }
  33. static
  34. WINLDAPAPI
  35. ULONG LDAPAPI
  36. LdapGetLastError(
  37. VOID
  38. )
  39. {
  40. return ERROR_PROC_NOT_FOUND;
  41. }
  42. static
  43. WINLDAPAPI
  44. LDAPMessage *LDAPAPI
  45. ldap_first_entry(
  46. LDAP *ld,
  47. LDAPMessage *res
  48. )
  49. {
  50. return NULL;
  51. }
  52. static
  53. WINLDAPAPI
  54. LDAPMessage *LDAPAPI
  55. ldap_next_entry(
  56. LDAP *ld,
  57. LDAPMessage *entry
  58. )
  59. {
  60. return NULL;
  61. }
  62. static
  63. WINLDAPAPI
  64. ULONG LDAPAPI
  65. ldap_count_entries(
  66. LDAP *ld,
  67. LDAPMessage *res
  68. )
  69. {
  70. return -1;
  71. }
  72. static
  73. WINLDAPAPI
  74. ULONG LDAPAPI
  75. ldap_result(
  76. LDAP *ld,
  77. ULONG msgid,
  78. ULONG all,
  79. struct l_timeval *timeout,
  80. LDAPMessage **res
  81. )
  82. {
  83. return -1;
  84. }
  85. static
  86. WINLDAPAPI
  87. ULONG LDAPAPI
  88. ldap_msgfree(
  89. LDAPMessage *res
  90. )
  91. {
  92. return LDAP_NO_MEMORY;
  93. }
  94. static
  95. WINLDAPAPI
  96. ULONG LDAPAPI
  97. ldap_bind_s(
  98. LDAP *ld,
  99. const PCHAR dn,
  100. const PCHAR cred,
  101. ULONG method
  102. )
  103. {
  104. return LDAP_NO_MEMORY;
  105. }
  106. static
  107. WINLDAPAPI
  108. LDAP * LDAPAPI
  109. cldap_openA(
  110. PCHAR HostName,
  111. ULONG PortNumber
  112. )
  113. {
  114. return NULL;
  115. }
  116. static
  117. WINLDAPAPI
  118. ULONG LDAPAPI
  119. ldap_add_sW(
  120. LDAP *ld,
  121. PWCHAR dn,
  122. LDAPModW *attrs[]
  123. )
  124. {
  125. return LDAP_NO_MEMORY;
  126. }
  127. static
  128. WINLDAPAPI
  129. ULONG LDAPAPI
  130. ldap_bind_sW(
  131. LDAP *ld,
  132. PWCHAR dn,
  133. PWCHAR cred,
  134. ULONG method
  135. )
  136. {
  137. return LDAP_NO_MEMORY;
  138. }
  139. static
  140. WINLDAPAPI
  141. ULONG LDAPAPI
  142. ldap_count_values_len(
  143. struct berval **vals
  144. )
  145. {
  146. return -1;
  147. }
  148. static
  149. WINLDAPAPI
  150. ULONG LDAPAPI
  151. ldap_value_free_len(
  152. struct berval **vals
  153. )
  154. {
  155. return LDAP_NO_MEMORY;
  156. }
  157. static
  158. WINLDAPAPI
  159. ULONG LDAPAPI
  160. ldap_compare_sW(
  161. LDAP *ld,
  162. const PWCHAR dn,
  163. const PWCHAR attr,
  164. PWCHAR value
  165. )
  166. {
  167. return LDAP_NO_MEMORY;
  168. }
  169. static
  170. WINLDAPAPI
  171. ULONG LDAPAPI
  172. ldap_count_valuesW(
  173. PWCHAR *vals
  174. )
  175. {
  176. return -1;
  177. }
  178. static
  179. WINLDAPAPI
  180. ULONG LDAPAPI
  181. ldap_delete_sW(
  182. LDAP *ld,
  183. const PWCHAR dn
  184. )
  185. {
  186. return LDAP_NO_MEMORY;
  187. }
  188. static
  189. WINLDAPAPI
  190. ULONG LDAPAPI
  191. ldap_escape_filter_elementA(
  192. PCHAR sourceFilterElement,
  193. ULONG sourceLength,
  194. PCHAR destFilterElement,
  195. ULONG destLength
  196. )
  197. {
  198. return LDAP_NO_MEMORY;
  199. }
  200. static
  201. PWCHAR __cdecl
  202. ldap_get_dnW (
  203. LDAP *ExternalHandle,
  204. LDAPMessage *LdapMsg
  205. )
  206. {
  207. return NULL;
  208. }
  209. static
  210. WINLDAPAPI
  211. ULONG LDAPAPI
  212. ldap_get_next_page_s(
  213. PLDAP ExternalHandle,
  214. PLDAPSearch SearchHandle,
  215. struct l_timeval *timeout,
  216. ULONG PageSize,
  217. ULONG *TotalCount,
  218. LDAPMessage **Results
  219. )
  220. {
  221. return LDAP_NO_MEMORY;
  222. }
  223. static
  224. WINLDAPAPI
  225. PWCHAR *LDAPAPI
  226. ldap_get_valuesW(
  227. LDAP *ld,
  228. LDAPMessage *entry,
  229. const PWCHAR attr
  230. )
  231. {
  232. return NULL;
  233. }
  234. static
  235. WINLDAPAPI
  236. struct berval **LDAPAPI
  237. ldap_get_values_lenA(
  238. LDAP *ExternalHandle,
  239. LDAPMessage *Message,
  240. const PCHAR attr
  241. )
  242. {
  243. return NULL;
  244. }
  245. static
  246. WINLDAPAPI
  247. struct berval **LDAPAPI
  248. ldap_get_values_lenW(
  249. LDAP *ExternalHandle,
  250. LDAPMessage *Message,
  251. const PWCHAR attr
  252. )
  253. {
  254. return NULL;
  255. }
  256. static
  257. WINLDAPAPI
  258. ULONG LDAPAPI
  259. ldap_modify_ext_sW(
  260. LDAP *ld,
  261. const PWCHAR dn,
  262. LDAPModW *mods[],
  263. PLDAPControlW *ServerControls,
  264. PLDAPControlW *ClientControls
  265. )
  266. {
  267. return LDAP_NO_MEMORY;
  268. }
  269. static
  270. WINLDAPAPI
  271. ULONG LDAPAPI
  272. ldap_modify_sW(
  273. LDAP *ld,
  274. PWCHAR dn,
  275. LDAPModW *mods[]
  276. )
  277. {
  278. return LDAP_NO_MEMORY;
  279. }
  280. static
  281. WINLDAPAPI
  282. LDAP * LDAPAPI
  283. ldap_openW(
  284. const PWCHAR HostName,
  285. ULONG PortNumber
  286. )
  287. {
  288. return NULL;
  289. }
  290. static
  291. WINLDAPAPI
  292. ULONG LDAPAPI
  293. ldap_searchA(
  294. LDAP *ld,
  295. const PCHAR base,
  296. ULONG scope,
  297. const PCHAR filter,
  298. PCHAR attrs[],
  299. ULONG attrsonly
  300. )
  301. {
  302. return -1;
  303. }
  304. static
  305. WINLDAPAPI
  306. ULONG LDAPAPI
  307. ldap_search_ext_sW(
  308. LDAP *ld,
  309. const PWCHAR base,
  310. ULONG scope,
  311. const PWCHAR filter,
  312. PWCHAR attrs[],
  313. ULONG attrsonly,
  314. PLDAPControlW *ServerControls,
  315. PLDAPControlW *ClientControls,
  316. struct l_timeval *timeout,
  317. ULONG SizeLimit,
  318. LDAPMessage **res
  319. )
  320. {
  321. return LDAP_NO_MEMORY;
  322. }
  323. static
  324. WINLDAPAPI
  325. ULONG LDAPAPI
  326. ldap_search_sW(
  327. LDAP *ld,
  328. const PWCHAR base,
  329. ULONG scope,
  330. const PWCHAR filter,
  331. PWCHAR attrs[],
  332. ULONG attrsonly,
  333. LDAPMessage **res
  334. )
  335. {
  336. *res = NULL;
  337. return LDAP_NO_MEMORY;
  338. }
  339. static
  340. WINLDAPAPI
  341. ULONG LDAPAPI
  342. ldap_value_freeW(
  343. PWCHAR *vals
  344. )
  345. {
  346. return LDAP_NO_MEMORY;
  347. }
  348. static
  349. WINLDAPAPI
  350. PCHAR LDAPAPI
  351. ldap_err2stringA(
  352. ULONG err
  353. )
  354. {
  355. return NULL;
  356. }
  357. static
  358. WINLDAPAPI
  359. ULONG LDAPAPI
  360. ldap_set_optionW(
  361. LDAP *ld,
  362. int option,
  363. const void *invalue
  364. )
  365. {
  366. return LDAP_NO_MEMORY;
  367. }
  368. static
  369. VOID __cdecl
  370. ldap_memfreeW(
  371. PWCHAR Block
  372. )
  373. {
  374. return;
  375. }
  376. static
  377. WINLDAPAPI
  378. ULONG LDAPAPI
  379. ldap_search_abandon_page(
  380. PLDAP ExternalHandle,
  381. PLDAPSearch SearchBlock
  382. )
  383. {
  384. return LDAP_NO_MEMORY;
  385. }
  386. WINLDAPAPI
  387. PLDAPSearch LDAPAPI
  388. ldap_search_init_pageW(
  389. PLDAP ExternalHandle,
  390. const PWCHAR DistinguishedName,
  391. ULONG ScopeOfSearch,
  392. const PWCHAR SearchFilter,
  393. PWCHAR AttributeList[],
  394. ULONG AttributesOnly,
  395. PLDAPControlW *ServerControls,
  396. PLDAPControlW *ClientControls,
  397. ULONG PageTimeLimit,
  398. ULONG TotalSizeLimit,
  399. PLDAPSortKeyW *SortKeys
  400. )
  401. {
  402. return NULL;
  403. }
  404. static
  405. WINLDAPAPI
  406. LDAP* LDAPAPI
  407. ldap_initW(
  408. const PWCHAR HostName,
  409. ULONG PortNumber
  410. )
  411. {
  412. return NULL;
  413. }
  414. //
  415. // !! WARNING !! The entries below must be in order by ORDINAL
  416. //
  417. DEFINE_ORDINAL_ENTRIES(wldap32)
  418. {
  419. DLOENTRY(13,ldap_unbind)
  420. DLOENTRY(14,ldap_set_optionW)
  421. DLOENTRY(16,LdapGetLastError)
  422. DLOENTRY(18,LdapMapErrorToWin32)
  423. DLOENTRY(26,ldap_first_entry)
  424. DLOENTRY(27,ldap_next_entry)
  425. DLOENTRY(36,ldap_count_entries)
  426. DLOENTRY(40,ldap_result)
  427. DLOENTRY(41,ldap_msgfree)
  428. DLOENTRY(45,ldap_bind_s)
  429. DLOENTRY(46,ldap_unbind_s)
  430. DLOENTRY(55,cldap_openA)
  431. DLOENTRY(69,ldap_add_sW)
  432. DLOENTRY(73,ldap_bind_sW)
  433. DLOENTRY(77,ldap_count_values_len)
  434. DLOENTRY(79,ldap_value_free_len)
  435. DLOENTRY(87,ldap_compare_sW)
  436. DLOENTRY(97,ldap_count_valuesW)
  437. DLOENTRY(113,ldap_delete_sW)
  438. DLOENTRY(117,ldap_err2stringA)
  439. DLOENTRY(119,ldap_escape_filter_elementA)
  440. DLOENTRY(133,ldap_get_dnW)
  441. DLOENTRY(135,ldap_get_next_page_s)
  442. DLOENTRY(140,ldap_get_valuesW)
  443. DLOENTRY(141,ldap_get_values_lenA)
  444. DLOENTRY(142,ldap_get_values_lenW)
  445. DLOENTRY(145,ldap_initW)
  446. DLOENTRY(147,ldap_memfreeW)
  447. DLOENTRY(155,ldap_modify_ext_sW)
  448. DLOENTRY(157,ldap_modify_sW)
  449. DLOENTRY(170,ldap_openW)
  450. DLOENTRY(189,ldap_searchA)
  451. DLOENTRY(191,ldap_search_abandon_page)
  452. DLOENTRY(203,ldap_search_ext_sW)
  453. DLOENTRY(206,ldap_search_init_pageW)
  454. DLOENTRY(208,ldap_search_sW)
  455. DLOENTRY(224,ldap_value_freeW)
  456. };
  457. DEFINE_ORDINAL_MAP(wldap32)