Freigeben über


ContextUtil.ApplicationInstanceId-Eigenschaft

Ruft eine GUID für die aktuelle Anwendungsinstanz ab.

Namespace: System.EnterpriseServices
Assembly: System.EnterpriseServices (in system.enterpriseservices.dll)

Syntax

'Declaration
Public Shared ReadOnly Property ApplicationInstanceId As Guid
'Usage
Dim value As Guid

value = ContextUtil.ApplicationInstanceId
public static Guid ApplicationInstanceId { get; }
public:
static property Guid ApplicationInstanceId {
    Guid get ();
}
/** @property */
public static Guid get_ApplicationInstanceId ()
public static function get ApplicationInstanceId () : Guid

Eigenschaftenwert

Die GUID für die aktuelle Anwendungsinstanz.

Ausnahmen

Ausnahmetyp Bedingung

COMException

Es ist kein COM+-Kontext verfügbar.

PlatformNotSupportedException

Die Plattform ist nicht Windows XP oder höher.

Beispiel

Im folgenden Codebeispiel wird der Wert einer ApplicationInstanceId-Eigenschaft abgerufen.

<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 'Example
End Class '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 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 );
   }
};
/** @attribute Synchronization(SynchronizationOption.Required)
 */
public class ContextUtil_ApplicationInstanceId extends ServicedComponent
{
    public void Example()
    {
        // Display the ApplicationInstanceId associated with the current COM+
        // context.
        Console.WriteLine("Application Instance ID: {0}",
            ContextUtil.get_ApplicationInstanceId());
    } //Example
} //ContextUtil_ApplicationInstanceId

.NET Framework-Sicherheit

  • Volle Vertrauenswürdigkeit für den unmittelbaren Aufrufer. Dieser Member kann von nur teilweise vertrauenswürdigem Code nicht verwendet werden. Weitere Informationen finden Sie unter .

Plattformen

Windows 98, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

.NET Framework unterstützt nicht alle Versionen sämtlicher Plattformen. Eine Liste der unterstützten Versionen finden Sie unter Systemanforderungen.

Versionsinformationen

.NET Framework

Unterstützt in: 2.0, 1.1, 1.0

Siehe auch

Referenz

ContextUtil-Klasse
ContextUtil-Member
System.EnterpriseServices-Namespace