DSBITEMW structure (dsclient.h)

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.

Syntax

typedef struct {
  DWORD   cbStruct;
  LPCWSTR pszADsPath;
  LPCWSTR pszClass;
  DWORD   dwMask;
  DWORD   dwState;
  DWORD   dwStateMask;
  WCHAR   szDisplayName[DSB_MAX_DISPLAYNAME_CHARS];
  WCHAR   szIconLocation[MAX_PATH];
  INT     iIconResID;
} DSBITEMW, *PDSBITEMW;

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.

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.

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.

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[DSB_MAX_DISPLAYNAME_CHARS]

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 nonzero value from BFFCallBack.

szIconLocation[MAX_PATH]

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 nonzero 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.
 

Remarks

Note

The dsclient.h header defines DSBITEM as an alias which automatically selects the ANSI or Unicode version of this function based on the definition of the UNICODE preprocessor constant. Mixing usage of the encoding-neutral alias with code that not encoding-neutral can lead to mismatches that result in compilation or runtime errors. For more information, see Conventions for Function Prototypes.

Requirements

Requirement Value
Minimum supported client Windows Vista
Minimum supported server Windows Server 2008
Header dsclient.h

See also

BFFCallBack

DsBrowseForContainer

ExtractIcon