Returns a list of services that the Communicator client uses. Scriptable.
Syntax
HRESULT Services( [out, retval] IDispatch** ppdispServices ); |
Parameters
- ppdispServices
-
Return Value. Pointer to a pointer to an IDispatch interface on an IMessengerServices collection object.
Return Value
Returns one of the following values. For managed code applications, these return values are received in the form of a COMException.
- S_OK
-
Success.
- PRC_X_NULL_REF_POINTER
-
ppdispServices is a null pointer.
Remarks
The default service an Office Communicator local client uses is Communications Service. At this time, Office Communicator Automation API supports only this service.
Example
The following example instantiates and fills a services collection object by querying the Services property of an IMessenger object. If the collection contains any service members, the code instantiates an IMessengerService object representing the primary Communicator service by querying the PrimaryService property of the collection. Finally, the primary service name is displayed on the application console window.
Copy Code | |
---|---|
IMessengerServices serviceCollection = (IMessengerServices)communicator.Services; if (serviceCollection.Count > 0 && serviceCollection != null) { try { IMessengerService primaryService = (IMessengerService) serviceCollection.PrimaryService; Console.WriteLine(primaryService.ServiceName); } catch (COMException SCCE) { Console.WriteLine("COM Exception " + SCCE.ErrorCode.ToString()); } } |
Requirements
- Client
-
Requires Microsoft DirectX 9.0, C Runtime libraries (msvcm80.dll) on Microsoft Windows© Vista, Microsoft Windows XP Service Pack 1 (SP1) or later, or Microsoft Windows 2000 with Service Pack 4 (SP4). Any Communicator-imposed restrictions apply. .
- Server
-
Requires Microsoft Office Communications Server 2007, AV MCU (for Media Support), Media Relay (for NAT/Firewall traversal) on Microsoft Office Communications Server 2007.
- Product
-
Microsoft Office Communicator 2007 Automation API
- IDL file
-
Msgrua.idl