Platform SDK: Active Directory, ADSI, and Directory Services

IADsGroup Property Methods

The property methods of the IADsGroup interface read and write the properties described in this topic. For more information see Interface Property Methods.

Properties in Vtable Order

Property Description
Description

[Visual Basic]
Access: Read/Write
Data Type: BSTR

[C++]
HRESULT get_Description
([out] BSTR *pbstrDescription);


HRESULT put_Description
([in] BSTR bstrDescription);

Indicates the textual description of the group membership.

Example Code [Visual Basic]

Dim grp As IADsGroup
Set grp = GetObject("WinNT://Microsoft/Administrators")
Debug.Print grp.Description

Example Code [C++]

The following C++/C code snippet binds to a group object and displays the description of the group.

IADsGroup *pGroup;
HRESULT hr;
LPWSTR adsPath = L"WinNT://localHost/Administrators";

hr = ADsGetObject(adsPath,IID_IADsGroup,(void**)&pGroup);

if(FAILED(hr)) exit(hr);

BSTR bstr;
hr = pGroup->get_Description(&bstr);
if(FAILED(hr)) exit(hr);

printf("Descripton: %S\n",bstr);
SysFreeString(bstr);

pGroup->Release();

See Also

IADs, IADsGroup, Interface Property Methods