IMessengerService::MyStatus
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.
Retrieves the status of the local user in a service. Scriptable.
Syntax
HRESULT MyStatus(
[out,
retval] MISTATUS* pmiStatus
);
Parameters
- pmiStatus
Pointer to the MISTATUS of the user.
Return Value
Pointer to the MISTATUS of the user. For managed code applications, these return values are received in the form of a COMException.
- S_OK
Success.
- RPC_X_NULL_REF_POINTER
pmiStatus is a null pointer.
Remarks
This property returns the published presence status of the user. The published status is the online status that is visible to other Office Communicator users. The user status cannot be set using this property. If the local client has multiple messenger services running, this interface allows you to specify which service you want to see user presence status for.
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 status of the logged-on user is displayed in the application console window.
IMessengerServices communicatorServices;
IMessengerService thisService;
communicatorServices = (IMessengerServices)communicator.Services;
thisService = (IMessengerService)communicatorServices.PrimaryService;
if (thisService != null)
{
try
{
Console.WriteLine("Primary Service MyStatus: " + thisService.MyStatus);
}
catch (COMException MSCE)
{
Console.WriteLine("COM Exception: " + MSCE.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
See Also
Reference
IMessengerService::MyFriendlyName
IMessengerService::MySigninName