Directory Services

DSBITEM

The DSBITEM structure contains data about an item in the Active Directory container browser dialog box. This structure is passed with the DSBM_QUERYINSERT notification to the BFFCallBack callback function. The container browser dialog box is created with the DsBrowseForContainer function.

typedef struct {
DWORD cbStruct;
LPCWSTR pszADsPath;
LPCWSTR pszClass;
DWORD dwMask;
DWORD dwState;
DWORD dwStateMask;
TCHAR szDisplayName[DSB_MAX_DISPLAYNAME_CHARS];
TCHAR szIconLocation[MAX_PATH];
INT iIconResID; } DSBITEM,
*PDSBITEM;

Members

cbStruct
Contains the size, in bytes, of the structure.
pszADsPath
Pointer to a null-terminated Unicode string that contains the ADsPath of the item.
pszClass
Pointer to a null-terminated Unicode string that contains the object class name of the item.
dwMask
Contains a set of flags that indicate which members of the structure contain valid data. This can be zero or a combination of one or more of the following values.
Value Meaning
DSBF_DISPLAYNAME The szDisplayName member contains valid data.
DSBF_ICONLOCATION The szIconLocation and iIconResID members contain valid data.
DSBF_STATE The dwState and dwStateMask members contain valid data.
dwState
Contains a set of flags that indicate the state of the item. This can be zero or a combination of one or more of the following values.
Value Meaning
DSBS_CHECKED If this flag is set, the item is selected. Otherwise, the item is not selected. This flag is not currently supported.
DSBS_HIDDEN If this flag is set, the item is hidden. Otherwise, the item is visible.
DSBS_ROOT If this flag is set, the item is a root item. Otherwise, the item is not a root item.
dwStateMask
Contains a set of flags that indicate which flags in the dwState member contain valid data. This can be zero or a combination of one or more of the following values. For example, if dwStateMask has the DSBS_HIDDEN flag set and dwState does not have the DSBS_HIDDEN flag set, then the item is visible. If dwStateMask does not have the DSBS_HIDDEN flag set, then the DSBS_HIDDEN flag in dwState must be ignored.
Value Meaning
DSBS_CHECKED The DSBS_CHECKED flag in the dwState member contains valid data.
DSBS_HIDDEN The DSBS_HIDDEN flag in the dwState member contains valid data.
DSBS_ROOT The DSBS_ROOT flag in the dwState member contains valid data.
szDisplayName
Pointer to a null-terminated string that contains the display name of the item. The display name of an item can be changed by copying the new display name into this member, setting the DSBF_DISPLAYNAME flag in the dwMask member, and returning a non-zero value from BFFCallBack.
szIconLocation
Pointer to a null-terminated string that contains the name of an .exe, .dll, or .ico file that contains the icon to display for the item. This can be any file type that can be passed to the ExtractIcon function. The index for this icon is specified in iIconResID. To modify the icon displayed for the item, copy the icon source file name into this member, set iIconResID to the zero-based index of the icon, set the DSBF_ICONLOCATION flag in the dwMask member, and return a non-zero value from BFFCallBack.
iIconResID
Contains the zero-based index of the icon to display for the item.

Note  This is not the resource identifier of the icon.

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

BFFCallBack, DsBrowseForContainer, ExtractIcon