jwadsquery.pas 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222
  1. {******************************************************************************}
  2. { }
  3. { Directory Services Query API interface Unit for Object Pascal }
  4. { }
  5. { Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft }
  6. { Corporation. All Rights Reserved. }
  7. { }
  8. { The original file is: dsquery.h, released November 2002. The original Pascal }
  9. { code is: DSQuery.pas, released March 2002. The initial developer of the }
  10. { Pascal code is Marcel van Brakel (brakelm att chello dott nl). }
  11. { }
  12. { Portions created by Marcel van Brakel are Copyright (C) 1999-2001 }
  13. { Marcel van Brakel. All Rights Reserved. }
  14. { }
  15. { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
  16. { }
  17. { You may retrieve the latest version of this file at the Project JEDI }
  18. { APILIB home page, located at http://jedi-apilib.sourceforge.net }
  19. { }
  20. { The contents of this file are used with permission, subject to the Mozilla }
  21. { Public License Version 1.1 (the "License"); you may not use this file except }
  22. { in compliance with the License. You may obtain a copy of the License at }
  23. { http://www.mozilla.org/MPL/MPL-1.1.html }
  24. { }
  25. { Software distributed under the License is distributed on an "AS IS" basis, }
  26. { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
  27. { the specific language governing rights and limitations under the License. }
  28. { }
  29. { Alternatively, the contents of this file may be used under the terms of the }
  30. { GNU Lesser General Public License (the "LGPL License"), in which case the }
  31. { provisions of the LGPL License are applicable instead of those above. }
  32. { If you wish to allow use of your version of this file only under the terms }
  33. { of the LGPL License and not to allow others to use your version of this file }
  34. { under the MPL, indicate your decision by deleting the provisions above and }
  35. { replace them with the notice and other provisions required by the LGPL }
  36. { License. If you do not delete the provisions above, a recipient may use }
  37. { your version of this file under either the MPL or the LGPL License. }
  38. { }
  39. { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
  40. { }
  41. {******************************************************************************}
  42. unit JwaDSQuery;
  43. {$WEAKPACKAGEUNIT}
  44. {$HPPEMIT ''}
  45. {$HPPEMIT '#include "dsquery.h"'}
  46. {$HPPEMIT ''}
  47. {$I jediapilib.inc}
  48. interface
  49. uses
  50. JwaCmnQuery, JwaWinType;
  51. const
  52. CLSID_DsQuery: TGUID = (D1:$8a23e65e; D2:$31c2; D3:$11d0; D4:($89, $1c, $0, $a0, $24, $ab, $2d, $bb));
  53. {$EXTERNALSYM CLSID_DsQuery}
  54. //
  55. // standard forms shipped in dsquery.dll
  56. //
  57. CLSID_DsFindObjects: TGUID = (D1:$83ee3fe1; D2:$57d9; D3:$11d0; D4:($b9, $32, $0, $a0, $24, $ab, $2d, $bb));
  58. {$EXTERNALSYM CLSID_DsFindObjects}
  59. CLSID_DsFindPeople: TGUID = (D1:$83ee3fe2; D2:$57d9; D3:$11d0; D4:($b9, $32, $0, $a0, $24, $ab, $2d, $bb));
  60. {$EXTERNALSYM CLSID_DsFindPeople}
  61. CLSID_DsFindPrinter: TGUID = (D1:$b577f070; D2:$7ee2; D3:$11d0; D4:($91, $3f, $0, $aa, $0, $c1, $6e, $65));
  62. {$EXTERNALSYM CLSID_DsFindPrinter}
  63. CLSID_DsFindComputer: TGUID = (D1:$16006700; D2:$87ad; D3:$11d0; D4:($91, $40, $0, $aa, $0, $c1, $6e, $65));
  64. {$EXTERNALSYM CLSID_DsFindComputer}
  65. CLSID_DsFindVolume: TGUID = (D1:$c1b3cbf1; D2:$886a; D3:$11d0; D4:($91, $40, $0, $aa, $0, $c1, $6e, $65));
  66. {$EXTERNALSYM CLSID_DsFindVolume}
  67. CLSID_DsFindContainer: TGUID = (D1:$c1b3cbf2; D2:$886a; D3:$11d0; D4:($91, $40, $0, $aa, $0, $c1, $6e, $65));
  68. {$EXTERNALSYM CLSID_DsFindContainer}
  69. CLSID_DsFindAdvanced: TGUID = (D1:$83ee3fe3; D2:$57d9; D3:$11d0; D4:($b9, $32, $0, $a0, $24, $ab, $2d, $bb));
  70. {$EXTERNALSYM CLSID_DsFindAdvanced}
  71. //
  72. // admin forms
  73. //
  74. CLSID_DsFindDomainController: TGUID = (D1:$538c7b7e; D2:$d25e; D3:$11d0; D4:($97, $42, $0, $a0, $c9, $6, $af, $45));
  75. {$EXTERNALSYM CLSID_DsFindDomainController}
  76. CLSID_DsFindFrsMembers: TGUID = (D1:$94ce4b18; D2:$b3d3; D3:$11d1; D4:($b9, $b4, $0, $c0, $4f, $d8, $d5, $b0));
  77. {$EXTERNALSYM CLSID_DsFindFrsMembers}
  78. //
  79. // DSQUERYINITPARAMS
  80. // -----------------
  81. // This structured is used when creating a new query view.
  82. //
  83. const
  84. DSQPF_NOSAVE = $00000001; // = 1 => remove save verb
  85. {$EXTERNALSYM DSQPF_NOSAVE}
  86. DSQPF_SAVELOCATION = $00000002; // = 1 => pSaveLocation contains directory to save queries into
  87. {$EXTERNALSYM DSQPF_SAVELOCATION}
  88. DSQPF_SHOWHIDDENOBJECTS = $00000004; // = 1 => show objects marked as "hidden" in results
  89. {$EXTERNALSYM DSQPF_SHOWHIDDENOBJECTS}
  90. DSQPF_ENABLEADMINFEATURES = $00000008; // = 1 => show admin verbs, property pages etc
  91. {$EXTERNALSYM DSQPF_ENABLEADMINFEATURES}
  92. DSQPF_ENABLEADVANCEDFEATURES = $00000010; // = 1 => set the advanced flag for the property pages
  93. {$EXTERNALSYM DSQPF_ENABLEADVANCEDFEATURES}
  94. DSQPF_HASCREDENTIALS = $00000020; // = 1 => pServer, pUserName & pPassword are valid
  95. {$EXTERNALSYM DSQPF_HASCREDENTIALS}
  96. DSQPF_NOCHOOSECOLUMNS = $00000040; // = 1 => remove choose columns from view
  97. {$EXTERNALSYM DSQPF_NOCHOOSECOLUMNS}
  98. type
  99. LPDSQUERYINITPARAMS = ^DSQUERYINITPARAMS;
  100. {$EXTERNALSYM LPDSQUERYINITPARAMS}
  101. DSQUERYINITPARAMS = record
  102. cbStruct: DWORD;
  103. dwFlags: DWORD;
  104. pDefaultScope: LPWSTR; // -> Active Directory path to use as scope / == NULL for none
  105. pDefaultSaveLocation: LPWSTR; // -> Directory to save queries into / == NULL default location
  106. pUserName: LPWSTR; // -> user name to authenticate with
  107. pPassword: LPWSTR; // -> password for authentication
  108. pServer: LPWSTR; // -> server to use for obtaining trusts etc
  109. end;
  110. {$EXTERNALSYM DSQUERYINITPARAMS}
  111. TDsQueryInitParams = DSQUERYINITPARAMS;
  112. PDsQueryInitParams = LPDSQUERYINITPARAMS;
  113. //
  114. // DSQUERYPARAMS
  115. // -------------
  116. // The DS query handle takes a packed structure which contains the
  117. // columns and query to be issued.
  118. //
  119. const
  120. CFSTR_DSQUERYPARAMS = TEXT('DsQueryParameters');
  121. {$EXTERNALSYM CFSTR_DSQUERYPARAMS}
  122. DSCOLUMNPROP_ADSPATH = LONG(-1);
  123. {$EXTERNALSYM DSCOLUMNPROP_ADSPATH}
  124. DSCOLUMNPROP_OBJECTCLASS = LONG(-2);
  125. {$EXTERNALSYM DSCOLUMNPROP_OBJECTCLASS}
  126. type
  127. LPDSCOLUMN = ^DSCOLUMN;
  128. {$EXTERNALSYM LPDSCOLUMN}
  129. DSCOLUMN = record
  130. dwFlags: DWORD; // flags for this column
  131. fmt: INT; // list view form information
  132. cx: INT; // default column width
  133. idsName: INT; // resource ID for the column dispaly name
  134. offsetProperty: LONG; // offset to BSTR defining column ADs property name
  135. dwReserved: DWORD; // reserved field
  136. end;
  137. {$EXTERNALSYM DSCOLUMN}
  138. TDsColumn = DSCOLUMN;
  139. PDsColumn = LPDSCOLUMN;
  140. LPDSQUERYPARAMS = ^DSQUERYPARAMS;
  141. {$EXTERNALSYM LPDSQUERYPARAMS}
  142. DSQUERYPARAMS = record
  143. cbStruct: DWORD;
  144. dwFlags: DWORD;
  145. hInstance: HINSTANCE; // instance handle used for string extraction
  146. offsetQuery: LONG; // offset to LDAP filter string
  147. iColumns: LONG; // column count
  148. dwReserved: DWORD; // reserved field for this query
  149. aColumns: array [0..0] of DSCOLUMN; // array of column descriptions
  150. end;
  151. {$EXTERNALSYM DSQUERYPARAMS}
  152. TDsQueryParams = DSQUERYPARAMS;
  153. PDsQueryParams = LPDSQUERYPARAMS;
  154. //
  155. // CF_DSQUERYSCOPE
  156. // ---------------
  157. // A clipboard format the puts a string version of the scope into a
  158. // storage medium via GlobalAlloc.
  159. //
  160. const
  161. CFSTR_DSQUERYSCOPE = TEXT('DsQueryScope');
  162. {$EXTERNALSYM CFSTR_DSQUERYSCOPE}
  163. //
  164. // DSQPM_GETCLASSLIST
  165. // ------------------
  166. // This page message is sent to the form pages to retrieve the list of classes
  167. // that the pages are going to query from. This is used by the feild selector
  168. // and the property well to build its list of display classes.
  169. //
  170. type
  171. LPDSQUERYCLASSLIST = ^DSQUERYCLASSLIST;
  172. {$EXTERNALSYM LPDSQUERYCLASSLIST}
  173. DSQUERYCLASSLIST = record
  174. cbStruct: DWORD;
  175. cClasses: LONG; // number of classes in array
  176. offsetClass: array [0..0] of DWORD; // offset to the class names (UNICODE)
  177. end;
  178. {$EXTERNALSYM DSQUERYCLASSLIST}
  179. TDsQueryClassList = DSQUERYCLASSLIST;
  180. PDsQueryClassList = LPDSQUERYCLASSLIST;
  181. const
  182. DSQPM_GETCLASSLIST = CQPM_HANDLERSPECIFIC + 0; // wParam == flags, lParam = LPLPDSQUERYCLASSLIST
  183. {$EXTERNALSYM DSQPM_GETCLASSLIST}
  184. //
  185. // DSQPM_HELPTOPICS
  186. // ----------------
  187. // This page message is sent to the form pages to allow them to handle the
  188. // "Help Topics" verb.
  189. //
  190. DSQPM_HELPTOPICS = CQPM_HANDLERSPECIFIC + 1; // wParam = 0, lParam = hWnd parent
  191. {$EXTERNALSYM DSQPM_HELPTOPICS}
  192. implementation
  193. end.