ContextUtil::ApplicationInstanceId Property

 

Gets a GUID for the current application instance.

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

public:
property Guid ApplicationInstanceId {
	static Guid get();
}

Property Value

Type: System::Guid

The GUID for the current application instance.

Exception Condition
COMException

There is no COM+ context available.

PlatformNotSupportedException

The platform is not Windows XP or later.

The following code example gets the value of a ApplicationInstanceId property.

[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 );
   }
};

.NET Framework
Available since 1.1
Return to top
Show: