IMessenger::MySigninName
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 sign-in name. Not scriptable.
Syntax
HRESULT MySigninName(
[out,
retval] BSTR* pbstrName
);
Parameters
- pbstrName
Return value. A pointer to a BSTR that contains the current user's sign-in name.
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_OUTOFMEMORY
The string comparison failed.
- E_FAIL
The local client is offline.
- MSGR_E_NOT_LOGGED_ON
The client is offline.
Remarks
This property fails if the local client is offline. This property does not recheck the user store for the current user's sign-in name. The value returned is the value entered on the client on the initial sign-in for this session, which is cleared when the current user signs out.
Example
The example code retrieves the sign-in name of the logged-in user by querying the MySigninName property of the IMessenger interface object (communicator)
string mySignInName = null;
try
{
mySignInName = communicator.MySigninName;
}
catch (COMException MSCE)
{
Console.WriteLine(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