📄 objsel.pas
字号:
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_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.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -