JwaNtDsApi.pas
上传用户:davidchvip
上传日期:2009-07-28
资源大小:1749k
文件大小:203k
源码类别:

Windows编程

开发平台:

Delphi

  1. function DsCrackUnquotedMangledRdnW(pszRDN: LPCWSTR; cchRDN: DWORD; pGuid: LPGUID; peDsMangleFor: PDsMangleFor): BOOL; stdcall;
  2. {$EXTERNALSYM DsCrackUnquotedMangledRdnW}
  3. function DsCrackUnquotedMangledRdnA(pszRDN: LPCSTR; cchRDN: DWORD; pGuid: LPGUID; peDsMangleFor: PDsMangleFor): BOOL; stdcall;
  4. {$EXTERNALSYM DsCrackUnquotedMangledRdnA}
  5. {$IFDEF UNICODE}
  6. function DsCrackUnquotedMangledRdn(pszRDN: LPCWSTR; cchRDN: DWORD; pGuid: LPGUID; peDsMangleFor: PDsMangleFor): BOOL; stdcall;
  7. {$EXTERNALSYM DsCrackUnquotedMangledRdn}
  8. {$ELSE}
  9. function DsCrackUnquotedMangledRdn(pszRDN: LPCSTR; cchRDN: DWORD; pGuid: LPGUID; peDsMangleFor: PDsMangleFor): BOOL; stdcall;
  10. {$EXTERNALSYM DsCrackUnquotedMangledRdn}
  11. {$ENDIF}
  12. (*++
  13. ==========================================================
  14. NTDSAPI
  15. BOOL
  16. WINAPI
  17. DsIsMangledRdnValueW(
  18.     LPCWSTR pszRdn,
  19.     DWORD cRdn,
  20.     DS_MANGLE_FOR eDsMangleForDesired
  21.     );
  22. Description
  23.     Determine if the given RDN Value is mangled, and of the given type. Note that
  24.     the key portion of an RDN should not be supplied.
  25.     The name may be quoted or unquoted.  This routine tries to unquote the value.  If
  26.     the unquote operation fails, the routine proceeds to attempt the unmangle.
  27.     A change was made in the default quoting behavior of DNs returned from the DS
  28.     between Windows 2000 and Windows XP. This routine transparently handles RDNs with
  29.     special characters in either form.
  30.     The routine expects the value part of the RDN.
  31.     If you have full DN, use DsIsMangledDn() below.
  32.     To check for deleted name:
  33.         DsIsMangledRdnValueW( rdn, rdnlen, DS_MANGLE_OBJECT_FOR_DELETION )
  34.     To check for a conflicted name:
  35.         DsIsMangledRdnValueW( rdn, rdnlen, DS_MANGLE_OBJECT_FOR_NAME_CONFLICT )
  36. Arguments:
  37.     pszRdn (IN) - RDN value character string. Termination is not required and
  38.         is ignored.
  39.     cRdn (IN) - Length of RDN value in characters excluding termination
  40.     eDsMangleForDesired (IN) - Type of mangling to check for
  41. Return Value:
  42.     BOOL - True if the Rdn is mangled and is of the required type
  43. --*)
  44. function DsIsMangledRdnValueW(pszRdn: LPCWSTR; cRdn: DWORD; eDsMangleForDesired: DS_MANGLE_FOR): BOOL; stdcall;
  45. {$EXTERNALSYM DsIsMangledRdnValueW}
  46. function DsIsMangledRdnValueA(pszRdn: LPCSTR; cRdn: DWORD; eDsMangleForDesired: DS_MANGLE_FOR): BOOL; stdcall;
  47. {$EXTERNALSYM DsIsMangledRdnValueA}
  48. {$IFDEF UNICODE}
  49. function DsIsMangledRdnValue(pszRdn: LPCWSTR; cRdn: DWORD; eDsMangleForDesired: DS_MANGLE_FOR): BOOL; stdcall;
  50. {$EXTERNALSYM DsIsMangledRdnValue}
  51. {$ELSE}
  52. function DsIsMangledRdnValue(pszRdn: LPCSTR; cRdn: DWORD; eDsMangleForDesired: DS_MANGLE_FOR): BOOL; stdcall;
  53. {$EXTERNALSYM DsIsMangledRdnValue}
  54. {$ENDIF}
  55. (*++
  56. ==========================================================
  57. NTDSAPI
  58. BOOL
  59. WINAPI
  60. DsIsMangledDnW(
  61.     LPCWSTR pszDn,
  62.     DS_MANGLE_FOR eDsMangleFor
  63.     );
  64. Description
  65.     Determine if the first RDN in a quoted DN is a mangled name of given type.
  66.     The DN must be suitable for input to DsGetRdn().
  67.     To check for deleted name:
  68.         DsIsMangledDnW( dn, DS_MANGLE_OBJECT_FOR_DELETION )
  69.     To check for a conflicted name:
  70.         DsIsMangledDnW( Dn, DS_MANGLE_OBJECT_FOR_NAME_CONFLICT )
  71. Arguments:
  72.     pszDn (IN) - Quoted Distinguished Name as returned by DS functions
  73.     eDsMangleFor (IN) - Type of mangling to check for
  74. Return Value:
  75.     BOOL - True if first RDN is mangled and is of the given mangle type
  76. --*)
  77. function DsIsMangledDnA(pszDn: LPCSTR; eDsMangleFor: DS_MANGLE_FOR): BOOL; stdcall;
  78. {$EXTERNALSYM DsIsMangledDnA}
  79. function DsIsMangledDnW(pszDn: LPCWSTR; eDsMangleFor: DS_MANGLE_FOR): BOOL; stdcall;
  80. {$EXTERNALSYM DsIsMangledDnW}
  81. {$IFDEF UNICODE}
  82. function DsIsMangledDn(pszDn: LPCWSTR; eDsMangleFor: DS_MANGLE_FOR): BOOL; stdcall;
  83. {$EXTERNALSYM DsIsMangledDn}
  84. {$ELSE}
  85. function DsIsMangledDn(pszDn: LPCSTR; eDsMangleFor: DS_MANGLE_FOR): BOOL; stdcall;
  86. {$EXTERNALSYM DsIsMangledDn}
  87. {$ENDIF}
  88. implementation
  89. const
  90.   ntdsapilib = 'ntdsapi.dll';
  91. function NTDSCONN_IGNORE_SCHEDULE(_options_: DWORD): DWORD;
  92. begin
  93.   // todo NTDSCONN_OPT_IGNORE_SCHEDULE_MASK only defined in pre-release version
  94.   Result := (_options_ and DWORD($80000000){NTDSCONN_OPT_IGNORE_SCHEDULE_MASK}) shr 31;
  95. end;
  96. function FRSCONN_GET_PRIORITY(_options_: DWORD): DWORD;
  97. begin
  98.   if ((_options_ and FRSCONN_PRIORITY_MASK) shr 28) <> 0 then
  99.     Result := (_options_ and FRSCONN_PRIORITY_MASK) shr 28
  100.   else
  101.     Result := FRSCONN_MAX_PRIORITY;
  102. end;
  103. {$IFDEF DYNAMIC_LINK}
  104. var
  105.   _DsBindA: Pointer;
  106. function DsBindA;
  107. begin
  108.   GetProcedureAddress(_DsBindA, ntdsapilib, 'DsBindA');
  109.   asm
  110.     mov esp, ebp
  111.     pop ebp
  112.     jmp [_DsBindA]
  113.   end;
  114. end;
  115. {$ELSE}
  116. function DsBindA; external ntdsapilib name 'DsBindA';
  117. {$ENDIF DYNAMIC_LINK}
  118. {$IFDEF DYNAMIC_LINK}
  119. var
  120.   _DsBindW: Pointer;
  121. function DsBindW;
  122. begin
  123.   GetProcedureAddress(_DsBindW, ntdsapilib, 'DsBindW');
  124.   asm
  125.     mov esp, ebp
  126.     pop ebp
  127.     jmp [_DsBindW]
  128.   end;
  129. end;
  130. {$ELSE}
  131. function DsBindW; external ntdsapilib name 'DsBindW';
  132. {$ENDIF DYNAMIC_LINK}
  133. {$IFDEF UNICODE}
  134. {$IFDEF DYNAMIC_LINK}
  135. var
  136.   _DsBind: Pointer;
  137. function DsBind;
  138. begin
  139.   GetProcedureAddress(_DsBind, ntdsapilib, 'DsBindW');
  140.   asm
  141.     mov esp, ebp
  142.     pop ebp
  143.     jmp [_DsBind]
  144.   end;
  145. end;
  146. {$ELSE}
  147. function DsBind; external ntdsapilib name 'DsBindW';
  148. {$ENDIF DYNAMIC_LINK}
  149. {$ELSE}
  150. {$IFDEF DYNAMIC_LINK}
  151. var
  152.   _DsBind: Pointer;
  153. function DsBind;
  154. begin
  155.   GetProcedureAddress(_DsBind, ntdsapilib, 'DsBindA');
  156.   asm
  157.     mov esp, ebp
  158.     pop ebp
  159.     jmp [_DsBind]
  160.   end;
  161. end;
  162. {$ELSE}
  163. function DsBind; external ntdsapilib name 'DsBindA';
  164. {$ENDIF DYNAMIC_LINK}
  165. {$ENDIF}
  166. {$IFDEF DYNAMIC_LINK}
  167. var
  168.   _DsBindWithCredA: Pointer;
  169. function DsBindWithCredA;
  170. begin
  171.   GetProcedureAddress(_DsBindWithCredA, ntdsapilib, 'DsBindWithCredA');
  172.   asm
  173.     mov esp, ebp
  174.     pop ebp
  175.     jmp [_DsBindWithCredA]
  176.   end;
  177. end;
  178. {$ELSE}
  179. function DsBindWithCredA; external ntdsapilib name 'DsBindWithCredA';
  180. {$ENDIF DYNAMIC_LINK}
  181. {$IFDEF DYNAMIC_LINK}
  182. var
  183.   _DsBindWithCredW: Pointer;
  184. function DsBindWithCredW;
  185. begin
  186.   GetProcedureAddress(_DsBindWithCredW, ntdsapilib, 'DsBindWithCredW');
  187.   asm
  188.     mov esp, ebp
  189.     pop ebp
  190.     jmp [_DsBindWithCredW]
  191.   end;
  192. end;
  193. {$ELSE}
  194. function DsBindWithCredW; external ntdsapilib name 'DsBindWithCredW';
  195. {$ENDIF DYNAMIC_LINK}
  196. {$IFDEF UNICODE}
  197. {$IFDEF DYNAMIC_LINK}
  198. var
  199.   _DsBindWithCred: Pointer;
  200. function DsBindWithCred;
  201. begin
  202.   GetProcedureAddress(_DsBindWithCred, ntdsapilib, 'DsBindWithCredW');
  203.   asm
  204.     mov esp, ebp
  205.     pop ebp
  206.     jmp [_DsBindWithCred]
  207.   end;
  208. end;
  209. {$ELSE}
  210. function DsBindWithCred; external ntdsapilib name 'DsBindWithCredW';
  211. {$ENDIF DYNAMIC_LINK}
  212. {$ELSE}
  213. {$IFDEF DYNAMIC_LINK}
  214. var
  215.   _DsBindWithCred: Pointer;
  216. function DsBindWithCred;
  217. begin
  218.   GetProcedureAddress(_DsBindWithCred, ntdsapilib, 'DsBindWithCredA');
  219.   asm
  220.     mov esp, ebp
  221.     pop ebp
  222.     jmp [_DsBindWithCred]
  223.   end;
  224. end;
  225. {$ELSE}
  226. function DsBindWithCred; external ntdsapilib name 'DsBindWithCredA';
  227. {$ENDIF DYNAMIC_LINK}
  228. {$ENDIF}
  229. {$IFDEF DYNAMIC_LINK}
  230. var
  231.   _DsBindWithSpnA: Pointer;
  232. function DsBindWithSpnA;
  233. begin
  234.   GetProcedureAddress(_DsBindWithSpnA, ntdsapilib, 'DsBindWithSpnA');
  235.   asm
  236.     mov esp, ebp
  237.     pop ebp
  238.     jmp [_DsBindWithSpnA]
  239.   end;
  240. end;
  241. {$ELSE}
  242. function DsBindWithSpnA; external ntdsapilib name 'DsBindWithSpnA';
  243. {$ENDIF DYNAMIC_LINK}
  244. {$IFDEF DYNAMIC_LINK}
  245. var
  246.   _DsBindWithSpnW: Pointer;
  247. function DsBindWithSpnW;
  248. begin
  249.   GetProcedureAddress(_DsBindWithSpnW, ntdsapilib, 'DsBindWithSpnW');
  250.   asm
  251.     mov esp, ebp
  252.     pop ebp
  253.     jmp [_DsBindWithSpnW]
  254.   end;
  255. end;
  256. {$ELSE}
  257. function DsBindWithSpnW; external ntdsapilib name 'DsBindWithSpnW';
  258. {$ENDIF DYNAMIC_LINK}
  259. {$IFDEF UNICODE}
  260. {$IFDEF DYNAMIC_LINK}
  261. var
  262.   _DsBindWithSpn: Pointer;
  263. function DsBindWithSpn;
  264. begin
  265.   GetProcedureAddress(_DsBindWithSpn, ntdsapilib, 'DsBindWithSpnW');
  266.   asm
  267.     mov esp, ebp
  268.     pop ebp
  269.     jmp [_DsBindWithSpn]
  270.   end;
  271. end;
  272. {$ELSE}
  273. function DsBindWithSpn; external ntdsapilib name 'DsBindWithSpnW';
  274. {$ENDIF DYNAMIC_LINK}
  275. {$ELSE}
  276. {$IFDEF DYNAMIC_LINK}
  277. var
  278.   _DsBindWithSpn: Pointer;
  279. function DsBindWithSpn;
  280. begin
  281.   GetProcedureAddress(_DsBindWithSpn, ntdsapilib, 'DsBindWithSpnA');
  282.   asm
  283.     mov esp, ebp
  284.     pop ebp
  285.     jmp [_DsBindWithSpn]
  286.   end;
  287. end;
  288. {$ELSE}
  289. function DsBindWithSpn; external ntdsapilib name 'DsBindWithSpnA';
  290. {$ENDIF DYNAMIC_LINK}
  291. {$ENDIF}
  292. {$IFDEF DYNAMIC_LINK}
  293. var
  294.   _DsBindWithSpnExW: Pointer;
  295. function DsBindWithSpnExW;
  296. begin
  297.   GetProcedureAddress(_DsBindWithSpnExW, ntdsapilib, 'DsBindWithSpnExW');
  298.   asm
  299.     mov esp, ebp
  300.     pop ebp
  301.     jmp [_DsBindWithSpnExW]
  302.   end;
  303. end;
  304. {$ELSE}
  305. function DsBindWithSpnExW; external ntdsapilib name 'DsBindWithSpnExW';
  306. {$ENDIF DYNAMIC_LINK}
  307. {$IFDEF DYNAMIC_LINK}
  308. var
  309.   _DsBindWithSpnExA: Pointer;
  310. function DsBindWithSpnExA;
  311. begin
  312.   GetProcedureAddress(_DsBindWithSpnExA, ntdsapilib, 'DsBindWithSpnExA');
  313.   asm
  314.     mov esp, ebp
  315.     pop ebp
  316.     jmp [_DsBindWithSpnExA]
  317.   end;
  318. end;
  319. {$ELSE}
  320. function DsBindWithSpnExA; external ntdsapilib name 'DsBindWithSpnExA';
  321. {$ENDIF DYNAMIC_LINK}
  322. {$IFDEF UNICODE}
  323. {$IFDEF DYNAMIC_LINK}
  324. var
  325.   _DsBindWithSpnEx: Pointer;
  326. function DsBindWithSpnEx;
  327. begin
  328.   GetProcedureAddress(_DsBindWithSpnEx, ntdsapilib, 'DsBindWithSpnExW');
  329.   asm
  330.     mov esp, ebp
  331.     pop ebp
  332.     jmp [_DsBindWithSpnEx]
  333.   end;
  334. end;
  335. {$ELSE}
  336. function DsBindWithSpnEx; external ntdsapilib name 'DsBindWithSpnExW';
  337. {$ENDIF DYNAMIC_LINK}
  338. {$ELSE}
  339. {$IFDEF DYNAMIC_LINK}
  340. var
  341.   _DsBindWithSpnEx: Pointer;
  342. function DsBindWithSpnEx;
  343. begin
  344.   GetProcedureAddress(_DsBindWithSpnEx, ntdsapilib, 'DsBindWithSpnExA');
  345.   asm
  346.     mov esp, ebp
  347.     pop ebp
  348.     jmp [_DsBindWithSpnEx]
  349.   end;
  350. end;
  351. {$ELSE}
  352. function DsBindWithSpnEx; external ntdsapilib name 'DsBindWithSpnExA';
  353. {$ENDIF DYNAMIC_LINK}
  354. {$ENDIF UNICODE}
  355. {$IFDEF DYNAMIC_LINK}
  356. var
  357.   _DsBindToISTGW: Pointer;
  358. function DsBindToISTGW;
  359. begin
  360.   GetProcedureAddress(_DsBindToISTGW, ntdsapilib, 'DsBindToISTGW');
  361.   asm
  362.     mov esp, ebp
  363.     pop ebp
  364.     jmp [_DsBindToISTGW]
  365.   end;
  366. end;
  367. {$ELSE}
  368. function DsBindToISTGW; external ntdsapilib name 'DsBindToISTGW';
  369. {$ENDIF DYNAMIC_LINK}
  370. {$IFDEF DYNAMIC_LINK}
  371. var
  372.   _DsBindToISTGA: Pointer;
  373. function DsBindToISTGA;
  374. begin
  375.   GetProcedureAddress(_DsBindToISTGA, ntdsapilib, 'DsBindToISTGA');
  376.   asm
  377.     mov esp, ebp
  378.     pop ebp
  379.     jmp [_DsBindToISTGA]
  380.   end;
  381. end;
  382. {$ELSE}
  383. function DsBindToISTGA; external ntdsapilib name 'DsBindToISTGA';
  384. {$ENDIF DYNAMIC_LINK}
  385. {$IFDEF UNICODE}
  386. {$IFDEF DYNAMIC_LINK}
  387. var
  388.   _DsBindToISTG: Pointer;
  389. function DsBindToISTG;
  390. begin
  391.   GetProcedureAddress(_DsBindToISTG, ntdsapilib, 'DsBindToISTGW');
  392.   asm
  393.     mov esp, ebp
  394.     pop ebp
  395.     jmp [_DsBindToISTG]
  396.   end;
  397. end;
  398. {$ELSE}
  399. function DsBindToISTG; external ntdsapilib name 'DsBindToISTGW';
  400. {$ENDIF DYNAMIC_LINK}
  401. {$ELSE}
  402. {$IFDEF DYNAMIC_LINK}
  403. var
  404.   _DsBindToISTG: Pointer;
  405. function DsBindToISTG;
  406. begin
  407.   GetProcedureAddress(_DsBindToISTG, ntdsapilib, 'DsBindToISTGA');
  408.   asm
  409.     mov esp, ebp
  410.     pop ebp
  411.     jmp [_DsBindToISTG]
  412.   end;
  413. end;
  414. {$ELSE}
  415. function DsBindToISTG; external ntdsapilib name 'DsBindToISTGA';
  416. {$ENDIF DYNAMIC_LINK}
  417. {$ENDIF UNICODE}
  418. {$IFDEF DYNAMIC_LINK}
  419. var
  420.   _DsBindingSetTimeout: Pointer;
  421. function DsBindingSetTimeout;
  422. begin
  423.   GetProcedureAddress(_DsBindingSetTimeout, ntdsapilib, 'DsBindingSetTimeout');
  424.   asm
  425.     mov esp, ebp
  426.     pop ebp
  427.     jmp [_DsBindingSetTimeout]
  428.   end;
  429. end;
  430. {$ELSE}
  431. function DsBindingSetTimeout; external ntdsapilib name 'DsBindingSetTimeout';
  432. {$ENDIF DYNAMIC_LINK}
  433. {$IFDEF DYNAMIC_LINK}
  434. var
  435.   _DsUnBindA: Pointer;
  436. function DsUnBindA;
  437. begin
  438.   GetProcedureAddress(_DsUnBindA, ntdsapilib, 'DsUnBindA');
  439.   asm
  440.     mov esp, ebp
  441.     pop ebp
  442.     jmp [_DsUnBindA]
  443.   end;
  444. end;
  445. {$ELSE}
  446. function DsUnBindA; external ntdsapilib name 'DsUnBindA';
  447. {$ENDIF DYNAMIC_LINK}
  448. {$IFDEF DYNAMIC_LINK}
  449. var
  450.   _DsUnBindW: Pointer;
  451. function DsUnBindW;
  452. begin
  453.   GetProcedureAddress(_DsUnBindW, ntdsapilib, 'DsUnBindW');
  454.   asm
  455.     mov esp, ebp
  456.     pop ebp
  457.     jmp [_DsUnBindW]
  458.   end;
  459. end;
  460. {$ELSE}
  461. function DsUnBindW; external ntdsapilib name 'DsUnBindW';
  462. {$ENDIF DYNAMIC_LINK}
  463. {$IFDEF UNICODE}
  464. {$IFDEF DYNAMIC_LINK}
  465. var
  466.   _DsUnBind: Pointer;
  467. function DsUnBind;
  468. begin
  469.   GetProcedureAddress(_DsUnBind, ntdsapilib, 'DsUnBindW');
  470.   asm
  471.     mov esp, ebp
  472.     pop ebp
  473.     jmp [_DsUnBind]
  474.   end;
  475. end;
  476. {$ELSE}
  477. function DsUnBind; external ntdsapilib name 'DsUnBindW';
  478. {$ENDIF DYNAMIC_LINK}
  479. {$ELSE}
  480. {$IFDEF DYNAMIC_LINK}
  481. var
  482.   _DsUnBind: Pointer;
  483. function DsUnBind;
  484. begin
  485.   GetProcedureAddress(_DsUnBind, ntdsapilib, 'DsUnBindA');
  486.   asm
  487.     mov esp, ebp
  488.     pop ebp
  489.     jmp [_DsUnBind]
  490.   end;
  491. end;
  492. {$ELSE}
  493. function DsUnBind; external ntdsapilib name 'DsUnBindA';
  494. {$ENDIF DYNAMIC_LINK}
  495. {$ENDIF}
  496. {$IFDEF DYNAMIC_LINK}
  497. var
  498.   _DsMakePasswordCredentialsA: Pointer;
  499. function DsMakePasswordCredentialsA;
  500. begin
  501.   GetProcedureAddress(_DsMakePasswordCredentialsA, ntdsapilib, 'DsMakePasswordCredentialsA');
  502.   asm
  503.     mov esp, ebp
  504.     pop ebp
  505.     jmp [_DsMakePasswordCredentialsA]
  506.   end;
  507. end;
  508. {$ELSE}
  509. function DsMakePasswordCredentialsA; external ntdsapilib name 'DsMakePasswordCredentialsA';
  510. {$ENDIF DYNAMIC_LINK}
  511. {$IFDEF DYNAMIC_LINK}
  512. var
  513.   _DsMakePasswordCredentialsW: Pointer;
  514. function DsMakePasswordCredentialsW;
  515. begin
  516.   GetProcedureAddress(_DsMakePasswordCredentialsW, ntdsapilib, 'DsMakePasswordCredentialsW');
  517.   asm
  518.     mov esp, ebp
  519.     pop ebp
  520.     jmp [_DsMakePasswordCredentialsW]
  521.   end;
  522. end;
  523. {$ELSE}
  524. function DsMakePasswordCredentialsW; external ntdsapilib name 'DsMakePasswordCredentialsW';
  525. {$ENDIF DYNAMIC_LINK}
  526. {$IFDEF UNICODE}
  527. {$IFDEF DYNAMIC_LINK}
  528. var
  529.   _DsMakePasswordCredentials: Pointer;
  530. function DsMakePasswordCredentials;
  531. begin
  532.   GetProcedureAddress(_DsMakePasswordCredentials, ntdsapilib, 'DsMakePasswordCredentialsW');
  533.   asm
  534.     mov esp, ebp
  535.     pop ebp
  536.     jmp [_DsMakePasswordCredentials]
  537.   end;
  538. end;
  539. {$ELSE}
  540. function DsMakePasswordCredentials; external ntdsapilib name 'DsMakePasswordCredentialsW';
  541. {$ENDIF DYNAMIC_LINK}
  542. {$ELSE}
  543. {$IFDEF DYNAMIC_LINK}
  544. var
  545.   _DsMakePasswordCredentials: Pointer;
  546. function DsMakePasswordCredentials;
  547. begin
  548.   GetProcedureAddress(_DsMakePasswordCredentials, ntdsapilib, 'DsMakePasswordCredentialsA');
  549.   asm
  550.     mov esp, ebp
  551.     pop ebp
  552.     jmp [_DsMakePasswordCredentials]
  553.   end;
  554. end;
  555. {$ELSE}
  556. function DsMakePasswordCredentials; external ntdsapilib name 'DsMakePasswordCredentialsA';
  557. {$ENDIF DYNAMIC_LINK}
  558. {$ENDIF}
  559. {$IFDEF DYNAMIC_LINK}
  560. var
  561.   _DsFreePasswordCredentials: Pointer;
  562. procedure DsFreePasswordCredentials;
  563. begin
  564.   GetProcedureAddress(_DsFreePasswordCredentials, ntdsapilib, 'DsFreePasswordCredentials');
  565.   asm
  566.     mov esp, ebp
  567.     pop ebp
  568.     jmp [_DsFreePasswordCredentials]
  569.   end;
  570. end;
  571. {$ELSE}
  572. procedure DsFreePasswordCredentials; external ntdsapilib name 'DsFreePasswordCredentials';
  573. {$ENDIF DYNAMIC_LINK}
  574. {$IFDEF DYNAMIC_LINK}
  575. var
  576.   _DsFreePasswordCredentialsA: Pointer;
  577. procedure DsFreePasswordCredentialsA;
  578. begin
  579.   GetProcedureAddress(_DsFreePasswordCredentialsA, ntdsapilib, 'DsFreePasswordCredentials');
  580.   asm
  581.     mov esp, ebp
  582.     pop ebp
  583.     jmp [_DsFreePasswordCredentialsA]
  584.   end;
  585. end;
  586. {$ELSE}
  587. procedure DsFreePasswordCredentialsA; external ntdsapilib name 'DsFreePasswordCredentials';
  588. {$ENDIF DYNAMIC_LINK}
  589. {$IFDEF DYNAMIC_LINK}
  590. var
  591.   _DsFreePasswordCredentialsW: Pointer;
  592. procedure DsFreePasswordCredentialsW;
  593. begin
  594.   GetProcedureAddress(_DsFreePasswordCredentialsW, ntdsapilib, 'DsFreePasswordCredentials');
  595.   asm
  596.     mov esp, ebp
  597.     pop ebp
  598.     jmp [_DsFreePasswordCredentialsW]
  599.   end;
  600. end;
  601. {$ELSE}
  602. procedure DsFreePasswordCredentialsW; external ntdsapilib name 'DsFreePasswordCredentials';
  603. {$ENDIF DYNAMIC_LINK}
  604. {$IFDEF DYNAMIC_LINK}
  605. var
  606.   _DsCrackNamesA: Pointer;
  607. function DsCrackNamesA;
  608. begin
  609.   GetProcedureAddress(_DsCrackNamesA, ntdsapilib, 'DsCrackNamesA');
  610.   asm
  611.     mov esp, ebp
  612.     pop ebp
  613.     jmp [_DsCrackNamesA]
  614.   end;
  615. end;
  616. {$ELSE}
  617. function DsCrackNamesA; external ntdsapilib name 'DsCrackNamesA';
  618. {$ENDIF DYNAMIC_LINK}
  619. {$IFDEF DYNAMIC_LINK}
  620. var
  621.   _DsCrackNamesW: Pointer;
  622. function DsCrackNamesW;
  623. begin
  624.   GetProcedureAddress(_DsCrackNamesW, ntdsapilib, 'DsCrackNamesW');
  625.   asm
  626.     mov esp, ebp
  627.     pop ebp
  628.     jmp [_DsCrackNamesW]
  629.   end;
  630. end;
  631. {$ELSE}
  632. function DsCrackNamesW; external ntdsapilib name 'DsCrackNamesW';
  633. {$ENDIF DYNAMIC_LINK}
  634. {$IFDEF UNICODE}
  635. {$IFDEF DYNAMIC_LINK}
  636. var
  637.   _DsCrackNames: Pointer;
  638. function DsCrackNames;
  639. begin
  640.   GetProcedureAddress(_DsCrackNames, ntdsapilib, 'DsCrackNamesW');
  641.   asm
  642.     mov esp, ebp
  643.     pop ebp
  644.     jmp [_DsCrackNames]
  645.   end;
  646. end;
  647. {$ELSE}
  648. function DsCrackNames; external ntdsapilib name 'DsCrackNamesW';
  649. {$ENDIF DYNAMIC_LINK}
  650. {$ELSE}
  651. {$IFDEF DYNAMIC_LINK}
  652. var
  653.   _DsCrackNames: Pointer;
  654. function DsCrackNames;
  655. begin
  656.   GetProcedureAddress(_DsCrackNames, ntdsapilib, 'DsCrackNamesA');
  657.   asm
  658.     mov esp, ebp
  659.     pop ebp
  660.     jmp [_DsCrackNames]
  661.   end;
  662. end;
  663. {$ELSE}
  664. function DsCrackNames; external ntdsapilib name 'DsCrackNamesA';
  665. {$ENDIF DYNAMIC_LINK}
  666. {$ENDIF}
  667. {$IFDEF DYNAMIC_LINK}
  668. var
  669.   _DsFreeNameResultA: Pointer;
  670. procedure DsFreeNameResultA;
  671. begin
  672.   GetProcedureAddress(_DsFreeNameResultA, ntdsapilib, 'DsFreeNameResultA');
  673.   asm
  674.     mov esp, ebp
  675.     pop ebp
  676.     jmp [_DsFreeNameResultA]
  677.   end;
  678. end;
  679. {$ELSE}
  680. procedure DsFreeNameResultA; external ntdsapilib name 'DsFreeNameResultA';
  681. {$ENDIF DYNAMIC_LINK}
  682. {$IFDEF DYNAMIC_LINK}
  683. var
  684.   _DsFreeNameResultW: Pointer;
  685. procedure DsFreeNameResultW;
  686. begin
  687.   GetProcedureAddress(_DsFreeNameResultW, ntdsapilib, 'DsFreeNameResultW');
  688.   asm
  689.     mov esp, ebp
  690.     pop ebp
  691.     jmp [_DsFreeNameResultW]
  692.   end;
  693. end;
  694. {$ELSE}
  695. procedure DsFreeNameResultW; external ntdsapilib name 'DsFreeNameResultW';
  696. {$ENDIF DYNAMIC_LINK}
  697. {$IFDEF UNICODE}
  698. {$IFDEF DYNAMIC_LINK}
  699. var
  700.   _DsFreeNameResult: Pointer;
  701. procedure DsFreeNameResult;
  702. begin
  703.   GetProcedureAddress(_DsFreeNameResult, ntdsapilib, 'DsFreeNameResultW');
  704.   asm
  705.     mov esp, ebp
  706.     pop ebp
  707.     jmp [_DsFreeNameResult]
  708.   end;
  709. end;
  710. {$ELSE}
  711. procedure DsFreeNameResult; external ntdsapilib name 'DsFreeNameResultW';
  712. {$ENDIF DYNAMIC_LINK}
  713. {$ELSE}
  714. {$IFDEF DYNAMIC_LINK}
  715. var
  716.   _DsFreeNameResult: Pointer;
  717. procedure DsFreeNameResult;
  718. begin
  719.   GetProcedureAddress(_DsFreeNameResult, ntdsapilib, 'DsFreeNameResultA');
  720.   asm
  721.     mov esp, ebp
  722.     pop ebp
  723.     jmp [_DsFreeNameResult]
  724.   end;
  725. end;
  726. {$ELSE}
  727. procedure DsFreeNameResult; external ntdsapilib name 'DsFreeNameResultA';
  728. {$ENDIF DYNAMIC_LINK}
  729. {$ENDIF}
  730. {$IFDEF DYNAMIC_LINK}
  731. var
  732.   _DsMakeSpnA: Pointer;
  733. function DsMakeSpnA;
  734. begin
  735.   GetProcedureAddress(_DsMakeSpnA, ntdsapilib, 'DsMakeSpnA');
  736.   asm
  737.     mov esp, ebp
  738.     pop ebp
  739.     jmp [_DsMakeSpnA]
  740.   end;
  741. end;
  742. {$ELSE}
  743. function DsMakeSpnA; external ntdsapilib name 'DsMakeSpnA';
  744. {$ENDIF DYNAMIC_LINK}
  745. {$IFDEF DYNAMIC_LINK}
  746. var
  747.   _DsMakeSpnW: Pointer;
  748. function DsMakeSpnW;
  749. begin
  750.   GetProcedureAddress(_DsMakeSpnW, ntdsapilib, 'DsMakeSpnW');
  751.   asm
  752.     mov esp, ebp
  753.     pop ebp
  754.     jmp [_DsMakeSpnW]
  755.   end;
  756. end;
  757. {$ELSE}
  758. function DsMakeSpnW; external ntdsapilib name 'DsMakeSpnW';
  759. {$ENDIF DYNAMIC_LINK}
  760. {$IFDEF UNICODE}
  761. {$IFDEF DYNAMIC_LINK}
  762. var
  763.   _DsMakeSpn: Pointer;
  764. function DsMakeSpn;
  765. begin
  766.   GetProcedureAddress(_DsMakeSpn, ntdsapilib, 'DsMakeSpnW');
  767.   asm
  768.     mov esp, ebp
  769.     pop ebp
  770.     jmp [_DsMakeSpn]
  771.   end;
  772. end;
  773. {$ELSE}
  774. function DsMakeSpn; external ntdsapilib name 'DsMakeSpnW';
  775. {$ENDIF DYNAMIC_LINK}
  776. {$ELSE}
  777. {$IFDEF DYNAMIC_LINK}
  778. var
  779.   _DsMakeSpn: Pointer;
  780. function DsMakeSpn;
  781. begin
  782.   GetProcedureAddress(_DsMakeSpn, ntdsapilib, 'DsMakeSpnA');
  783.   asm
  784.     mov esp, ebp
  785.     pop ebp
  786.     jmp [_DsMakeSpn]
  787.   end;
  788. end;
  789. {$ELSE}
  790. function DsMakeSpn; external ntdsapilib name 'DsMakeSpnA';
  791. {$ENDIF DYNAMIC_LINK}
  792. {$ENDIF}
  793. {$IFDEF DYNAMIC_LINK}
  794. var
  795.   _DsGetSpnA: Pointer;
  796. function DsGetSpnA;
  797. begin
  798.   GetProcedureAddress(_DsGetSpnA, ntdsapilib, 'DsGetSpnA');
  799.   asm
  800.     mov esp, ebp
  801.     pop ebp
  802.     jmp [_DsGetSpnA]
  803.   end;
  804. end;
  805. {$ELSE}
  806. function DsGetSpnA; external ntdsapilib name 'DsGetSpnA';
  807. {$ENDIF DYNAMIC_LINK}
  808. {$IFDEF DYNAMIC_LINK}
  809. var
  810.   _DsGetSpnW: Pointer;
  811. function DsGetSpnW;
  812. begin
  813.   GetProcedureAddress(_DsGetSpnW, ntdsapilib, 'DsGetSpnW');
  814.   asm
  815.     mov esp, ebp
  816.     pop ebp
  817.     jmp [_DsGetSpnW]
  818.   end;
  819. end;
  820. {$ELSE}
  821. function DsGetSpnW; external ntdsapilib name 'DsGetSpnW';
  822. {$ENDIF DYNAMIC_LINK}
  823. {$IFDEF UNICODE}
  824. {$IFDEF DYNAMIC_LINK}
  825. var
  826.   _DsGetSpn: Pointer;
  827. function DsGetSpn;
  828. begin
  829.   GetProcedureAddress(_DsGetSpn, ntdsapilib, 'DsGetSpnW');
  830.   asm
  831.     mov esp, ebp
  832.     pop ebp
  833.     jmp [_DsGetSpn]
  834.   end;
  835. end;
  836. {$ELSE}
  837. function DsGetSpn; external ntdsapilib name 'DsGetSpnW';
  838. {$ENDIF DYNAMIC_LINK}
  839. {$ELSE}
  840. {$IFDEF DYNAMIC_LINK}
  841. var
  842.   _DsGetSpn: Pointer;
  843. function DsGetSpn;
  844. begin
  845.   GetProcedureAddress(_DsGetSpn, ntdsapilib, 'DsGetSpnA');
  846.   asm
  847.     mov esp, ebp
  848.     pop ebp
  849.     jmp [_DsGetSpn]
  850.   end;
  851. end;
  852. {$ELSE}
  853. function DsGetSpn; external ntdsapilib name 'DsGetSpnA';
  854. {$ENDIF DYNAMIC_LINK}
  855. {$ENDIF}
  856. {$IFDEF DYNAMIC_LINK}
  857. var
  858.   _DsFreeSpnArrayA: Pointer;
  859. procedure DsFreeSpnArrayA;
  860. begin
  861.   GetProcedureAddress(_DsFreeSpnArrayA, ntdsapilib, 'DsFreeSpnArrayA');
  862.   asm
  863.     mov esp, ebp
  864.     pop ebp
  865.     jmp [_DsFreeSpnArrayA]
  866.   end;
  867. end;
  868. {$ELSE}
  869. procedure DsFreeSpnArrayA; external ntdsapilib name 'DsFreeSpnArrayA';
  870. {$ENDIF DYNAMIC_LINK}
  871. {$IFDEF DYNAMIC_LINK}
  872. var
  873.   _DsFreeSpnArrayW: Pointer;
  874. procedure DsFreeSpnArrayW;
  875. begin
  876.   GetProcedureAddress(_DsFreeSpnArrayW, ntdsapilib, 'DsFreeSpnArrayW');
  877.   asm
  878.     mov esp, ebp
  879.     pop ebp
  880.     jmp [_DsFreeSpnArrayW]
  881.   end;
  882. end;
  883. {$ELSE}
  884. procedure DsFreeSpnArrayW; external ntdsapilib name 'DsFreeSpnArrayW';
  885. {$ENDIF DYNAMIC_LINK}
  886. {$IFDEF UNICODE}
  887. {$IFDEF DYNAMIC_LINK}
  888. var
  889.   _DsFreeSpnArray: Pointer;
  890. procedure DsFreeSpnArray;
  891. begin
  892.   GetProcedureAddress(_DsFreeSpnArray, ntdsapilib, 'DsFreeSpnArrayW');
  893.   asm
  894.     mov esp, ebp
  895.     pop ebp
  896.     jmp [_DsFreeSpnArray]
  897.   end;
  898. end;
  899. {$ELSE}
  900. procedure DsFreeSpnArray; external ntdsapilib name 'DsFreeSpnArrayW';
  901. {$ENDIF DYNAMIC_LINK}
  902. {$ELSE}
  903. {$IFDEF DYNAMIC_LINK}
  904. var
  905.   _DsFreeSpnArray: Pointer;
  906. procedure DsFreeSpnArray;
  907. begin
  908.   GetProcedureAddress(_DsFreeSpnArray, ntdsapilib, 'DsFreeSpnArrayA');
  909.   asm
  910.     mov esp, ebp
  911.     pop ebp
  912.     jmp [_DsFreeSpnArray]
  913.   end;
  914. end;
  915. {$ELSE}
  916. procedure DsFreeSpnArray; external ntdsapilib name 'DsFreeSpnArrayA';
  917. {$ENDIF DYNAMIC_LINK}
  918. {$ENDIF}
  919. {$IFDEF DYNAMIC_LINK}
  920. var
  921.   _DsCrackSpnA: Pointer;
  922. function DsCrackSpnA;
  923. begin
  924.   GetProcedureAddress(_DsCrackSpnA, ntdsapilib, 'DsCrackSpnA');
  925.   asm
  926.     mov esp, ebp
  927.     pop ebp
  928.     jmp [_DsCrackSpnA]
  929.   end;
  930. end;
  931. {$ELSE}
  932. function DsCrackSpnA; external ntdsapilib name 'DsCrackSpnA';
  933. {$ENDIF DYNAMIC_LINK}
  934. {$IFDEF DYNAMIC_LINK}
  935. var
  936.   _DsCrackSpnW: Pointer;
  937. function DsCrackSpnW;
  938. begin
  939.   GetProcedureAddress(_DsCrackSpnW, ntdsapilib, 'DsCrackSpnW');
  940.   asm
  941.     mov esp, ebp
  942.     pop ebp
  943.     jmp [_DsCrackSpnW]
  944.   end;
  945. end;
  946. {$ELSE}
  947. function DsCrackSpnW; external ntdsapilib name 'DsCrackSpnW';
  948. {$ENDIF DYNAMIC_LINK}
  949. {$IFDEF UNICODE}
  950. {$IFDEF DYNAMIC_LINK}
  951. var
  952.   _DsCrackSpn: Pointer;
  953. function DsCrackSpn;
  954. begin
  955.   GetProcedureAddress(_DsCrackSpn, ntdsapilib, 'DsCrackSpnW');
  956.   asm
  957.     mov esp, ebp
  958.     pop ebp
  959.     jmp [_DsCrackSpn]
  960.   end;
  961. end;
  962. {$ELSE}
  963. function DsCrackSpn; external ntdsapilib name 'DsCrackSpnW';
  964. {$ENDIF DYNAMIC_LINK}
  965. {$ELSE}
  966. {$IFDEF DYNAMIC_LINK}
  967. var
  968.   _DsCrackSpn: Pointer;
  969. function DsCrackSpn;
  970. begin
  971.   GetProcedureAddress(_DsCrackSpn, ntdsapilib, 'DsCrackSpnA');
  972.   asm
  973.     mov esp, ebp
  974.     pop ebp
  975.     jmp [_DsCrackSpn]
  976.   end;
  977. end;
  978. {$ELSE}
  979. function DsCrackSpn; external ntdsapilib name 'DsCrackSpnA';
  980. {$ENDIF DYNAMIC_LINK}
  981. {$ENDIF}
  982. {$IFDEF DYNAMIC_LINK}
  983. var
  984.   _DsWriteAccountSpnA: Pointer;
  985. function DsWriteAccountSpnA;
  986. begin
  987.   GetProcedureAddress(_DsWriteAccountSpnA, ntdsapilib, 'DsWriteAccountSpnA');
  988.   asm
  989.     mov esp, ebp
  990.     pop ebp
  991.     jmp [_DsWriteAccountSpnA]
  992.   end;
  993. end;
  994. {$ELSE}
  995. function DsWriteAccountSpnA; external ntdsapilib name 'DsWriteAccountSpnA';
  996. {$ENDIF DYNAMIC_LINK}
  997. {$IFDEF DYNAMIC_LINK}
  998. var
  999.   _DsWriteAccountSpnW: Pointer;
  1000. function DsWriteAccountSpnW;
  1001. begin
  1002.   GetProcedureAddress(_DsWriteAccountSpnW, ntdsapilib, 'DsWriteAccountSpnW');
  1003.   asm
  1004.     mov esp, ebp
  1005.     pop ebp
  1006.     jmp [_DsWriteAccountSpnW]
  1007.   end;
  1008. end;
  1009. {$ELSE}
  1010. function DsWriteAccountSpnW; external ntdsapilib name 'DsWriteAccountSpnW';
  1011. {$ENDIF DYNAMIC_LINK}
  1012. {$IFDEF UNICODE}
  1013. {$IFDEF DYNAMIC_LINK}
  1014. var
  1015.   _DsWriteAccountSpn: Pointer;
  1016. function DsWriteAccountSpn;
  1017. begin
  1018.   GetProcedureAddress(_DsWriteAccountSpn, ntdsapilib, 'DsWriteAccountSpnW');
  1019.   asm
  1020.     mov esp, ebp
  1021.     pop ebp
  1022.     jmp [_DsWriteAccountSpn]
  1023.   end;
  1024. end;
  1025. {$ELSE}
  1026. function DsWriteAccountSpn; external ntdsapilib name 'DsWriteAccountSpnW';
  1027. {$ENDIF DYNAMIC_LINK}
  1028. {$ELSE}
  1029. {$IFDEF DYNAMIC_LINK}
  1030. var
  1031.   _DsWriteAccountSpn: Pointer;
  1032. function DsWriteAccountSpn;
  1033. begin
  1034.   GetProcedureAddress(_DsWriteAccountSpn, ntdsapilib, 'DsWriteAccountSpnA');
  1035.   asm
  1036.     mov esp, ebp
  1037.     pop ebp
  1038.     jmp [_DsWriteAccountSpn]
  1039.   end;
  1040. end;
  1041. {$ELSE}
  1042. function DsWriteAccountSpn; external ntdsapilib name 'DsWriteAccountSpnA';
  1043. {$ENDIF DYNAMIC_LINK}
  1044. {$ENDIF}
  1045. {$IFDEF DYNAMIC_LINK}
  1046. var
  1047.   _DsClientMakeSpnForTargetServerA: Pointer;
  1048. function DsClientMakeSpnForTargetServerA;
  1049. begin
  1050.   GetProcedureAddress(_DsClientMakeSpnForTargetServerA, ntdsapilib, 'DsClientMakeSpnForTargetServerA');
  1051.   asm
  1052.     mov esp, ebp
  1053.     pop ebp
  1054.     jmp [_DsClientMakeSpnForTargetServerA]
  1055.   end;
  1056. end;
  1057. {$ELSE}
  1058. function DsClientMakeSpnForTargetServerA; external ntdsapilib name 'DsClientMakeSpnForTargetServerA';
  1059. {$ENDIF DYNAMIC_LINK}
  1060. {$IFDEF DYNAMIC_LINK}
  1061. var
  1062.   _DsClientMakeSpnForTargetServerW: Pointer;
  1063. function DsClientMakeSpnForTargetServerW;
  1064. begin
  1065.   GetProcedureAddress(_DsClientMakeSpnForTargetServerW, ntdsapilib, 'DsClientMakeSpnForTargetServerW');
  1066.   asm
  1067.     mov esp, ebp
  1068.     pop ebp
  1069.     jmp [_DsClientMakeSpnForTargetServerW]
  1070.   end;
  1071. end;
  1072. {$ELSE}
  1073. function DsClientMakeSpnForTargetServerW; external ntdsapilib name 'DsClientMakeSpnForTargetServerW';
  1074. {$ENDIF DYNAMIC_LINK}
  1075. {$IFDEF UNICODE}
  1076. {$IFDEF DYNAMIC_LINK}
  1077. var
  1078.   _DsClientMakeSpnForTargetServer: Pointer;
  1079. function DsClientMakeSpnForTargetServer;
  1080. begin
  1081.   GetProcedureAddress(_DsClientMakeSpnForTargetServer, ntdsapilib, 'DsClientMakeSpnForTargetServerW');
  1082.   asm
  1083.     mov esp, ebp
  1084.     pop ebp
  1085.     jmp [_DsClientMakeSpnForTargetServer]
  1086.   end;
  1087. end;
  1088. {$ELSE}
  1089. function DsClientMakeSpnForTargetServer; external ntdsapilib name 'DsClientMakeSpnForTargetServerW';
  1090. {$ENDIF DYNAMIC_LINK}
  1091. {$ELSE}
  1092. {$IFDEF DYNAMIC_LINK}
  1093. var
  1094.   _DsClientMakeSpnForTargetServer: Pointer;
  1095. function DsClientMakeSpnForTargetServer;
  1096. begin
  1097.   GetProcedureAddress(_DsClientMakeSpnForTargetServer, ntdsapilib, 'DsClientMakeSpnForTargetServerA');
  1098.   asm
  1099.     mov esp, ebp
  1100.     pop ebp
  1101.     jmp [_DsClientMakeSpnForTargetServer]
  1102.   end;
  1103. end;
  1104. {$ELSE}
  1105. function DsClientMakeSpnForTargetServer; external ntdsapilib name 'DsClientMakeSpnForTargetServerA';
  1106. {$ENDIF DYNAMIC_LINK}
  1107. {$ENDIF}
  1108. {$IFDEF DYNAMIC_LINK}
  1109. var
  1110.   _DsServerRegisterSpnA: Pointer;
  1111. function DsServerRegisterSpnA;
  1112. begin
  1113.   GetProcedureAddress(_DsServerRegisterSpnA, ntdsapilib, 'DsServerRegisterSpnA');
  1114.   asm
  1115.     mov esp, ebp
  1116.     pop ebp
  1117.     jmp [_DsServerRegisterSpnA]
  1118.   end;
  1119. end;
  1120. {$ELSE}
  1121. function DsServerRegisterSpnA; external ntdsapilib name 'DsServerRegisterSpnA';
  1122. {$ENDIF DYNAMIC_LINK}
  1123. {$IFDEF DYNAMIC_LINK}
  1124. var
  1125.   _DsServerRegisterSpnW: Pointer;
  1126. function DsServerRegisterSpnW;
  1127. begin
  1128.   GetProcedureAddress(_DsServerRegisterSpnW, ntdsapilib, 'DsServerRegisterSpnW');
  1129.   asm
  1130.     mov esp, ebp
  1131.     pop ebp
  1132.     jmp [_DsServerRegisterSpnW]
  1133.   end;
  1134. end;
  1135. {$ELSE}
  1136. function DsServerRegisterSpnW; external ntdsapilib name 'DsServerRegisterSpnW';
  1137. {$ENDIF DYNAMIC_LINK}
  1138. {$IFDEF UNICODE}
  1139. {$IFDEF DYNAMIC_LINK}
  1140. var
  1141.   _DsServerRegisterSpn: Pointer;
  1142. function DsServerRegisterSpn;
  1143. begin
  1144.   GetProcedureAddress(_DsServerRegisterSpn, ntdsapilib, 'DsServerRegisterSpnW');
  1145.   asm
  1146.     mov esp, ebp
  1147.     pop ebp
  1148.     jmp [_DsServerRegisterSpn]
  1149.   end;
  1150. end;
  1151. {$ELSE}
  1152. function DsServerRegisterSpn; external ntdsapilib name 'DsServerRegisterSpnW';
  1153. {$ENDIF DYNAMIC_LINK}
  1154. {$ELSE}
  1155. {$IFDEF DYNAMIC_LINK}
  1156. var
  1157.   _DsServerRegisterSpn: Pointer;
  1158. function DsServerRegisterSpn;
  1159. begin
  1160.   GetProcedureAddress(_DsServerRegisterSpn, ntdsapilib, 'DsServerRegisterSpnA');
  1161.   asm
  1162.     mov esp, ebp
  1163.     pop ebp
  1164.     jmp [_DsServerRegisterSpn]
  1165.   end;
  1166. end;
  1167. {$ELSE}
  1168. function DsServerRegisterSpn; external ntdsapilib name 'DsServerRegisterSpnA';
  1169. {$ENDIF DYNAMIC_LINK}
  1170. {$ENDIF}
  1171. {$IFDEF DYNAMIC_LINK}
  1172. var
  1173.   _DsReplicaSyncA: Pointer;
  1174. function DsReplicaSyncA;
  1175. begin
  1176.   GetProcedureAddress(_DsReplicaSyncA, ntdsapilib, 'DsReplicaSyncA');
  1177.   asm
  1178.     mov esp, ebp
  1179.     pop ebp
  1180.     jmp [_DsReplicaSyncA]
  1181.   end;
  1182. end;
  1183. {$ELSE}
  1184. function DsReplicaSyncA; external ntdsapilib name 'DsReplicaSyncA';
  1185. {$ENDIF DYNAMIC_LINK}
  1186. {$IFDEF DYNAMIC_LINK}
  1187. var
  1188.   _DsReplicaSyncW: Pointer;
  1189. function DsReplicaSyncW;
  1190. begin
  1191.   GetProcedureAddress(_DsReplicaSyncW, ntdsapilib, 'DsReplicaSyncW');
  1192.   asm
  1193.     mov esp, ebp
  1194.     pop ebp
  1195.     jmp [_DsReplicaSyncW]
  1196.   end;
  1197. end;
  1198. {$ELSE}
  1199. function DsReplicaSyncW; external ntdsapilib name 'DsReplicaSyncW';
  1200. {$ENDIF DYNAMIC_LINK}
  1201. {$IFDEF UNICODE}
  1202. {$IFDEF DYNAMIC_LINK}
  1203. var
  1204.   _DsReplicaSync: Pointer;
  1205. function DsReplicaSync;
  1206. begin
  1207.   GetProcedureAddress(_DsReplicaSync, ntdsapilib, 'DsReplicaSyncW');
  1208.   asm
  1209.     mov esp, ebp
  1210.     pop ebp
  1211.     jmp [_DsReplicaSync]
  1212.   end;
  1213. end;
  1214. {$ELSE}
  1215. function DsReplicaSync; external ntdsapilib name 'DsReplicaSyncW';
  1216. {$ENDIF DYNAMIC_LINK}
  1217. {$ELSE}
  1218. {$IFDEF DYNAMIC_LINK}
  1219. var
  1220.   _DsReplicaSync: Pointer;
  1221. function DsReplicaSync;
  1222. begin
  1223.   GetProcedureAddress(_DsReplicaSync, ntdsapilib, 'DsReplicaSyncA');
  1224.   asm
  1225.     mov esp, ebp
  1226.     pop ebp
  1227.     jmp [_DsReplicaSync]
  1228.   end;
  1229. end;
  1230. {$ELSE}
  1231. function DsReplicaSync; external ntdsapilib name 'DsReplicaSyncA';
  1232. {$ENDIF DYNAMIC_LINK}
  1233. {$ENDIF}
  1234. {$IFDEF DYNAMIC_LINK}
  1235. var
  1236.   _DsReplicaAddA: Pointer;
  1237. function DsReplicaAddA;
  1238. begin
  1239.   GetProcedureAddress(_DsReplicaAddA, ntdsapilib, 'DsReplicaAddA');
  1240.   asm
  1241.     mov esp, ebp
  1242.     pop ebp
  1243.     jmp [_DsReplicaAddA]
  1244.   end;
  1245. end;
  1246. {$ELSE}
  1247. function DsReplicaAddA; external ntdsapilib name 'DsReplicaAddA';
  1248. {$ENDIF DYNAMIC_LINK}
  1249. {$IFDEF DYNAMIC_LINK}
  1250. var
  1251.   _DsReplicaAddW: Pointer;
  1252. function DsReplicaAddW;
  1253. begin
  1254.   GetProcedureAddress(_DsReplicaAddW, ntdsapilib, 'DsReplicaAddW');
  1255.   asm
  1256.     mov esp, ebp
  1257.     pop ebp
  1258.     jmp [_DsReplicaAddW]
  1259.   end;
  1260. end;
  1261. {$ELSE}
  1262. function DsReplicaAddW; external ntdsapilib name 'DsReplicaAddW';
  1263. {$ENDIF DYNAMIC_LINK}
  1264. {$IFDEF UNICODE}
  1265. {$IFDEF DYNAMIC_LINK}
  1266. var
  1267.   _DsReplicaAdd: Pointer;
  1268. function DsReplicaAdd;
  1269. begin
  1270.   GetProcedureAddress(_DsReplicaAdd, ntdsapilib, 'DsReplicaAddW');
  1271.   asm
  1272.     mov esp, ebp
  1273.     pop ebp
  1274.     jmp [_DsReplicaAdd]
  1275.   end;
  1276. end;
  1277. {$ELSE}
  1278. function DsReplicaAdd; external ntdsapilib name 'DsReplicaAddW';
  1279. {$ENDIF DYNAMIC_LINK}
  1280. {$ELSE}
  1281. {$IFDEF DYNAMIC_LINK}
  1282. var
  1283.   _DsReplicaAdd: Pointer;
  1284. function DsReplicaAdd;
  1285. begin
  1286.   GetProcedureAddress(_DsReplicaAdd, ntdsapilib, 'DsReplicaAddA');
  1287.   asm
  1288.     mov esp, ebp
  1289.     pop ebp
  1290.     jmp [_DsReplicaAdd]
  1291.   end;
  1292. end;
  1293. {$ELSE}
  1294. function DsReplicaAdd; external ntdsapilib name 'DsReplicaAddA';
  1295. {$ENDIF DYNAMIC_LINK}
  1296. {$ENDIF}
  1297. {$IFDEF DYNAMIC_LINK}
  1298. var
  1299.   _DsReplicaDelA: Pointer;
  1300. function DsReplicaDelA;
  1301. begin
  1302.   GetProcedureAddress(_DsReplicaDelA, ntdsapilib, 'DsReplicaDelA');
  1303.   asm
  1304.     mov esp, ebp
  1305.     pop ebp
  1306.     jmp [_DsReplicaDelA]
  1307.   end;
  1308. end;
  1309. {$ELSE}
  1310. function DsReplicaDelA; external ntdsapilib name 'DsReplicaDelA';
  1311. {$ENDIF DYNAMIC_LINK}
  1312. {$IFDEF DYNAMIC_LINK}
  1313. var
  1314.   _DsReplicaDelW: Pointer;
  1315. function DsReplicaDelW;
  1316. begin
  1317.   GetProcedureAddress(_DsReplicaDelW, ntdsapilib, 'DsReplicaDelW');
  1318.   asm
  1319.     mov esp, ebp
  1320.     pop ebp
  1321.     jmp [_DsReplicaDelW]
  1322.   end;
  1323. end;
  1324. {$ELSE}
  1325. function DsReplicaDelW; external ntdsapilib name 'DsReplicaDelW';
  1326. {$ENDIF DYNAMIC_LINK}
  1327. {$IFDEF UNICODE}
  1328. {$IFDEF DYNAMIC_LINK}
  1329. var
  1330.   _DsReplicaDel: Pointer;
  1331. function DsReplicaDel;
  1332. begin
  1333.   GetProcedureAddress(_DsReplicaDel, ntdsapilib, 'DsReplicaDelW');
  1334.   asm
  1335.     mov esp, ebp
  1336.     pop ebp
  1337.     jmp [_DsReplicaDel]
  1338.   end;
  1339. end;
  1340. {$ELSE}
  1341. function DsReplicaDel; external ntdsapilib name 'DsReplicaDelW';
  1342. {$ENDIF DYNAMIC_LINK}
  1343. {$ELSE}
  1344. {$IFDEF DYNAMIC_LINK}
  1345. var
  1346.   _DsReplicaDel: Pointer;
  1347. function DsReplicaDel;
  1348. begin
  1349.   GetProcedureAddress(_DsReplicaDel, ntdsapilib, 'DsReplicaDelA');
  1350.   asm
  1351.     mov esp, ebp
  1352.     pop ebp
  1353.     jmp [_DsReplicaDel]
  1354.   end;
  1355. end;
  1356. {$ELSE}
  1357. function DsReplicaDel; external ntdsapilib name 'DsReplicaDelA';
  1358. {$ENDIF DYNAMIC_LINK}
  1359. {$ENDIF}
  1360. {$IFDEF DYNAMIC_LINK}
  1361. var
  1362.   _DsReplicaModifyA: Pointer;
  1363. function DsReplicaModifyA;
  1364. begin
  1365.   GetProcedureAddress(_DsReplicaModifyA, ntdsapilib, 'DsReplicaModifyA');
  1366.   asm
  1367.     mov esp, ebp
  1368.     pop ebp
  1369.     jmp [_DsReplicaModifyA]
  1370.   end;
  1371. end;
  1372. {$ELSE}
  1373. function DsReplicaModifyA; external ntdsapilib name 'DsReplicaModifyA';
  1374. {$ENDIF DYNAMIC_LINK}
  1375. {$IFDEF DYNAMIC_LINK}
  1376. var
  1377.   _DsReplicaModifyW: Pointer;
  1378. function DsReplicaModifyW;
  1379. begin
  1380.   GetProcedureAddress(_DsReplicaModifyW, ntdsapilib, 'DsReplicaModifyW');
  1381.   asm
  1382.     mov esp, ebp
  1383.     pop ebp
  1384.     jmp [_DsReplicaModifyW]
  1385.   end;
  1386. end;
  1387. {$ELSE}
  1388. function DsReplicaModifyW; external ntdsapilib name 'DsReplicaModifyW';
  1389. {$ENDIF DYNAMIC_LINK}
  1390. {$IFDEF UNICODE}
  1391. {$IFDEF DYNAMIC_LINK}
  1392. var
  1393.   _DsReplicaModify: Pointer;
  1394. function DsReplicaModify;
  1395. begin
  1396.   GetProcedureAddress(_DsReplicaModify, ntdsapilib, 'DsReplicaModifyW');
  1397.   asm
  1398.     mov esp, ebp
  1399.     pop ebp
  1400.     jmp [_DsReplicaModify]
  1401.   end;
  1402. end;
  1403. {$ELSE}
  1404. function DsReplicaModify; external ntdsapilib name 'DsReplicaModifyW';
  1405. {$ENDIF DYNAMIC_LINK}
  1406. {$ELSE}
  1407. {$IFDEF DYNAMIC_LINK}
  1408. var
  1409.   _DsReplicaModify: Pointer;
  1410. function DsReplicaModify;
  1411. begin
  1412.   GetProcedureAddress(_DsReplicaModify, ntdsapilib, 'DsReplicaModifyA');
  1413.   asm
  1414.     mov esp, ebp
  1415.     pop ebp
  1416.     jmp [_DsReplicaModify]
  1417.   end;
  1418. end;
  1419. {$ELSE}
  1420. function DsReplicaModify; external ntdsapilib name 'DsReplicaModifyA';
  1421. {$ENDIF DYNAMIC_LINK}
  1422. {$ENDIF}
  1423. {$IFDEF DYNAMIC_LINK}
  1424. var
  1425.   _DsReplicaUpdateRefsA: Pointer;
  1426. function DsReplicaUpdateRefsA;
  1427. begin
  1428.   GetProcedureAddress(_DsReplicaUpdateRefsA, ntdsapilib, 'DsReplicaUpdateRefsA');
  1429.   asm
  1430.     mov esp, ebp
  1431.     pop ebp
  1432.     jmp [_DsReplicaUpdateRefsA]
  1433.   end;
  1434. end;
  1435. {$ELSE}
  1436. function DsReplicaUpdateRefsA; external ntdsapilib name 'DsReplicaUpdateRefsA';
  1437. {$ENDIF DYNAMIC_LINK}
  1438. {$IFDEF DYNAMIC_LINK}
  1439. var
  1440.   _DsReplicaUpdateRefsW: Pointer;
  1441. function DsReplicaUpdateRefsW;
  1442. begin
  1443.   GetProcedureAddress(_DsReplicaUpdateRefsW, ntdsapilib, 'DsReplicaUpdateRefsW');
  1444.   asm
  1445.     mov esp, ebp
  1446.     pop ebp
  1447.     jmp [_DsReplicaUpdateRefsW]
  1448.   end;
  1449. end;
  1450. {$ELSE}
  1451. function DsReplicaUpdateRefsW; external ntdsapilib name 'DsReplicaUpdateRefsW';
  1452. {$ENDIF DYNAMIC_LINK}
  1453. {$IFDEF UNICODE}
  1454. {$IFDEF DYNAMIC_LINK}
  1455. var
  1456.   _DsReplicaUpdateRefs: Pointer;
  1457. function DsReplicaUpdateRefs;
  1458. begin
  1459.   GetProcedureAddress(_DsReplicaUpdateRefs, ntdsapilib, 'DsReplicaUpdateRefsW');
  1460.   asm
  1461.     mov esp, ebp
  1462.     pop ebp
  1463.     jmp [_DsReplicaUpdateRefs]
  1464.   end;
  1465. end;
  1466. {$ELSE}
  1467. function DsReplicaUpdateRefs; external ntdsapilib name 'DsReplicaUpdateRefsW';
  1468. {$ENDIF DYNAMIC_LINK}
  1469. {$ELSE}
  1470. {$IFDEF DYNAMIC_LINK}
  1471. var
  1472.   _DsReplicaUpdateRefs: Pointer;
  1473. function DsReplicaUpdateRefs;
  1474. begin
  1475.   GetProcedureAddress(_DsReplicaUpdateRefs, ntdsapilib, 'DsReplicaUpdateRefsA');
  1476.   asm
  1477.     mov esp, ebp
  1478.     pop ebp
  1479.     jmp [_DsReplicaUpdateRefs]
  1480.   end;
  1481. end;
  1482. {$ELSE}
  1483. function DsReplicaUpdateRefs; external ntdsapilib name 'DsReplicaUpdateRefsA';
  1484. {$ENDIF DYNAMIC_LINK}
  1485. {$ENDIF}
  1486. {$IFDEF DYNAMIC_LINK}
  1487. var
  1488.   _DsReplicaSyncAllA: Pointer;
  1489. function DsReplicaSyncAllA;
  1490. begin
  1491.   GetProcedureAddress(_DsReplicaSyncAllA, ntdsapilib, 'DsReplicaSyncAllA');
  1492.   asm
  1493.     mov esp, ebp
  1494.     pop ebp
  1495.     jmp [_DsReplicaSyncAllA]
  1496.   end;
  1497. end;
  1498. {$ELSE}
  1499. function DsReplicaSyncAllA; external ntdsapilib name 'DsReplicaSyncAllA';
  1500. {$ENDIF DYNAMIC_LINK}
  1501. {$IFDEF DYNAMIC_LINK}
  1502. var
  1503.   _DsReplicaSyncAllW: Pointer;
  1504. function DsReplicaSyncAllW;
  1505. begin
  1506.   GetProcedureAddress(_DsReplicaSyncAllW, ntdsapilib, 'DsReplicaSyncAllW');
  1507.   asm
  1508.     mov esp, ebp
  1509.     pop ebp
  1510.     jmp [_DsReplicaSyncAllW]
  1511.   end;
  1512. end;
  1513. {$ELSE}
  1514. function DsReplicaSyncAllW; external ntdsapilib name 'DsReplicaSyncAllW';
  1515. {$ENDIF DYNAMIC_LINK}
  1516. {$IFDEF UNICODE}
  1517. {$IFDEF DYNAMIC_LINK}
  1518. var
  1519.   _DsReplicaSyncAll: Pointer;
  1520. function DsReplicaSyncAll;
  1521. begin
  1522.   GetProcedureAddress(_DsReplicaSyncAll, ntdsapilib, 'DsReplicaSyncAllW');
  1523.   asm
  1524.     mov esp, ebp
  1525.     pop ebp
  1526.     jmp [_DsReplicaSyncAll]
  1527.   end;
  1528. end;
  1529. {$ELSE}
  1530. function DsReplicaSyncAll; external ntdsapilib name 'DsReplicaSyncAllW';
  1531. {$ENDIF DYNAMIC_LINK}
  1532. {$ELSE}
  1533. {$IFDEF DYNAMIC_LINK}
  1534. var
  1535.   _DsReplicaSyncAll: Pointer;
  1536. function DsReplicaSyncAll;
  1537. begin
  1538.   GetProcedureAddress(_DsReplicaSyncAll, ntdsapilib, 'DsReplicaSyncAllA');
  1539.   asm
  1540.     mov esp, ebp
  1541.     pop ebp
  1542.     jmp [_DsReplicaSyncAll]
  1543.   end;
  1544. end;
  1545. {$ELSE}
  1546. function DsReplicaSyncAll; external ntdsapilib name 'DsReplicaSyncAllA';
  1547. {$ENDIF DYNAMIC_LINK}
  1548. {$ENDIF}
  1549. {$IFDEF DYNAMIC_LINK}
  1550. var
  1551.   _DsRemoveDsServerA: Pointer;
  1552. function DsRemoveDsServerA;
  1553. begin
  1554.   GetProcedureAddress(_DsRemoveDsServerA, ntdsapilib, 'DsRemoveDsServerA');
  1555.   asm
  1556.     mov esp, ebp
  1557.     pop ebp
  1558.     jmp [_DsRemoveDsServerA]
  1559.   end;
  1560. end;
  1561. {$ELSE}
  1562. function DsRemoveDsServerA; external ntdsapilib name 'DsRemoveDsServerA';
  1563. {$ENDIF DYNAMIC_LINK}
  1564. {$IFDEF DYNAMIC_LINK}
  1565. var
  1566.   _DsRemoveDsServerW: Pointer;
  1567. function DsRemoveDsServerW;
  1568. begin
  1569.   GetProcedureAddress(_DsRemoveDsServerW, ntdsapilib, 'DsRemoveDsServerW');
  1570.   asm
  1571.     mov esp, ebp
  1572.     pop ebp
  1573.     jmp [_DsRemoveDsServerW]
  1574.   end;
  1575. end;
  1576. {$ELSE}
  1577. function DsRemoveDsServerW; external ntdsapilib name 'DsRemoveDsServerW';
  1578. {$ENDIF DYNAMIC_LINK}
  1579. {$IFDEF UNICODE}
  1580. {$IFDEF DYNAMIC_LINK}
  1581. var
  1582.   _DsRemoveDsServer: Pointer;
  1583. function DsRemoveDsServer;
  1584. begin
  1585.   GetProcedureAddress(_DsRemoveDsServer, ntdsapilib, 'DsRemoveDsServerW');
  1586.   asm
  1587.     mov esp, ebp
  1588.     pop ebp
  1589.     jmp [_DsRemoveDsServer]
  1590.   end;
  1591. end;
  1592. {$ELSE}
  1593. function DsRemoveDsServer; external ntdsapilib name 'DsRemoveDsServerW';
  1594. {$ENDIF DYNAMIC_LINK}
  1595. {$ELSE}
  1596. {$IFDEF DYNAMIC_LINK}
  1597. var
  1598.   _DsRemoveDsServer: Pointer;
  1599. function DsRemoveDsServer;
  1600. begin
  1601.   GetProcedureAddress(_DsRemoveDsServer, ntdsapilib, 'DsRemoveDsServerA');
  1602.   asm
  1603.     mov esp, ebp
  1604.     pop ebp
  1605.     jmp [_DsRemoveDsServer]
  1606.   end;
  1607. end;
  1608. {$ELSE}
  1609. function DsRemoveDsServer; external ntdsapilib name 'DsRemoveDsServerA';
  1610. {$ENDIF DYNAMIC_LINK}
  1611. {$ENDIF}
  1612. {$IFDEF DYNAMIC_LINK}
  1613. var
  1614.   _DsRemoveDsDomainA: Pointer;
  1615. function DsRemoveDsDomainA;
  1616. begin
  1617.   GetProcedureAddress(_DsRemoveDsDomainA, ntdsapilib, 'DsRemoveDsDomainA');
  1618.   asm
  1619.     mov esp, ebp
  1620.     pop ebp
  1621.     jmp [_DsRemoveDsDomainA]
  1622.   end;
  1623. end;
  1624. {$ELSE}
  1625. function DsRemoveDsDomainA; external ntdsapilib name 'DsRemoveDsDomainA';
  1626. {$ENDIF DYNAMIC_LINK}
  1627. {$IFDEF DYNAMIC_LINK}
  1628. var
  1629.   _DsRemoveDsDomainW: Pointer;
  1630. function DsRemoveDsDomainW;
  1631. begin
  1632.   GetProcedureAddress(_DsRemoveDsDomainW, ntdsapilib, 'DsRemoveDsDomainW');
  1633.   asm
  1634.     mov esp, ebp
  1635.     pop ebp
  1636.     jmp [_DsRemoveDsDomainW]
  1637.   end;
  1638. end;
  1639. {$ELSE}
  1640. function DsRemoveDsDomainW; external ntdsapilib name 'DsRemoveDsDomainW';
  1641. {$ENDIF DYNAMIC_LINK}
  1642. {$IFDEF UNICODE}
  1643. {$IFDEF DYNAMIC_LINK}
  1644. var
  1645.   _DsRemoveDsDomain: Pointer;
  1646. function DsRemoveDsDomain;
  1647. begin
  1648.   GetProcedureAddress(_DsRemoveDsDomain, ntdsapilib, 'DsRemoveDsDomainW');
  1649.   asm
  1650.     mov esp, ebp
  1651.     pop ebp
  1652.     jmp [_DsRemoveDsDomain]
  1653.   end;
  1654. end;
  1655. {$ELSE}
  1656. function DsRemoveDsDomain; external ntdsapilib name 'DsRemoveDsDomainW';
  1657. {$ENDIF DYNAMIC_LINK}
  1658. {$ELSE}
  1659. {$IFDEF DYNAMIC_LINK}
  1660. var
  1661.   _DsRemoveDsDomain: Pointer;
  1662. function DsRemoveDsDomain;
  1663. begin
  1664.   GetProcedureAddress(_DsRemoveDsDomain, ntdsapilib, 'DsRemoveDsDomainA');
  1665.   asm
  1666.     mov esp, ebp
  1667.     pop ebp
  1668.     jmp [_DsRemoveDsDomain]
  1669.   end;
  1670. end;
  1671. {$ELSE}
  1672. function DsRemoveDsDomain; external ntdsapilib name 'DsRemoveDsDomainA';
  1673. {$ENDIF DYNAMIC_LINK}
  1674. {$ENDIF}
  1675. {$IFDEF DYNAMIC_LINK}
  1676. var
  1677.   _DsListSitesA: Pointer;
  1678. function DsListSitesA;
  1679. begin
  1680.   GetProcedureAddress(_DsListSitesA, ntdsapilib, 'DsListSitesA');
  1681.   asm
  1682.     mov esp, ebp
  1683.     pop ebp
  1684.     jmp [_DsListSitesA]
  1685.   end;
  1686. end;
  1687. {$ELSE}
  1688. function DsListSitesA; external ntdsapilib name 'DsListSitesA';
  1689. {$ENDIF DYNAMIC_LINK}
  1690. {$IFDEF DYNAMIC_LINK}
  1691. var
  1692.   _DsListSitesW: Pointer;
  1693. function DsListSitesW;
  1694. begin
  1695.   GetProcedureAddress(_DsListSitesW, ntdsapilib, 'DsListSitesW');
  1696.   asm
  1697.     mov esp, ebp
  1698.     pop ebp
  1699.     jmp [_DsListSitesW]
  1700.   end;
  1701. end;
  1702. {$ELSE}
  1703. function DsListSitesW; external ntdsapilib name 'DsListSitesW';
  1704. {$ENDIF DYNAMIC_LINK}
  1705. {$IFDEF UNICODE}
  1706. {$IFDEF DYNAMIC_LINK}
  1707. var
  1708.   _DsListSites: Pointer;
  1709. function DsListSites;
  1710. begin
  1711.   GetProcedureAddress(_DsListSites, ntdsapilib, 'DsListSitesW');
  1712.   asm
  1713.     mov esp, ebp
  1714.     pop ebp
  1715.     jmp [_DsListSites]
  1716.   end;
  1717. end;
  1718. {$ELSE}
  1719. function DsListSites; external ntdsapilib name 'DsListSitesW';
  1720. {$ENDIF DYNAMIC_LINK}
  1721. {$ELSE}
  1722. {$IFDEF DYNAMIC_LINK}
  1723. var
  1724.   _DsListSites: Pointer;
  1725. function DsListSites;
  1726. begin
  1727.   GetProcedureAddress(_DsListSites, ntdsapilib, 'DsListSitesA');
  1728.   asm
  1729.     mov esp, ebp
  1730.     pop ebp
  1731.     jmp [_DsListSites]
  1732.   end;
  1733. end;
  1734. {$ELSE}
  1735. function DsListSites; external ntdsapilib name 'DsListSitesA';
  1736. {$ENDIF DYNAMIC_LINK}
  1737. {$ENDIF}
  1738. {$IFDEF DYNAMIC_LINK}
  1739. var
  1740.   _DsListServersInSiteA: Pointer;
  1741. function DsListServersInSiteA;
  1742. begin
  1743.   GetProcedureAddress(_DsListServersInSiteA, ntdsapilib, 'DsListServersInSiteA');
  1744.   asm
  1745.     mov esp, ebp
  1746.     pop ebp
  1747.     jmp [_DsListServersInSiteA]
  1748.   end;
  1749. end;
  1750. {$ELSE}
  1751. function DsListServersInSiteA; external ntdsapilib name 'DsListServersInSiteA';
  1752. {$ENDIF DYNAMIC_LINK}
  1753. {$IFDEF DYNAMIC_LINK}
  1754. var
  1755.   _DsListServersInSiteW: Pointer;
  1756. function DsListServersInSiteW;
  1757. begin
  1758.   GetProcedureAddress(_DsListServersInSiteW, ntdsapilib, 'DsListServersInSiteW');
  1759.   asm
  1760.     mov esp, ebp
  1761.     pop ebp
  1762.     jmp [_DsListServersInSiteW]
  1763.   end;
  1764. end;
  1765. {$ELSE}
  1766. function DsListServersInSiteW; external ntdsapilib name 'DsListServersInSiteW';
  1767. {$ENDIF DYNAMIC_LINK}
  1768. {$IFDEF UNICODE}
  1769. {$IFDEF DYNAMIC_LINK}
  1770. var
  1771.   _DsListServersInSite: Pointer;
  1772. function DsListServersInSite;
  1773. begin
  1774.   GetProcedureAddress(_DsListServersInSite, ntdsapilib, 'DsListServersInSiteW');
  1775.   asm
  1776.     mov esp, ebp
  1777.     pop ebp
  1778.     jmp [_DsListServersInSite]
  1779.   end;
  1780. end;
  1781. {$ELSE}
  1782. function DsListServersInSite; external ntdsapilib name 'DsListServersInSiteW';
  1783. {$ENDIF DYNAMIC_LINK}
  1784. {$ELSE}
  1785. {$IFDEF DYNAMIC_LINK}
  1786. var
  1787.   _DsListServersInSite: Pointer;
  1788. function DsListServersInSite;
  1789. begin
  1790.   GetProcedureAddress(_DsListServersInSite, ntdsapilib, 'DsListServersInSiteA');
  1791.   asm
  1792.     mov esp, ebp
  1793.     pop ebp
  1794.     jmp [_DsListServersInSite]
  1795.   end;
  1796. end;
  1797. {$ELSE}
  1798. function DsListServersInSite; external ntdsapilib name 'DsListServersInSiteA';
  1799. {$ENDIF DYNAMIC_LINK}
  1800. {$ENDIF}
  1801. {$IFDEF DYNAMIC_LINK}
  1802. var
  1803.   _DsListDomainsInSiteA: Pointer;
  1804. function DsListDomainsInSiteA;
  1805. begin
  1806.   GetProcedureAddress(_DsListDomainsInSiteA, ntdsapilib, 'DsListDomainsInSiteA');
  1807.   asm
  1808.     mov esp, ebp
  1809.     pop ebp
  1810.     jmp [_DsListDomainsInSiteA]
  1811.   end;
  1812. end;
  1813. {$ELSE}
  1814. function DsListDomainsInSiteA; external ntdsapilib name 'DsListDomainsInSiteA';
  1815. {$ENDIF DYNAMIC_LINK}
  1816. {$IFDEF DYNAMIC_LINK}
  1817. var
  1818.   _DsListDomainsInSiteW: Pointer;
  1819. function DsListDomainsInSiteW;
  1820. begin
  1821.   GetProcedureAddress(_DsListDomainsInSiteW, ntdsapilib, 'DsListDomainsInSiteW');
  1822.   asm
  1823.     mov esp, ebp
  1824.     pop ebp
  1825.     jmp [_DsListDomainsInSiteW]
  1826.   end;
  1827. end;
  1828. {$ELSE}
  1829. function DsListDomainsInSiteW; external ntdsapilib name 'DsListDomainsInSiteW';
  1830. {$ENDIF DYNAMIC_LINK}
  1831. {$IFDEF UNICODE}
  1832. {$IFDEF DYNAMIC_LINK}
  1833. var
  1834.   _DsListDomainsInSite: Pointer;
  1835. function DsListDomainsInSite;
  1836. begin
  1837.   GetProcedureAddress(_DsListDomainsInSite, ntdsapilib, 'DsListDomainsInSiteW');
  1838.   asm
  1839.     mov esp, ebp
  1840.     pop ebp
  1841.     jmp [_DsListDomainsInSite]
  1842.   end;
  1843. end;
  1844. {$ELSE}
  1845. function DsListDomainsInSite; external ntdsapilib name 'DsListDomainsInSiteW';
  1846. {$ENDIF DYNAMIC_LINK}
  1847. {$ELSE}
  1848. {$IFDEF DYNAMIC_LINK}
  1849. var
  1850.   _DsListDomainsInSite: Pointer;
  1851. function DsListDomainsInSite;
  1852. begin
  1853.   GetProcedureAddress(_DsListDomainsInSite, ntdsapilib, 'DsListDomainsInSiteA');
  1854.   asm
  1855.     mov esp, ebp
  1856.     pop ebp
  1857.     jmp [_DsListDomainsInSite]
  1858.   end;
  1859. end;
  1860. {$ELSE}
  1861. function DsListDomainsInSite; external ntdsapilib name 'DsListDomainsInSiteA';
  1862. {$ENDIF DYNAMIC_LINK}
  1863. {$ENDIF}
  1864. {$IFDEF DYNAMIC_LINK}
  1865. var
  1866.   _DsListServersForDomainInSiteA: Pointer;
  1867. function DsListServersForDomainInSiteA;
  1868. begin
  1869.   GetProcedureAddress(_DsListServersForDomainInSiteA, ntdsapilib, 'DsListServersForDomainInSiteA');
  1870.   asm
  1871.     mov esp, ebp
  1872.     pop ebp
  1873.     jmp [_DsListServersForDomainInSiteA]
  1874.   end;
  1875. end;
  1876. {$ELSE}
  1877. function DsListServersForDomainInSiteA; external ntdsapilib name 'DsListServersForDomainInSiteA';
  1878. {$ENDIF DYNAMIC_LINK}
  1879. {$IFDEF DYNAMIC_LINK}
  1880. var
  1881.   _DsListServersForDomainInSiteW: Pointer;
  1882. function DsListServersForDomainInSiteW;
  1883. begin
  1884.   GetProcedureAddress(_DsListServersForDomainInSiteW, ntdsapilib, 'DsListServersForDomainInSiteW');
  1885.   asm
  1886.     mov esp, ebp
  1887.     pop ebp
  1888.     jmp [_DsListServersForDomainInSiteW]
  1889.   end;
  1890. end;
  1891. {$ELSE}
  1892. function DsListServersForDomainInSiteW; external ntdsapilib name 'DsListServersForDomainInSiteW';
  1893. {$ENDIF DYNAMIC_LINK}
  1894. {$IFDEF UNICODE}
  1895. {$IFDEF DYNAMIC_LINK}
  1896. var
  1897.   _DsListServersForDomainInSite: Pointer;
  1898. function DsListServersForDomainInSite;
  1899. begin
  1900.   GetProcedureAddress(_DsListServersForDomainInSite, ntdsapilib, 'DsListServersForDomainInSiteW');
  1901.   asm
  1902.     mov esp, ebp
  1903.     pop ebp
  1904.     jmp [_DsListServersForDomainInSite]
  1905.   end;
  1906. end;
  1907. {$ELSE}
  1908. function DsListServersForDomainInSite; external ntdsapilib name 'DsListServersForDomainInSiteW';
  1909. {$ENDIF DYNAMIC_LINK}
  1910. {$ELSE}
  1911. {$IFDEF DYNAMIC_LINK}
  1912. var
  1913.   _DsListServersForDomainInSite: Pointer;
  1914. function DsListServersForDomainInSite;
  1915. begin
  1916.   GetProcedureAddress(_DsListServersForDomainInSite, ntdsapilib, 'DsListServersForDomainInSiteA');
  1917.   asm
  1918.     mov esp, ebp
  1919.     pop ebp
  1920.     jmp [_DsListServersForDomainInSite]
  1921.   end;
  1922. end;
  1923. {$ELSE}
  1924. function DsListServersForDomainInSite; external ntdsapilib name 'DsListServersForDomainInSiteA';
  1925. {$ENDIF DYNAMIC_LINK}
  1926. {$ENDIF}
  1927. {$IFDEF DYNAMIC_LINK}
  1928. var
  1929.   _DsListInfoForServerA: Pointer;
  1930. function DsListInfoForServerA;
  1931. begin
  1932.   GetProcedureAddress(_DsListInfoForServerA, ntdsapilib, 'DsListInfoForServerA');
  1933.   asm
  1934.     mov esp, ebp
  1935.     pop ebp
  1936.     jmp [_DsListInfoForServerA]
  1937.   end;
  1938. end;
  1939. {$ELSE}
  1940. function DsListInfoForServerA; external ntdsapilib name 'DsListInfoForServerA';
  1941. {$ENDIF DYNAMIC_LINK}
  1942. {$IFDEF DYNAMIC_LINK}
  1943. var
  1944.   _DsListInfoForServerW: Pointer;
  1945. function DsListInfoForServerW;
  1946. begin
  1947.   GetProcedureAddress(_DsListInfoForServerW, ntdsapilib, 'DsListInfoForServerW');
  1948.   asm
  1949.     mov esp, ebp
  1950.     pop ebp
  1951.     jmp [_DsListInfoForServerW]
  1952.   end;
  1953. end;
  1954. {$ELSE}
  1955. function DsListInfoForServerW; external ntdsapilib name 'DsListInfoForServerW';
  1956. {$ENDIF DYNAMIC_LINK}
  1957. {$IFDEF UNICODE}
  1958. {$IFDEF DYNAMIC_LINK}
  1959. var
  1960.   _DsListInfoForServer: Pointer;
  1961. function DsListInfoForServer;
  1962. begin
  1963.   GetProcedureAddress(_DsListInfoForServer, ntdsapilib, 'DsListInfoForServerW');
  1964.   asm
  1965.     mov esp, ebp
  1966.     pop ebp
  1967.     jmp [_DsListInfoForServer]
  1968.   end;
  1969. end;
  1970. {$ELSE}
  1971. function DsListInfoForServer; external ntdsapilib name 'DsListInfoForServerW';
  1972. {$ENDIF DYNAMIC_LINK}
  1973. {$ELSE}
  1974. {$IFDEF DYNAMIC_LINK}
  1975. var
  1976.   _DsListInfoForServer: Pointer;
  1977. function DsListInfoForServer;
  1978. begin
  1979.   GetProcedureAddress(_DsListInfoForServer, ntdsapilib, 'DsListInfoForServerA');
  1980.   asm
  1981.     mov esp, ebp
  1982.     pop ebp
  1983.     jmp [_DsListInfoForServer]
  1984.   end;
  1985. end;
  1986. {$ELSE}
  1987. function DsListInfoForServer; external ntdsapilib name 'DsListInfoForServerA';
  1988. {$ENDIF DYNAMIC_LINK}
  1989. {$ENDIF}
  1990. {$IFDEF DYNAMIC_LINK}
  1991. var
  1992.   _DsListRolesA: Pointer;
  1993. function DsListRolesA;
  1994. begin
  1995.   GetProcedureAddress(_DsListRolesA, ntdsapilib, 'DsListRolesA');
  1996.   asm
  1997.     mov esp, ebp
  1998.     pop ebp
  1999.     jmp [_DsListRolesA]
  2000.   end;
  2001. end;
  2002. {$ELSE}
  2003. function DsListRolesA; external ntdsapilib name 'DsListRolesA';
  2004. {$ENDIF DYNAMIC_LINK}
  2005. {$IFDEF DYNAMIC_LINK}
  2006. var
  2007.   _DsListRolesW: Pointer;
  2008. function DsListRolesW;
  2009. begin
  2010.   GetProcedureAddress(_DsListRolesW, ntdsapilib, 'DsListRolesW');
  2011.   asm
  2012.     mov esp, ebp
  2013.     pop ebp
  2014.     jmp [_DsListRolesW]
  2015.   end;
  2016. end;
  2017. {$ELSE}
  2018. function DsListRolesW; external ntdsapilib name 'DsListRolesW';
  2019. {$ENDIF DYNAMIC_LINK}
  2020. {$IFDEF UNICODE}
  2021. {$IFDEF DYNAMIC_LINK}
  2022. var
  2023.   _DsListRoles: Pointer;
  2024. function DsListRoles;
  2025. begin
  2026.   GetProcedureAddress(_DsListRoles, ntdsapilib, 'DsListRolesW');
  2027.   asm
  2028.     mov esp, ebp
  2029.     pop ebp
  2030.     jmp [_DsListRoles]
  2031.   end;
  2032. end;
  2033. {$ELSE}
  2034. function DsListRoles; external ntdsapilib name 'DsListRolesW';
  2035. {$ENDIF DYNAMIC_LINK}
  2036. {$ELSE}
  2037. {$IFDEF DYNAMIC_LINK}
  2038. var
  2039.   _DsListRoles: Pointer;
  2040. function DsListRoles;
  2041. begin
  2042.   GetProcedureAddress(_DsListRoles, ntdsapilib, 'DsListRolesA');
  2043.   asm
  2044.     mov esp, ebp
  2045.     pop ebp
  2046.     jmp [_DsListRoles]
  2047.   end;
  2048. end;
  2049. {$ELSE}
  2050. function DsListRoles; external ntdsapilib name 'DsListRolesA';
  2051. {$ENDIF DYNAMIC_LINK}
  2052. {$ENDIF}
  2053. {$IFDEF DYNAMIC_LINK}
  2054. var
  2055.   _DsQuerySitesByCostW: Pointer;
  2056. function DsQuerySitesByCostW;
  2057. begin
  2058.   GetProcedureAddress(_DsQuerySitesByCostW, ntdsapilib, 'DsQuerySitesByCostW');
  2059.   asm
  2060.     mov esp, ebp
  2061.     pop ebp
  2062.     jmp [_DsQuerySitesByCostW]
  2063.   end;
  2064. end;
  2065. {$ELSE}
  2066. function DsQuerySitesByCostW; external ntdsapilib name 'DsQuerySitesByCostW';
  2067. {$ENDIF DYNAMIC_LINK}
  2068. {$IFDEF DYNAMIC_LINK}
  2069. var
  2070.   _DsQuerySitesByCostA: Pointer;
  2071. function DsQuerySitesByCostA;
  2072. begin
  2073.   GetProcedureAddress(_DsQuerySitesByCostA, ntdsapilib, 'DsQuerySitesByCostA');
  2074.   asm
  2075.     mov esp, ebp
  2076.     pop ebp
  2077.     jmp [_DsQuerySitesByCostA]
  2078.   end;
  2079. end;
  2080. {$ELSE}
  2081. function DsQuerySitesByCostA; external ntdsapilib name 'DsQuerySitesByCostA';
  2082. {$ENDIF DYNAMIC_LINK}
  2083. {$IFDEF UNICODE}
  2084. {$IFDEF DYNAMIC_LINK}
  2085. var
  2086.   _DsQuerySitesByCost: Pointer;
  2087. function DsQuerySitesByCost;
  2088. begin
  2089.   GetProcedureAddress(_DsQuerySitesByCost, ntdsapilib, 'DsQuerySitesByCostW');
  2090.   asm
  2091.     mov esp, ebp
  2092.     pop ebp
  2093.     jmp [_DsQuerySitesByCost]
  2094.   end;
  2095. end;
  2096. {$ELSE}
  2097. function DsQuerySitesByCost; external ntdsapilib name 'DsQuerySitesByCostW';
  2098. {$ENDIF DYNAMIC_LINK}
  2099. {$ELSE}
  2100. {$IFDEF DYNAMIC_LINK}
  2101. var
  2102.   _DsQuerySitesByCost: Pointer;
  2103. function DsQuerySitesByCost;
  2104. begin
  2105.   GetProcedureAddress(_DsQuerySitesByCost, ntdsapilib, 'DsQuerySitesByCostA');
  2106.   asm
  2107.     mov esp, ebp
  2108.     pop ebp
  2109.     jmp [_DsQuerySitesByCost]
  2110.   end;
  2111. end;
  2112. {$ELSE}
  2113. function DsQuerySitesByCost; external ntdsapilib name 'DsQuerySitesByCostA';
  2114. {$ENDIF DYNAMIC_LINK}
  2115. {$ENDIF}
  2116. {$IFDEF DYNAMIC_LINK}
  2117. var
  2118.   _DsQuerySitesFree: Pointer;
  2119. procedure DsQuerySitesFree;
  2120. begin
  2121.   GetProcedureAddress(_DsQuerySitesFree, ntdsapilib, 'DsQuerySitesFree');
  2122.   asm
  2123.     mov esp, ebp
  2124.     pop ebp
  2125.     jmp [_DsQuerySitesFree]
  2126.   end;
  2127. end;
  2128. {$ELSE}
  2129. procedure DsQuerySitesFree; external ntdsapilib name 'DsQuerySitesFree';
  2130. {$ENDIF DYNAMIC_LINK}
  2131. {$IFDEF DYNAMIC_LINK}
  2132. var
  2133.   _DsMapSchemaGuidsA: Pointer;
  2134. function DsMapSchemaGuidsA;
  2135. begin
  2136.   GetProcedureAddress(_DsMapSchemaGuidsA, ntdsapilib, 'DsMapSchemaGuidsA');
  2137.   asm
  2138.     mov esp, ebp
  2139.     pop ebp
  2140.     jmp [_DsMapSchemaGuidsA]
  2141.   end;
  2142. end;
  2143. {$ELSE}
  2144. function DsMapSchemaGuidsA; external ntdsapilib name 'DsMapSchemaGuidsA';
  2145. {$ENDIF DYNAMIC_LINK}
  2146. {$IFDEF DYNAMIC_LINK}
  2147. var
  2148.   _DsMapSchemaGuidsW: Pointer;
  2149. function DsMapSchemaGuidsW;
  2150. begin
  2151.   GetProcedureAddress(_DsMapSchemaGuidsW, ntdsapilib, 'DsMapSchemaGuidsW');
  2152.   asm
  2153.     mov esp, ebp
  2154.     pop ebp
  2155.     jmp [_DsMapSchemaGuidsW]
  2156.   end;
  2157. end;
  2158. {$ELSE}
  2159. function DsMapSchemaGuidsW; external ntdsapilib name 'DsMapSchemaGuidsW';
  2160. {$ENDIF DYNAMIC_LINK}
  2161. {$IFDEF DYNAMIC_LINK}
  2162. var
  2163.   _DsFreeSchemaGuidMapA: Pointer;
  2164. procedure DsFreeSchemaGuidMapA;
  2165. begin
  2166.   GetProcedureAddress(_DsFreeSchemaGuidMapA, ntdsapilib, 'DsFreeSchemaGuidMapA');
  2167.   asm
  2168.     mov esp, ebp
  2169.     pop ebp
  2170.     jmp [_DsFreeSchemaGuidMapA]
  2171.   end;
  2172. end;
  2173. {$ELSE}
  2174. procedure DsFreeSchemaGuidMapA; external ntdsapilib name 'DsFreeSchemaGuidMapA';
  2175. {$ENDIF DYNAMIC_LINK}
  2176. {$IFDEF DYNAMIC_LINK}
  2177. var
  2178.   _DsFreeSchemaGuidMapW: Pointer;
  2179. procedure DsFreeSchemaGuidMapW;
  2180. begin
  2181.   GetProcedureAddress(_DsFreeSchemaGuidMapW, ntdsapilib, 'DsFreeSchemaGuidMapW');
  2182.   asm
  2183.     mov esp, ebp
  2184.     pop ebp
  2185.     jmp [_DsFreeSchemaGuidMapW]
  2186.   end;
  2187. end;
  2188. {$ELSE}
  2189. procedure DsFreeSchemaGuidMapW; external ntdsapilib name 'DsFreeSchemaGuidMapW';
  2190. {$ENDIF DYNAMIC_LINK}
  2191. {$IFDEF UNICODE}
  2192. {$IFDEF DYNAMIC_LINK}
  2193. var
  2194.   _DsMapSchemaGuids: Pointer;
  2195. function DsMapSchemaGuids;
  2196. begin
  2197.   GetProcedureAddress(_DsMapSchemaGuids, ntdsapilib, 'DsMapSchemaGuidsW');
  2198.   asm
  2199.     mov esp, ebp
  2200.     pop ebp
  2201.     jmp [_DsMapSchemaGuids]
  2202.   end;
  2203. end;
  2204. {$ELSE}
  2205. function DsMapSchemaGuids; external ntdsapilib name 'DsMapSchemaGuidsW';
  2206. {$ENDIF DYNAMIC_LINK}
  2207. {$IFDEF DYNAMIC_LINK}
  2208. var
  2209.   _DsFreeSchemaGuidMap: Pointer;
  2210. procedure DsFreeSchemaGuidMap;
  2211. begin
  2212.   GetProcedureAddress(_DsFreeSchemaGuidMap, ntdsapilib, 'DsFreeSchemaGuidMapW');
  2213.   asm
  2214.     mov esp, ebp
  2215.     pop ebp
  2216.     jmp [_DsFreeSchemaGuidMap]
  2217.   end;
  2218. end;
  2219. {$ELSE}
  2220. procedure DsFreeSchemaGuidMap; external ntdsapilib name 'DsFreeSchemaGuidMapW';
  2221. {$ENDIF DYNAMIC_LINK}
  2222. {$ELSE}
  2223. {$IFDEF DYNAMIC_LINK}
  2224. var
  2225.   _DsMapSchemaGuids: Pointer;
  2226. function DsMapSchemaGuids;
  2227. begin
  2228.   GetProcedureAddress(_DsMapSchemaGuids, ntdsapilib, 'DsMapSchemaGuidsA');
  2229.   asm
  2230.     mov esp, ebp
  2231.     pop ebp
  2232.     jmp [_DsMapSchemaGuids]
  2233.   end;
  2234. end;
  2235. {$ELSE}
  2236. function DsMapSchemaGuids; external ntdsapilib name 'DsMapSchemaGuidsA';
  2237. {$ENDIF DYNAMIC_LINK}
  2238. {$IFDEF DYNAMIC_LINK}
  2239. var
  2240.   _DsFreeSchemaGuidMap: Pointer;
  2241. procedure DsFreeSchemaGuidMap;
  2242. begin
  2243.   GetProcedureAddress(_DsFreeSchemaGuidMap, ntdsapilib, 'DsFreeSchemaGuidMapA');
  2244.   asm
  2245.     mov esp, ebp
  2246.     pop ebp
  2247.     jmp [_DsFreeSchemaGuidMap]
  2248.   end;
  2249. end;
  2250. {$ELSE}
  2251. procedure DsFreeSchemaGuidMap; external ntdsapilib name 'DsFreeSchemaGuidMapA';
  2252. {$ENDIF DYNAMIC_LINK}
  2253. {$ENDIF}
  2254. {$IFDEF DYNAMIC_LINK}
  2255. var
  2256.   _DsGetDomainControllerInfoA: Pointer;
  2257. function DsGetDomainControllerInfoA;
  2258. begin
  2259.   GetProcedureAddress(_DsGetDomainControllerInfoA, ntdsapilib, 'DsGetDomainControllerInfoA');
  2260.   asm
  2261.     mov esp, ebp
  2262.     pop ebp
  2263.     jmp [_DsGetDomainControllerInfoA]
  2264.   end;
  2265. end;
  2266. {$ELSE}
  2267. function DsGetDomainControllerInfoA; external ntdsapilib name 'DsGetDomainControllerInfoA';
  2268. {$ENDIF DYNAMIC_LINK}
  2269. {$IFDEF DYNAMIC_LINK}
  2270. var
  2271.   _DsGetDomainControllerInfoW: Pointer;
  2272. function DsGetDomainControllerInfoW;
  2273. begin
  2274.   GetProcedureAddress(_DsGetDomainControllerInfoW, ntdsapilib, 'DsGetDomainControllerInfoW');
  2275.   asm
  2276.     mov esp, ebp
  2277.     pop ebp
  2278.     jmp [_DsGetDomainControllerInfoW]
  2279.   end;
  2280. end;
  2281. {$ELSE}
  2282. function DsGetDomainControllerInfoW; external ntdsapilib name 'DsGetDomainControllerInfoW';
  2283. {$ENDIF DYNAMIC_LINK}
  2284. {$IFDEF UNICODE}
  2285. {$IFDEF DYNAMIC_LINK}
  2286. var
  2287.   _DsGetDomainControllerInfo: Pointer;
  2288. function DsGetDomainControllerInfo;
  2289. begin
  2290.   GetProcedureAddress(_DsGetDomainControllerInfo, ntdsapilib, 'DsGetDomainControllerInfoW');
  2291.   asm
  2292.     mov esp, ebp
  2293.     pop ebp
  2294.     jmp [_DsGetDomainControllerInfo]
  2295.   end;
  2296. end;
  2297. {$ELSE}
  2298. function DsGetDomainControllerInfo; external ntdsapilib name 'DsGetDomainControllerInfoW';
  2299. {$ENDIF DYNAMIC_LINK}
  2300. {$ELSE}
  2301. {$IFDEF DYNAMIC_LINK}
  2302. var
  2303.   _DsGetDomainControllerInfo: Pointer;
  2304. function DsGetDomainControllerInfo;
  2305. begin
  2306.   GetProcedureAddress(_DsGetDomainControllerInfo, ntdsapilib, 'DsGetDomainControllerInfoA');
  2307.   asm
  2308.     mov esp, ebp
  2309.     pop ebp
  2310.     jmp [_DsGetDomainControllerInfo]
  2311.   end;
  2312. end;
  2313. {$ELSE}
  2314. function DsGetDomainControllerInfo; external ntdsapilib name 'DsGetDomainControllerInfoA';
  2315. {$ENDIF DYNAMIC_LINK}
  2316. {$ENDIF}
  2317. {$IFDEF DYNAMIC_LINK}
  2318. var
  2319.   _DsFreeDomainControllerInfoA: Pointer;
  2320. procedure DsFreeDomainControllerInfoA;
  2321. begin
  2322.   GetProcedureAddress(_DsFreeDomainControllerInfoA, ntdsapilib, 'DsFreeDomainControllerInfoA');
  2323.   asm
  2324.     mov esp, ebp
  2325.     pop ebp
  2326.     jmp [_DsFreeDomainControllerInfoA]
  2327.   end;
  2328. end;
  2329. {$ELSE}
  2330. procedure DsFreeDomainControllerInfoA; external ntdsapilib name 'DsFreeDomainControllerInfoA';
  2331. {$ENDIF DYNAMIC_LINK}
  2332. {$IFDEF DYNAMIC_LINK}
  2333. var
  2334.   _DsFreeDomainControllerInfoW: Pointer;
  2335. procedure DsFreeDomainControllerInfoW;
  2336. begin
  2337.   GetProcedureAddress(_DsFreeDomainControllerInfoW, ntdsapilib, 'DsFreeDomainControllerInfoW');
  2338.   asm
  2339.     mov esp, ebp
  2340.     pop ebp
  2341.     jmp [_DsFreeDomainControllerInfoW]
  2342.   end;
  2343. end;
  2344. {$ELSE}
  2345. procedure DsFreeDomainControllerInfoW; external ntdsapilib name 'DsFreeDomainControllerInfoW';
  2346. {$ENDIF DYNAMIC_LINK}
  2347. {$IFDEF UNICODE}
  2348. {$IFDEF DYNAMIC_LINK}
  2349. var
  2350.   _DsFreeDomainControllerInfo: Pointer;
  2351. procedure DsFreeDomainControllerInfo;
  2352. begin
  2353.   GetProcedureAddress(_DsFreeDomainControllerInfo, ntdsapilib, 'DsFreeDomainControllerInfoW');
  2354.   asm
  2355.     mov esp, ebp
  2356.     pop ebp
  2357.     jmp [_DsFreeDomainControllerInfo]
  2358.   end;
  2359. end;
  2360. {$ELSE}
  2361. procedure DsFreeDomainControllerInfo; external ntdsapilib name 'DsFreeDomainControllerInfoW';
  2362. {$ENDIF DYNAMIC_LINK}
  2363. {$ELSE}
  2364. {$IFDEF DYNAMIC_LINK}
  2365. var
  2366.   _DsFreeDomainControllerInfo: Pointer;
  2367. procedure DsFreeDomainControllerInfo;
  2368. begin
  2369.   GetProcedureAddress(_DsFreeDomainControllerInfo, ntdsapilib, 'DsFreeDomainControllerInfoA');
  2370.   asm
  2371.     mov esp, ebp
  2372.     pop ebp
  2373.     jmp [_DsFreeDomainControllerInfo]
  2374.   end;
  2375. end;
  2376. {$ELSE}
  2377. procedure DsFreeDomainControllerInfo; external ntdsapilib name 'DsFreeDomainControllerInfoA';
  2378. {$ENDIF DYNAMIC_LINK}
  2379. {$ENDIF}
  2380. {$IFDEF DYNAMIC_LINK}
  2381. var
  2382.   _DsReplicaConsistencyCheck: Pointer;
  2383. function DsReplicaConsistencyCheck;
  2384. begin
  2385.   GetProcedureAddress(_DsReplicaConsistencyCheck, ntdsapilib, 'DsReplicaConsistencyCheck');
  2386.   asm
  2387.     mov esp, ebp
  2388.     pop ebp
  2389.     jmp [_DsReplicaConsistencyCheck]
  2390.   end;
  2391. end;
  2392. {$ELSE}
  2393. function DsReplicaConsistencyCheck; external ntdsapilib name 'DsReplicaConsistencyCheck';
  2394. {$ENDIF DYNAMIC_LINK}
  2395. {$IFDEF DYNAMIC_LINK}
  2396. var
  2397.   _DsReplicaVerifyObjectsW: Pointer;
  2398. function DsReplicaVerifyObjectsW;
  2399. begin
  2400.   GetProcedureAddress(_DsReplicaVerifyObjectsW, ntdsapilib, 'DsReplicaVerifyObjectsW');
  2401.   asm
  2402.     mov esp, ebp
  2403.     pop ebp
  2404.     jmp [_DsReplicaVerifyObjectsW]
  2405.   end;
  2406. end;
  2407. {$ELSE}
  2408. function DsReplicaVerifyObjectsW; external ntdsapilib name 'DsReplicaVerifyObjectsW';
  2409. {$ENDIF DYNAMIC_LINK}
  2410. {$IFDEF DYNAMIC_LINK}
  2411. var
  2412.   _DsReplicaVerifyObjectsA: Pointer;
  2413. function DsReplicaVerifyObjectsA;
  2414. begin
  2415.   GetProcedureAddress(_DsReplicaVerifyObjectsA, ntdsapilib, 'DsReplicaVerifyObjectsA');
  2416.   asm
  2417.     mov esp, ebp
  2418.     pop ebp
  2419.     jmp [_DsReplicaVerifyObjectsA]
  2420.   end;
  2421. end;
  2422. {$ELSE}
  2423. function DsReplicaVerifyObjectsA; external ntdsapilib name 'DsReplicaVerifyObjectsA';
  2424. {$ENDIF DYNAMIC_LINK}
  2425. {$IFDEF UNICODE}
  2426. {$IFDEF DYNAMIC_LINK}
  2427. var
  2428.   _DsReplicaVerifyObjects: Pointer;
  2429. function DsReplicaVerifyObjects;
  2430. begin
  2431.   GetProcedureAddress(_DsReplicaVerifyObjects, ntdsapilib, 'DsReplicaVerifyObjectsW');
  2432.   asm
  2433.     mov esp, ebp
  2434.     pop ebp
  2435.     jmp [_DsReplicaVerifyObjects]
  2436.   end;
  2437. end;
  2438. {$ELSE}
  2439. function DsReplicaVerifyObjects; external ntdsapilib name 'DsReplicaVerifyObjectsW';
  2440. {$ENDIF DYNAMIC_LINK}
  2441. {$ELSE}
  2442. {$IFDEF DYNAMIC_LINK}
  2443. var
  2444.   _DsReplicaVerifyObjects: Pointer;
  2445. function DsReplicaVerifyObjects;
  2446. begin
  2447.   GetProcedureAddress(_DsReplicaVerifyObjects, ntdsapilib, 'DsReplicaVerifyObjectsA');
  2448.   asm
  2449.     mov esp, ebp
  2450.     pop ebp
  2451.     jmp [_DsReplicaVerifyObjects]
  2452.   end;
  2453. end;
  2454. {$ELSE}
  2455. function DsReplicaVerifyObjects; external ntdsapilib name 'DsReplicaVerifyObjectsA';
  2456. {$ENDIF DYNAMIC_LINK}
  2457. {$ENDIF}
  2458. {$IFDEF DYNAMIC_LINK}
  2459. var
  2460.   _DsReplicaGetInfoW: Pointer;
  2461. function DsReplicaGetInfoW;
  2462. begin
  2463.   GetProcedureAddress(_DsReplicaGetInfoW, ntdsapilib, 'DsReplicaGetInfoW');
  2464.   asm
  2465.     mov esp, ebp
  2466.     pop ebp
  2467.     jmp [_DsReplicaGetInfoW]
  2468.   end;
  2469. end;
  2470. {$ELSE}
  2471. function DsReplicaGetInfoW; external ntdsapilib name 'DsReplicaGetInfoW';
  2472. {$ENDIF DYNAMIC_LINK}
  2473. {$IFDEF DYNAMIC_LINK}
  2474. var
  2475.   _DsReplicaFreeInfo: Pointer;
  2476. procedure DsReplicaFreeInfo;
  2477. begin
  2478.   GetProcedureAddress(_DsReplicaFreeInfo, ntdsapilib, 'DsReplicaFreeInfo');
  2479.   asm
  2480.     mov esp, ebp
  2481.     pop ebp
  2482.     jmp [_DsReplicaFreeInfo]
  2483.   end;
  2484. end;
  2485. {$ELSE}
  2486. procedure DsReplicaFreeInfo; external ntdsapilib name 'DsReplicaFreeInfo';
  2487. {$ENDIF DYNAMIC_LINK}
  2488. {$IFDEF UNICODE}
  2489. {$IFDEF DYNAMIC_LINK}
  2490. var
  2491.   _DsReplicaGetInfo: Pointer;
  2492. function DsReplicaGetInfo;
  2493. begin
  2494.   GetProcedureAddress(_DsReplicaGetInfo, ntdsapilib, 'DsReplicaGetInfoW');
  2495.   asm
  2496.     mov esp, ebp
  2497.     pop ebp
  2498.     jmp [_DsReplicaGetInfo]
  2499.   end;
  2500. end;
  2501. {$ELSE}
  2502. function DsReplicaGetInfo; external ntdsapilib name 'DsReplicaGetInfoW';
  2503. {$ENDIF DYNAMIC_LINK}
  2504. {$IFDEF DYNAMIC_LINK}
  2505. var
  2506.   _DsReplicaGetInfo2W: Pointer;
  2507. function DsReplicaGetInfo2W;
  2508. begin
  2509.   GetProcedureAddress(_DsReplicaGetInfo2W, ntdsapilib, 'DsReplicaGetInfo2W');
  2510.   asm
  2511.     mov esp, ebp
  2512.     pop ebp
  2513.     jmp [_DsReplicaGetInfo2W]
  2514.   end;
  2515. end;
  2516. {$ELSE}
  2517. function DsReplicaGetInfo2W; external ntdsapilib name 'DsReplicaGetInfo2W';
  2518. {$ENDIF DYNAMIC_LINK}
  2519. {$ENDIF UNICODE}
  2520. {$IFDEF DYNAMIC_LINK}
  2521. var
  2522.   _DsAddSidHistoryA: Pointer;
  2523. function DsAddSidHistoryA;
  2524. begin
  2525.   GetProcedureAddress(_DsAddSidHistoryA, ntdsapilib, 'DsAddSidHistoryA');
  2526.   asm
  2527.     mov esp, ebp
  2528.     pop ebp
  2529.     jmp [_DsAddSidHistoryA]
  2530.   end;
  2531. end;
  2532. {$ELSE}
  2533. function DsAddSidHistoryA; external ntdsapilib name 'DsAddSidHistoryA';
  2534. {$ENDIF DYNAMIC_LINK}
  2535. {$IFDEF DYNAMIC_LINK}
  2536. var
  2537.   _DsAddSidHistoryW: Pointer;
  2538. function DsAddSidHistoryW;
  2539. begin
  2540.   GetProcedureAddress(_DsAddSidHistoryW, ntdsapilib, 'DsAddSidHistoryW');
  2541.   asm
  2542.     mov esp, ebp
  2543.     pop ebp
  2544.     jmp [_DsAddSidHistoryW]
  2545.   end;
  2546. end;
  2547. {$ELSE}
  2548. function DsAddSidHistoryW; external ntdsapilib name 'DsAddSidHistoryW';
  2549. {$ENDIF DYNAMIC_LINK}
  2550. {$IFDEF UNICODE}
  2551. {$IFDEF DYNAMIC_LINK}
  2552. var
  2553.   _DsAddSidHistory: Pointer;
  2554. function DsAddSidHistory;
  2555. begin
  2556.   GetProcedureAddress(_DsAddSidHistory, ntdsapilib, 'DsAddSidHistoryW');
  2557.   asm
  2558.     mov esp, ebp
  2559.     pop ebp
  2560.     jmp [_DsAddSidHistory]
  2561.   end;
  2562. end;
  2563. {$ELSE}
  2564. function DsAddSidHistory; external ntdsapilib name 'DsAddSidHistoryW';
  2565. {$ENDIF DYNAMIC_LINK}
  2566. {$ELSE}
  2567. {$IFDEF DYNAMIC_LINK}
  2568. var
  2569.   _DsAddSidHistory: Pointer;
  2570. function DsAddSidHistory;
  2571. begin
  2572.   GetProcedureAddress(_DsAddSidHistory, ntdsapilib, 'DsAddSidHistoryA');
  2573.   asm
  2574.     mov esp, ebp
  2575.     pop ebp
  2576.     jmp [_DsAddSidHistory]
  2577.   end;
  2578. end;
  2579. {$ELSE}
  2580. function DsAddSidHistory; external ntdsapilib name 'DsAddSidHistoryA';
  2581. {$ENDIF DYNAMIC_LINK}
  2582. {$ENDIF}
  2583. {$IFDEF DYNAMIC_LINK}
  2584. var
  2585.   _DsInheritSecurityIdentityA: Pointer;
  2586. function DsInheritSecurityIdentityA;
  2587. begin
  2588.   GetProcedureAddress(_DsInheritSecurityIdentityA, ntdsapilib, 'DsInheritSecurityIdentityA');
  2589.   asm
  2590.     mov esp, ebp
  2591.     pop ebp
  2592.     jmp [_DsInheritSecurityIdentityA]
  2593.   end;
  2594. end;
  2595. {$ELSE}
  2596. function DsInheritSecurityIdentityA; external ntdsapilib name 'DsInheritSecurityIdentityA';
  2597. {$ENDIF DYNAMIC_LINK}
  2598. {$IFDEF DYNAMIC_LINK}
  2599. var
  2600.   _DsInheritSecurityIdentityW: Pointer;
  2601. function DsInheritSecurityIdentityW;
  2602. begin
  2603.   GetProcedureAddress(_DsInheritSecurityIdentityW, ntdsapilib, 'DsInheritSecurityIdentityW');
  2604.   asm
  2605.     mov esp, ebp
  2606.     pop ebp
  2607.     jmp [_DsInheritSecurityIdentityW]
  2608.   end;
  2609. end;
  2610. {$ELSE}
  2611. function DsInheritSecurityIdentityW; external ntdsapilib name 'DsInheritSecurityIdentityW';
  2612. {$ENDIF DYNAMIC_LINK}
  2613. {$IFDEF UNICODE}
  2614. {$IFDEF DYNAMIC_LINK}
  2615. var
  2616.   _DsInheritSecurityIdentity: Pointer;
  2617. function DsInheritSecurityIdentity;
  2618. begin
  2619.   GetProcedureAddress(_DsInheritSecurityIdentity, ntdsapilib, 'DsInheritSecurityIdentityW');
  2620.   asm
  2621.     mov esp, ebp
  2622.     pop ebp
  2623.     jmp [_DsInheritSecurityIdentity]
  2624.   end;
  2625. end;
  2626. {$ELSE}
  2627. function DsInheritSecurityIdentity; external ntdsapilib name 'DsInheritSecurityIdentityW';
  2628. {$ENDIF DYNAMIC_LINK}
  2629. {$ELSE}
  2630. {$IFDEF DYNAMIC_LINK}
  2631. var
  2632.   _DsInheritSecurityIdentity: Pointer;
  2633. function DsInheritSecurityIdentity;
  2634. begin
  2635.   GetProcedureAddress(_DsInheritSecurityIdentity, ntdsapilib, 'DsInheritSecurityIdentityA');
  2636.   asm
  2637.     mov esp, ebp
  2638.     pop ebp
  2639.     jmp [_DsInheritSecurityIdentity]
  2640.   end;
  2641. end;
  2642. {$ELSE}
  2643. function DsInheritSecurityIdentity; external ntdsapilib name 'DsInheritSecurityIdentityA';
  2644. {$ENDIF DYNAMIC_LINK}
  2645. {$ENDIF}
  2646. {$IFDEF DYNAMIC_LINK}
  2647. var
  2648.   _DsQuoteRdnValueA: Pointer;
  2649. function DsQuoteRdnValueA;
  2650. begin
  2651.   GetProcedureAddress(_DsQuoteRdnValueA, ntdsapilib, 'DsQuoteRdnValueA');
  2652.   asm
  2653.     mov esp, ebp
  2654.     pop ebp
  2655.     jmp [_DsQuoteRdnValueA]
  2656.   end;
  2657. end;
  2658. {$ELSE}
  2659. function DsQuoteRdnValueA; external ntdsapilib name 'DsQuoteRdnValueA';
  2660. {$ENDIF DYNAMIC_LINK}
  2661. {$IFDEF DYNAMIC_LINK}
  2662. var
  2663.   _DsQuoteRdnValueW: Pointer;
  2664. function DsQuoteRdnValueW;
  2665. begin
  2666.   GetProcedureAddress(_DsQuoteRdnValueW, ntdsapilib, 'DsQuoteRdnValueW');
  2667.   asm
  2668.     mov esp, ebp
  2669.     pop ebp
  2670.     jmp [_DsQuoteRdnValueW]
  2671.   end;
  2672. end;
  2673. {$ELSE}
  2674. function DsQuoteRdnValueW; external ntdsapilib name 'DsQuoteRdnValueW';
  2675. {$ENDIF DYNAMIC_LINK}
  2676. {$IFDEF UNICODE}
  2677. {$IFDEF DYNAMIC_LINK}
  2678. var
  2679.   _DsQuoteRdnValue: Pointer;
  2680. function DsQuoteRdnValue;
  2681. begin
  2682.   GetProcedureAddress(_DsQuoteRdnValue, ntdsapilib, 'DsQuoteRdnValueW');
  2683.   asm
  2684.     mov esp, ebp
  2685.     pop ebp
  2686.     jmp [_DsQuoteRdnValue]
  2687.   end;
  2688. end;
  2689. {$ELSE}
  2690. function DsQuoteRdnValue; external ntdsapilib name 'DsQuoteRdnValueW';
  2691. {$ENDIF DYNAMIC_LINK}
  2692. {$ELSE}
  2693. {$IFDEF DYNAMIC_LINK}
  2694. var
  2695.   _DsQuoteRdnValue: Pointer;
  2696. function DsQuoteRdnValue;
  2697. begin
  2698.   GetProcedureAddress(_DsQuoteRdnValue, ntdsapilib, 'DsQuoteRdnValueA');
  2699.   asm
  2700.     mov esp, ebp
  2701.     pop ebp
  2702.     jmp [_DsQuoteRdnValue]
  2703.   end;
  2704. end;
  2705. {$ELSE}
  2706. function DsQuoteRdnValue; external ntdsapilib name 'DsQuoteRdnValueA';
  2707. {$ENDIF DYNAMIC_LINK}
  2708. {$ENDIF}
  2709. {$IFDEF DYNAMIC_LINK}
  2710. var
  2711.   _DsUnquoteRdnValueA: Pointer;
  2712. function DsUnquoteRdnValueA;
  2713. begin
  2714.   GetProcedureAddress(_DsUnquoteRdnValueA, ntdsapilib, 'DsUnquoteRdnValueA');
  2715.   asm
  2716.     mov esp, ebp
  2717.     pop ebp
  2718.     jmp [_DsUnquoteRdnValueA]
  2719.   end;
  2720. end;
  2721. {$ELSE}
  2722. function DsUnquoteRdnValueA; external ntdsapilib name 'DsUnquoteRdnValueA';
  2723. {$ENDIF DYNAMIC_LINK}
  2724. {$IFDEF DYNAMIC_LINK}
  2725. var
  2726.   _DsUnquoteRdnValueW: Pointer;
  2727. function DsUnquoteRdnValueW;
  2728. begin
  2729.   GetProcedureAddress(_DsUnquoteRdnValueW, ntdsapilib, 'DsUnquoteRdnValueW');
  2730.   asm
  2731.     mov esp, ebp
  2732.     pop ebp
  2733.     jmp [_DsUnquoteRdnValueW]
  2734.   end;
  2735. end;
  2736. {$ELSE}
  2737. function DsUnquoteRdnValueW; external ntdsapilib name 'DsUnquoteRdnValueW';
  2738. {$ENDIF DYNAMIC_LINK}
  2739. {$IFDEF UNICODE}
  2740. {$IFDEF DYNAMIC_LINK}
  2741. var
  2742.   _DsUnquoteRdnValue: Pointer;
  2743. function DsUnquoteRdnValue;
  2744. begin
  2745.   GetProcedureAddress(_DsUnquoteRdnValue, ntdsapilib, 'DsUnquoteRdnValueW');
  2746.   asm
  2747.     mov esp, ebp
  2748.     pop ebp
  2749.     jmp [_DsUnquoteRdnValue]
  2750.   end;
  2751. end;
  2752. {$ELSE}
  2753. function DsUnquoteRdnValue; external ntdsapilib name 'DsUnquoteRdnValueW';
  2754. {$ENDIF DYNAMIC_LINK}
  2755. {$ELSE}
  2756. {$IFDEF DYNAMIC_LINK}
  2757. var
  2758.   _DsUnquoteRdnValue: Pointer;
  2759. function DsUnquoteRdnValue;
  2760. begin
  2761.   GetProcedureAddress(_DsUnquoteRdnValue, ntdsapilib, 'DsUnquoteRdnValueA');
  2762.   asm
  2763.     mov esp, ebp
  2764.     pop ebp
  2765.     jmp [_DsUnquoteRdnValue]
  2766.   end;
  2767. end;
  2768. {$ELSE}
  2769. function DsUnquoteRdnValue; external ntdsapilib name 'DsUnquoteRdnValueA';
  2770. {$ENDIF DYNAMIC_LINK}
  2771. {$ENDIF}
  2772. {$IFDEF DYNAMIC_LINK}
  2773. var
  2774.   _DsGetRdnW: Pointer;
  2775. function DsGetRdnW;
  2776. begin
  2777.   GetProcedureAddress(_DsGetRdnW, ntdsapilib, 'DsGetRdnW');
  2778.   asm
  2779.     mov esp, ebp
  2780.     pop ebp
  2781.     jmp [_DsGetRdnW]
  2782.   end;
  2783. end;
  2784. {$ELSE}
  2785. function DsGetRdnW; external ntdsapilib name 'DsGetRdnW';
  2786. {$ENDIF DYNAMIC_LINK}
  2787. {$IFDEF DYNAMIC_LINK}
  2788. var
  2789.   _DsCrackUnquotedMangledRdnW: Pointer;
  2790. function DsCrackUnquotedMangledRdnW;
  2791. begin
  2792.   GetProcedureAddress(_DsCrackUnquotedMangledRdnW, ntdsapilib, 'DsCrackUnquotedMangledRdnW');
  2793.   asm
  2794.     mov esp, ebp
  2795.     pop ebp
  2796.     jmp [_DsCrackUnquotedMangledRdnW]
  2797.   end;
  2798. end;
  2799. {$ELSE}
  2800. function DsCrackUnquotedMangledRdnW; external ntdsapilib name 'DsCrackUnquotedMangledRdnW';
  2801. {$ENDIF DYNAMIC_LINK}
  2802. {$IFDEF DYNAMIC_LINK}
  2803. var
  2804.   _DsCrackUnquotedMangledRdnA: Pointer;
  2805. function DsCrackUnquotedMangledRdnA;
  2806. begin
  2807.   GetProcedureAddress(_DsCrackUnquotedMangledRdnA, ntdsapilib, 'DsCrackUnquotedMangledRdnA');
  2808.   asm
  2809.     mov esp, ebp
  2810.     pop ebp
  2811.     jmp [_DsCrackUnquotedMangledRdnA]
  2812.   end;
  2813. end;
  2814. {$ELSE}
  2815. function DsCrackUnquotedMangledRdnA; external ntdsapilib name 'DsCrackUnquotedMangledRdnA';
  2816. {$ENDIF DYNAMIC_LINK}
  2817. {$IFDEF UNICODE}
  2818. {$IFDEF DYNAMIC_LINK}
  2819. var
  2820.   _DsCrackUnquotedMangledRdn: Pointer;
  2821. function DsCrackUnquotedMangledRdn;
  2822. begin
  2823.   GetProcedureAddress(_DsCrackUnquotedMangledRdn, ntdsapilib, 'DsCrackUnquotedMangledRdnW');
  2824.   asm
  2825.     mov esp, ebp
  2826.     pop ebp
  2827.     jmp [_DsCrackUnquotedMangledRdn]
  2828.   end;
  2829. end;
  2830. {$ELSE}
  2831. function DsCrackUnquotedMangledRdn; external ntdsapilib name 'DsCrackUnquotedMangledRdnW';
  2832. {$ENDIF DYNAMIC_LINK}
  2833. {$ELSE}
  2834. {$IFDEF DYNAMIC_LINK}
  2835. var
  2836.   _DsCrackUnquotedMangledRdn: Pointer;
  2837. function DsCrackUnquotedMangledRdn;
  2838. begin
  2839.   GetProcedureAddress(_DsCrackUnquotedMangledRdn, ntdsapilib, 'DsCrackUnquotedMangledRdnA');
  2840.   asm
  2841.     mov esp, ebp
  2842.     pop ebp
  2843.     jmp [_DsCrackUnquotedMangledRdn]
  2844.   end;
  2845. end;
  2846. {$ELSE}
  2847. function DsCrackUnquotedMangledRdn; external ntdsapilib name 'DsCrackUnquotedMangledRdnA';
  2848. {$ENDIF DYNAMIC_LINK}
  2849. {$ENDIF}
  2850. {$IFDEF DYNAMIC_LINK}
  2851. var
  2852.   _DsIsMangledRdnValueW: Pointer;
  2853. function DsIsMangledRdnValueW;
  2854. begin
  2855.   GetProcedureAddress(_DsIsMangledRdnValueW, ntdsapilib, 'DsIsMangledRdnValueW');
  2856.   asm
  2857.     mov esp, ebp
  2858.     pop ebp
  2859.     jmp [_DsIsMangledRdnValueW]
  2860.   end;
  2861. end;
  2862. {$ELSE}
  2863. function DsIsMangledRdnValueW; external ntdsapilib name 'DsIsMangledRdnValueW';
  2864. {$ENDIF DYNAMIC_LINK}
  2865. {$IFDEF DYNAMIC_LINK}
  2866. var
  2867.   _DsIsMangledRdnValueA: Pointer;
  2868. function DsIsMangledRdnValueA;
  2869. begin
  2870.   GetProcedureAddress(_DsIsMangledRdnValueA, ntdsapilib, 'DsIsMangledRdnValueA');
  2871.   asm
  2872.     mov esp, ebp
  2873.     pop ebp
  2874.     jmp [_DsIsMangledRdnValueA]
  2875.   end;
  2876. end;
  2877. {$ELSE}
  2878. function DsIsMangledRdnValueA; external ntdsapilib name 'DsIsMangledRdnValueA';
  2879. {$ENDIF DYNAMIC_LINK}
  2880. {$IFDEF UNICODE}
  2881. {$IFDEF DYNAMIC_LINK}
  2882. var
  2883.   _DsIsMangledRdnValue: Pointer;
  2884. function DsIsMangledRdnValue;
  2885. begin
  2886.   GetProcedureAddress(_DsIsMangledRdnValue, ntdsapilib, 'DsIsMangledRdnValueW');
  2887.   asm
  2888.     mov esp, ebp
  2889.     pop ebp
  2890.     jmp [_DsIsMangledRdnValue]
  2891.   end;
  2892. end;
  2893. {$ELSE}
  2894. function DsIsMangledRdnValue; external ntdsapilib name 'DsIsMangledRdnValueW';
  2895. {$ENDIF DYNAMIC_LINK}
  2896. {$ELSE}
  2897. {$IFDEF DYNAMIC_LINK}
  2898. var
  2899.   _DsIsMangledRdnValue: Pointer;
  2900. function DsIsMangledRdnValue;
  2901. begin
  2902.   GetProcedureAddress(_DsIsMangledRdnValue, ntdsapilib, 'DsIsMangledRdnValueA');
  2903.   asm
  2904.     mov esp, ebp
  2905.     pop ebp
  2906.     jmp [_DsIsMangledRdnValue]
  2907.   end;
  2908. end;
  2909. {$ELSE}
  2910. function DsIsMangledRdnValue; external ntdsapilib name 'DsIsMangledRdnValueA';
  2911. {$ENDIF DYNAMIC_LINK}
  2912. {$ENDIF}
  2913. {$IFDEF DYNAMIC_LINK}
  2914. var
  2915.   _DsIsMangledDnA: Pointer;
  2916. function DsIsMangledDnA;
  2917. begin
  2918.   GetProcedureAddress(_DsIsMangledDnA, ntdsapilib, 'DsIsMangledDnA');
  2919.   asm
  2920.     mov esp, ebp
  2921.     pop ebp
  2922.     jmp [_DsIsMangledDnA]
  2923.   end;
  2924. end;
  2925. {$ELSE}
  2926. function DsIsMangledDnA; external ntdsapilib name 'DsIsMangledDnA';
  2927. {$ENDIF DYNAMIC_LINK}
  2928. {$IFDEF DYNAMIC_LINK}
  2929. var
  2930.   _DsIsMangledDnW: Pointer;
  2931. function DsIsMangledDnW;
  2932. begin
  2933.   GetProcedureAddress(_DsIsMangledDnW, ntdsapilib, 'DsIsMangledDnW');
  2934.   asm
  2935.     mov esp, ebp
  2936.     pop ebp
  2937.     jmp [_DsIsMangledDnW]
  2938.   end;
  2939. end;
  2940. {$ELSE}
  2941. function DsIsMangledDnW; external ntdsapilib name 'DsIsMangledDnW';
  2942. {$ENDIF DYNAMIC_LINK}
  2943. {$IFDEF UNICODE}
  2944. {$IFDEF DYNAMIC_LINK}
  2945. var
  2946.   _DsIsMangledDn: Pointer;
  2947. function DsIsMangledDn;
  2948. begin
  2949.   GetProcedureAddress(_DsIsMangledDn, ntdsapilib, 'DsIsMangledDnW');
  2950.   asm
  2951.     mov esp, ebp
  2952.     pop ebp
  2953.     jmp [_DsIsMangledDn]
  2954.   end;
  2955. end;
  2956. {$ELSE}
  2957. function DsIsMangledDn; external ntdsapilib name 'DsIsMangledDnW';
  2958. {$ENDIF DYNAMIC_LINK}
  2959. {$ELSE}
  2960. {$IFDEF DYNAMIC_LINK}
  2961. var
  2962.   _DsIsMangledDn: Pointer;
  2963. function DsIsMangledDn;
  2964. begin
  2965.   GetProcedureAddress(_DsIsMangledDn, ntdsapilib, 'DsIsMangledDnA');
  2966.   asm
  2967.     mov esp, ebp
  2968.     pop ebp
  2969.     jmp [_DsIsMangledDn]
  2970.   end;
  2971. end;
  2972. {$ELSE}
  2973. function DsIsMangledDn; external ntdsapilib name 'DsIsMangledDnA';
  2974. {$ENDIF DYNAMIC_LINK}
  2975. {$ENDIF}
  2976. end.