1 //------------------------------------------------------------------------------
2 // <copyright file="COAUTHINFO.cs" company="Microsoft">
3 //     Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5 //------------------------------------------------------------------------------
6 
7 namespace System.Web.Configuration {
8     using System.Collections;
9     using System.Configuration;
10     using System.Configuration.Internal;
11     using System.Web;
12     using System.Web.Util;
13     using System.Security;
14     using System.IO;
15     using System.Web.Hosting;
16     using System.Runtime.InteropServices;
17     using System.Reflection;
18     using System.Collections.Specialized;
19     using System.Xml;
20     using System.Security.Principal;
21     using System.Threading;
22     using System.Globalization;
23 
24     [StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Unicode)]
25     internal class COAUTHINFO : IDisposable
26     {
COAUTHINFO(RpcAuthent authent, RpcAuthor author, string serverprinc, RpcLevel level, RpcImpers impers, IntPtr ciptr)27         internal COAUTHINFO(RpcAuthent authent, RpcAuthor author, string serverprinc, RpcLevel level, RpcImpers impers, IntPtr ciptr) {
28             authnsvc = authent;
29             authzsvc = author;
30             serverprincname = serverprinc;
31             authnlevel = level;
32             impersonationlevel = impers;
33             authidentitydata = ciptr;
34         }
35 
36         internal RpcAuthent authnsvc;
37         internal RpcAuthor authzsvc;
38         [MarshalAs(UnmanagedType.LPWStr)]
39         internal string serverprincname;
40         internal RpcLevel authnlevel;
41         internal RpcImpers impersonationlevel;
42         internal IntPtr authidentitydata;        // COAUTHIDENTITY*
43         internal int capabilities = 0;        // EOAC_NONE
44 
IDisposable.Dispose()45         void IDisposable.Dispose()
46         {
47             authidentitydata = IntPtr.Zero;
48             GC.SuppressFinalize(this);
49         }
~COAUTHINFO()50         ~COAUTHINFO()
51         {
52         }
53     }
54 
55     [StructLayout(LayoutKind.Sequential, Pack = 4, CharSet = CharSet.Unicode)]
56     internal class COAUTHINFO_X64 : IDisposable
57     {
COAUTHINFO_X64(RpcAuthent authent, RpcAuthor author, string serverprinc, RpcLevel level, RpcImpers impers, IntPtr ciptr)58         internal COAUTHINFO_X64(RpcAuthent authent, RpcAuthor author, string serverprinc, RpcLevel level, RpcImpers impers, IntPtr ciptr)
59         {
60             authnsvc = authent;
61             authzsvc = author;
62             serverprincname = serverprinc;
63             authnlevel = level;
64             impersonationlevel = impers;
65             authidentitydata = ciptr;
66         }
67 
68         internal RpcAuthent authnsvc;
69         internal RpcAuthor authzsvc;
70         [MarshalAs(UnmanagedType.LPWStr)]
71         internal string serverprincname;
72         internal RpcLevel authnlevel;
73         internal RpcImpers impersonationlevel;
74         internal IntPtr authidentitydata;        // COAUTHIDENTITY*
75         internal int capabilities = 0;        // EOAC_NONE
76 #pragma warning disable 0649
77         internal int padding;
78 #pragma warning restore 0649
79 
IDisposable.Dispose()80         void IDisposable.Dispose()
81         {
82             authidentitydata = IntPtr.Zero;
83             GC.SuppressFinalize(this);
84         }
~COAUTHINFO_X64()85         ~COAUTHINFO_X64()
86         {
87         }
88     }
89 }
90