Share via


IMessengerContact::SigninName property

[SigninName is no longer available for use as of Windows Vista. See Windows Messenger for more information.]

Retrieves the sign-in name of the contact associated with this MessengerContact object.

This property is read-only.

Syntax

HRESULT get_SigninName(
  [out, retval] BSTR *pbstrSigninName
);

Property value

Pointer to a BSTR that uniquely identifies the contact.

Error codes

Returns one of the following values.

Name Meaning
S_OK
Success.
E_FAIL
pbstrSigninName returns a NULL string.
E_OUTOFMEMORY
String comparison failed.
RPC_X_NULL_REF_POINTER
pbstrSigninName is a NULL pointer.
E_NOTIMPL
Cannot be accessed through scripting.

Remarks

The following table lists error codes returned by this method.

Error Code Meaning
0x80004001 Cannot be accessed through scripting.
0x80004005 pbstrSigninName returns a NULL string.
0x8007000E String comparison failed.

To get the sign-in name of the local client user rather than a remote user, use MySigninName.

Note

This property is available to scripting languages only in a trusted zone.

Examples

The following Visual Basic example shows the use of this method.

Public WithEvents MsgrUIA As MessengerAPI.Messenger
Public MsgrContact As MessengerAPI.IMessengerContact

Private Sub btnSigninName_Click()
    On Error Resume Next
    Dim strSigninName As String
    Dim strServiceID As String
    'Get selected contact
    strSigninName = ListContact.SelectedItem.SubItems(2)
    strServiceID = ListContact.SelectedItem.SubItems(5)
    sbStatus.Panels.Item(1).Text = "Selected: " & strSigninName & " : " & strServiceID
    Set MsgrContact = Nothing
    Set MsgrContact = MsgrUIA.GetContact(strSigninName, strServiceID)
    ErrorTrap ("GetContact")    'Error handling routine
    MsgBox("Contact SigninName: " & CStr(MsgrContact.SigninName))
    ErrorTrap ("Contact.SigninName")    'Error handling routine
End Sub

Requirements

End of client support
Windows XP
End of server support
Windows Server 2003
Header
Msgrua.h
IDL
Msgrua.idl
DLL
Msgsc.dll

See also

IMessengerContact

FriendlyName