System.Tether.AppProfile.TTetheringAppProfile.SendString
Delphi
function SendString(const AProfile: TTetheringProfileInfo; const Description, AString: string): Boolean;
C++
bool __fastcall SendString(const System::Tether::Manager::TTetheringProfileInfo &AProfile, const System::UnicodeString Description, const System::UnicodeString AString);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Tether.AppProfile.pas System.Tether.AppProfile.hpp |
System.Tether.AppProfile | TTetheringAppProfile |
Description
Sends the specified string to the specified remote profile.
This function receives the following parameters:
AProfile
is the remote profile to receive the string.Description
is a description of the contents of the string.AString
is the string to be sent.
The remote profile receives the string as a parameter of the "send string" command, therefore it is not necessary for the remote profile to accept and receive the string separately (as it is the case with SendStream). This means that the remote profile cannot choose whether to receive the string or not.
The function returns True
if the remote profile received the command.
SendString is a synchronous function. This function performs a request to the remote profile, and the function execution only finishes after there is a response from the remote profile. You might want to use a separate thread to run this function.
Exceptions
A call to SendString may raise any of the following exceptions:
Exception | Exception.Message | Scenarios |
---|---|---|
Profile <profile identifier> is not connected. |
| |
No available connections to <profile identifier> |
| |
Cannot get a connection to profile <profile identifier>. |
| |
Cannot connect to profile <profile identifier> |
|
See Also
- System.Tether.AppProfile.TCustomRemoteItem.IsTemp
- System.Tether.AppProfile.TTetheringAppProfile.OnAcceptResource
- System.Tether.AppProfile.TTetheringAppProfile.OnResourceReceived
- System.Tether.AppProfile.TRemoteResource
- System.Tether.AppProfile.TRemoteResource.Value
- System.Tether.Manager.TTetheringProfile.Manager
- System.Tether.Manager.TTetheringManager.RemoteProfiles
- BDShoppingList sample
- MediaPlayer sample