Share via


IMessenger::ViewProfile method

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

Launches a new browser instance, allowing the client user to view properties of the specified contact through the Public Profiles feature.

Syntax

HRESULT ViewProfile(
  [in] VARIANT vContact
);

Parameters

vContact [in]

Type: VARIANT

A VARIANT that can take as its value either a VT_BSTR string or a VT_DISPATCH pointer to an existing MessengerContact object. If the input value type is a string, this method creates a new MessengerContact object internally. The string should be the full sign-in name. For a Microsoft .NET Messenger Service contact, this should include the "at" sign (@) and domain name. If the input value type is a pointer to an existing MessengerContact object (should be type VT_DISPATCH), the existing object is used.

Return value

Type: HRESULT

For a table of MSGR_E_* constants, seeMSGRConstants.

Returns one of the following values.

Return code Description
S_OK
Success.
E_INVALIDARG
vContact value is NULL, the wrong type, points to a NULL string, or points to a string that has a space as the first character.
- or -
vContact is a VT_BSTR that exceeded 129 characters (130 if the string terminator is included in the cout. This allows for a 64-character sign-in name, @ symbol, and a 64-character domain name. This format does not have to be followed.)
- or -
vContact is a VT_BSTR and contains a carriage return or linefeed.
E_FAIL
Unspecified failure.
MSGR_E_NOT_LOGGED_ON
Client is offline.

Remarks

This option is available in the Microsoft Exchange Instant Messaging Service (IM) client, but only for Microsoft .NET Messenger Service users.

Calling this method on a user or service other than the Microsoft .NET Messenger Service will launch the browser instance, but the interface will not find a valid user. Because profiles (and each element of data therein) are opt-in, even Microsoft .NET Messenger Service users are not guaranteed to have profiles available.

To use this method with Windows Messenger, you must install an add-in component that supports viewing profiles.

This method will launch the Web page even if a contact does not have a public profile established or enabled for view. Error messaging on that Web page may inform the client user that the specified contact does not have a profile available.

This method should be called on the local user's sign-in name to obtain public profile information on the local client user.

Note

This method is available for scripting languages but it returns E_NOTIMPL.

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

IMessenger

IMessengerContact