Export (0) Print
Expand All

_IUccContainerEvents.OnMemberRemoved Method

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Raised when a container member is removed from a container.

Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in microsoft.office.interop.uccapi.dll)

void OnMemberRemoved (
	IUccContainer pContainer,
	UccContainerMemberCollectionEvent pEventData
)
void OnMemberRemoved (
	IUccContainer pContainer, 
	UccContainerMemberCollectionEvent pEventData
)
function OnMemberRemoved (
	pContainer : IUccContainer, 
	pEventData : UccContainerMemberCollectionEvent
)

Parameters

pContainer

A value of the IUccContainer* (IUccContainer, for a .NET application) type. This represents the container from which the specified container member is removed.

pEventData

A value of the IUccContainerMemberCollectionEvent* (UccContainerMemberCollectionEvent, for a .NET application) type. This contains the container member removed from the specified container.

A container member is defined by the scope attributed to the member as stored in the Scope property of the member. The enumeration, UCC_CONTAINER_MEMBERSHIP_SCOPE defines the possible scope values. A container member with a broad scope such as UCCCMS_EVERYONE indicates the owning container also contains category data that all users have access to. Conversly, a container whose membership includes a member whose scope is UCCCMS_USER is a container whose category instances are available to the specified user.

A container may contain multiple container members with no restriction of scope. This means a container may have both a member with a broad scope and a member with a very limited scope. For example: A container can have a member whose scope is UCCCMS_COMPANY which means all members of the local user's company have access to the contained category instances. This container can have a member whose scope is UCCCMS_USER and whose specified Uri is that of a user outside of the local user's company.

Win32 COM/C++ Syntax

HRESULT OnMemberRemoved
(
   IUccContainer* pContainer,
   IUccContainerMemberCollectionEvent* pEventData
);
Cc667754.note(en-us,office.12).gifNote:
In a Win32 application, the return value of a method or property is always an HRESULT value indicating the status of the call to the interface member. Any result of the operation is returned as a parameter marked with the [out, retval] attribute. In contrast, in a .NET application the HRESULT value indicating an error condition is returned as a COM exception and the [out, retval] parameter becomes the return value. For the UCC API-defined HRESULT values, see Trace and Handle Errors in Unified Communications Client API .

The following example handles the OnMemberRemoved event to maintain an application dictionary<string, ContainerMember> containing a collection of container member instances. The example examines the scope of the received IUccContainerMember to determine whether the Uri property of the instance is filled.

void _IUccContainerEvents.OnMemberRemoved(
   IUccContainer pContainer, 
   UccContainerMemberCollectionEvent pEventData)
{
   IUccContainerMember cm = pEventData.ContainerMember;
   string dictionaryKey = string.Empty;
   if (cm.Scope == UCC_CONTAINER_MEMBERSHIP_SCOPE.UCCCMS_USER || cm.Scope == UCC_CONTAINER_MEMBERSHIP_SCOPE.UCCCMS_DOMAIN)
   {
      dictionaryKey = cm.Uri;
   }
   else
   {
      dictionaryKey = cm.Scope.ToString();
   }
   this.containerMembers.Remove(dictionaryKey);
}

All public static (Shared in Visual Basic) members of this type are thread-safe. Instance members are not guaranteed to be thread-safe.

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2000 with Service Pack 4, Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms

Show:
© 2014 Microsoft