Platform SDK: Active Directory, ADSI, and Directory Services

DSBROWSEINFO

The DSBROWSEINFO structure is used by the DsBrowseForContainer function to specify the state and behavior of a dialog for browsing parts of Active Directory™.

typedef struct DSBROWSEINFOW
{
  DWORD    cbStruct;
  HWND     hwndOwner;
  LPCWSTR  pszCaption;
  LPCWSTR  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
The size of the structure used for versioning.
hwndOwner
The parent of the dialog, used for modality.
pszCaption
The dialog caption text (Can be NULL).
pszTitle
Text displayed above the tree view control (Can be NULL).
pszRoot
The ADSI path specifying the place in Active Directory to begin enumeration.
pszPath
[in/out] On entry can contain the path to open the dialog to. On exit contains the users path.
cchPath
Size of the pszPath buffer (used on exit).
dwFlags
Invocation flags can be a combination of any flags in the following table.
dwFlags Description
DSBI_CHECKBOXES NOT IMPLEMENTED.
DSBI_ENTIREDIRECTORY Includes all the trusted domains to the server specified in pszPath (or the domain that the user is logged in to).
DSBI_EXPANDONOPEN When opening the dialog, expands the tree view to the path specified in pszPath.
DSBI_HASCREDENTIALS Indicates that pUserName and pPassword are valid.
DSBI_IGNORETREATASLEAF When determining the container attribute for the objects, ignores the display specifier's attributes for this object.
DSBI_INCLUDEHIDDEN Shows all objects, even those marked as hidden.
DSBI_NOBUTTONS Removes + or - icons from the tree view.
DSBI_NOLINES Removes lines connecting each node in the tree view.
DSBI_NOLINESATROOT Removes lines from the root down from the tree view.
DSBI_NOROOT Removes the root object in the tree.
DSBI_RETURN_FORMAT Indicates that the dwReturnFormat is valid and can be used to format the return path. If it is not valid, an X.500 format name is specified.
DSBI_RETURNOBJECTCLASS Indicates that the pszObjectClass and cchObjectClass are valid and should be filled.
DSBI_SIMPLEAUTHENTICATE Indicates that secure authentication is not needed when calling ADsOpenObject.

pfnCallback
The callback function used to filter, modify and otherwise update the view based on selection change etc. For the information on the prototype of this callback function, see _BrowseCallBack.
lParam
Passed to pfnCallback as lpData.
dwReturnFormat
The return format for the ADSI path ( ADS_FORMAT_* ). This is passed to IADsPathname::Retrieve.
pUserName
User name used for logging onto a different server. A Null value indicates the current user.
pPassword
Password used for logging onto a different server. A Null value indicates the current user password.
pszObjectClass
The Unicode string for the object class.
cchObjectClass
Size of the object class string.

Remarks

The caller of the DsBrowseForContainer fills in this structure in order to display the browse dialog for a user to navigate along an Active Directory tree. An example of such an dialog can be seen when you choose the "Browse…" button in "Start->Search->For Printers" on a Windows® 2000 machine belonging to an Active Directory domain.

Requirements

  Windows NT/2000: Requires Windows 2000.
  Header: Declared in Dsclient.h.
  Unicode: Declared as Unicode and ANSI structures.

See Also

Active Directory Display Structures, DsBrowseForContainer, _BrowseCallBack, DSBITEM