IMessenger::Signout
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.
Signs out the client user. Not scriptable.
Syntax
HRESULT Signout(
);
Parameters
This method takes no parameters.
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.
- E_FAIL
Could not find the Messenger object or could not send the outgoing protocol message.
- MSGR_E_NOT_LOGGED_ON
You were not signed in to the primary service when you attempted the sign-out.
Remarks
If successful, invoking this method results in a DMessengerEvents::OnSignout event. Signing out also results in a DMessengerEvents::OnMyStatusChange event with mMYStatusOE=MISTATUS_LOCAL_DISCONNECTING_FROM_SERVER. This state persists until the server of the service receives and responds to the protocol-level logoff command.
Example
The Signout method raises a COMEvent if the signout fails. This example is catching the exception and writing the string HEX value of the exception to the console. If successful, the logged-in user is logged out of the running instance of Office Communicator.
Try
{
Signout();
}
catch (COMException SOCE)
{
Console.WriteLine(SOCE.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