Two options comes to mind:

1. Add a reference to the mtsadmin.tlb (%windir%system32\com\mtsadmin.tlb) and get the 
ICatalog::MajorVersion
 Major version returns:
    2 - for MTS    (NT4)
    3 - for COM+    (W2K)
    4 - for COM+ 1.5 (XP and Windows .NET)

2. Read the Environment.OSVersion.Platform and Environment.OSVersion.Version.Major 
properties.

Willy.

----- Original Message -----
From: "Thomas Tomiczek" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, May 13, 2002 9:17 AM
Subject: [DOTNET] COM+ Version - how to find out in .NET?


Hello friends,

I have a "common" problem, I believe - at least among there working with
ServicedComponents.

I am just now prepping an assembly for release that will be deployed on
2000 and later on .NET server. SOME settings on the .NET Server can be
handled directly through attributes (which COM+ recognizes).

IF I am running this under COM+ 1.0 (i.e. 2000) some of the components
have to change some behavior in order to behave like expected. Most
visible here is transaction handling - I have one component that does
not require and separation (read only) and I can basically set a lower
level than serializable on COM+ for the component, while under COM+ 1.0
I have to reconfigure the database connection.

So, anyone knows a good way to find out the COM+ version from within a
Serviced Component?


Regards

Thomas Tomiczek
THONA Consulting Ltd.
(Microsoft MVP C#/.NET)

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to