ContextUtil.ApplicationInstanceId Eigenschaft
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Ruft eine GUID für die aktuelle Anwendungsinstanz ab.
public:
static property Guid ApplicationInstanceId { Guid get(); };
public static Guid ApplicationInstanceId { get; }
static member ApplicationInstanceId : Guid
Public Shared ReadOnly Property ApplicationInstanceId As Guid
Eigenschaftswert
Die GUID für die aktuelle Anwendungsinstanz.
Ausnahmen
Es ist kein COM+-Kontext verfügbar.
Die Plattform ist nicht Windows XP oder höher.
Beispiele
Im folgenden Codebeispiel wird der Wert einer ApplicationInstanceId Eigenschaft abgerufen.
[Synchronization(SynchronizationOption::Required)]
public ref class ContextUtil_ApplicationInstanceId: public ServicedComponent
{
public:
void Example()
{
// Display the ApplicationInstanceId associated with the current COM+
// context.
Console::WriteLine( "Application Instance ID: {0}",
ContextUtil::ApplicationInstanceId );
}
};
[Synchronization(SynchronizationOption.Required)]
public class ContextUtil_ApplicationInstanceId : ServicedComponent
{
public void Example()
{
// Display the ApplicationInstanceId associated with the current COM+
// context.
Console.WriteLine("Application Instance ID: {0}",
ContextUtil.ApplicationInstanceId);
}
}
<Synchronization(SynchronizationOption.Required)> _
Public Class ContextUtil_ApplicationInstanceId
Inherits ServicedComponent
Public Sub Example()
' Display the ApplicationInstanceId associated with the current COM+
' context.
MsgBox("Application Instance ID: " & ContextUtil.ApplicationInstanceId.ToString())
End Sub
End Class
Gilt für:
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für