A
download jwaObjsel.pas
Language: Delphi
License: LGPL
Copyright: (C) 1995-2001 Microsoft } (C) 1999-2001 }
LOC: 147
Project Info
FreePascal
Server: FreePascal
Type: zip
...rc\packages\extra\winunits\
   activex.pp
   buildjwa.pp
   commctrl.pp
   comobj.pp
   jedi.inc
   jediapilib.inc
   jwaaccctrl.pas
   jwaaclapi.pas
   jwaaclui.pas
   jwaactiveds.pas
   jwaadsdb.pas
   jwaadserr.pas
   jwaadshlp.pas
   jwaadsnms.pas
   jwaadsprop.pas
   jwaadssts.pas
   jwaadstlb.pas
   jwaadtgen.pas
   jwaaf_irda.pas
   jwaatalkwsh.pas
   jwaauthif.pas
   jwaauthz.pas
   jwabatclass.pas
   jwabits.pas
   jwabits1_5.pas
   jwabitscfg.pas
   jwabitsmsg.pas
   jwablberr.pas
   jwabluetoothapis.pas
   jwabthdef.pas
   jwabthsdpdef.pas
   jwabugcodes.pas
   jwacderr.pas
   jwacmnquery.pas
   jwacolordlg.pas
   jwacpl.pas
   jwacplext.pas
   jwacryptuiapi.pas
   jwadbt.pas
   jwadde.pas
   jwadhcpcsdk.pas
   jwadhcpsapi.pas
   jwadhcpssdk.pas
   jwadlgs.pas
   jwadsadmin.pas
   jwadsclient.pas
   jwadsgetdc.pas
   jwadskquota.pas
   jwadsquery.pas
   jwadsrole.pas
   jwadssec.pas
   jwaerrorrep.pas
   jwaexcpt.pas
   jwafaxdev.pas
   jwafaxext.pas
   jwafaxmmc.pas
   jwafaxroute.pas
   jwagpedit.pas
   jwahherror.pas
   jwahtmlGuid.pas
   jwahtmlhelp.pas
   jwaiaccess.pas
   jwaiadmext.pas
   jwaicmpapi.pas
   jwaiiscnfg.pas
   jwaimagehlp.pas
   jwaimapi.pas
   jwaimapierror.pas
   jwaime.pas
   jwaioevent.pas
   jwaipexport.pas
   jwaiphlpapi.pas
   jwaipifcons.pas
   jwaipinfoid.pas
   jwaiprtrmib.pas
   jwaiptypes.pas
   jwaisguids.pas
   jwaissper16.pas
   jwalmaccess.pas
   jwalmalert.pas
   jwalmapibuf.pas
   jwalmat.pas
   jwalmaudit.pas
   jwalmconfig.pas
   jwalmcons.pas
   jwalmdfs.pas
   jwalmerr.pas
   jwalmerrlog.pas
   jwalmjoin.pas
   jwalmmsg.pas
   jwalmremutl.pas
   jwalmrepl.pas
   jwalmserver.pas
   jwalmshare.pas
   jwalmsname.pas
   jwalmstats.pas
   jwalmsvc.pas
   jwalmuse.pas
   jwalmuseflg.pas
   jwalmwksta.pas
   jwaloadperf.pas
   jwalpmapi.pas
   jwamciavi.pas
   jwamprerror.pas
   jwamsi.pas
   jwamsidefs.pas
   jwamsiquery.pas
   jwamstask.pas
   jwamstcpip.pas
   jwamswsock.pas
   jwanative.pas
   jwanb30.pas
   jwanetsh.pas
   jwanspapi.pas
   jwantddpar.pas
   jwantdsapi.pas
   jwantdsbcli.pas
   jwantdsbmsg.pas
   jwantldap.pas
   jwantquery.pas
   jwantsecapi.pas
   jwantstatus.pas
   jwaObjsel.pas
   jwapatchapi.pas
   jwapatchwiz.pas
   jwapbt.pas
   jwapdh.pas
   jwapdhmsg.pas
   jwapowrprof.pas
   jwaprofinfo.pas
   jwaprotocol.pas
   jwaprsht.pas
   jwapsapi.pas
   jwaqos.pas
   jwaqosname.pas
   jwaqospol.pas
   jwaqossp.pas
   jwareason.pas
   jwaregstr.pas
   jwarpc.pas
   jwarpcasync.pas
   jwarpcdce.pas
   jwarpcnsi.pas
   jwarpcnterr.pas
   jwarpcssl.pas
   jwascesvc.pas
   jwaschedule.pas
   jwaschemadef.pas
   jwasddl.pas
   jwasecext.pas
   jwasecurity.pas
   jwasens.pas
   jwasensapi.pas
   jwasensevts.pas
   jwasfc.pas
   jwashlguid.pas
   jwasisbkup.pas
   jwasnmp.pas
   jwasporder.pas
   jwasrrestoreptapi.pas
   jwasspi.pas
   jwasubauth.pas
   jwasvcguid.pas
   jwatlhelp32.pas
   jwatmschema.pas
   jwatraffic.pas
   jwauserenv.pas
   jwauxtheme.pas
   jwawbemcli.pas
   jwawinable.pas
   jwawinber.pas
   jwawincon.pas
   jwawincpl.pas
   jwawincred.pas
   jwawindns.pas
   jwawinefs.pas
   jwawinfax.pas
   jwawingdi.pas
   jwawinioctl.pas
   jwawinldap.pas
   jwawinnetwk.pas
   jwawinnls.pas
   jwawinnt.pas
   jwawinperf.pas
   jwawinreg.pas
   jwawinresrc.pas
   jwawinsafer.pas
   jwawinsock.pas
   jwawinsock2.pas
   jwawinsvc.pas
   jwawintype.pas
   jwawinver.pas
   jwawinwlx.pas
   jwawmistr.pas
   jwawownt16.pas
   jwawownt32.pas
   jwawpapi.pas
   jwawpapimsg.pas
   jwawpcrsmsg.pas
   jwawpftpmsg.pas
   jwawppstmsg.pas
   jwawpspihlp.pas
   jwawptypes.pas
   jwawpwizmsg.pas
   jwaws2atm.pas
   jwaws2bth.pas
   jwaws2dnet.pas
   jwaws2spi.pas
   jwaws2tcpip.pas
   jwawshisotp.pas
   jwawsipx.pas
   jwawsnetbs.pas
   jwawsnwlink.pas
   jwawsrm.pas
   jwawsvns.pas
   jwawtsapi32.pas
   jwazmouse.pas
   Makefile.fpc
   mmsystem.pp
   ole2.pp
   shellapi.pp
   shfolder.pp
   shlobj.pp
   winver.pp

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
{******************************************************************************}
{                                                                              }
{ Object Picker API interface Unit for Object Pascal                           }
{                                                                              }
{ Portions created by Microsoft are Copyright (C) 1995-2001 Microsoft          }
{ Corporation. All Rights Reserved.                                            }
{                                                                              }
{ The original file is: objsel.h, released June 2000. The original Pascal      }
{ code is: ObjSel.pas, released December 2000. The initial developer of the    }
{ Pascal code is Marcel van Brakel (brakelm att chello dott nl).               }
{                                                                              }
{ Portions created by Marcel van Brakel are Copyright (C) 1999-2001            }
{ Marcel van Brakel. All Rights Reserved.                                      }
{                                                                              }
{ Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI)        }
{                                                                              }
{ You may retrieve the latest version of this file at the Project JEDI         }
{ APILIB home page, located at http://jedi-apilib.sourceforge.net              }
{                                                                              }
{ The contents of this file are used with permission, subject to the Mozilla   }
{ Public License Version 1.1 (the "License"); you may not use this file except }
{ in compliance with the License. You may obtain a copy of the License at      }
{ http://www.mozilla.org/MPL/MPL-1.1.html                                      }
{                                                                              }
{ Software distributed under the License is distributed on an "AS IS" basis,   }
{ WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
{ the specific language governing rights and limitations under the License.    }
{                                                                              }
{ Alternatively, the contents of this file may be used under the terms of the  }
{ GNU Lesser General Public License (the  "LGPL License"), in which case the   }
{ provisions of the LGPL License are applicable instead of those above.        }
{ If you wish to allow use of your version of this file only under the terms   }
{ of the LGPL License and not to allow others to use your version of this file }
{ under the MPL, indicate your decision by deleting  the provisions above and  }
{ replace  them with the notice and other provisions required by the LGPL      }
{ License.  If you do not delete the provisions above, a recipient may use     }
{ your version of this file under either the MPL or the LGPL License.          }
{                                                                              }
{ For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
{                                                                              }
{******************************************************************************}


unit JwaObjSel;

{$WEAKPACKAGEUNIT}

{$HPPEMIT ''}
{$HPPEMIT '#include "ObjSel.h"'}
{$HPPEMIT ''}

{$I jediapilib.inc}

interface

uses
  ActiveX {TODO}, JwaWinType;

//  Contents:   Object Picker Dialog public header

const
  //'{17d6ccd8-3b7b-11d2-b9e0-00c04fd8dbf7}'
  CLSID_DsObjectPicker: TGUID = (
    D1:$17d6ccd8; D2:$3b7b; D3:$11d2; D4:($b9,$e0,$00,$c0,$4f,$d8,$db,$f7));
  {$EXTERNALSYM CLSID_DsObjectPicker}

  IID_IDsObjectPicker: TGUID = (
    D1:$0c87e64e; D2:$3b7a; D3:$11d2; D4:($b9,$e0,$00,$c0,$4f,$d8,$db,$f7));
  {$EXTERNALSYM IID_IDsObjectPicker}

{
CLIPBOARD FORMATS
=================

CFSTR_DSOP_DS_SELECTION_LIST
    Returns an HGLOBAL for global memory containing a DS_SELECTION_LIST
    variable length structure.
}

const
  CFSTR_DSOP_DS_SELECTION_LIST = 'CFSTR_DSOP_DS_SELECTION_LIST';
  {$EXTERNALSYM CFSTR_DSOP_DS_SELECTION_LIST}

{
SCOPE TYPES
===========

A scope is an entry in the "Look In" dropdown list of the Object Picker
dialog.

When initializing the DS Object Picker, DSOP_SCOPE_TYPEs are used with
DSOP_SCOPE_INIT_INFO.flType member to specify which types of scopes the
DS Object Picker should put in the "Look In" list.

DSOP_SCOPE_TYPE_TARGET_COMPUTER
    Computer specified by DSOP_INIT_INFO.pwzTargetComputer, NULL is
    local computer.

DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN
    Uplevel domain to which target computer is joined.

DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN
    Downlevel domain to which target computer is joined.

DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN
    All domains in the enterprise to which the target computer belongs
    other than the JOINED_DOMAIN or USER_SPECIFIED_*_SCOPEs.

DSOP_SCOPE_TYPE_GLOBAL_CATALOG
    The Entire Directory scope.

DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN
    All uplevel domains external to the enterprise but trusted by the
    domain to which the target computer is joined.

DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN
    All downlevel domains external to the enterprise but trusted by the
    domain to which the target computer is joined.

DSOP_SCOPE_TYPE_WORKGROUP
    The workgroup of which TARGET_COMPUTER is a member.  Applies only if the
    TARGET_COMPUTER is not joined to a domain.

DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE
DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE
    Any uplevel or downlevel scope generated by processing user input.  If
    neither of these types is specified, user entries that do not refer to
    one of the scopes in the "Look In" control will be rejected.

}

const
  DSOP_SCOPE_TYPE_TARGET_COMPUTER              = $00000001;
  {$EXTERNALSYM DSOP_SCOPE_TYPE_TARGET_COMPUTER}
  DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN        = $00000002;
  {$EXTERNALSYM DSOP_SCOPE_TYPE_UPLEVEL_JOINED_DOMAIN}
  DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN      = $00000004;
  {$EXTERNALSYM DSOP_SCOPE_TYPE_DOWNLEVEL_JOINED_DOMAIN}
  DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN            = $00000008;
  {$EXTERNALSYM DSOP_SCOPE_TYPE_ENTERPRISE_DOMAIN}
  DSOP_SCOPE_TYPE_GLOBAL_CATALOG               = $00000010;
  {$EXTERNALSYM DSOP_SCOPE_TYPE_GLOBAL_CATALOG}
  DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN      = $00000020;
  {$EXTERNALSYM DSOP_SCOPE_TYPE_EXTERNAL_UPLEVEL_DOMAIN}
  DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN    = $00000040;
  {$EXTERNALSYM DSOP_SCOPE_TYPE_EXTERNAL_DOWNLEVEL_DOMAIN}
  DSOP_SCOPE_TYPE_WORKGROUP                    = $00000080;
  {$EXTERNALSYM DSOP_SCOPE_TYPE_WORKGROUP}
  DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE   = $00000100;
  {$EXTERNALSYM DSOP_SCOPE_TYPE_USER_ENTERED_UPLEVEL_SCOPE}
  DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE = $00000200;
  {$EXTERNALSYM DSOP_SCOPE_TYPE_USER_ENTERED_DOWNLEVEL_SCOPE}

{
DSOP_SCOPE_INIT_INFO flags
==========================

The flScope member can contain zero or more of the following flags:

DSOP_SCOPE_FLAG_STARTING_SCOPE
    The scope should be the first one selected in the Look In control after
    dialog initialization.  If more than one scope specifies this flag,
    the one which is chosen to be the starting scope is implementation
    dependant.

DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT
    ADs paths for objects selected from this scope should be converted to use
    the WinNT provider.

DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP
    ADs paths for objects selected from this scope should be converted to use
    the LDAP provider.

DSOP_SCOPE_FLAG_WANT_PROVIDER_GC
    ADs paths for objects selected from this scope should be converted to use
    the GC provider.

DSOP_SCOPE_FLAG_WANT_SID_PATH
    ADs paths for objects selected from this scope having an objectSid
    attribute should be converted to the form LDAP://<SID=x>, where x
    represents the hexidecimal digits of the objectSid attribute value.

DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH
    ADs paths for downlevel well-known SID objects (for example,
    DSOP_DOWNLEVEL_FILTER_INTERACTIVE) are an empty string unless this flag is
    specified.  If it is, the paths will be of the form
    WinNT://NT AUTHORITY/Interactive or WinNT://Creator owner.

DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS
    If the scope filter contains the DSOP_FILTER_USERS or
    DSOP_DOWNLEVEL_FILTER_USERS flag, then check the Users checkbox by
    default in the Look For dialog.

DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS

DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS

DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS
}

const
  DSOP_SCOPE_FLAG_STARTING_SCOPE              = $00000001;
  {$EXTERNALSYM DSOP_SCOPE_FLAG_STARTING_SCOPE}
  DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT         = $00000002;
  {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_PROVIDER_WINNT}
  DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP          = $00000004;
  {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_PROVIDER_LDAP}
  DSOP_SCOPE_FLAG_WANT_PROVIDER_GC            = $00000008;
  {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_PROVIDER_GC}
  DSOP_SCOPE_FLAG_WANT_SID_PATH               = $00000010;
  {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_SID_PATH}
  DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH = $00000020;
  {$EXTERNALSYM DSOP_SCOPE_FLAG_WANT_DOWNLEVEL_BUILTIN_PATH}
  DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS        = $00000040;
  {$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_USERS}
  DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS       = $00000080;
  {$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_GROUPS}
  DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS    = $00000100;
  {$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_COMPUTERS}
  DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS     = $00000200;
  {$EXTERNALSYM DSOP_SCOPE_FLAG_DEFAULT_FILTER_CONTACTS}

{
The flMixedModeOnly/flNativeModeOnly member of an uplevel scope can
contain one or more of the following flags (at least one must be specified):

DSOP_FILTER_INCLUDE_ADVANCED_VIEW
    Include objects which have the attribute showInAdvancedViewOnly set to
    true.

DSOP_FILTER_USERS
    Include user objects.

DSOP_FILTER_BUILTIN_GROUPS
    Include group objects with a groupType value having the flag
    GROUP_TYPE_BUILTIN_LOCAL_GROUP.

DSOP_FILTER_WELL_KNOWN_PRINCIPALS
    Include the contents of the WellKnown Security Principals container.

DSOP_FILTER_UNIVERSAL_GROUPS_DL
    Include distribution list universal groups.

DSOP_FILTER_UNIVERSAL_GROUPS_SE
    Include security enabled universal groups.

DSOP_FILTER_GLOBAL_GROUPS_DL
    Include distribution list global groups.

DSOP_FILTER_GLOBAL_GROUPS_SE
    Include security enabled global groups.

DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL
    Include distribution list domain global groups.

DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE
    Include security enabled domain local groups.

DSOP_FILTER_CONTACTS
    Include contact objects.

DSOP_FILTER_COMPUTERS
    Include computer objects.
}

const
  DSOP_FILTER_INCLUDE_ADVANCED_VIEW  = $00000001;
  {$EXTERNALSYM DSOP_FILTER_INCLUDE_ADVANCED_VIEW}
  DSOP_FILTER_USERS                  = $00000002;
  {$EXTERNALSYM DSOP_FILTER_USERS}
  DSOP_FILTER_BUILTIN_GROUPS         = $00000004;
  {$EXTERNALSYM DSOP_FILTER_BUILTIN_GROUPS}
  DSOP_FILTER_WELL_KNOWN_PRINCIPALS  = $00000008;
  {$EXTERNALSYM DSOP_FILTER_WELL_KNOWN_PRINCIPALS}
  DSOP_FILTER_UNIVERSAL_GROUPS_DL    = $00000010;
  {$EXTERNALSYM DSOP_FILTER_UNIVERSAL_GROUPS_DL}
  DSOP_FILTER_UNIVERSAL_GROUPS_SE    = $00000020;
  {$EXTERNALSYM DSOP_FILTER_UNIVERSAL_GROUPS_SE}
  DSOP_FILTER_GLOBAL_GROUPS_DL       = $00000040;
  {$EXTERNALSYM DSOP_FILTER_GLOBAL_GROUPS_DL}
  DSOP_FILTER_GLOBAL_GROUPS_SE       = $00000080;
  {$EXTERNALSYM DSOP_FILTER_GLOBAL_GROUPS_SE}
  DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL = $00000100;
  {$EXTERNALSYM DSOP_FILTER_DOMAIN_LOCAL_GROUPS_DL}
  DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE = $00000200;
  {$EXTERNALSYM DSOP_FILTER_DOMAIN_LOCAL_GROUPS_SE}
  DSOP_FILTER_CONTACTS               = $00000400;
  {$EXTERNALSYM DSOP_FILTER_CONTACTS}
  DSOP_FILTER_COMPUTERS              = $00000800;
  {$EXTERNALSYM DSOP_FILTER_COMPUTERS}

{
The flFilter member of a downlevel scope can contain one or more of the
following flags:

DSOP_DOWNLEVEL_FILTER_USERS
    Include user objects.

DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS
    Include all local groups.

DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS
    Include all global groups.

DSOP_DOWNLEVEL_FILTER_COMPUTERS
    Include computer objects

DSOP_DOWNLEVEL_FILTER_WORLD
    Include builtin security principal World (Everyone).

DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER
    Include builtin security principal Authenticated User.

DSOP_DOWNLEVEL_FILTER_ANONYMOUS
    Include builtin security principal Anonymous.

DSOP_DOWNLEVEL_FILTER_BATCH
    Include builtin security principal Batch.

DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER
    Include builtin security principal Creator Owner.

DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP
    Include builtin security principal Creator Group.

DSOP_DOWNLEVEL_FILTER_DIALUP
    Include builtin security principal Dialup.

DSOP_DOWNLEVEL_FILTER_INTERACTIVE
    Include builtin security principal Interactive.

DSOP_DOWNLEVEL_FILTER_NETWORK
    Include builtin security principal Network.

DSOP_DOWNLEVEL_FILTER_SERVICE
    Include builtin security principal Service.

DSOP_DOWNLEVEL_FILTER_SYSTEM
    Include builtin security principal System.

DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS
    Exclude local builtin groups returned by groups enumeration.

DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER
    Include builtin security principal Terminal Server.

DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE
    Include builtin security principal Local Service

DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE
    Include builtin security principal Network Service

DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS
    Include all builtin security principals.
}

const
  DSOP_DOWNLEVEL_FILTER_USERS                  = DWORD($80000001);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_USERS}
  DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS           = DWORD($80000002);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_LOCAL_GROUPS}
  DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS          = DWORD($80000004);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_GLOBAL_GROUPS}
  DSOP_DOWNLEVEL_FILTER_COMPUTERS              = DWORD($80000008);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_COMPUTERS}
  DSOP_DOWNLEVEL_FILTER_WORLD                  = DWORD($80000010);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_WORLD}
  DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER     = DWORD($80000020);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_AUTHENTICATED_USER}
  DSOP_DOWNLEVEL_FILTER_ANONYMOUS              = DWORD($80000040);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_ANONYMOUS}
  DSOP_DOWNLEVEL_FILTER_BATCH                  = DWORD($80000080);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_BATCH}
  DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER          = DWORD($80000100);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_CREATOR_OWNER}
  DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP          = DWORD($80000200);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_CREATOR_GROUP}
  DSOP_DOWNLEVEL_FILTER_DIALUP                 = DWORD($80000400);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_DIALUP}
  DSOP_DOWNLEVEL_FILTER_INTERACTIVE            = DWORD($80000800);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_INTERACTIVE}
  DSOP_DOWNLEVEL_FILTER_NETWORK                = DWORD($80001000);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_NETWORK}
  DSOP_DOWNLEVEL_FILTER_SERVICE                = DWORD($80002000);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_SERVICE}
  DSOP_DOWNLEVEL_FILTER_SYSTEM                 = DWORD($80004000);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_SYSTEM}
  DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS = DWORD($80008000);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_EXCLUDE_BUILTIN_GROUPS}
  DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER        = DWORD($80010000);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_TERMINAL_SERVER}
  DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS     = DWORD($80020000);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_ALL_WELLKNOWN_SIDS}
  DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE          = DWORD($80040000);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_LOCAL_SERVICE}
  DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE        = DWORD($80080000);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_NETWORK_SERVICE}
  DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON           = DWORD($80100000);
  {$EXTERNALSYM DSOP_DOWNLEVEL_FILTER_REMOTE_LOGON}

{
DSOP_UPLEVEL_FILTER_FLAGS
=========================

Contains the DSOP_FILTER_* flags for use with a DSOP_SCOPE_INIT_INFO
structure when the scope is uplevel (DS-aware).

flBothModes
    Flags to use for an uplevel scope, regardless of whether it is a
    mixed or native mode domain.

flMixedModeOnly
    Flags to use when an uplevel domain is in mixed mode.

flNativeModeOnly
    Flags to use when an uplevel domain is in native mode.

DSOP_FILTER_FLAGS
=================

Uplevel
    Contains flags to use for an uplevel scope.

flDownlevel
    Flags to use for a downlevel scope.
}

type
  _DSOP_UPLEVEL_FILTER_FLAGS = record
    flBothModes: ULONG;
    flMixedModeOnly: ULONG;
    flNativeModeOnly: ULONG;
  end;
  {$EXTERNALSYM _DSOP_UPLEVEL_FILTER_FLAGS}
  DSOP_UPLEVEL_FILTER_FLAGS = _DSOP_UPLEVEL_FILTER_FLAGS;
  {$EXTERNALSYM DSOP_UPLEVEL_FILTER_FLAGS}
  TDsOpUpLevelFilterFlags = DSOP_UPLEVEL_FILTER_FLAGS;
  PDsOpUpLevelFilterFlags = ^DSOP_UPLEVEL_FILTER_FLAGS;

  _DSOP_FILTER_FLAGS = record
    Uplevel: DSOP_UPLEVEL_FILTER_FLAGS;
    flDownlevel: ULONG;
  end;
  {$EXTERNALSYM _DSOP_FILTER_FLAGS}
  DSOP_FILTER_FLAGS = _DSOP_FILTER_FLAGS;
  {$EXTERNALSYM DSOP_FILTER_FLAGS}
  TDsOpFilterFlags = DSOP_FILTER_FLAGS;
  PDsOpFilterFlags = ^DSOP_FILTER_FLAGS;

{
DSOP_SCOPE_INIT_INFO
====================

Each DSOP_SCOPE_INIT_INFO structure in the array DSOP_INIT_INFO.aDsScopeInfos
describes a single scope or a group of scopes with the same settings.

cbSize
    Size, in bytes, of the entire structure.

flType
    DSOP_SCOPE_TYPE_* flags.  It is legal to combine multiple values via
    bitwise OR if all of the types of scopes combined in this way require
    the same settings.

flScope
    DSOP_SCOPE_ * flags.

FilterFlags
    DSOP_FILTER_* flags that indicate which types of objects should be
    presented to the user in this scope.

pwzDcName
    Name of the DC of a domain.  This member is used only if the flType
    member contains the flag DSOP_SCOPE_TYPE_JOINED_DOMAIN.  If that flag is
    not set, this member must be NULL.

pwzADsPath
    Currently not supported, must be NULL.

hr
    Filled with S_OK if the scope represented by this structure could be
    created, or an error message indicating why it could not.  If
    IDsObjectPicker::SetScopes returns a success code, this value will
    also be a success code.
}

type
  PDSOP_SCOPE_INIT_INFO = ^DSOP_SCOPE_INIT_INFO;
  {$EXTERNALSYM PDSOP_SCOPE_INIT_INFO}
  _DSOP_SCOPE_INIT_INFO = record
    cbSize: ULONG;
    flType: ULONG;
    flScope: ULONG;
    FilterFlags: DSOP_FILTER_FLAGS;
    pwzDcName: PWSTR;  // OPTIONAL
    pwzADsPath: PWSTR; // OPTIONAL
    hr: HRESULT;
  end;
  {$EXTERNALSYM _DSOP_SCOPE_INIT_INFO}
  DSOP_SCOPE_INIT_INFO = _DSOP_SCOPE_INIT_INFO;
  {$EXTERNALSYM DSOP_SCOPE_INIT_INFO}
  PCDSOP_SCOPE_INIT_INFO = PDSOP_SCOPE_INIT_INFO;
  {$EXTERNALSYM PCDSOP_SCOPE_INIT_INFO}
  TDsOpScopeInitInfo = DSOP_SCOPE_INIT_INFO;
  PDsOpScopeInitInfo = PDSOP_SCOPE_INIT_INFO;

{
DSOP_INIT_INFO flags
====================

The following flags may be set in DSOP_INIT_INFO.flOptions:

DSOP_FLAG_MULTISELECT
    Allow multiple selections.  If this flag is not set, the dialog will
    return zero or one objects.

DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK
    If this flag is NOT set, then the DSOP_SCOPE_TYPE_TARGET_COMPUTER flag
    will be ignored if the target computer is a DC.  This flag has no effect
    unless DSOP_SCOPE_TYPE_TARGET_COMPUTER is specified.

}

const
  DSOP_FLAG_MULTISELECT                   = $00000001;
  {$EXTERNALSYM DSOP_FLAG_MULTISELECT}
  DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK = $00000002;
  {$EXTERNALSYM DSOP_FLAG_SKIP_TARGET_COMPUTER_DC_CHECK}

{
DSOP_INIT_INFO
==============

Used to configure the DS Object Picker dialog.

cbSize
    Size, in bytes, of entire structure.

pwzTargetComputer
    Sets the computer associated with DSOP_SCOPE_TARGET_COMPUTER, and
    which is used to determine the joined domain and enterprise.
    If this value is NULL, the target computer is the local machine.

cDsScopeInfos
    Count of elements in aDsScopeInfos.  Must be at least 1, since
    the object picker cannot operate without at least one scope.

aDsScopeInfos
    Array of scope initialization structures.  Must be present and
    contain at least one element.

flOptions
    Various DS Object Picker flags (DSOP_FLAG_MULTISELECT).

cAttributesToFetch
    Count of elements in apwzAttributeNames.  Can be 0.

apwzAttributeNames
    Array of names of attributes to fetch for each object.  Ignored
    if cAttributesToFetch is 0.
}

type
  PDSOP_INIT_INFO = ^DSOP_INIT_INFO;
  {$EXTERNALSYM PDSOP_INIT_INFO}
  _DSOP_INIT_INFO = record
    cbSize: ULONG;
    pwzTargetComputer: PWSTR;
    cDsScopeInfos: ULONG;
    aDsScopeInfos: PDSOP_SCOPE_INIT_INFO;
    flOptions: ULONG;
    cAttributesToFetch: ULONG;
    apwzAttributeNames: LPLPWSTR;
  end;
  {$EXTERNALSYM _DSOP_INIT_INFO}
  DSOP_INIT_INFO = _DSOP_INIT_INFO;
  {$EXTERNALSYM DSOP_INIT_INFO}
  PCDSOP_INIT_INFO = PDSOP_INIT_INFO;
  {$EXTERNALSYM PCDSOP_INIT_INFO}
  TDsOpInitInfo = DSOP_INIT_INFO;
  PDsOpInitInfo = PDSOP_INIT_INFO;

{
DS_SELECTION
============
Describes an object selected by the user.

pwzName
    The object's RDN.

pwzADsPath
    The object's ADsPath.

pwzClass
    The object's class attribute value.

pwzUPN
    The object's userPrincipalName attribute value.

pvarFetchedAttributes
    An array of VARIANTs, one for each attribute fetched.

flScopeType
    A single DSOP_SCOPE_TYPE_* flag describing the type of the scope
    from which this object was selected.

DS_SELECTION_LIST
=================
Available as a clipboard format from the data object returned by
IDsObjectPicker::InvokeDialog.  Contains a list of objects that the user
selected.

cItems
    Number of elements in the aDsSelection array.

cFetchedAttributes
    Number of elements in each DSSELECTION.avarFetchedAttributes member.

aDsSelection
    Array of cItems DSSELECTION structures.
}

type
  PDS_SELECTION = ^DS_SELECTION;
  {$EXTERNALSYM PDS_SELECTION}
  _DS_SELECTION = record
    pwzName: PWSTR;
    pwzADsPath: PWSTR;
    pwzClass: PWSTR;
    pwzUPN: PWSTR;
    pvarFetchedAttributes: POleVariant; 
    flScopeType: ULONG;
  end;
  {$EXTERNALSYM _DS_SELECTION}
  DS_SELECTION = _DS_SELECTION;
  {$EXTERNALSYM DS_SELECTION}
  TDsSelection = DS_SELECTION;
  PDsSelection = PDS_SELECTION;

  PDS_SELECTION_LIST = ^DS_SELECTION_LIST;
  {$EXTERNALSYM PDS_SELECTION_LIST}
  _DS_SELECTION_LIST = record
    cItems: ULONG;
    cFetchedAttributes: ULONG;
    aDsSelection: array [0..ANYSIZE_ARRAY - 1] of DS_SELECTION;
  end;
  {$EXTERNALSYM _DS_SELECTION_LIST}
  DS_SELECTION_LIST = _DS_SELECTION_LIST;
  {$EXTERNALSYM DS_SELECTION_LIST}
  TDsSelectionList = DS_SELECTION_LIST;
  PDsSelectionList = PDS_SELECTION_LIST;

//
// Object Picker Interfaces
//

//
// The main interface to the DS Object Picker, used to initialize it,
// invoke the dialog, and return the user's selections.
//

type
  IDsObjectPicker = interface (IUnknown)
  ['{0c87e64e-3b7a-11d2-b9e0-00c04fd8dbf7}']
    // Sets scope, filter, etc. for use with next invocation of dialog
    function Initialize(const pInitInfo: DSOP_INIT_INFO): HRESULT; stdcall;
    // Creates the modal DS Object Picker dialog.
    function InvokeDialog(hwndParent: HWND; out ppdoSelections: IDataObject): HRESULT; stdcall;
  end;
  {$EXTERNALSYM IDsObjectPicker}

implementation

end.

About Koders | Resources | Downloads | Support | Black Duck | Terms of Service | DMCA | Privacy Policy | Contact Us