Directory Services

DSBROWSEINFO

The DSBROWSEINFO structure is used with the DsBrowseForContainer function to supply and return data about the Active Directory® container browser dialog box.

typedef struct {
DWORD cbStruct;
HWND hwndOwner;
LPCTSTR pszCaption;
LPCTSTR pszTitle;
LPCWSTR pszRoot;
LPWSTR pszPath;
ULONG cchPath;
DWORD dwFlags;
BFFCALLBACK pfnCallback;
LPARAM lParam;
DWORD dwReturnFormat;
LPCWSTR pUserName;
LPCWSTR pPassword;
LPWSTR pszObjectClass;
ULONG cchObjectClass; } DSBROWSEINFOW,
*PDSBROWSEINFOW;

Members

cbStruct
Contains the size, in bytes, of the DSBROWSEINFO structure. This is used by the DsBrowseForContainer function for versioning purposes.
hwndOwner
Handle of the window used as the parent of the container browser dialog box.
pszCaption
Pointer to a null-terminated string that contains the caption of the dialog box. If this member is NULL, a default caption is used.
pszTitle
Pointer to a null-terminated string that contains additional text to be displayed in the dialog box above the tree control. If this member is NULL, no additional text is displayed.
pszRoot
Pointer to a null-terminated Unicode string that contains the ADsPath of the container placed at the root of the dialog box. The user cannot navigate above this level using the dialog box.
pszPath
Pointer to a null-terminated Unicode string that receives the ADsPath of the container selected in the dialog. This string will always be null-terminated even if cchPath is not large enough to hold the entire path. If dwFlags contains the DSBI_EXPANDONOPEN flag, this member contains the ADsPath of the container that should be initially selected in the dialog box.
cchPath
Contains the size, in WCHAR characters, of the pszPath buffer.
dwFlags
Contains a set of flags that define the behavior of the dialog box. This can be zero or a combination of one or more of the following values.
Value Meaning
DSBI_CHECKBOXES Causes a checkbox to be placed next to each item in the tree. The user can use the mouse to select and clear this checkbox. This currently has limited usage because there is no way to set or get the check state of an item.
DSBI_ENTIREDIRECTORY Includes all the trusted domains to the server specified in pszRoot or, by default, the domain that the user is logged in to.
DSBI_EXPANDONOPEN When the dialog box opens, the container specified in pszPath will be visible and selected.
DSBI_HASCREDENTIALS pUserName and pPassword are used for the access credentials. Otherwise, if this member does not contain DSBI_SIMPLEAUTHENTICATE, the dialog uses the security context of the calling thread.
DSBI_IGNORETREATASLEAF When determining if the object is displayed in the dialog box, the treatAsLeaf display specifier is ignored.
DSBI_INCLUDEHIDDEN Include hidden objects in the dialog box.
DSBI_NOBUTTONS The + and - buttons are not displayed in the dialog box.
DSBI_NOLINES The lines connecting the objects in the dialog box are not be displayed.
DSBI_NOLINESATROOT The lines and buttons above the root objects are not displayed.
DSBI_NOROOT The root object, specified by pszRoot, is not displayed and the immediate children of the root are displayed at the root of the tree. This flag has no effect if pszRoot is NULL or if this member contains DSBI_ENTIREDIRECTORY.
DSBI_RETURN_FORMAT Indicates that the dwReturnFormat member is valid. If this flag is not set, the path format defaults to X.500.
DSBI_RETURNOBJECTCLASS Indicates that the pszObjectClass and cchObjectClass are valid and should be filled.
DSBI_SIMPLEAUTHENTICATE Indicates that secure authentication is not required when calling ADsOpenObject.
pfnCallback
Pointer to an application-defined BFFCallBack callback function that receives notifications from the container browser dialog box. Set this member to NULL if it is not used.
lParam
Contains an application-defined 32-bit value passed as the lpData parameter in all calls to pfnCallback. This member is ignored if pfnCallback is NULL.
dwReturnFormat
Contains one of the ADS_FORMAT_ENUM values that specifies the format that the ADSI path returned in pszPath will accept.
pUserName
Pointer to a Unicode string that contains the user name used for the credentials. This member is ignored if dwFlags does not have the DSBI_HASCREDENTIALS flag set. If this member is NULL, the currently logged on user name is used.
pPassword
Pointer to a Unicode string that contains the password used for the credentials. This member is ignored if dwFlags does not have the DSBI_HASCREDENTIALS flag set. If this member is NULL, the password of the currently logged on user is used.
pszObjectClass
Pointer to a Unicode string buffer that receives the class string of the selected. This member is ignored if dwFlags does not have the DSBI_RETURNOBJECTCLASS flag set.
cchObjectClass
Contains the size, in WCHAR characters, of the pszObjectClass buffer.

Requirements

Client: Included in Windows XP and Windows 2000 Professional.
Server: Included in Windows Server 2003 and Windows 2000 Server.
Unicode: Declared as Unicode and ANSI structures.
Header: Declared in Dsclient.h.

See Also

DsBrowseForContainer, ADsOpenObject, BFFCallBack, ADS_FORMAT_ENUM