System.Tether.AppProfile.TTetheringAppProfile.Connect
Delphi
function Connect(const AProfile: TTetheringProfileInfo; const AProtocolType: TTetheringProtocolType = '';
const AnAdapterType: TTetheringAdapterType = ''): Boolean; overload; override;
function Connect(const AProfile: TTetheringProfileInfo; ATimeout: Integer; const AProtocolType: TTetheringProtocolType = '';
const AnAdapterType: TTetheringAdapterType = ''): Boolean; overload; override;
C++
virtual bool __fastcall Connect(const System::Tether::Manager::TTetheringProfileInfo &AProfile, const System::UnicodeString AProtocolType = System::UnicodeString(), const System::UnicodeString AnAdapterType = System::UnicodeString())/* overload */;
virtual bool __fastcall Connect(const System::Tether::Manager::TTetheringProfileInfo &AProfile, int ATimeout, const System::UnicodeString AProtocolType = System::UnicodeString(), const System::UnicodeString AnAdapterType = System::UnicodeString())/* overload */;
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
function | public | System.Tether.AppProfile.pas System.Tether.AppProfile.hpp |
System.Tether.AppProfile | TTetheringAppProfile |
Description
Etablit une connexion au profil distant spécifié ou redémarre une connexion existante.
Connect charge ou met à jour les collections d'actions et de ressources, et actualise les abonnements des éléments en raison des groupes de profils correspondants.
En plus de la connexion au profil distant (AProfile
), vous pouvez facultativement spécifier un type de protocole (AProtocolType
) et un type d'adaptateur (AnAdapterType
) à utiliser pour la connexion.
Voir Connexion à des applications distantes à l'aide du tethering d'app.
Exceptions
Un appel de Connect peut déclencher l'une des exceptions suivantes :
Exception | Exception.Message | Scénarios |
---|---|---|
Aucune connexion disponible pour <l'identificateur de profil> |
| |
Vous devez ajouter un protocole et un adaptateur se connectant à <l'identificateur de profil> |
| |
Impossible de trouver la liste des ressources pour {{Placeholder|l'identificateur de profil} |
| |
Impossible de se connecter à <l'identificateur de profil> |
Voir aussi
- System.Tether.Manager.TTetheringProfileInfo
- System.Tether.Manager.TTetheringProtocolType
- System.Tether.Manager.TTetheringAdapterType
- System.Tether.AppProfile.TTetheringAppProfile.Actions
- System.Tether.AppProfile.TTetheringAppProfile.Resources
- System.Tether.Manager.TTetheringProfile.Group
- Exemple MediaPlayer
- Exemple PhotoWall