IRTCClientProvisioning::EnableProfile

The EnableProfile method enables a profile for use in server registration and automatic profile selection. It is recommended that you have only one PC-PC profile if you will be using presence (see the Remarks section).

HRESULT EnableProfile(IRTCProfile*pProfile,
longlRegisterFlags);

Parameters

  • pProfile
    [in] Pointer to the Profile object that is enabled.
  • lRegisterFlags
    [in] A set of RTCRF_ registration flags used to specify the types of sessions that the profile should be registered for on the server. A value of zero will enable a profile without registering it. To disable registration, this value should be set to zero.

Return Values

RTC methods may return an RTC_E_ constant. The RTC_E_PROFILE_ constants can all be returned from this method.

Value Meaning
E_INVALIDARG Invalid register flags.
RTC_E_CLIENT_NOT_INITIALIZED The client is not initialized.

Remarks

It is recommended that you have only one PC-PC profile if you are using presence. The first enabled PC-PC profile is your default presence profile for operations involving the presence store as well as the AddBuddy method. When enabling the default profile, the RTCRF_REGISTER_PRESENCE flag must be used to allow incoming watchers to be routed to the client. After the profile is enabled, the EnablePresence method may be called to enable the presence store.

Enabled profiles will show up in the profile list returned by IRTCClientProvisioning::EnumerateProfiles and IRTCClientProvisioning::get_Profiles. They will also be available to be selected for use by IRTCClient::CreateSession and IRTCClientPresence::AddBuddy.

If lRegisterFlags are specified and the profile contains information about a SIP registrar server, registration will occur. To trigger unregistration, the profile may either be disabled with IRTCClientProvisioning::DisableProfile or enabled again with lRegisterFlags set to zero. The status of registration/unregistration will be notified with RTCE_REGISTRATION_STATE_CHANGE events.

If a profile is enabled with the same Key value (see the provisioning schema) as an existing enabled profile, the existing profile will be disabled and replaced by the new profile.

Note  This function may send data over the wire in unencrypted form; therefore, someone eavesdropping on the network may be able to read the data. The security risk of sending the data in clear text should be considered before using this method in an unencrypted session. An RTC session can be encrypted by specifying TLS in the profile used for the session.

Incoming sessions will not be secure unless the application sets the listen mode to disallow both static and dynamic ports (RTCLM_NONE), and the TLS transport is specified in the profile.

Requirements

Client: Requires Windows XP.
Server: Requires Windows Server 2003.
Redistributable: Requires Rtcdll.dll on Windows 2000, and Windows Me/98.
Header: Declared in Rtccore.h.
Library: Included as a resource in Rtcdll.dll.
GUID: IID_IRTCClientProvisioning is defined as B9F5CF06-65B9-4a80-A0E6-73CAE3EF3822.

See Also

IRTCClientProvisioning, IRTCProfile, RTCRF_, Create and Enable a Profile, IRTCClientProvisioning::CreateProfile, IRTCClientProvisioning::DisableProfile, Roaming