⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 objsel.pas

📁 East make Tray Icon in delphi
💻 PAS
📖 第 1 页 / 共 2 页
字号:
{******************************************************************************

 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 home
 page, located at http://delphi-jedi.org or my personal homepage located at
 http://members.chello.nl/m.vanbrakel2

 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 ObjSel;

{$I jvcl.inc}
{$I windowsonly.inc}

{$WEAKPACKAGEUNIT}

{$HPPEMIT ''}
{$HPPEMIT '#include "ObjSel.h"'}
{$HPPEMIT ''}
{$HPPEMIT 'typedef IDsObjectPicker* _di_IDsObjectPicker;'}

interface

uses
  Windows, ActiveX;

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.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -