Retrieves the local user's sign-in name that corresponds to the selected service. Not scriptable.
Syntax
HRESULT MySigninName( [out, retval] BSTR* pbstrName ); |
Parameters
- pbstrName
-
Pointer to a BSTR that contains the sign-in name for the local user of this service.
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.
- RPC_X_NULL_REF_POINTER
-
pbstrName is a null pointer.
- E_FAIL
-
pbstrName returns a null string.
- E_OUTOFMEMORY
-
The string comparison failed.
- MSGR_E_NOT_LOGGED_ON
-
This service is offline.
Remarks
This property returns the sign-in name of the currently logged-on user. The sign-in name is formatted as a SIP URI. This name is also known as the sign-in address. If the Office Communicator UI is offline, querying this property returns MSGR_E_NOT_LOGGED_ON.
Example
In this example, an IMessenger object has been instantiated as communicator. The primary communicator service, thisService, is accessed as an IMessengerService object by querying the IMessengerServices::PrimaryService property on communicatorServices. Finally, the sign-in name of the logged-on user is displayed in the application console window.
Copy Code | |
---|---|
IMessengerServices communicatorServices; IMessengerService thisService; communicatorServices = (IMessengerServices)communicator.Services; thisService = (IMessengerService)communicatorServices.PrimaryService; if (thisService != null) { try { Console.WriteLine("Primary Service MySignInName: " + thisService.MySigninName); } catch (COMException MSNCE) { Console.WriteLine("COM Exception: " + MSNCE.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