Directory Services |
The property methods of the IADsGroup interface read and write the following properties. For more information, see Interface Property Methods.
Property | Description |
---|---|
Description
[Visual Basic] [C++] |
Indicates the textual description of the group membership. |
The following code example binds to a group object and displays the description of the group.
Dim grp As IADsGroup On Error GoTo Cleanup Set grp = GetObject("WinNT://Microsoft/Administrators") Debug.Print grp.Description Cleanup If (Err.Number<>0) Then MsgBox("An error has occurred. " & Err.Number) End If Set grp = Nothing
The following code example binds to a group object and displays the description of the group.
IADsGroup *pGroup = NULL; HRESULT hr = S_OK; LPWSTR adsPath = L"WinNT://localHost/Administrators"; BSTR bstr; hr = ADsGetObject(adsPath,IID_IADsGroup,(void**)&pGroup); if(FAILED(hr)) {goto Cleanup;} hr = pGroup->get_Description(&bstr); if(FAILED(hr)) {goto Cleanup;} printf("Descripton: %S\n",bstr); Cleanup: SysFreeString(bstr); if(pGroup) pGroup->Release(); return hr;
Client: Included in Windows XP and
Windows 2000 Professional.
Server: Included in Windows Server 2003 and
Windows 2000 Server.
Redistributable: Requires Active Directory Client Extension
on Windows NT 4.0 SP6a and Windows 95/98/Me.
Header: Declared in Iads.h.