#define MCG_WINRT_SUPPORTED
using Mcg.System;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.InteropServices.WindowsRuntime;
using global::Windows.Foundation;
using global::Windows.Foundation.Collections;


// -----------------------------------------------------------------------------------------------------------
// 
// WARNING: THIS SOURCE FILE IS FOR 32-BIT BUILDS ONLY!
// 
// MCG GENERATED CODE
// 
// This C# source file is generated by MCG and is added into the application at compile time to support interop features.
// 
// It has three primary components:
// 
// 1. Public type definitions with interop implementation used by this application including WinRT & COM data structures and P/Invokes.
// 
// 2. The '__Interop' class containing marshaling code that acts as a bridge from managed code to native code.
// 
// 3. The 'McgNative' class containing marshaling code and native type definitions that call into native code and are called by native code.
// 
// -----------------------------------------------------------------------------------------------------------
// 
// warning CS0067: The event 'event' is never used
#pragma warning disable 67
// warning CS0169: The field 'field' is never used
#pragma warning disable 169
// warning CS0649: Field 'field' is never assigned to, and will always have its default value 0
#pragma warning disable 414
// warning CS0414: The private field 'field' is assigned but its value is never used
#pragma warning disable 649
// warning CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member'
#pragma warning disable 1591
// warning CS0108 'member1' hides inherited member 'member2'. Use the new keyword if hiding was intended.
#pragma warning disable 108
// warning CS0114 'member1' hides inherited member 'member2'.  To make the current method override that implementation, add the override keyword. Otherwise add the new keyword.
#pragma warning disable 114
// warning CS0659 'type' overrides Object.Equals but does not override GetHashCode.
#pragma warning disable 659
// warning CS0465 Introducing a 'Finalize' method can interfere with destructor invocation. Did you intend to declare a destructor?
#pragma warning disable 465
// warning CS0028 'function declaration' has the wrong signature to be an entry point
#pragma warning disable 28
// warning CS0162 Unreachable code Detected
#pragma warning disable 162
// warning CS0628 new protected member declared in sealed class
#pragma warning disable 628

namespace __Interop
{
	/// <summary>
	/// P/Invoke class for module '[MRT]'
	/// </summary>
	public unsafe static partial class _MRT_
	{
		// Signature, RhpGetFuncEvalParameterBufferSize, [fwd] [return] [EETypeRva:0x0004157C] uint__unsigned int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Runtime.RuntimeImports", "RhpGetFuncEvalParameterBufferSize")]
		public static uint RhpGetFuncEvalParameterBufferSize()
		{
			// Setup
			uint unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop._MRT__PInvokes.RhpGetFuncEvalParameterBufferSize();
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}

		// Signature, RhpGetFuncEvalMode, [fwd] [return] [EETypeRva:0x0004157C] uint__unsigned int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Runtime.RuntimeImports", "RhpGetFuncEvalMode")]
		public static uint RhpGetFuncEvalMode()
		{
			// Setup
			uint unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop._MRT__PInvokes.RhpGetFuncEvalMode();
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}

		// Signature, RhpRecordDebuggeeInitiatedHandle, [fwd] [return] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x0004157C] void___ptrvoid *, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Runtime.RuntimeImports", "RhpRecordDebuggeeInitiatedHandle")]
		public static uint RhpRecordDebuggeeInitiatedHandle(void* objectHandle)
		{
			// Setup
			uint unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop._MRT__PInvokes.RhpRecordDebuggeeInitiatedHandle(((void*)objectHandle));
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}

		// Signature, RhpVerifyDebuggerCleanup, [fwd] [return] [EETypeRva:0x000405F8] void__void, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Runtime.RuntimeImports", "RhpVerifyDebuggerCleanup")]
		public static void RhpVerifyDebuggerCleanup()
		{
			// Marshalling
			// Call to native method
			global::__Interop._MRT__PInvokes.RhpVerifyDebuggerCleanup();
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
		}

		// Signature, RhpGetCurrentThread, [fwd] [return] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Runtime.RuntimeImports", "RhpGetCurrentThread")]
		public static global::System.IntPtr RhpGetCurrentThread()
		{
			// Setup
			global::System.IntPtr unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop._MRT__PInvokes.RhpGetCurrentThread();
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}

		// Signature, RhWaitForPendingFinalizers, [fwd] [return] [EETypeRva:0x000405F8] void__void, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Runtime.RuntimeImports", "RhWaitForPendingFinalizers")]
		public static void RhWaitForPendingFinalizers(int allowReentrantWait)
		{
			// Marshalling
			// Call to native method
			global::__Interop._MRT__PInvokes.RhWaitForPendingFinalizers(allowReentrantWait);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
		}

		// Signature, _RhYield, [fwd] [return] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Runtime.RuntimeImports", "_RhYield")]
		public static int _RhYield()
		{
			// Setup
			int unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop._MRT__PInvokes._RhYield();
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}

		// Signature, RhFlushProcessWriteBuffers, [fwd] [return] [EETypeRva:0x000405F8] void__void, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Runtime.RuntimeImports", "RhFlushProcessWriteBuffers")]
		public static void RhFlushProcessWriteBuffers()
		{
			// Marshalling
			// Call to native method
			global::__Interop._MRT__PInvokes.RhFlushProcessWriteBuffers();
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
		}

		// Signature, RhCompatibleReentrantWaitAny, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr___ptr__w64 int *, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Runtime.RuntimeImports", "RhCompatibleReentrantWaitAny")]
		public static int RhCompatibleReentrantWaitAny(
					int alertable, 
					int timeout, 
					int count, 
					global::System.IntPtr* handles)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop._MRT__PInvokes.RhCompatibleReentrantWaitAny(
								alertable, 
								timeout, 
								count, 
								((global::System.IntPtr*)handles)
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}

		// Signature, RhCallDescrWorkerNative, [fwd] [return] [EETypeRva:0x000405F8] void__void, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Runtime.RuntimeImports", "RhCallDescrWorkerNative")]
		public static void RhCallDescrWorkerNative(global::System.IntPtr callDescr)
		{
			// Marshalling
			// Call to native method
			global::__Interop._MRT__PInvokes.RhCallDescrWorkerNative(callDescr);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
		}

		// Signature, _ecvt_s, [fwd] [return] [EETypeRva:0x000405F8] void__void, [fwd] [in] [EETypeRva:0x0004157C] byte___ptrunsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] double__double, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int___ptrint *, [fwd] [in] [EETypeRva:0x0004157C] int___ptrint *, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Runtime.RuntimeImports", "_ecvt_s")]
		public static void _ecvt_s(
					byte* buffer, 
					int sizeInBytes, 
					double value, 
					int count, 
					int* dec, 
					int* sign)
		{
			// Marshalling
			// Call to native method
			global::__Interop._MRT__PInvokes._ecvt_s(
								((byte*)buffer), 
								sizeInBytes, 
								value, 
								count, 
								((int*)dec), 
								((int*)sign)
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
		}

		// Signature, memmove, [fwd] [return] [EETypeRva:0x000405F8] void__void, [fwd] [in] [EETypeRva:0x0004157C] byte___ptrunsigned char *, [fwd] [in] [EETypeRva:0x0004157C] byte___ptrunsigned char *, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Runtime.RuntimeImports", "memmove")]
		public static void memmove(
					byte* dmem, 
					byte* smem, 
					uint size)
		{
			// Marshalling
			// Call to native method
			global::__Interop._MRT__PInvokes.memmove(
								((byte*)dmem), 
								((byte*)smem), 
								size
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
		}

		// Signature, memset, [fwd] [return] [EETypeRva:0x000405F8] void__void, [fwd] [in] [EETypeRva:0x0004157C] byte___ptrunsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Runtime.RuntimeImports", "memset")]
		public static void memset(
					byte* mem, 
					int value, 
					uint size)
		{
			// Marshalling
			// Call to native method
			global::__Interop._MRT__PInvokes.memset(
								((byte*)mem), 
								value, 
								size
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
		}
	}

	/// <summary>
	/// P/Invoke class for module '*'
	/// </summary>
	public unsafe static partial class _
	{
		// Signature, CallingConventionConverter_GetStubs, [fwd] [return] [EETypeRva:0x000405F8] void__void, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.TypeLoader, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Internal.Runtime.TypeLoader.CallConverterThunk", "CallingConventionConverter_GetStubs")]
		public static void CallingConventionConverter_GetStubs(
					out global::System.IntPtr returnVoidStub, 
					out global::System.IntPtr returnIntegerStub, 
					out global::System.IntPtr commonStub, 
					out global::System.IntPtr returnFloatingPointReturn4Thunk, 
					out global::System.IntPtr returnFloatingPointReturn8Thunk)
		{
			// Marshalling
			fixed (global::System.IntPtr* pinned_returnVoidStub = &(returnVoidStub))
				fixed (global::System.IntPtr* pinned_returnIntegerStub = &(returnIntegerStub))
					fixed (global::System.IntPtr* pinned_commonStub = &(commonStub))
						fixed (global::System.IntPtr* pinned_returnFloatingPointReturn4Thunk = &(returnFloatingPointReturn4Thunk))
							fixed (global::System.IntPtr* pinned_returnFloatingPointReturn8Thunk = &(returnFloatingPointReturn8Thunk))
							{
								// Call to native method
								global::__Interop.__PInvokes.CallingConventionConverter_GetStubs(
													pinned_returnVoidStub, 
													pinned_returnIntegerStub, 
													pinned_commonStub, 
													pinned_returnFloatingPointReturn4Thunk, 
													pinned_returnFloatingPointReturn8Thunk
												);
								global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
							}
			// Return
		}
	}

	/// <summary>
	/// P/Invoke class for module 'api-ms-win-core-winrt-string-l1-1-0.dll'
	/// </summary>
	public unsafe static partial class api_ms_win_core_winrt_string_l1_1_0_dll
	{
		// Signature, WindowsCreateStringReference, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] char___ptrwchar_t *, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x0004157C] System_Runtime_InteropServices_HSTRING_HEADER__System_Private_Interop___ptrSystem_Runtime_InteropServices__HSTRING_HEADER__System_Private_Interop *, [fwd] [in] [EETypeRva:0x0004157C] void___ptrvoid *, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.WinRTInterop.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "mincore", "WindowsCreateStringReference")]
		public static int WindowsCreateStringReference(
					char* sourceString, 
					uint length, 
					global::System_Runtime_InteropServices.HSTRING_HEADER__System_Private_Interop* phstringHeader, 
					void* hstring)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop.api_ms_win_core_winrt_string_l1_1_0_dll_PInvokes.WindowsCreateStringReference(
								((ushort*)sourceString), 
								length, 
								((global::System_Runtime_InteropServices.HSTRING_HEADER__System_Private_Interop*)phstringHeader), 
								((void*)hstring)
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}
	}

	/// <summary>
	/// P/Invoke class for module 'api-ms-win-core-errorhandling-l1-1-0.dll'
	/// </summary>
	public unsafe static partial class api_ms_win_core_errorhandling_l1_1_0_dll
	{
		// Signature, GetLastError, [fwd] [return] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+mincore", "GetLastError")]
		public static int GetLastError()
		{
			// Setup
			int unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop.api_ms_win_core_errorhandling_l1_1_0_dll_PInvokes.GetLastError();
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}

		// Signature, SetLastError, [fwd] [return] [EETypeRva:0x000405F8] void__void, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+mincore", "SetLastError")]
		public static void SetLastError(uint dwErrCode)
		{
			// Marshalling
			// Call to native method
			global::__Interop.api_ms_win_core_errorhandling_l1_1_0_dll_PInvokes.SetLastError(dwErrCode);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
		}
	}

	/// <summary>
	/// P/Invoke class for module 'api-ms-win-core-winrt-l1-1-0.dll'
	/// </summary>
	public unsafe static partial class api_ms_win_core_winrt_l1_1_0_dll
	{
		// Signature, RoInitialize, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.WinRTInterop.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "mincore+mincore_PInvokes", "RoInitialize")]
		public static int RoInitialize(uint initType)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop.api_ms_win_core_winrt_l1_1_0_dll_PInvokes.RoInitialize(initType);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}
	}

	/// <summary>
	/// P/Invoke class for module 'api-ms-win-core-localization-l1-2-0.dll'
	/// </summary>
	public unsafe static partial class api_ms_win_core_localization_l1_2_0_dll
	{
		// Signature, IsValidLocaleName, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] char___ptrwchar_t *, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.WinRTInterop.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "mincore+mincore_PInvokes", "IsValidLocaleName")]
		public static int IsValidLocaleName(char* lpLocaleName)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop.api_ms_win_core_localization_l1_2_0_dll_PInvokes.IsValidLocaleName(((ushort*)lpLocaleName));
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}

		// Signature, ResolveLocaleName, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] char___ptrwchar_t *, [fwd] [in] [EETypeRva:0x0004157C] char___ptrwchar_t *, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.WinRTInterop.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "mincore+mincore_PInvokes", "ResolveLocaleName")]
		public static int ResolveLocaleName(
					char* lpNameToResolve, 
					char* lpLocaleName, 
					int cchLocaleName)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop.api_ms_win_core_localization_l1_2_0_dll_PInvokes.ResolveLocaleName(
								((ushort*)lpNameToResolve), 
								((ushort*)lpLocaleName), 
								cchLocaleName
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}
	}

	/// <summary>
	/// P/Invoke class for module 'kernel32.dll'
	/// </summary>
	public unsafe static partial class kernel32_dll
	{
		// Signature, SetCommState, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] __Interop_Kernel32_DCB__System_IO_Ports____Interop_Kernel32_DCB__System_IO_Ports, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "SetCommState")]
		public static bool SetCommState(
					global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib hFile, 
					ref global::_.Interop_Kernel32_DCB__System_IO_Ports lpDCB)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			fixed (global::_.Interop_Kernel32_DCB__System_IO_Ports* pinned_lpDCB = &(lpDCB))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.kernel32_dll_PInvokes.SetCommState(
									hFile.DangerousGetHandle(), 
									pinned_lpDCB
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, EscapeCommFunction, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "EscapeCommFunction")]
		public static bool EscapeCommFunction(
					global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib hFile, 
					int dwFunc)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.EscapeCommFunction(
								hFile.DangerousGetHandle(), 
								dwFunc
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, GetFileType, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x00041CC4] System_Runtime_InteropServices_SafeHandle____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "GetFileType")]
		public static int GetFileType(global::System.Runtime.InteropServices.SafeHandle hFile)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.GetFileType(hFile.DangerousGetHandle());
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, GetCommProperties, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004084C] __Interop_Kernel32_COMMPROP__System_IO_Ports____Interop_Kernel32_COMMPROP__System_IO_Ports, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "GetCommProperties")]
		public static bool GetCommProperties(
					global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib hFile, 
					ref global::_.Interop_Kernel32_COMMPROP__System_IO_Ports lpCommProp)
		{
			// Setup
			bool addRefed = false;
			global::_.Interop_Kernel32_COMMPROP__System_IO_Ports__Impl.UnsafeType unsafe_lpCommProp = default(global::_.Interop_Kernel32_COMMPROP__System_IO_Ports__Impl.UnsafeType);
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			global::_.Interop_Kernel32_COMMPROP__System_IO_Ports__Impl.Marshal__SafeToUnsafe(
								ref lpCommProp, 
								out unsafe_lpCommProp
							);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.GetCommProperties(
								hFile.DangerousGetHandle(), 
								&(unsafe_lpCommProp)
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			global::_.Interop_Kernel32_COMMPROP__System_IO_Ports__Impl.Marshal__UnsafeToSafe(
								ref unsafe_lpCommProp, 
								out lpCommProp
							);
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, GetCommModemStatus, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "GetCommModemStatus")]
		public static bool GetCommModemStatus(
					global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib hFile, 
					ref int lpModemStat)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			fixed (int* pinned_lpModemStat = &(lpModemStat))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.kernel32_dll_PInvokes.GetCommModemStatus(
									hFile.DangerousGetHandle(), 
									pinned_lpModemStat
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, SetCommTimeouts, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] __Interop_Kernel32_COMMTIMEOUTS__System_IO_Ports____Interop_Kernel32_COMMTIMEOUTS__System_IO_Ports, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "SetCommTimeouts")]
		public static bool SetCommTimeouts(
					global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib hFile, 
					ref global::_.Interop_Kernel32_COMMTIMEOUTS__System_IO_Ports lpCommTimeouts)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			fixed (global::_.Interop_Kernel32_COMMTIMEOUTS__System_IO_Ports* pinned_lpCommTimeouts = &(lpCommTimeouts))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.kernel32_dll_PInvokes.SetCommTimeouts(
									hFile.DangerousGetHandle(), 
									pinned_lpCommTimeouts
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, SetCommMask, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "SetCommMask")]
		public static bool SetCommMask(
					global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib hFile, 
					int dwEvtMask)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.SetCommMask(
								hFile.DangerousGetHandle(), 
								dwEvtMask
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, SetupComm, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "SetupComm")]
		public static bool SetupComm(
					global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib hFile, 
					int dwInQueue, 
					int dwOutQueue)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.SetupComm(
								hFile.DangerousGetHandle(), 
								dwInQueue, 
								dwOutQueue
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, GetCurrentProcessId, [fwd] [return] [EETypeRva:0x0004157C] uint__unsigned int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Diagnostics.Process, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "GetCurrentProcessId")]
		public static uint GetCurrentProcessId()
		{
			// Setup
			uint unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.GetCurrentProcessId();
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}

		// Signature, FlushFileBuffers, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] System_Runtime_InteropServices_SafeHandle____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "FlushFileBuffers")]
		public static bool FlushFileBuffers(global::System.Runtime.InteropServices.SafeHandle hHandle)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hHandle.DangerousAddRef(ref addRefed);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.FlushFileBuffers(hHandle.DangerousGetHandle());
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed)
				hHandle.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, GetCommState, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] __Interop_Kernel32_DCB__System_IO_Ports____Interop_Kernel32_DCB__System_IO_Ports, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "GetCommState")]
		public static bool GetCommState(
					global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib hFile, 
					ref global::_.Interop_Kernel32_DCB__System_IO_Ports lpDCB)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			fixed (global::_.Interop_Kernel32_DCB__System_IO_Ports* pinned_lpDCB = &(lpDCB))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.kernel32_dll_PInvokes.GetCommState(
									hFile.DangerousGetHandle(), 
									pinned_lpDCB
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, WriteFile, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x00041CC4] System_Runtime_InteropServices_SafeHandle____w64 int, [fwd] [in] [EETypeRva:0x0004157C] byte___ptrunsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_Threading_NativeOverlapped__System_Private_CoreLib___ptrSystem_Threading__NativeOverlapped__System_Private_CoreLib *, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "WriteFile")]
		public static int WriteFile(
					global::System.Runtime.InteropServices.SafeHandle handle, 
					byte* bytes, 
					int numBytesToWrite, 
					global::System.IntPtr numBytesWritten_mustBeZero, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* lpOverlapped)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			handle.DangerousAddRef(ref addRefed);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.WriteFile(
								handle.DangerousGetHandle(), 
								((byte*)bytes), 
								numBytesToWrite, 
								numBytesWritten_mustBeZero, 
								((global::System_Threading.NativeOverlapped__System_Private_CoreLib*)lpOverlapped)
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed)
				handle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, WriteFile__0, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x00041CC4] System_Runtime_InteropServices_SafeHandle____w64 int, [fwd] [in] [EETypeRva:0x0004157C] byte___ptrunsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "WriteFile")]
		public static int WriteFile__0(
					global::System.Runtime.InteropServices.SafeHandle handle, 
					byte* bytes, 
					int numBytesToWrite, 
					out int numBytesWritten, 
					global::System.IntPtr mustBeZero)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			handle.DangerousAddRef(ref addRefed);
			fixed (int* pinned_numBytesWritten = &(numBytesWritten))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.kernel32_dll_PInvokes.WriteFile__0(
									handle.DangerousGetHandle(), 
									((byte*)bytes), 
									numBytesToWrite, 
									pinned_numBytesWritten, 
									mustBeZero
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				handle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, ClearCommError, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] __Interop_Kernel32_COMSTAT__System_IO_Ports____Interop_Kernel32_COMSTAT__System_IO_Ports, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "ClearCommError")]
		public static bool ClearCommError(
					global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib hFile, 
					ref int lpErrors, 
					ref global::_.Interop_Kernel32_COMSTAT__System_IO_Ports lpStat)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			fixed (int* pinned_lpErrors = &(lpErrors))
				fixed (global::_.Interop_Kernel32_COMSTAT__System_IO_Ports* pinned_lpStat = &(lpStat))
				{
					global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
					// Call to native method
					unsafe___value = global::__Interop.kernel32_dll_PInvokes.ClearCommError(
										hFile.DangerousGetHandle(), 
										pinned_lpErrors, 
										pinned_lpStat
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
					global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				}
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, GetCPInfoExW, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x0004157C] __Interop_Kernel32_CPINFOEXW__System_Text_Encoding_CodePages___ptr__Interop_Kernel32_CPINFOEXW__System_Text_Encoding_CodePages *, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Text.Encoding.CodePages, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "GetCPInfoExW")]
		public static int GetCPInfoExW(
					uint CodePage, 
					uint dwFlags, 
					global::_.Interop_Kernel32_CPINFOEXW__System_Text_Encoding_CodePages* lpCPInfoEx)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.GetCPInfoExW(
								CodePage, 
								dwFlags, 
								((global::_.Interop_Kernel32_CPINFOEXW__System_Text_Encoding_CodePages*)lpCPInfoEx)
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}

		// Signature, PurgeComm, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "PurgeComm")]
		public static bool PurgeComm(
					global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib hFile, 
					uint dwFlags)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.PurgeComm(
								hFile.DangerousGetHandle(), 
								dwFlags
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, GetCurrentProcess, [fwd] [return] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeProcessHandle__System_Diagnostics_Process____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Diagnostics.Process, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "GetCurrentProcess")]
		public static global::Microsoft.Win32.SafeHandles.SafeProcessHandle__System_Diagnostics_Process GetCurrentProcess()
		{
			// Setup
			global::Microsoft.Win32.SafeHandles.SafeProcessHandle__System_Diagnostics_Process __value;
			global::System.IntPtr unsafe___value;
			// Marshalling
			__value = new global::Microsoft.Win32.SafeHandles.SafeProcessHandle__System_Diagnostics_Process();
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.GetCurrentProcess();
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
								__value, 
								unsafe___value
							);
			// Return
			return __value;
		}

		// Signature, ReadFile, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x00041CC4] System_Runtime_InteropServices_SafeHandle____w64 int, [fwd] [in] [EETypeRva:0x0004157C] byte___ptrunsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_Threading_NativeOverlapped__System_Private_CoreLib___ptrSystem_Threading__NativeOverlapped__System_Private_CoreLib *, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "ReadFile")]
		public static int ReadFile(
					global::System.Runtime.InteropServices.SafeHandle handle, 
					byte* bytes, 
					int numBytesToRead, 
					global::System.IntPtr numBytesRead_mustBeZero, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* overlapped)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			handle.DangerousAddRef(ref addRefed);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.ReadFile(
								handle.DangerousGetHandle(), 
								((byte*)bytes), 
								numBytesToRead, 
								numBytesRead_mustBeZero, 
								((global::System_Threading.NativeOverlapped__System_Private_CoreLib*)overlapped)
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed)
				handle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, ReadFile__0, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x00041CC4] System_Runtime_InteropServices_SafeHandle____w64 int, [fwd] [in] [EETypeRva:0x0004157C] byte___ptrunsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "ReadFile")]
		public static int ReadFile__0(
					global::System.Runtime.InteropServices.SafeHandle handle, 
					byte* bytes, 
					int numBytesToRead, 
					out int numBytesRead, 
					global::System.IntPtr mustBeZero)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			handle.DangerousAddRef(ref addRefed);
			fixed (int* pinned_numBytesRead = &(numBytesRead))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.kernel32_dll_PInvokes.ReadFile__0(
									handle.DangerousGetHandle(), 
									((byte*)bytes), 
									numBytesToRead, 
									pinned_numBytesRead, 
									mustBeZero
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				handle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, GetProcessId, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeProcessHandle__System_Diagnostics_Process____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Diagnostics.Process, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "GetProcessId")]
		public static int GetProcessId(global::Microsoft.Win32.SafeHandles.SafeProcessHandle__System_Diagnostics_Process nativeHandle)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			nativeHandle.DangerousAddRef(ref addRefed);
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.GetProcessId(nativeHandle.DangerousGetHandle());
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			if (addRefed)
				nativeHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, GetExitCodeProcess, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeProcessHandle__System_Diagnostics_Process____w64 int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Diagnostics.Process, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "GetExitCodeProcess")]
		public static bool GetExitCodeProcess(
					global::Microsoft.Win32.SafeHandles.SafeProcessHandle__System_Diagnostics_Process processHandle, 
					out int exitCode)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			processHandle.DangerousAddRef(ref addRefed);
			fixed (int* pinned_exitCode = &(exitCode))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.kernel32_dll_PInvokes.GetExitCodeProcess(
									processHandle.DangerousGetHandle(), 
									pinned_exitCode
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				processHandle.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, WaitCommEvent, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int___ptrint *, [fwd] [in] [EETypeRva:0x0004157C] System_Threading_NativeOverlapped__System_Private_CoreLib___ptrSystem_Threading__NativeOverlapped__System_Private_CoreLib *, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "WaitCommEvent")]
		public static bool WaitCommEvent(
					global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib hFile, 
					int* lpEvtMask, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* lpOverlapped)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.WaitCommEvent(
								hFile.DangerousGetHandle(), 
								((int*)lpEvtMask), 
								((global::System_Threading.NativeOverlapped__System_Private_CoreLib*)lpOverlapped)
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, GetOverlappedResult, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_Threading_NativeOverlapped__System_Private_CoreLib___ptrSystem_Threading__NativeOverlapped__System_Private_CoreLib *, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0003F06C] bool__System.Boolean, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "GetOverlappedResult")]
		public static bool GetOverlappedResult(
					global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib hFile, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* lpOverlapped, 
					ref int lpNumberOfBytesTransferred, 
					bool bWait)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			fixed (int* pinned_lpNumberOfBytesTransferred = &(lpNumberOfBytesTransferred))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.kernel32_dll_PInvokes.GetOverlappedResult(
									hFile.DangerousGetHandle(), 
									((global::System_Threading.NativeOverlapped__System_Private_CoreLib*)lpOverlapped), 
									pinned_lpNumberOfBytesTransferred, 
									(bWait ? 1 : 0)
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, CloseHandle, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Diagnostics.Process, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "CloseHandle")]
		public static bool CloseHandle(global::System.IntPtr handle)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.CloseHandle(handle);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value != 0;
		}

		// Signature, DuplicateHandle, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeProcessHandle__System_Diagnostics_Process____w64 int, [fwd] [in] [EETypeRva:0x00041CC4] System_Runtime_InteropServices_SafeHandle____w64 int, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeProcessHandle__System_Diagnostics_Process____w64 int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeWaitHandle__System_Private_CoreLib____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Diagnostics.Process, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "DuplicateHandle")]
		public static bool DuplicateHandle(
					global::Microsoft.Win32.SafeHandles.SafeProcessHandle__System_Diagnostics_Process hSourceProcessHandle, 
					global::System.Runtime.InteropServices.SafeHandle hSourceHandle, 
					global::Microsoft.Win32.SafeHandles.SafeProcessHandle__System_Diagnostics_Process hTargetProcess, 
					out global::Microsoft.Win32.SafeHandles.SafeWaitHandle__System_Private_CoreLib targetHandle, 
					int dwDesiredAccess, 
					bool bInheritHandle, 
					int dwOptions)
		{
			// Setup
			bool addRefed = false;
			bool addRefed_1 = false;
			bool addRefed_2 = false;
			global::System.IntPtr unsafe_targetHandle;
			int unsafe___value;
			// Marshalling
			hSourceProcessHandle.DangerousAddRef(ref addRefed);
			hSourceHandle.DangerousAddRef(ref addRefed_1);
			hTargetProcess.DangerousAddRef(ref addRefed_2);
			targetHandle = new global::Microsoft.Win32.SafeHandles.SafeWaitHandle__System_Private_CoreLib();
			unsafe_targetHandle = targetHandle.DangerousGetHandle();
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.DuplicateHandle(
								hSourceProcessHandle.DangerousGetHandle(), 
								hSourceHandle.DangerousGetHandle(), 
								hTargetProcess.DangerousGetHandle(), 
								&(unsafe_targetHandle), 
								dwDesiredAccess, 
								(bInheritHandle ? 1 : 0), 
								dwOptions
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
								targetHandle, 
								unsafe_targetHandle
							);
			if (addRefed_2)
				hTargetProcess.DangerousRelease();
			if (addRefed_1)
				hSourceHandle.DangerousRelease();
			if (addRefed)
				hSourceProcessHandle.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, ClearCommError__0, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+Kernel32", "ClearCommError")]
		public static bool ClearCommError__0(
					global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib hFile, 
					ref int lpErrors, 
					global::System.IntPtr lpStat)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			hFile.DangerousAddRef(ref addRefed);
			fixed (int* pinned_lpErrors = &(lpErrors))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.kernel32_dll_PInvokes.ClearCommError__0(
									hFile.DangerousGetHandle(), 
									pinned_lpErrors, 
									lpStat
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				hFile.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, OpenProcess, [fwd] [return] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeProcessHandle__System_Diagnostics_Process____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Diagnostics.Process, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "OpenProcess")]
		public static global::Microsoft.Win32.SafeHandles.SafeProcessHandle__System_Diagnostics_Process OpenProcess(
					int access, 
					bool inherit, 
					int processId)
		{
			// Setup
			global::Microsoft.Win32.SafeHandles.SafeProcessHandle__System_Diagnostics_Process __value;
			global::System.IntPtr unsafe___value;
			// Marshalling
			__value = new global::Microsoft.Win32.SafeHandles.SafeProcessHandle__System_Diagnostics_Process();
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.OpenProcess(
								access, 
								(inherit ? 1 : 0), 
								processId
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
								__value, 
								unsafe___value
							);
			// Return
			return __value;
		}

		// Signature, FormatMessage, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [out] [EETypeRva:0x00040380] System_Text_StringBuilder__wchar_t *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x000410CC] rg_System_IntPtr____w64 int *, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("Microsoft.Win32.Primitives, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "FormatMessage")]
		public static int FormatMessage(
					int dwFlags, 
					global::System.IntPtr lpSource, 
					uint dwMessageId, 
					int dwLanguageId, 
					global::System.Text.StringBuilder lpBuffer, 
					int nSize, 
					global::System.IntPtr[] arguments)
		{
			// Setup
			ushort* unsafe_lpBuffer = default(ushort*);
			global::System.IntPtr* unsafe_arguments;
			int unsafe___value;
			try
			{
				// Marshalling
				if (lpBuffer == null)
					unsafe_lpBuffer = null;
				else
				{
					unsafe_lpBuffer = (ushort*)global::__Interop.McgHelpers.CoTaskMemAllocAndZeroMemory(new global::System.IntPtr(checked(lpBuffer.Capacity * 2 
										+ 2)));
					if (unsafe_lpBuffer == null)
						throw new global::System.OutOfMemoryException();
				}
				fixed (global::System.IntPtr* pinned_arguments = ((arguments != null 
							&& arguments.Length == 0) ? new global::System.IntPtr[1] : arguments))
				{
					unsafe_arguments = (global::System.IntPtr*)pinned_arguments;
					global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
					// Call to native method
					unsafe___value = global::__Interop.kernel32_dll_PInvokes.FormatMessage(
										dwFlags, 
										lpSource, 
										dwMessageId, 
										dwLanguageId, 
										unsafe_lpBuffer, 
										nSize, 
										unsafe_arguments
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
					global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				}
				if (lpBuffer != null)
					global::System.Runtime.InteropServices.McgMarshal.UnicodeStringToStringBuilder(
										unsafe_lpBuffer, 
										lpBuffer
									);
				// Return
				return unsafe___value;
			}
			finally
			{
				// Cleanup
				if (unsafe_lpBuffer != null)
					global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_lpBuffer);
			}
		}

		// Signature, GetComputerName, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x000410CC] rg_char__wchar_t *, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] uint__unsigned int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Diagnostics.Process, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "GetComputerName")]
		public static int GetComputerName(
					char[] lpBuffer, 
					ref uint nSize)
		{
			// Setup
			ushort* unsafe_lpBuffer;
			int unsafe___value;
			// Marshalling
			fixed (char* pinned_lpBuffer = ((lpBuffer != null 
						&& lpBuffer.Length == 0) ? new char[1] : lpBuffer))
			{
				unsafe_lpBuffer = (ushort*)pinned_lpBuffer;
				fixed (uint* pinned_nSize = &(nSize))
				{
					// Call to native method
					unsafe___value = global::__Interop.kernel32_dll_PInvokes.GetComputerName(
										unsafe_lpBuffer, 
										pinned_nSize
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				}
			}
			// Return
			return unsafe___value;
		}

		// Signature, GetCurrentThread, [fwd] [return] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "GetCurrentThread")]
		public static global::System.IntPtr GetCurrentThread()
		{
			// Setup
			global::System.IntPtr unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.GetCurrentThread();
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}

		// Signature, GetCurrentProcess__0, [fwd] [return] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "GetCurrentProcess")]
		public static global::System.IntPtr GetCurrentProcess__0()
		{
			// Setup
			global::System.IntPtr unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.GetCurrentProcess__0();
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value;
		}

		// Signature, SetFileCompletionNotificationModes, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] System_Runtime_InteropServices_SafeHandle____w64 int, [fwd] [in] [EETypeRva:0x000414B4] __Interop_Kernel32_FileCompletionNotificationModes__System_Net_Sockets__Interop_Kernel32_FileCompletionNotificationModes__System_Net_Sockets, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "SetFileCompletionNotificationModes")]
		public static bool SetFileCompletionNotificationModes(
					global::System.Runtime.InteropServices.SafeHandle handle, 
					global::_.Interop_Kernel32_FileCompletionNotificationModes__System_Net_Sockets flags)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			handle.DangerousAddRef(ref addRefed);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.SetFileCompletionNotificationModes(
								handle.DangerousGetHandle(), 
								flags
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed)
				handle.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, CloseHandle__0, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "CloseHandle")]
		public static bool CloseHandle__0(global::System.IntPtr handle)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.CloseHandle__0(handle);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value != 0;
		}

		// Signature, CheckTokenMembershipEx, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeAccessTokenHandle__System_Security_Principal_Windows____w64 int, [fwd] [in] [EETypeRva:0x000410CC] rg_byte__unsigned char *, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0003F06C] bool__System.Boolean, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "CheckTokenMembershipEx")]
		public static bool CheckTokenMembershipEx(
					global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle__System_Security_Principal_Windows TokenHandle, 
					byte[] SidToCheck, 
					uint Flags, 
					ref bool IsMember)
		{
			// Setup
			bool addRefed = false;
			byte* unsafe_SidToCheck;
			int unsafe_IsMember;
			int unsafe___value;
			// Marshalling
			TokenHandle.DangerousAddRef(ref addRefed);
			fixed (byte* pinned_SidToCheck = ((SidToCheck != null 
						&& SidToCheck.Length == 0) ? new byte[1] : SidToCheck))
			{
				unsafe_SidToCheck = (byte*)pinned_SidToCheck;
				unsafe_IsMember = (IsMember ? 1 : 0);
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.kernel32_dll_PInvokes.CheckTokenMembershipEx(
									TokenHandle.DangerousGetHandle(), 
									unsafe_SidToCheck, 
									Flags, 
									&(unsafe_IsMember)
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				IsMember = unsafe_IsMember != 0;
			}
			if (addRefed)
				TokenHandle.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, EnumProcesses, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x000410CC] rg_int__int *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Diagnostics.Process, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "EnumProcesses")]
		public static bool EnumProcesses(
					int[] processIds, 
					int size, 
					out int needed)
		{
			// Setup
			int* unsafe_processIds;
			int unsafe___value;
			// Marshalling
			fixed (int* pinned_processIds = ((processIds != null 
						&& processIds.Length == 0) ? new int[1] : processIds))
			{
				unsafe_processIds = (int*)pinned_processIds;
				fixed (int* pinned_needed = &(needed))
				{
					global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
					// Call to native method
					unsafe___value = global::__Interop.kernel32_dll_PInvokes.EnumProcesses(
										unsafe_processIds, 
										size, 
										pinned_needed
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
					global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				}
			}
			// Return
			return unsafe___value != 0;
		}

		// Signature, LocalAlloc, [fwd] [return] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeLocalAllocHandle__System_Security_Principal_Windows____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_UIntPtr____w64 unsigned int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "LocalAlloc")]
		public static global::Microsoft.Win32.SafeHandles.SafeLocalAllocHandle__System_Security_Principal_Windows LocalAlloc(
					int uFlags, 
					global::System.UIntPtr sizetdwBytes)
		{
			// Setup
			global::Microsoft.Win32.SafeHandles.SafeLocalAllocHandle__System_Security_Principal_Windows __value;
			global::System.IntPtr unsafe___value;
			// Marshalling
			__value = new global::Microsoft.Win32.SafeHandles.SafeLocalAllocHandle__System_Security_Principal_Windows();
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.LocalAlloc(
								uFlags, 
								sizetdwBytes
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
								__value, 
								unsafe___value
							);
			// Return
			return __value;
		}

		// Signature, LocalFree, [fwd] [return] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Kernel32", "LocalFree")]
		public static global::System.IntPtr LocalFree(global::System.IntPtr handle)
		{
			// Setup
			global::System.IntPtr unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernel32_dll_PInvokes.LocalFree(handle);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value;
		}
	}

	/// <summary>
	/// P/Invoke class for module 'ws2_32.dll'
	/// </summary>
	public unsafe static partial class ws2_32_dll
	{
		// Signature, WSAStartup, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x0004157C] short__short, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004084C] __Interop_Winsock_WSAData__System_Net_NameResolution____Interop_Winsock_WSAData__System_Net_NameResolution, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.NameResolution, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "WSAStartup")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives WSAStartup(
					short wVersionRequested, 
					out global::_.Interop_Winsock_WSAData__System_Net_NameResolution lpWSAData)
		{
			// Setup
			global::_.Interop_Winsock_WSAData__System_Net_NameResolution__Impl.UnsafeType unsafe_lpWSAData = default(global::_.Interop_Winsock_WSAData__System_Net_NameResolution__Impl.UnsafeType);
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			unsafe_lpWSAData = default(global::_.Interop_Winsock_WSAData__System_Net_NameResolution__Impl.UnsafeType);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.ws2_32_dll_PInvokes.WSAStartup(
								wVersionRequested, 
								&(unsafe_lpWSAData)
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			global::_.Interop_Winsock_WSAData__System_Net_NameResolution__Impl.Marshal__UnsafeToSafe(
								ref unsafe_lpWSAData, 
								out lpWSAData
							);
			// Return
			return unsafe___value;
		}

		// Signature, gethostname, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [out] [EETypeRva:0x00040380] System_Text_StringBuilder__unsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.NameResolution, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "gethostname")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives gethostname(
					global::System.Text.StringBuilder hostName, 
					int bufferLength)
		{
			// Setup
			byte* unsafe_hostName = default(byte*);
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			try
			{
				// Marshalling
				if (hostName == null)
					unsafe_hostName = null;
				else
				{
					unsafe_hostName = (byte*)global::__Interop.McgHelpers.CoTaskMemAllocAndZeroMemory(new global::System.IntPtr(checked(hostName.Capacity * global::System.Runtime.InteropServices.Marshal.SystemMaxDBCSCharSize 
										+ 2)));
					if (unsafe_hostName == null)
						throw new global::System.OutOfMemoryException();
				}
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.gethostname(
									unsafe_hostName, 
									bufferLength
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				if (hostName != null)
					global::System.Runtime.InteropServices.McgMarshal.AnsiStringToStringBuilder(
										unsafe_hostName, 
										hostName
									);
				// Return
				return unsafe___value;
			}
			finally
			{
				// Cleanup
				if (unsafe_hostName != null)
					global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_hostName);
			}
		}

		// Signature, GetNameInfoW, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x000410CC] rg_byte__unsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [out] [EETypeRva:0x00040380] System_Text_StringBuilder__wchar_t *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [out] [EETypeRva:0x00040380] System_Text_StringBuilder__wchar_t *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.NameResolution, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "GetNameInfoW")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives GetNameInfoW(
					byte[] sa, 
					int salen, 
					global::System.Text.StringBuilder host, 
					int hostlen, 
					global::System.Text.StringBuilder serv, 
					int servlen, 
					int flags)
		{
			// Setup
			byte* unsafe_sa;
			ushort* unsafe_host = default(ushort*);
			ushort* unsafe_serv = default(ushort*);
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			try
			{
				// Marshalling
				fixed (byte* pinned_sa = ((sa != null 
							&& sa.Length == 0) ? new byte[1] : sa))
				{
					unsafe_sa = (byte*)pinned_sa;
					if (host == null)
						unsafe_host = null;
					else
					{
						unsafe_host = (ushort*)global::__Interop.McgHelpers.CoTaskMemAllocAndZeroMemory(new global::System.IntPtr(checked(host.Capacity * 2 
											+ 2)));
						if (unsafe_host == null)
							throw new global::System.OutOfMemoryException();
					}
					if (serv == null)
						unsafe_serv = null;
					else
					{
						unsafe_serv = (ushort*)global::__Interop.McgHelpers.CoTaskMemAllocAndZeroMemory(new global::System.IntPtr(checked(serv.Capacity * 2 
											+ 2)));
						if (unsafe_serv == null)
							throw new global::System.OutOfMemoryException();
					}
					global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
					// Call to native method
					unsafe___value = global::__Interop.ws2_32_dll_PInvokes.GetNameInfoW(
										unsafe_sa, 
										salen, 
										unsafe_host, 
										hostlen, 
										unsafe_serv, 
										servlen, 
										flags
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
					global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
					if (serv != null)
						global::System.Runtime.InteropServices.McgMarshal.UnicodeStringToStringBuilder(
											unsafe_serv, 
											serv
										);
					if (host != null)
						global::System.Runtime.InteropServices.McgMarshal.UnicodeStringToStringBuilder(
											unsafe_host, 
											host
										);
				}
				// Return
				return unsafe___value;
			}
			finally
			{
				// Cleanup
				if (unsafe_host != null)
					global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_host);
				if (unsafe_serv != null)
					global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_serv);
			}
		}

		// Signature, gethostbyaddr, [fwd] [return] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Internals_ProtocolFamily__System_Net_NameResolution__ProtocolFamily__System_Net_NameResolution, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.NameResolution, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "gethostbyaddr")]
		public static global::System.IntPtr gethostbyaddr(
					ref int addr, 
					int len, 
					global::System_Net_Internals.ProtocolFamily__System_Net_NameResolution type)
		{
			// Setup
			global::System.IntPtr unsafe___value;
			// Marshalling
			fixed (int* pinned_addr = &(addr))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.gethostbyaddr(
									pinned_addr, 
									len, 
									type
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			// Return
			return unsafe___value;
		}

		// Signature, gethostbyname, [fwd] [return] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x000402BC] string__unsigned char *, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.NameResolution, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "gethostbyname")]
		public static global::System.IntPtr gethostbyname(string host)
		{
			// Setup
			byte* unsafe_host = default(byte*);
			global::System.IntPtr unsafe___value;
			try
			{
				// Marshalling
				unsafe_host = global::System.Runtime.InteropServices.McgMarshal.StringToAnsiString(host, false, true);
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.gethostbyname(unsafe_host);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				// Return
				return unsafe___value;
			}
			finally
			{
				// Cleanup
				global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_host);
			}
		}

		// Signature, getsockname, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [out] [EETypeRva:0x000410CC] rg_byte__unsigned char *, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "getsockname")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives getsockname(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					byte[] socketAddress, 
					ref int socketAddressSize)
		{
			// Setup
			bool addRefed = false;
			byte* unsafe_socketAddress;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (byte* pinned_socketAddress = ((socketAddress != null 
						&& socketAddress.Length == 0) ? new byte[1] : socketAddress))
			{
				unsafe_socketAddress = (byte*)pinned_socketAddress;
				fixed (int* pinned_socketAddressSize = &(socketAddressSize))
				{
					global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
					// Call to native method
					unsafe___value = global::__Interop.ws2_32_dll_PInvokes.getsockname(
										socketHandle.DangerousGetHandle(), 
										unsafe_socketAddress, 
										pinned_socketAddressSize
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
					global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				}
			}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, sendto, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] byte___ptrunsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketFlags__System_Net_Sockets__SocketFlags__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000410CC] rg_byte__unsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "sendto")]
		public static int sendto(
					global::System.IntPtr socketHandle, 
					byte* pinnedBuffer, 
					int len, 
					global::System_Net_Sockets.SocketFlags__System_Net_Sockets socketFlags, 
					byte[] socketAddress, 
					int socketAddressSize)
		{
			// Setup
			byte* unsafe_socketAddress;
			int unsafe___value;
			// Marshalling
			fixed (byte* pinned_socketAddress = ((socketAddress != null 
						&& socketAddress.Length == 0) ? new byte[1] : socketAddress))
			{
				unsafe_socketAddress = (byte*)pinned_socketAddress;
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.sendto(
									socketHandle, 
									((byte*)pinnedBuffer), 
									len, 
									socketFlags, 
									unsafe_socketAddress, 
									socketAddressSize
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			// Return
			return unsafe___value;
		}

		// Signature, getsockopt, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionLevel__System_Net_Sockets__SocketOptionLevel__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionName__System_Net_Sockets__SocketOptionName__System_Net_Sockets, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "getsockopt")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives getsockopt(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					out int optionValue, 
					ref int optionLength)
		{
			// Setup
			bool addRefed = false;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (int* pinned_optionValue = &(optionValue))
				fixed (int* pinned_optionLength = &(optionLength))
				{
					global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
					// Call to native method
					unsafe___value = global::__Interop.ws2_32_dll_PInvokes.getsockopt(
										socketHandle.DangerousGetHandle(), 
										optionLevel, 
										optionName, 
										pinned_optionValue, 
										pinned_optionLength
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
					global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, shutdown, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "shutdown")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives shutdown(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					int how)
		{
			// Setup
			bool addRefed = false;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.ws2_32_dll_PInvokes.shutdown(
								socketHandle.DangerousGetHandle(), 
								how
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, GetAddrInfoW, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x000401D0] string__wchar_t *, [fwd] [in] [EETypeRva:0x000401D0] string__wchar_t *, [fwd] [in] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] System_Net_Sockets_AddressInfo__System_Net_NameResolution__System_Net_Sockets__AddressInfo__System_Net_NameResolution, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeFreeAddrInfo__System_Net_NameResolution____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.NameResolution, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "GetAddrInfoW")]
		public static int GetAddrInfoW(
					string nodename, 
					string servicename, 
					ref global::System_Net_Sockets.AddressInfo__System_Net_NameResolution hints, 
					out global::System.Net.Sockets.SafeFreeAddrInfo__System_Net_NameResolution handle)
		{
			// Setup
			ushort* unsafe_nodename = default(ushort*);
			ushort* unsafe_servicename = default(ushort*);
			global::System.IntPtr unsafe_handle;
			int unsafe___value;
			// Marshalling
			fixed (char* pinned_nodename = nodename)
			{
				unsafe_nodename = (ushort*)pinned_nodename;
				fixed (char* pinned_servicename = servicename)
				{
					unsafe_servicename = (ushort*)pinned_servicename;
					fixed (global::System_Net_Sockets.AddressInfo__System_Net_NameResolution* pinned_hints = &(hints))
					{
						handle = new global::System.Net.Sockets.SafeFreeAddrInfo__System_Net_NameResolution();
						unsafe_handle = handle.DangerousGetHandle();
						global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
						// Call to native method
						unsafe___value = global::__Interop.ws2_32_dll_PInvokes.GetAddrInfoW(
											unsafe_nodename, 
											unsafe_servicename, 
											pinned_hints, 
											&(unsafe_handle)
										);
						global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
						global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
						global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
											handle, 
											unsafe_handle
										);
					}
				}
			}
			// Return
			return unsafe___value;
		}

		// Signature, setsockopt, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionLevel__System_Net_Sockets__SocketOptionLevel__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionName__System_Net_Sockets__SocketOptionName__System_Net_Sockets, [fwd] [in] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "setsockopt")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					ref int optionValue, 
					int optionLength)
		{
			// Setup
			bool addRefed = false;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (int* pinned_optionValue = &(optionValue))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.setsockopt(
									socketHandle.DangerousGetHandle(), 
									optionLevel, 
									optionName, 
									pinned_optionValue, 
									optionLength
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, select, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [out] [EETypeRva:0x000410CC] rg_System_IntPtr____w64 int *, [fwd] [in] [out] [EETypeRva:0x000410CC] rg_System_IntPtr____w64 int *, [fwd] [in] [out] [EETypeRva:0x000410CC] rg_System_IntPtr____w64 int *, [fwd] [in] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] __Interop_Winsock_TimeValue__System_Net_Sockets____Interop_Winsock_TimeValue__System_Net_Sockets, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "select")]
		public static int select(
					int ignoredParameter, 
					global::System.IntPtr[] readfds, 
					global::System.IntPtr[] writefds, 
					global::System.IntPtr[] exceptfds, 
					ref global::_.Interop_Winsock_TimeValue__System_Net_Sockets timeout)
		{
			// Setup
			global::System.IntPtr* unsafe_readfds;
			global::System.IntPtr* unsafe_writefds;
			global::System.IntPtr* unsafe_exceptfds;
			int unsafe___value;
			// Marshalling
			fixed (global::System.IntPtr* pinned_readfds = ((readfds != null 
						&& readfds.Length == 0) ? new global::System.IntPtr[1] : readfds))
			{
				unsafe_readfds = (global::System.IntPtr*)pinned_readfds;
				fixed (global::System.IntPtr* pinned_writefds = ((writefds != null 
							&& writefds.Length == 0) ? new global::System.IntPtr[1] : writefds))
				{
					unsafe_writefds = (global::System.IntPtr*)pinned_writefds;
					fixed (global::System.IntPtr* pinned_exceptfds = ((exceptfds != null 
								&& exceptfds.Length == 0) ? new global::System.IntPtr[1] : exceptfds))
					{
						unsafe_exceptfds = (global::System.IntPtr*)pinned_exceptfds;
						fixed (global::_.Interop_Winsock_TimeValue__System_Net_Sockets* pinned_timeout = &(timeout))
						{
							global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
							// Call to native method
							unsafe___value = global::__Interop.ws2_32_dll_PInvokes.select(
												ignoredParameter, 
												unsafe_readfds, 
												unsafe_writefds, 
												unsafe_exceptfds, 
												pinned_timeout
											);
							global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
							global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
						}
					}
				}
			}
			// Return
			return unsafe___value;
		}

		// Signature, select__0, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [out] [EETypeRva:0x000410CC] rg_System_IntPtr____w64 int *, [fwd] [in] [out] [EETypeRva:0x000410CC] rg_System_IntPtr____w64 int *, [fwd] [in] [out] [EETypeRva:0x000410CC] rg_System_IntPtr____w64 int *, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "select")]
		public static int select__0(
					int ignoredParameter, 
					global::System.IntPtr[] readfds, 
					global::System.IntPtr[] writefds, 
					global::System.IntPtr[] exceptfds, 
					global::System.IntPtr nullTimeout)
		{
			// Setup
			global::System.IntPtr* unsafe_readfds;
			global::System.IntPtr* unsafe_writefds;
			global::System.IntPtr* unsafe_exceptfds;
			int unsafe___value;
			// Marshalling
			fixed (global::System.IntPtr* pinned_readfds = ((readfds != null 
						&& readfds.Length == 0) ? new global::System.IntPtr[1] : readfds))
			{
				unsafe_readfds = (global::System.IntPtr*)pinned_readfds;
				fixed (global::System.IntPtr* pinned_writefds = ((writefds != null 
							&& writefds.Length == 0) ? new global::System.IntPtr[1] : writefds))
				{
					unsafe_writefds = (global::System.IntPtr*)pinned_writefds;
					fixed (global::System.IntPtr* pinned_exceptfds = ((exceptfds != null 
								&& exceptfds.Length == 0) ? new global::System.IntPtr[1] : exceptfds))
					{
						unsafe_exceptfds = (global::System.IntPtr*)pinned_exceptfds;
						global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
						// Call to native method
						unsafe___value = global::__Interop.ws2_32_dll_PInvokes.select__0(
											ignoredParameter, 
											unsafe_readfds, 
											unsafe_writefds, 
											unsafe_exceptfds, 
											nullTimeout
										);
						global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
						global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
					}
				}
			}
			// Return
			return unsafe___value;
		}

		// Signature, bind, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x000410CC] rg_byte__unsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "bind")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives bind(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					byte[] socketAddress, 
					int socketAddressSize)
		{
			// Setup
			bool addRefed = false;
			byte* unsafe_socketAddress;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (byte* pinned_socketAddress = ((socketAddress != null 
						&& socketAddress.Length == 0) ? new byte[1] : socketAddress))
			{
				unsafe_socketAddress = (byte*)pinned_socketAddress;
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.bind(
									socketHandle.DangerousGetHandle(), 
									unsafe_socketAddress, 
									socketAddressSize
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, send, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] byte___ptrunsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketFlags__System_Net_Sockets__SocketFlags__System_Net_Sockets, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "send")]
		public static int send(
					global::System.IntPtr socketHandle, 
					byte* pinnedBuffer, 
					int len, 
					global::System_Net_Sockets.SocketFlags__System_Net_Sockets socketFlags)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.ws2_32_dll_PInvokes.send(
								socketHandle, 
								((byte*)pinnedBuffer), 
								len, 
								socketFlags
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value;
		}

		// Signature, recv, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] byte___ptrunsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketFlags__System_Net_Sockets__SocketFlags__System_Net_Sockets, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "recv")]
		public static int recv(
					global::System.IntPtr socketHandle, 
					byte* pinnedBuffer, 
					int len, 
					global::System_Net_Sockets.SocketFlags__System_Net_Sockets socketFlags)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.ws2_32_dll_PInvokes.recv(
								socketHandle, 
								((byte*)pinnedBuffer), 
								len, 
								socketFlags
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value;
		}

		// Signature, setsockopt__0, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionLevel__System_Net_Sockets__SocketOptionLevel__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionName__System_Net_Sockets__SocketOptionName__System_Net_Sockets, [fwd] [in] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] __Interop_Winsock_Linger__System_Net_Sockets____Interop_Winsock_Linger__System_Net_Sockets, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "setsockopt")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt__0(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					ref global::_.Interop_Winsock_Linger__System_Net_Sockets linger, 
					int optionLength)
		{
			// Setup
			bool addRefed = false;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (global::_.Interop_Winsock_Linger__System_Net_Sockets* pinned_linger = &(linger))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.setsockopt__0(
									socketHandle.DangerousGetHandle(), 
									optionLevel, 
									optionName, 
									pinned_linger, 
									optionLength
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, setsockopt__1, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionLevel__System_Net_Sockets__SocketOptionLevel__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionName__System_Net_Sockets__SocketOptionName__System_Net_Sockets, [fwd] [in] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] __Interop_Winsock_IPMulticastRequest__System_Net_Sockets____Interop_Winsock_IPMulticastRequest__System_Net_Sockets, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "setsockopt")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt__1(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					ref global::_.Interop_Winsock_IPMulticastRequest__System_Net_Sockets mreq, 
					int optionLength)
		{
			// Setup
			bool addRefed = false;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (global::_.Interop_Winsock_IPMulticastRequest__System_Net_Sockets* pinned_mreq = &(mreq))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.setsockopt__1(
									socketHandle.DangerousGetHandle(), 
									optionLevel, 
									optionName, 
									pinned_mreq, 
									optionLength
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, setsockopt__2, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionLevel__System_Net_Sockets__SocketOptionLevel__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionName__System_Net_Sockets__SocketOptionName__System_Net_Sockets, [fwd] [in] [managedbyref] [nativebyref] [EETypeRva:0x0004084C] __Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets____Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "setsockopt")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt__2(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					ref global::_.Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets mreq, 
					int optionLength)
		{
			// Setup
			bool addRefed = false;
			global::_.Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets__Impl.UnsafeType unsafe_mreq = default(global::_.Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets__Impl.UnsafeType);
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			global::_.Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets__Impl.Marshal__SafeToUnsafe(
								ref mreq, 
								out unsafe_mreq
							);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.ws2_32_dll_PInvokes.setsockopt__2(
								socketHandle.DangerousGetHandle(), 
								optionLevel, 
								optionName, 
								&(unsafe_mreq), 
								optionLength
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, getsockopt__0, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionLevel__System_Net_Sockets__SocketOptionLevel__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionName__System_Net_Sockets__SocketOptionName__System_Net_Sockets, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] __Interop_Winsock_Linger__System_Net_Sockets____Interop_Winsock_Linger__System_Net_Sockets, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "getsockopt")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives getsockopt__0(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					out global::_.Interop_Winsock_Linger__System_Net_Sockets optionValue, 
					ref int optionLength)
		{
			// Setup
			bool addRefed = false;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (global::_.Interop_Winsock_Linger__System_Net_Sockets* pinned_optionValue = &(optionValue))
				fixed (int* pinned_optionLength = &(optionLength))
				{
					global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
					// Call to native method
					unsafe___value = global::__Interop.ws2_32_dll_PInvokes.getsockopt__0(
										socketHandle.DangerousGetHandle(), 
										optionLevel, 
										optionName, 
										pinned_optionValue, 
										pinned_optionLength
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
					global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, getsockopt__1, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionLevel__System_Net_Sockets__SocketOptionLevel__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionName__System_Net_Sockets__SocketOptionName__System_Net_Sockets, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] __Interop_Winsock_IPMulticastRequest__System_Net_Sockets____Interop_Winsock_IPMulticastRequest__System_Net_Sockets, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "getsockopt")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives getsockopt__1(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					out global::_.Interop_Winsock_IPMulticastRequest__System_Net_Sockets optionValue, 
					ref int optionLength)
		{
			// Setup
			bool addRefed = false;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (global::_.Interop_Winsock_IPMulticastRequest__System_Net_Sockets* pinned_optionValue = &(optionValue))
				fixed (int* pinned_optionLength = &(optionLength))
				{
					global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
					// Call to native method
					unsafe___value = global::__Interop.ws2_32_dll_PInvokes.getsockopt__1(
										socketHandle.DangerousGetHandle(), 
										optionLevel, 
										optionName, 
										pinned_optionValue, 
										pinned_optionLength
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
					global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, getsockopt__2, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionLevel__System_Net_Sockets__SocketOptionLevel__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionName__System_Net_Sockets__SocketOptionName__System_Net_Sockets, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004084C] __Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets____Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "getsockopt")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives getsockopt__2(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					out global::_.Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets optionValue, 
					ref int optionLength)
		{
			// Setup
			bool addRefed = false;
			global::_.Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets__Impl.UnsafeType unsafe_optionValue = default(global::_.Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets__Impl.UnsafeType);
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			unsafe_optionValue = default(global::_.Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets__Impl.UnsafeType);
			fixed (int* pinned_optionLength = &(optionLength))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.getsockopt__2(
									socketHandle.DangerousGetHandle(), 
									optionLevel, 
									optionName, 
									&(unsafe_optionValue), 
									pinned_optionLength
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			global::_.Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets__Impl.Marshal__UnsafeToSafe(
								ref unsafe_optionValue, 
								out optionValue
							);
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, getpeername, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [out] [EETypeRva:0x000410CC] rg_byte__unsigned char *, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "getpeername")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives getpeername(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					byte[] socketAddress, 
					ref int socketAddressSize)
		{
			// Setup
			bool addRefed = false;
			byte* unsafe_socketAddress;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (byte* pinned_socketAddress = ((socketAddress != null 
						&& socketAddress.Length == 0) ? new byte[1] : socketAddress))
			{
				unsafe_socketAddress = (byte*)pinned_socketAddress;
				fixed (int* pinned_socketAddressSize = &(socketAddressSize))
				{
					global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
					// Call to native method
					unsafe___value = global::__Interop.ws2_32_dll_PInvokes.getpeername(
										socketHandle.DangerousGetHandle(), 
										unsafe_socketAddress, 
										pinned_socketAddressSize
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
					global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				}
			}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, ioctlsocket, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "ioctlsocket")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives ioctlsocket(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					int cmd, 
					ref int argp)
		{
			// Setup
			bool addRefed = false;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (int* pinned_argp = &(argp))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.ioctlsocket(
									socketHandle.DangerousGetHandle(), 
									cmd, 
									pinned_argp
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, WSAGetOverlappedResult, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_Threading_NativeOverlapped__System_Private_CoreLib___ptrSystem_Threading__NativeOverlapped__System_Private_CoreLib *, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x000414B4] System_Net_Sockets_SocketFlags__System_Net_Sockets__SocketFlags__System_Net_Sockets, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "WSAGetOverlappedResult")]
		public static bool WSAGetOverlappedResult(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* overlapped, 
					out uint bytesTransferred, 
					bool wait, 
					out global::System_Net_Sockets.SocketFlags__System_Net_Sockets socketFlags)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (uint* pinned_bytesTransferred = &(bytesTransferred))
				fixed (global::System_Net_Sockets.SocketFlags__System_Net_Sockets* pinned_socketFlags = &(socketFlags))
				{
					global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
					// Call to native method
					unsafe___value = global::__Interop.ws2_32_dll_PInvokes.WSAGetOverlappedResult(
										socketHandle.DangerousGetHandle(), 
										((global::System_Threading.NativeOverlapped__System_Private_CoreLib*)overlapped), 
										pinned_bytesTransferred, 
										(wait ? 1 : 0), 
										pinned_socketFlags
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
					global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, WSASocketW, [fwd] [return] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_AddressFamily__System_Net_Primitives__AddressFamily__System_Net_Primitives, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Internals_SocketType__System_Net_NameResolution__SocketType__System_Net_NameResolution, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.NameResolution, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "WSASocketW")]
		public static global::System.IntPtr WSASocketW(
					global::System_Net_Sockets.AddressFamily__System_Net_Primitives addressFamily, 
					global::System_Net_Internals.SocketType__System_Net_NameResolution socketType, 
					int protocolType, 
					global::System.IntPtr protocolInfo, 
					int group, 
					int flags)
		{
			// Setup
			global::System.IntPtr unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.ws2_32_dll_PInvokes.WSASocketW(
								addressFamily, 
								socketType, 
								protocolType, 
								protocolInfo, 
								group, 
								flags
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value;
		}

		// Signature, closesocket, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.NameResolution, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "closesocket")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives closesocket(global::System.IntPtr socketHandle)
		{
			// Setup
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.ws2_32_dll_PInvokes.closesocket(socketHandle);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value;
		}

		// Signature, WSARecvFrom, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_Net_Sockets_WSABuffer__System_Net_Sockets___ptrSystem_Net_Sockets__WSABuffer__System_Net_Sockets *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x000414B4] System_Net_Sockets_SocketFlags__System_Net_Sockets__SocketFlags__System_Net_Sockets, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_Threading_NativeOverlapped__System_Private_CoreLib___ptrSystem_Threading__NativeOverlapped__System_Private_CoreLib *, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "WSARecvFrom")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives WSARecvFrom(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.WSABuffer__System_Net_Sockets* buffers, 
					int bufferCount, 
					out int bytesTransferred, 
					ref global::System_Net_Sockets.SocketFlags__System_Net_Sockets socketFlags, 
					global::System.IntPtr socketAddressPointer, 
					global::System.IntPtr socketAddressSizePointer, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* overlapped, 
					global::System.IntPtr completionRoutine)
		{
			// Setup
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			fixed (int* pinned_bytesTransferred = &(bytesTransferred))
				fixed (global::System_Net_Sockets.SocketFlags__System_Net_Sockets* pinned_socketFlags = &(socketFlags))
				{
					global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
					// Call to native method
					unsafe___value = global::__Interop.ws2_32_dll_PInvokes.WSARecvFrom(
										socketHandle, 
										((global::System_Net_Sockets.WSABuffer__System_Net_Sockets*)buffers), 
										bufferCount, 
										pinned_bytesTransferred, 
										pinned_socketFlags, 
										socketAddressPointer, 
										socketAddressSizePointer, 
										((global::System_Threading.NativeOverlapped__System_Private_CoreLib*)overlapped), 
										completionRoutine
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
					global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				}
			// Return
			return unsafe___value;
		}

		// Signature, WSARecv, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_Net_Sockets_WSABuffer__System_Net_Sockets___ptrSystem_Net_Sockets__WSABuffer__System_Net_Sockets *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x000414B4] System_Net_Sockets_SocketFlags__System_Net_Sockets__SocketFlags__System_Net_Sockets, [fwd] [in] [EETypeRva:0x0004157C] System_Threading_NativeOverlapped__System_Private_CoreLib___ptrSystem_Threading__NativeOverlapped__System_Private_CoreLib *, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "WSARecv")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives WSARecv(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.WSABuffer__System_Net_Sockets* buffer, 
					int bufferCount, 
					out int bytesTransferred, 
					ref global::System_Net_Sockets.SocketFlags__System_Net_Sockets socketFlags, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* overlapped, 
					global::System.IntPtr completionRoutine)
		{
			// Setup
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			fixed (int* pinned_bytesTransferred = &(bytesTransferred))
				fixed (global::System_Net_Sockets.SocketFlags__System_Net_Sockets* pinned_socketFlags = &(socketFlags))
				{
					global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
					// Call to native method
					unsafe___value = global::__Interop.ws2_32_dll_PInvokes.WSARecv(
										socketHandle, 
										((global::System_Net_Sockets.WSABuffer__System_Net_Sockets*)buffer), 
										bufferCount, 
										pinned_bytesTransferred, 
										pinned_socketFlags, 
										((global::System_Threading.NativeOverlapped__System_Private_CoreLib*)overlapped), 
										completionRoutine
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
					global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				}
			// Return
			return unsafe___value;
		}

		// Signature, WSASend, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_Net_Sockets_WSABuffer__System_Net_Sockets___ptrSystem_Net_Sockets__WSABuffer__System_Net_Sockets *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketFlags__System_Net_Sockets__SocketFlags__System_Net_Sockets, [fwd] [in] [EETypeRva:0x0004157C] System_Threading_NativeOverlapped__System_Private_CoreLib___ptrSystem_Threading__NativeOverlapped__System_Private_CoreLib *, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "WSASend")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives WSASend(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.WSABuffer__System_Net_Sockets* buffers, 
					int bufferCount, 
					out int bytesTransferred, 
					global::System_Net_Sockets.SocketFlags__System_Net_Sockets socketFlags, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* overlapped, 
					global::System.IntPtr completionRoutine)
		{
			// Setup
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			fixed (int* pinned_bytesTransferred = &(bytesTransferred))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.WSASend(
									socketHandle, 
									((global::System_Net_Sockets.WSABuffer__System_Net_Sockets*)buffers), 
									bufferCount, 
									pinned_bytesTransferred, 
									socketFlags, 
									((global::System_Threading.NativeOverlapped__System_Private_CoreLib*)overlapped), 
									completionRoutine
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			// Return
			return unsafe___value;
		}

		// Signature, freeaddrinfo, [fwd] [return] [EETypeRva:0x000405F8] void__void, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.NameResolution, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "freeaddrinfo")]
		public static void freeaddrinfo(global::System.IntPtr info)
		{
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			global::__Interop.ws2_32_dll_PInvokes.freeaddrinfo(info);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
		}

		// Signature, WSASocketW__0, [fwd] [return] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket_InnerSafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_AddressFamily__System_Net_Primitives__AddressFamily__System_Net_Primitives, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketType__System_Net_Sockets__SocketType__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_ProtocolType__System_Net_Sockets__ProtocolType__System_Net_Sockets, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x000414B4] __Interop_Winsock_SocketConstructorFlags__System_Net_Sockets__Interop_Winsock_SocketConstructorFlags__System_Net_Sockets, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "WSASocketW")]
		public static global::System.Net.Sockets.SafeCloseSocket_InnerSafeCloseSocket__System_Net_Sockets WSASocketW__0(
					global::System_Net_Sockets.AddressFamily__System_Net_Primitives addressFamily, 
					global::System_Net_Sockets.SocketType__System_Net_Sockets socketType, 
					global::System_Net_Sockets.ProtocolType__System_Net_Sockets protocolType, 
					global::System.IntPtr protocolInfo, 
					uint group, 
					global::_.Interop_Winsock_SocketConstructorFlags__System_Net_Sockets flags)
		{
			// Setup
			global::System.Net.Sockets.SafeCloseSocket_InnerSafeCloseSocket__System_Net_Sockets __value;
			global::System.IntPtr unsafe___value;
			// Marshalling
			__value = new global::System.Net.Sockets.SafeCloseSocket_InnerSafeCloseSocket__System_Net_Sockets();
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.ws2_32_dll_PInvokes.WSASocketW__0(
								addressFamily, 
								socketType, 
								protocolType, 
								protocolInfo, 
								group, 
								flags
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
								__value, 
								unsafe___value
							);
			// Return
			return __value;
		}

		// Signature, WSASocketW__1, [fwd] [return] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_AddressFamily__System_Net_Primitives__AddressFamily__System_Net_Primitives, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketType__System_Net_Sockets__SocketType__System_Net_Sockets, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "WSASocketW")]
		public static global::System.IntPtr WSASocketW__1(
					global::System_Net_Sockets.AddressFamily__System_Net_Primitives addressFamily, 
					global::System_Net_Sockets.SocketType__System_Net_Sockets socketType, 
					int protocolType, 
					global::System.IntPtr protocolInfo, 
					int group, 
					int flags)
		{
			// Setup
			global::System.IntPtr unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.ws2_32_dll_PInvokes.WSASocketW__1(
								addressFamily, 
								socketType, 
								protocolType, 
								protocolInfo, 
								group, 
								flags
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value;
		}

		// Signature, closesocket__0, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "closesocket")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives closesocket__0(global::System.IntPtr socketHandle)
		{
			// Setup
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.ws2_32_dll_PInvokes.closesocket__0(socketHandle);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value;
		}

		// Signature, setsockopt__3, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionLevel__System_Net_Sockets__SocketOptionLevel__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionName__System_Net_Sockets__SocketOptionName__System_Net_Sockets, [fwd] [in] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "setsockopt")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt__3(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					ref global::System.IntPtr pointer, 
					int optionLength)
		{
			// Setup
			bool addRefed = false;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (global::System.IntPtr* pinned_pointer = &(pointer))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.setsockopt__3(
									socketHandle.DangerousGetHandle(), 
									optionLevel, 
									optionName, 
									pinned_pointer, 
									optionLength
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, setsockopt__4, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionLevel__System_Net_Sockets__SocketOptionLevel__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionName__System_Net_Sockets__SocketOptionName__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000410CC] rg_byte__unsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "setsockopt")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt__4(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					byte[] optionValue, 
					int optionLength)
		{
			// Setup
			bool addRefed = false;
			byte* unsafe_optionValue;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (byte* pinned_optionValue = ((optionValue != null 
						&& optionValue.Length == 0) ? new byte[1] : optionValue))
			{
				unsafe_optionValue = (byte*)pinned_optionValue;
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.setsockopt__4(
									socketHandle.DangerousGetHandle(), 
									optionLevel, 
									optionName, 
									unsafe_optionValue, 
									optionLength
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, WSAConnect, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x000410CC] rg_byte__unsigned char *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "WSAConnect")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives WSAConnect(
					global::System.IntPtr socketHandle, 
					byte[] socketAddress, 
					int socketAddressSize, 
					global::System.IntPtr inBuffer, 
					global::System.IntPtr outBuffer, 
					global::System.IntPtr sQOS, 
					global::System.IntPtr gQOS)
		{
			// Setup
			byte* unsafe_socketAddress;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			fixed (byte* pinned_socketAddress = ((socketAddress != null 
						&& socketAddress.Length == 0) ? new byte[1] : socketAddress))
			{
				unsafe_socketAddress = (byte*)pinned_socketAddress;
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.WSAConnect(
									socketHandle, 
									unsafe_socketAddress, 
									socketAddressSize, 
									inBuffer, 
									outBuffer, 
									sQOS, 
									gQOS
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			// Return
			return unsafe___value;
		}

		// Signature, ioctlsocket__0, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "ioctlsocket")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives ioctlsocket__0(
					global::System.IntPtr handle, 
					int cmd, 
					ref int argp)
		{
			// Setup
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			fixed (int* pinned_argp = &(argp))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.ioctlsocket__0(
									handle, 
									cmd, 
									pinned_argp
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			// Return
			return unsafe___value;
		}

		// Signature, setsockopt__5, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionLevel__System_Net_Sockets__SocketOptionLevel__System_Net_Sockets, [fwd] [in] [EETypeRva:0x000414B4] System_Net_Sockets_SocketOptionName__System_Net_Sockets__SocketOptionName__System_Net_Sockets, [fwd] [in] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] __Interop_Winsock_Linger__System_Net_Sockets____Interop_Winsock_Linger__System_Net_Sockets, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "setsockopt")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt__5(
					global::System.IntPtr handle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					ref global::_.Interop_Winsock_Linger__System_Net_Sockets linger, 
					int optionLength)
		{
			// Setup
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			fixed (global::_.Interop_Winsock_Linger__System_Net_Sockets* pinned_linger = &(linger))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.ws2_32_dll_PInvokes.setsockopt__5(
									handle, 
									optionLevel, 
									optionName, 
									pinned_linger, 
									optionLength
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			// Return
			return unsafe___value;
		}

		// Signature, WSAIoctl, [fwd] [return] [EETypeRva:0x000414B4] System_Net_Sockets_SocketError__System_Net_Primitives__SocketError__System_Net_Primitives, [fwd] [in] [EETypeRva:0x00041CC4] System_Net_Sockets_SafeCloseSocket__System_Net_Sockets____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] System_Guid__System.Guid, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Net.Sockets, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Winsock", "WSAIoctl")]
		public static global::System_Net_Sockets.SocketError__System_Net_Primitives WSAIoctl(
					global::System.Net.Sockets.SafeCloseSocket__System_Net_Sockets socketHandle, 
					int ioControlCode, 
					ref global::System.Guid guid, 
					int guidSize, 
					out global::System.IntPtr funcPtr, 
					int funcPtrSize, 
					out int bytesTransferred, 
					global::System.IntPtr shouldBeNull, 
					global::System.IntPtr shouldBeNull2)
		{
			// Setup
			bool addRefed = false;
			global::System_Net_Sockets.SocketError__System_Net_Primitives unsafe___value;
			// Marshalling
			socketHandle.DangerousAddRef(ref addRefed);
			fixed (global::System.Guid* pinned_guid = &(guid))
				fixed (global::System.IntPtr* pinned_funcPtr = &(funcPtr))
					fixed (int* pinned_bytesTransferred = &(bytesTransferred))
					{
						global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
						// Call to native method
						unsafe___value = global::__Interop.ws2_32_dll_PInvokes.WSAIoctl(
											socketHandle.DangerousGetHandle(), 
											ioControlCode, 
											pinned_guid, 
											guidSize, 
											pinned_funcPtr, 
											funcPtrSize, 
											pinned_bytesTransferred, 
											shouldBeNull, 
											shouldBeNull2
										);
						global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
						global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
					}
			if (addRefed)
				socketHandle.DangerousRelease();
			// Return
			return unsafe___value;
		}
	}

	/// <summary>
	/// P/Invoke class for module 'kernelbase.dll'
	/// </summary>
	public unsafe static partial class kernelbase_dll
	{
		// Signature, OpenCommPort, [fwd] [return] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeFileHandle__System_Private_CoreLib____w64 int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.IO.Ports, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51", "Interop+KernelBase", "OpenCommPort")]
		public static global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib OpenCommPort(
					uint uPortNumber, 
					int dwDesiredAccess, 
					int dwFlagsAndAttributes)
		{
			// Setup
			global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib __value;
			global::System.IntPtr unsafe___value;
			// Marshalling
			__value = new global::Microsoft.Win32.SafeHandles.SafeFileHandle__System_Private_CoreLib();
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.kernelbase_dll_PInvokes.OpenCommPort(
								uPortNumber, 
								dwDesiredAccess, 
								dwFlagsAndAttributes
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
								__value, 
								unsafe___value
							);
			// Return
			return __value;
		}
	}

	/// <summary>
	/// P/Invoke class for module 'advapi32.dll'
	/// </summary>
	public unsafe static partial class advapi32_dll
	{
		// Signature, LookupPrivilegeValue, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x000401D0] string__wchar_t *, [fwd] [in] [EETypeRva:0x000401D0] string__wchar_t *, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] __Interop_Advapi32_LUID__System_Diagnostics_Process____Interop_Advapi32_LUID__System_Diagnostics_Process, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Diagnostics.Process, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "LookupPrivilegeValue")]
		public static bool LookupPrivilegeValue(
					string lpSystemName, 
					string lpName, 
					out global::_.Interop_Advapi32_LUID__System_Diagnostics_Process lpLuid)
		{
			// Setup
			ushort* unsafe_lpSystemName = default(ushort*);
			ushort* unsafe_lpName = default(ushort*);
			int unsafe___value;
			// Marshalling
			fixed (char* pinned_lpSystemName = lpSystemName)
			{
				unsafe_lpSystemName = (ushort*)pinned_lpSystemName;
				fixed (char* pinned_lpName = lpName)
				{
					unsafe_lpName = (ushort*)pinned_lpName;
					fixed (global::_.Interop_Advapi32_LUID__System_Diagnostics_Process* pinned_lpLuid = &(lpLuid))
					{
						global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
						// Call to native method
						unsafe___value = global::__Interop.advapi32_dll_PInvokes.LookupPrivilegeValue(
											unsafe_lpSystemName, 
											unsafe_lpName, 
											pinned_lpLuid
										);
						global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
						global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
					}
				}
			}
			// Return
			return unsafe___value != 0;
		}

		// Signature, OpenProcessToken, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeProcessHandle__System_Diagnostics_Process____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeTokenHandle__System_Diagnostics_Process____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Diagnostics.Process, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "OpenProcessToken")]
		public static bool OpenProcessToken(
					global::Microsoft.Win32.SafeHandles.SafeProcessHandle__System_Diagnostics_Process ProcessHandle, 
					int DesiredAccess, 
					out global::Microsoft.Win32.SafeHandles.SafeTokenHandle__System_Diagnostics_Process TokenHandle)
		{
			// Setup
			bool addRefed = false;
			global::System.IntPtr unsafe_TokenHandle;
			int unsafe___value;
			// Marshalling
			ProcessHandle.DangerousAddRef(ref addRefed);
			TokenHandle = new global::Microsoft.Win32.SafeHandles.SafeTokenHandle__System_Diagnostics_Process();
			unsafe_TokenHandle = TokenHandle.DangerousGetHandle();
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.advapi32_dll_PInvokes.OpenProcessToken(
								ProcessHandle.DangerousGetHandle(), 
								DesiredAccess, 
								&(unsafe_TokenHandle)
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
								TokenHandle, 
								unsafe_TokenHandle
							);
			if (addRefed)
				ProcessHandle.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, AdjustTokenPrivileges, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeTokenHandle__System_Diagnostics_Process____w64 int, [fwd] [in] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x000418A4] __Interop_Advapi32_TokenPrivileges__System_Diagnostics_Process____Interop_Advapi32_TokenPrivileges__System_Diagnostics_Process *, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Diagnostics.Process, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "AdjustTokenPrivileges")]
		public static bool AdjustTokenPrivileges(
					global::Microsoft.Win32.SafeHandles.SafeTokenHandle__System_Diagnostics_Process TokenHandle, 
					bool DisableAllPrivileges, 
					global::_.Interop_Advapi32_TokenPrivileges__System_Diagnostics_Process NewState, 
					int BufferLength, 
					global::System.IntPtr PreviousState, 
					global::System.IntPtr ReturnLength)
		{
			// Setup
			bool addRefed = false;
			global::_.Interop_Advapi32_TokenPrivileges__System_Diagnostics_Process__Impl.UnsafeType* unsafe_NewState = default(global::_.Interop_Advapi32_TokenPrivileges__System_Diagnostics_Process__Impl.UnsafeType*);
			int unsafe___value;
			try
			{
				// Marshalling
				TokenHandle.DangerousAddRef(ref addRefed);
				unsafe_NewState = (global::_.Interop_Advapi32_TokenPrivileges__System_Diagnostics_Process__Impl.UnsafeType*)global::__Interop.McgHelpers.CoTaskMemAllocAndZeroMemory(new global::System.IntPtr(sizeof(global::_.Interop_Advapi32_TokenPrivileges__System_Diagnostics_Process__Impl.UnsafeType)));
				global::_.Interop_Advapi32_TokenPrivileges__System_Diagnostics_Process__Impl.Marshal__SafeToUnsafe(
									NewState, 
									out (*(unsafe_NewState))
								);
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.advapi32_dll_PInvokes.AdjustTokenPrivileges(
									TokenHandle.DangerousGetHandle(), 
									(DisableAllPrivileges ? 1 : 0), 
									unsafe_NewState, 
									BufferLength, 
									PreviousState, 
									ReturnLength
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				if (addRefed)
					TokenHandle.DangerousRelease();
				// Return
				return unsafe___value != 0;
			}
			finally
			{
				// Cleanup
				global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_NewState);
			}
		}

		// Signature, RevertToSelf, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "RevertToSelf")]
		public static bool RevertToSelf()
		{
			// Setup
			int unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.advapi32_dll_PInvokes.RevertToSelf();
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value != 0;
		}

		// Signature, ImpersonateLoggedOnUser, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeAccessTokenHandle__System_Security_Principal_Windows____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "ImpersonateLoggedOnUser")]
		public static bool ImpersonateLoggedOnUser(global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle__System_Security_Principal_Windows userToken)
		{
			// Setup
			bool addRefed = false;
			int unsafe___value;
			// Marshalling
			userToken.DangerousAddRef(ref addRefed);
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.advapi32_dll_PInvokes.ImpersonateLoggedOnUser(userToken.DangerousGetHandle());
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed)
				userToken.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, OpenThreadToken, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Security_Principal_TokenAccessLevels__System_Security_Principal_Windows__TokenAccessLevels__System_Security_Principal_Windows, [fwd] [in] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeAccessTokenHandle__System_Security_Principal_Windows____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "OpenThreadToken")]
		public static bool OpenThreadToken(
					global::System.IntPtr ThreadHandle, 
					global::System_Security_Principal.TokenAccessLevels__System_Security_Principal_Windows dwDesiredAccess, 
					bool bOpenAsSelf, 
					out global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle__System_Security_Principal_Windows phThreadToken)
		{
			// Setup
			global::System.IntPtr unsafe_phThreadToken;
			int unsafe___value;
			// Marshalling
			phThreadToken = new global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle__System_Security_Principal_Windows();
			unsafe_phThreadToken = phThreadToken.DangerousGetHandle();
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.advapi32_dll_PInvokes.OpenThreadToken(
								ThreadHandle, 
								dwDesiredAccess, 
								(bOpenAsSelf ? 1 : 0), 
								&(unsafe_phThreadToken)
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
								phThreadToken, 
								unsafe_phThreadToken
							);
			// Return
			return unsafe___value != 0;
		}

		// Signature, OpenProcessToken__0, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x000414B4] System_Security_Principal_TokenAccessLevels__System_Security_Principal_Windows__TokenAccessLevels__System_Security_Principal_Windows, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeAccessTokenHandle__System_Security_Principal_Windows____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "OpenProcessToken")]
		public static bool OpenProcessToken__0(
					global::System.IntPtr ProcessToken, 
					global::System_Security_Principal.TokenAccessLevels__System_Security_Principal_Windows DesiredAccess, 
					out global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle__System_Security_Principal_Windows TokenHandle)
		{
			// Setup
			global::System.IntPtr unsafe_TokenHandle;
			int unsafe___value;
			// Marshalling
			TokenHandle = new global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle__System_Security_Principal_Windows();
			unsafe_TokenHandle = TokenHandle.DangerousGetHandle();
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.advapi32_dll_PInvokes.OpenProcessToken__0(
								ProcessToken, 
								DesiredAccess, 
								&(unsafe_TokenHandle)
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
								TokenHandle, 
								unsafe_TokenHandle
							);
			// Return
			return unsafe___value != 0;
		}

		// Signature, LsaNtStatusToWinError, [fwd] [return] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "LsaNtStatusToWinError")]
		public static uint LsaNtStatusToWinError(uint status)
		{
			// Setup
			uint unsafe___value;
			// Marshalling
			// Call to native method
			unsafe___value = global::__Interop.advapi32_dll_PInvokes.LsaNtStatusToWinError(status);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
			return unsafe___value;
		}

		// Signature, DuplicateTokenEx, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeAccessTokenHandle__System_Security_Principal_Windows____w64 int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeAccessTokenHandle__System_Security_Principal_Windows____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "DuplicateTokenEx")]
		public static bool DuplicateTokenEx(
					global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle__System_Security_Principal_Windows hExistingToken, 
					uint dwDesiredAccess, 
					global::System.IntPtr lpTokenAttributes, 
					uint ImpersonationLevel, 
					uint TokenType, 
					ref global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle__System_Security_Principal_Windows phNewToken)
		{
			// Setup
			bool addRefed = false;
			bool addRefed_1 = false;
			global::System.IntPtr unsafe_phNewToken;
			global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle__System_Security_Principal_Windows out_phNewToken;
			global::System.IntPtr prev_unsafe_phNewToken;
			int unsafe___value;
			// Marshalling
			hExistingToken.DangerousAddRef(ref addRefed);
			phNewToken.DangerousAddRef(ref addRefed_1);
			unsafe_phNewToken = phNewToken.DangerousGetHandle();
			prev_unsafe_phNewToken = unsafe_phNewToken;
			out_phNewToken = new global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle__System_Security_Principal_Windows();
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.advapi32_dll_PInvokes.DuplicateTokenEx(
								hExistingToken.DangerousGetHandle(), 
								dwDesiredAccess, 
								lpTokenAttributes, 
								ImpersonationLevel, 
								TokenType, 
								&(unsafe_phNewToken)
							);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			if (addRefed_1)
				phNewToken.DangerousRelease();
			if (prev_unsafe_phNewToken != unsafe_phNewToken)
			{
				global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
									out_phNewToken, 
									unsafe_phNewToken
								);
				phNewToken = out_phNewToken;
			}
			if (addRefed)
				hExistingToken.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, GetTokenInformation, [fwd] [return] [EETypeRva:0x0003F06C] bool__System.Boolean, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeAccessTokenHandle__System_Security_Principal_Windows____w64 int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeLocalAllocHandle__System_Security_Principal_Windows____w64 int, [fwd] [in] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] uint__unsigned int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "GetTokenInformation")]
		public static bool GetTokenInformation(
					global::Microsoft.Win32.SafeHandles.SafeAccessTokenHandle__System_Security_Principal_Windows TokenHandle, 
					uint TokenInformationClass, 
					global::Microsoft.Win32.SafeHandles.SafeLocalAllocHandle__System_Security_Principal_Windows TokenInformation, 
					uint TokenInformationLength, 
					out uint ReturnLength)
		{
			// Setup
			bool addRefed = false;
			bool addRefed_1 = false;
			int unsafe___value;
			// Marshalling
			TokenHandle.DangerousAddRef(ref addRefed);
			TokenInformation.DangerousAddRef(ref addRefed_1);
			fixed (uint* pinned_ReturnLength = &(ReturnLength))
			{
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.advapi32_dll_PInvokes.GetTokenInformation(
									TokenHandle.DangerousGetHandle(), 
									TokenInformationClass, 
									TokenInformation.DangerousGetHandle(), 
									TokenInformationLength, 
									pinned_ReturnLength
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			}
			if (addRefed_1)
				TokenInformation.DangerousRelease();
			if (addRefed)
				TokenHandle.DangerousRelease();
			// Return
			return unsafe___value != 0;
		}

		// Signature, LsaLookupSids, [fwd] [return] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeLsaPolicyHandle__System_Security_Principal_Windows____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x000410CC] rg_System_IntPtr____w64 int *, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeLsaMemoryHandle__System_Security_Principal_Windows____w64 int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeLsaMemoryHandle__System_Security_Principal_Windows____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "LsaLookupSids")]
		public static uint LsaLookupSids(
					global::Microsoft.Win32.SafeHandles.SafeLsaPolicyHandle__System_Security_Principal_Windows handle, 
					int count, 
					global::System.IntPtr[] sids, 
					ref global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle__System_Security_Principal_Windows referencedDomains, 
					ref global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle__System_Security_Principal_Windows names)
		{
			// Setup
			bool addRefed = false;
			global::System.IntPtr* unsafe_sids;
			bool addRefed_1 = false;
			global::System.IntPtr unsafe_referencedDomains;
			global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle__System_Security_Principal_Windows out_referencedDomains;
			global::System.IntPtr prev_unsafe_referencedDomains;
			bool addRefed_2 = false;
			global::System.IntPtr unsafe_names;
			global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle__System_Security_Principal_Windows out_names;
			global::System.IntPtr prev_unsafe_names;
			uint unsafe___value;
			// Marshalling
			handle.DangerousAddRef(ref addRefed);
			fixed (global::System.IntPtr* pinned_sids = ((sids != null 
						&& sids.Length == 0) ? new global::System.IntPtr[1] : sids))
			{
				unsafe_sids = (global::System.IntPtr*)pinned_sids;
				referencedDomains.DangerousAddRef(ref addRefed_1);
				unsafe_referencedDomains = referencedDomains.DangerousGetHandle();
				prev_unsafe_referencedDomains = unsafe_referencedDomains;
				out_referencedDomains = new global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle__System_Security_Principal_Windows();
				names.DangerousAddRef(ref addRefed_2);
				unsafe_names = names.DangerousGetHandle();
				prev_unsafe_names = unsafe_names;
				out_names = new global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle__System_Security_Principal_Windows();
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.advapi32_dll_PInvokes.LsaLookupSids(
									handle.DangerousGetHandle(), 
									count, 
									unsafe_sids, 
									&(unsafe_referencedDomains), 
									&(unsafe_names)
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				if (addRefed_2)
					names.DangerousRelease();
				if (prev_unsafe_names != unsafe_names)
				{
					global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
										out_names, 
										unsafe_names
									);
					names = out_names;
				}
				if (addRefed_1)
					referencedDomains.DangerousRelease();
				if (prev_unsafe_referencedDomains != unsafe_referencedDomains)
				{
					global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
										out_referencedDomains, 
										unsafe_referencedDomains
									);
					referencedDomains = out_referencedDomains;
				}
			}
			if (addRefed)
				handle.DangerousRelease();
			// Return
			return unsafe___value;
		}

		// Signature, LsaLookupNames2, [fwd] [return] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeLsaPolicyHandle__System_Security_Principal_Windows____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x00040B74] rg___Interop_UNICODE_STRING__System_Security_Principal_Windows____Interop_UNICODE_STRING__System_Security_Principal_Windows *, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeLsaMemoryHandle__System_Security_Principal_Windows____w64 int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeLsaMemoryHandle__System_Security_Principal_Windows____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "LsaLookupNames2")]
		public static uint LsaLookupNames2(
					global::Microsoft.Win32.SafeHandles.SafeLsaPolicyHandle__System_Security_Principal_Windows handle, 
					int flags, 
					int count, 
					global::_.Interop_UNICODE_STRING__System_Security_Principal_Windows[] names, 
					ref global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle__System_Security_Principal_Windows referencedDomains, 
					ref global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle__System_Security_Principal_Windows sids)
		{
			// Setup
			bool addRefed = false;
			global::_.Interop_UNICODE_STRING__System_Security_Principal_Windows__Impl.UnsafeType* unsafe_names = default(global::_.Interop_UNICODE_STRING__System_Security_Principal_Windows__Impl.UnsafeType*);
			bool addRefed_1 = false;
			global::System.IntPtr unsafe_referencedDomains;
			global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle__System_Security_Principal_Windows out_referencedDomains;
			global::System.IntPtr prev_unsafe_referencedDomains;
			bool addRefed_2 = false;
			global::System.IntPtr unsafe_sids;
			global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle__System_Security_Principal_Windows out_sids;
			global::System.IntPtr prev_unsafe_sids;
			uint unsafe___value;
			try
			{
				// Marshalling
				handle.DangerousAddRef(ref addRefed);
				if (names == null)
					unsafe_names = null;
				else
				{
					if (names != null)
						unsafe_names = (global::_.Interop_UNICODE_STRING__System_Security_Principal_Windows__Impl.UnsafeType*)global::__Interop.McgHelpers.CoTaskMemAllocAndZeroMemory(((global::System.IntPtr)checked(names.Length * sizeof(global::_.Interop_UNICODE_STRING__System_Security_Principal_Windows__Impl.UnsafeType))));
					if (names != null)
						for (uint mcgIdx = 0; (mcgIdx < names.Length); mcgIdx++)
						{
							// [fwd] [in] [optional] [EETypeRva:0x0004084C] __Interop_UNICODE_STRING__System_Security_Principal_Windows____Interop_UNICODE_STRING__System_Security_Principal_Windows names
							global::_.Interop_UNICODE_STRING__System_Security_Principal_Windows__Impl.Marshal__SafeToUnsafe(
												ref names[mcgIdx], 
												out unsafe_names[mcgIdx]
											);
						}
				}
				referencedDomains.DangerousAddRef(ref addRefed_1);
				unsafe_referencedDomains = referencedDomains.DangerousGetHandle();
				prev_unsafe_referencedDomains = unsafe_referencedDomains;
				out_referencedDomains = new global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle__System_Security_Principal_Windows();
				sids.DangerousAddRef(ref addRefed_2);
				unsafe_sids = sids.DangerousGetHandle();
				prev_unsafe_sids = unsafe_sids;
				out_sids = new global::Microsoft.Win32.SafeHandles.SafeLsaMemoryHandle__System_Security_Principal_Windows();
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.advapi32_dll_PInvokes.LsaLookupNames2(
									handle.DangerousGetHandle(), 
									flags, 
									count, 
									unsafe_names, 
									&(unsafe_referencedDomains), 
									&(unsafe_sids)
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				if (addRefed_2)
					sids.DangerousRelease();
				if (prev_unsafe_sids != unsafe_sids)
				{
					global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
										out_sids, 
										unsafe_sids
									);
					sids = out_sids;
				}
				if (addRefed_1)
					referencedDomains.DangerousRelease();
				if (prev_unsafe_referencedDomains != unsafe_referencedDomains)
				{
					global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
										out_referencedDomains, 
										unsafe_referencedDomains
									);
					referencedDomains = out_referencedDomains;
				}
				if (addRefed)
					handle.DangerousRelease();
				// Return
				return unsafe___value;
			}
			finally
			{
				// Cleanup
				if (unsafe_names != null)
					for (uint mcgIdx_1 = 0; (mcgIdx_1 < names.Length); mcgIdx_1++)
					{
						// [fwd] [in] [out] [optional] [EETypeRva:0x0004084C] __Interop_UNICODE_STRING__System_Security_Principal_Windows____Interop_UNICODE_STRING__System_Security_Principal_Windows names
						global::_.Interop_UNICODE_STRING__System_Security_Principal_Windows__Impl.Cleanup__Unsafe(ref unsafe_names[mcgIdx_1]);
					}
				global::System.Runtime.InteropServices.ExternalInterop.SafeCoTaskMemFree(unsafe_names);
			}
		}

		// Signature, LsaOpenPolicy, [fwd] [return] [EETypeRva:0x0004157C] uint__unsigned int, [fwd] [in] [EETypeRva:0x000401D0] string__wchar_t *, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] __Interop_LSA_OBJECT_ATTRIBUTES__System_Security_Principal_Windows____Interop_LSA_OBJECT_ATTRIBUTES__System_Security_Principal_Windows, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeLsaPolicyHandle__System_Security_Principal_Windows____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "LsaOpenPolicy")]
		public static uint LsaOpenPolicy(
					string systemName, 
					ref global::_.Interop_LSA_OBJECT_ATTRIBUTES__System_Security_Principal_Windows attributes, 
					int accessMask, 
					out global::Microsoft.Win32.SafeHandles.SafeLsaPolicyHandle__System_Security_Principal_Windows handle)
		{
			// Setup
			ushort* unsafe_systemName = default(ushort*);
			global::System.IntPtr unsafe_handle;
			uint unsafe___value;
			// Marshalling
			fixed (char* pinned_systemName = systemName)
			{
				unsafe_systemName = (ushort*)pinned_systemName;
				fixed (global::_.Interop_LSA_OBJECT_ATTRIBUTES__System_Security_Principal_Windows* pinned_attributes = &(attributes))
				{
					handle = new global::Microsoft.Win32.SafeHandles.SafeLsaPolicyHandle__System_Security_Principal_Windows();
					unsafe_handle = handle.DangerousGetHandle();
					global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
					// Call to native method
					unsafe___value = global::__Interop.advapi32_dll_PInvokes.LsaOpenPolicy(
										unsafe_systemName, 
										pinned_attributes, 
										accessMask, 
										&(unsafe_handle)
									);
					global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
					global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
					global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
										handle, 
										unsafe_handle
									);
				}
			}
			// Return
			return unsafe___value;
		}

		// Signature, LsaClose, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "LsaClose")]
		public static int LsaClose(global::System.IntPtr handle)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.advapi32_dll_PInvokes.LsaClose(handle);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value;
		}

		// Signature, LsaFreeMemory, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+Advapi32", "LsaFreeMemory")]
		public static int LsaFreeMemory(global::System.IntPtr handle)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.advapi32_dll_PInvokes.LsaFreeMemory(handle);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value;
		}
	}

	/// <summary>
	/// P/Invoke class for module 'api-ms-win-core-com-l1-1-0.dll'
	/// </summary>
	public unsafe static partial class api_ms_win_core_com_l1_1_0_dll
	{
		// Signature, CoCreateInstance, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] byte___ptrunsigned char *, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, [fwd] [in] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] byte___ptrunsigned char *, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.StackTraceGenerator, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Internal.StackTraceGenerator.StackTraceGenerator", "CoCreateInstance")]
		public static int CoCreateInstance(
					byte* rclsid, 
					global::System.IntPtr pUnkOuter, 
					int dwClsContext, 
					byte* riid, 
					out global::System.IntPtr ppv)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			fixed (global::System.IntPtr* pinned_ppv = &(ppv))
			{
				// Call to native method
				unsafe___value = global::__Interop.api_ms_win_core_com_l1_1_0_dll_PInvokes.CoCreateInstance(
									((byte*)rclsid), 
									pUnkOuter, 
									dwClsContext, 
									((byte*)riid), 
									pinned_ppv
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			}
			// Return
			return unsafe___value;
		}
	}

	/// <summary>
	/// P/Invoke class for module 'OleAut32'
	/// </summary>
	public unsafe static partial class OleAut32
	{
		// Signature, SysFreeString, [fwd] [return] [EETypeRva:0x000405F8] void__void, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Private.StackTraceGenerator, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Internal.LightweightInterop.MarshalExtensions", "SysFreeString")]
		public static void SysFreeString(global::System.IntPtr bstr)
		{
			// Marshalling
			// Call to native method
			global::__Interop.OleAut32_PInvokes.SysFreeString(bstr);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			// Return
		}
	}

	/// <summary>
	/// P/Invoke class for module 'sspicli.dll'
	/// </summary>
	public unsafe static partial class sspicli_dll
	{
		// Signature, LsaGetLogonSessionData, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x0004196C] __Interop_LUID__System_Security_Principal_Windows____Interop_LUID__System_Security_Principal_Windows, [fwd] [in] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041CC4] Microsoft_Win32_SafeHandles_SafeLsaReturnBufferHandle__System_Security_Principal_Windows____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+SspiCli", "LsaGetLogonSessionData")]
		public static int LsaGetLogonSessionData(
					ref global::_.Interop_LUID__System_Security_Principal_Windows LogonId, 
					ref global::Microsoft.Win32.SafeHandles.SafeLsaReturnBufferHandle__System_Security_Principal_Windows ppLogonSessionData)
		{
			// Setup
			bool addRefed = false;
			global::System.IntPtr unsafe_ppLogonSessionData;
			global::Microsoft.Win32.SafeHandles.SafeLsaReturnBufferHandle__System_Security_Principal_Windows out_ppLogonSessionData;
			global::System.IntPtr prev_unsafe_ppLogonSessionData;
			int unsafe___value;
			// Marshalling
			fixed (global::_.Interop_LUID__System_Security_Principal_Windows* pinned_LogonId = &(LogonId))
			{
				ppLogonSessionData.DangerousAddRef(ref addRefed);
				unsafe_ppLogonSessionData = ppLogonSessionData.DangerousGetHandle();
				prev_unsafe_ppLogonSessionData = unsafe_ppLogonSessionData;
				out_ppLogonSessionData = new global::Microsoft.Win32.SafeHandles.SafeLsaReturnBufferHandle__System_Security_Principal_Windows();
				global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
				// Call to native method
				unsafe___value = global::__Interop.sspicli_dll_PInvokes.LsaGetLogonSessionData(
									pinned_LogonId, 
									&(unsafe_ppLogonSessionData)
								);
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
				if (addRefed)
					ppLogonSessionData.DangerousRelease();
				if (prev_unsafe_ppLogonSessionData != unsafe_ppLogonSessionData)
				{
					global::System.Runtime.InteropServices.McgMarshal.InitializeHandle(
										out_ppLogonSessionData, 
										unsafe_ppLogonSessionData
									);
					ppLogonSessionData = out_ppLogonSessionData;
				}
			}
			// Return
			return unsafe___value;
		}

		// Signature, LsaFreeReturnBuffer, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [in] [EETypeRva:0x0004157C] System_IntPtr____w64 int, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Security.Principal.Windows, Version=4.1.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "Interop+SspiCli", "LsaFreeReturnBuffer")]
		public static int LsaFreeReturnBuffer(global::System.IntPtr handle)
		{
			// Setup
			int unsafe___value;
			// Marshalling
			global::System.Runtime.InteropServices.McgMarshal.ClearLastWin32Error();
			// Call to native method
			unsafe___value = global::__Interop.sspicli_dll_PInvokes.LsaFreeReturnBuffer(handle);
			global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
			global::System.Runtime.InteropServices.McgMarshal.SaveLastWin32Error();
			// Return
			return unsafe___value;
		}
	}

	/// <summary>
	/// P/Invoke class for module 'api-ms-win-core-winrt-robuffer-l1-1-0.dll'
	/// </summary>
	public unsafe static partial class api_ms_win_core_winrt_robuffer_l1_1_0_dll
	{
		// Signature, RoGetBufferMarshaler, [fwd] [return] [EETypeRva:0x0004157C] int__int, [fwd] [out] [managedbyref] [nativebyref] [EETypeRva:0x00041E80] System_Runtime_InteropServices_IMarshal__System_Runtime_WindowsRuntime__System_Runtime_InteropServices__IMarshal__System_Runtime_WindowsRuntime *, 
		[global::System.Runtime.InteropServices.McgPInvokeMarshalStub("System.Runtime.WindowsRuntime, Version=4.0.14.0, Culture=neutral, PublicKeyToken=b77a5c561934e089", "Interop+mincore", "RoGetBufferMarshaler")]
		public static int RoGetBufferMarshaler(out global::System_Runtime_InteropServices.IMarshal__System_Runtime_WindowsRuntime bufferMarshalerPtr)
		{
			// Setup
			void* unsafe_bufferMarshalerPtr = default(void*);
			int unsafe___value;
			try
			{
				// Marshalling
				unsafe_bufferMarshalerPtr = null;
				// Call to native method
				unsafe___value = global::__Interop.api_ms_win_core_winrt_robuffer_l1_1_0_dll_PInvokes.RoGetBufferMarshaler(&(unsafe_bufferMarshalerPtr));
				global::System.Diagnostics.DebugAnnotations.PreviousCallContainsDebuggerStepInCode();
				bufferMarshalerPtr = (global::System_Runtime_InteropServices.IMarshal__System_Runtime_WindowsRuntime)global::System.Runtime.InteropServices.McgMarshal.ComInterfaceToObject(
									((global::System.IntPtr)unsafe_bufferMarshalerPtr), 
									global::System.Runtime.InteropServices.TypeOfHelper.RuntimeTypeHandleOf("System.Runtime.InteropServices.IMarshal,System.Runtime.WindowsRuntime, Version=4.0.14.0, Culture=neutral, Public" +
											"KeyToken=b77a5c561934e089")
								);
				// Return
				return unsafe___value;
			}
			finally
			{
				// Cleanup
				global::System.Runtime.InteropServices.McgMarshal.ComSafeRelease(new global::System.IntPtr(((void*)unsafe_bufferMarshalerPtr)));
			}
		}
	}

	public unsafe static partial class _MRT__PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("[MRT]", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Cdecl)]
		public extern static uint RhpGetFuncEvalParameterBufferSize();

		[global::System.Runtime.InteropServices.DllImport("[MRT]", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Cdecl)]
		public extern static uint RhpGetFuncEvalMode();

		[global::System.Runtime.InteropServices.DllImport("[MRT]", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Cdecl)]
		public extern static uint RhpRecordDebuggeeInitiatedHandle(void* objectHandle);

		[global::System.Runtime.InteropServices.DllImport("[MRT]", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Cdecl)]
		public extern static void RhpVerifyDebuggerCleanup();

		[global::System.Runtime.InteropServices.DllImport("[MRT]", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Cdecl)]
		public extern static global::System.IntPtr RhpGetCurrentThread();

		[global::System.Runtime.InteropServices.DllImport("[MRT]", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static void RhWaitForPendingFinalizers(int allowReentrantWait);

		[global::System.Runtime.InteropServices.DllImport("[MRT]", EntryPoint="RhYield", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Cdecl)]
		public extern static int _RhYield();

		[global::System.Runtime.InteropServices.DllImport("[MRT]", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Cdecl)]
		public extern static void RhFlushProcessWriteBuffers();

		[global::System.Runtime.InteropServices.DllImport("[MRT]", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int RhCompatibleReentrantWaitAny(
					int alertable, 
					int timeout, 
					int count, 
					global::System.IntPtr* handles);

		[global::System.Runtime.InteropServices.DllImport("[MRT]", EntryPoint="RhCallDescrWorker", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static void RhCallDescrWorkerNative(global::System.IntPtr callDescr);

		[global::System.Runtime.InteropServices.DllImport("[MRT]", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static void _ecvt_s(
					byte* buffer, 
					int sizeInBytes, 
					double value, 
					int count, 
					int* dec, 
					int* sign);

		[global::System.Runtime.InteropServices.DllImport("[MRT]", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static void memmove(
					byte* dmem, 
					byte* smem, 
					uint size);

		[global::System.Runtime.InteropServices.DllImport("[MRT]", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static void memset(
					byte* mem, 
					int value, 
					uint size);
	}

	public unsafe static partial class __PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("*", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static void CallingConventionConverter_GetStubs(
					global::System.IntPtr* returnVoidStub, 
					global::System.IntPtr* returnIntegerStub, 
					global::System.IntPtr* commonStub, 
					global::System.IntPtr* returnFloatingPointReturn4Thunk, 
					global::System.IntPtr* returnFloatingPointReturn8Thunk);
	}

	public unsafe static partial class api_ms_win_core_winrt_string_l1_1_0_dll_PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("api-ms-win-core-winrt-string-l1-1-0.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int WindowsCreateStringReference(
					ushort* sourceString, 
					uint length, 
					global::System_Runtime_InteropServices.HSTRING_HEADER__System_Private_Interop* phstringHeader, 
					void* hstring);
	}

	public unsafe static partial class api_ms_win_core_errorhandling_l1_1_0_dll_PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("api-ms-win-core-errorhandling-l1-1-0.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int GetLastError();

		[global::System.Runtime.InteropServices.DllImport("api-ms-win-core-errorhandling-l1-1-0.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static void SetLastError(uint dwErrCode);
	}

	public unsafe static partial class api_ms_win_core_winrt_l1_1_0_dll_PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("api-ms-win-core-winrt-l1-1-0.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int RoInitialize(uint initType);
	}

	public unsafe static partial class api_ms_win_core_localization_l1_2_0_dll_PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("api-ms-win-core-localization-l1-2-0.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int IsValidLocaleName(ushort* lpLocaleName);

		[global::System.Runtime.InteropServices.DllImport("api-ms-win-core-localization-l1-2-0.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int ResolveLocaleName(
					ushort* lpNameToResolve, 
					ushort* lpLocaleName, 
					int cchLocaleName);
	}

	public unsafe static partial class kernel32_dll_PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int SetCommState(
					global::System.IntPtr hFile, 
					global::_.Interop_Kernel32_DCB__System_IO_Ports* lpDCB);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int EscapeCommFunction(
					global::System.IntPtr hFile, 
					int dwFunc);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int GetFileType(global::System.IntPtr hFile);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int GetCommProperties(
					global::System.IntPtr hFile, 
					global::_.Interop_Kernel32_COMMPROP__System_IO_Ports__Impl.UnsafeType* lpCommProp);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int GetCommModemStatus(
					global::System.IntPtr hFile, 
					int* lpModemStat);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int SetCommTimeouts(
					global::System.IntPtr hFile, 
					global::_.Interop_Kernel32_COMMTIMEOUTS__System_IO_Ports* lpCommTimeouts);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int SetCommMask(
					global::System.IntPtr hFile, 
					int dwEvtMask);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int SetupComm(
					global::System.IntPtr hFile, 
					int dwInQueue, 
					int dwOutQueue);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static uint GetCurrentProcessId();

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int FlushFileBuffers(global::System.IntPtr hHandle);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int GetCommState(
					global::System.IntPtr hFile, 
					global::_.Interop_Kernel32_DCB__System_IO_Ports* lpDCB);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int WriteFile(
					global::System.IntPtr handle, 
					byte* bytes, 
					int numBytesToWrite, 
					global::System.IntPtr numBytesWritten_mustBeZero, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* lpOverlapped);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", EntryPoint="WriteFile", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int WriteFile__0(
					global::System.IntPtr handle, 
					byte* bytes, 
					int numBytesToWrite, 
					int* numBytesWritten, 
					global::System.IntPtr mustBeZero);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int ClearCommError(
					global::System.IntPtr hFile, 
					int* lpErrors, 
					global::_.Interop_Kernel32_COMSTAT__System_IO_Ports* lpStat);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int GetCPInfoExW(
					uint CodePage, 
					uint dwFlags, 
					global::_.Interop_Kernel32_CPINFOEXW__System_Text_Encoding_CodePages* lpCPInfoEx);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int PurgeComm(
					global::System.IntPtr hFile, 
					uint dwFlags);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System.IntPtr GetCurrentProcess();

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int ReadFile(
					global::System.IntPtr handle, 
					byte* bytes, 
					int numBytesToRead, 
					global::System.IntPtr numBytesRead_mustBeZero, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* overlapped);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", EntryPoint="ReadFile", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int ReadFile__0(
					global::System.IntPtr handle, 
					byte* bytes, 
					int numBytesToRead, 
					int* numBytesRead, 
					global::System.IntPtr mustBeZero);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int GetProcessId(global::System.IntPtr nativeHandle);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int GetExitCodeProcess(
					global::System.IntPtr processHandle, 
					int* exitCode);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int WaitCommEvent(
					global::System.IntPtr hFile, 
					int* lpEvtMask, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* lpOverlapped);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int GetOverlappedResult(
					global::System.IntPtr hFile, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* lpOverlapped, 
					int* lpNumberOfBytesTransferred, 
					int bWait);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int CloseHandle(global::System.IntPtr handle);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int DuplicateHandle(
					global::System.IntPtr hSourceProcessHandle, 
					global::System.IntPtr hSourceHandle, 
					global::System.IntPtr hTargetProcess, 
					global::System.IntPtr* targetHandle, 
					int dwDesiredAccess, 
					int bInheritHandle, 
					int dwOptions);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", EntryPoint="ClearCommError", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int ClearCommError__0(
					global::System.IntPtr hFile, 
					int* lpErrors, 
					global::System.IntPtr lpStat);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System.IntPtr OpenProcess(
					int access, 
					int inherit, 
					int processId);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", EntryPoint="FormatMessageW", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int FormatMessage(
					int dwFlags, 
					global::System.IntPtr lpSource, 
					uint dwMessageId, 
					int dwLanguageId, 
					ushort* lpBuffer, 
					int nSize, 
					global::System.IntPtr* arguments);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", EntryPoint="GetComputerNameW", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int GetComputerName(
					ushort* lpBuffer, 
					uint* nSize);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System.IntPtr GetCurrentThread();

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", EntryPoint="GetCurrentProcess", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System.IntPtr GetCurrentProcess__0();

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int SetFileCompletionNotificationModes(
					global::System.IntPtr handle, 
					global::_.Interop_Kernel32_FileCompletionNotificationModes__System_Net_Sockets flags);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", EntryPoint="CloseHandle", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int CloseHandle__0(global::System.IntPtr handle);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int CheckTokenMembershipEx(
					global::System.IntPtr TokenHandle, 
					byte* SidToCheck, 
					uint Flags, 
					int* IsMember);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", EntryPoint="K32EnumProcesses", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int EnumProcesses(
					int* processIds, 
					int size, 
					int* needed);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System.IntPtr LocalAlloc(
					int uFlags, 
					global::System.UIntPtr sizetdwBytes);

		[global::System.Runtime.InteropServices.DllImport("kernel32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System.IntPtr LocalFree(global::System.IntPtr handle);
	}

	public unsafe static partial class ws2_32_dll_PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives WSAStartup(
					short wVersionRequested, 
					global::_.Interop_Winsock_WSAData__System_Net_NameResolution__Impl.UnsafeType* lpWSAData);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives gethostname(
					byte* hostName, 
					int bufferLength);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives GetNameInfoW(
					byte* sa, 
					int salen, 
					ushort* host, 
					int hostlen, 
					ushort* serv, 
					int servlen, 
					int flags);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System.IntPtr gethostbyaddr(
					int* addr, 
					int len, 
					global::System_Net_Internals.ProtocolFamily__System_Net_NameResolution type);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System.IntPtr gethostbyname(byte* host);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives getsockname(
					global::System.IntPtr socketHandle, 
					byte* socketAddress, 
					int* socketAddressSize);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int sendto(
					global::System.IntPtr socketHandle, 
					byte* pinnedBuffer, 
					int len, 
					global::System_Net_Sockets.SocketFlags__System_Net_Sockets socketFlags, 
					byte* socketAddress, 
					int socketAddressSize);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives getsockopt(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					int* optionValue, 
					int* optionLength);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives shutdown(
					global::System.IntPtr socketHandle, 
					int how);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int GetAddrInfoW(
					ushort* nodename, 
					ushort* servicename, 
					global::System_Net_Sockets.AddressInfo__System_Net_NameResolution* hints, 
					global::System.IntPtr* handle);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					int* optionValue, 
					int optionLength);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int select(
					int ignoredParameter, 
					global::System.IntPtr* readfds, 
					global::System.IntPtr* writefds, 
					global::System.IntPtr* exceptfds, 
					global::_.Interop_Winsock_TimeValue__System_Net_Sockets* timeout);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="select", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int select__0(
					int ignoredParameter, 
					global::System.IntPtr* readfds, 
					global::System.IntPtr* writefds, 
					global::System.IntPtr* exceptfds, 
					global::System.IntPtr nullTimeout);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives bind(
					global::System.IntPtr socketHandle, 
					byte* socketAddress, 
					int socketAddressSize);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int send(
					global::System.IntPtr socketHandle, 
					byte* pinnedBuffer, 
					int len, 
					global::System_Net_Sockets.SocketFlags__System_Net_Sockets socketFlags);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int recv(
					global::System.IntPtr socketHandle, 
					byte* pinnedBuffer, 
					int len, 
					global::System_Net_Sockets.SocketFlags__System_Net_Sockets socketFlags);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="setsockopt", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt__0(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					global::_.Interop_Winsock_Linger__System_Net_Sockets* linger, 
					int optionLength);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="setsockopt", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt__1(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					global::_.Interop_Winsock_IPMulticastRequest__System_Net_Sockets* mreq, 
					int optionLength);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="setsockopt", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt__2(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					global::_.Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets__Impl.UnsafeType* mreq, 
					int optionLength);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="getsockopt", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives getsockopt__0(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					global::_.Interop_Winsock_Linger__System_Net_Sockets* optionValue, 
					int* optionLength);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="getsockopt", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives getsockopt__1(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					global::_.Interop_Winsock_IPMulticastRequest__System_Net_Sockets* optionValue, 
					int* optionLength);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="getsockopt", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives getsockopt__2(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					global::_.Interop_Winsock_IPv6MulticastRequest__System_Net_Sockets__Impl.UnsafeType* optionValue, 
					int* optionLength);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives getpeername(
					global::System.IntPtr socketHandle, 
					byte* socketAddress, 
					int* socketAddressSize);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives ioctlsocket(
					global::System.IntPtr socketHandle, 
					int cmd, 
					int* argp);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int WSAGetOverlappedResult(
					global::System.IntPtr socketHandle, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* overlapped, 
					uint* bytesTransferred, 
					int wait, 
					global::System_Net_Sockets.SocketFlags__System_Net_Sockets* socketFlags);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System.IntPtr WSASocketW(
					global::System_Net_Sockets.AddressFamily__System_Net_Primitives addressFamily, 
					global::System_Net_Internals.SocketType__System_Net_NameResolution socketType, 
					int protocolType, 
					global::System.IntPtr protocolInfo, 
					int group, 
					int flags);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives closesocket(global::System.IntPtr socketHandle);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives WSARecvFrom(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.WSABuffer__System_Net_Sockets* buffers, 
					int bufferCount, 
					int* bytesTransferred, 
					global::System_Net_Sockets.SocketFlags__System_Net_Sockets* socketFlags, 
					global::System.IntPtr socketAddressPointer, 
					global::System.IntPtr socketAddressSizePointer, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* overlapped, 
					global::System.IntPtr completionRoutine);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives WSARecv(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.WSABuffer__System_Net_Sockets* buffer, 
					int bufferCount, 
					int* bytesTransferred, 
					global::System_Net_Sockets.SocketFlags__System_Net_Sockets* socketFlags, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* overlapped, 
					global::System.IntPtr completionRoutine);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives WSASend(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.WSABuffer__System_Net_Sockets* buffers, 
					int bufferCount, 
					int* bytesTransferred, 
					global::System_Net_Sockets.SocketFlags__System_Net_Sockets socketFlags, 
					global::System_Threading.NativeOverlapped__System_Private_CoreLib* overlapped, 
					global::System.IntPtr completionRoutine);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static void freeaddrinfo(global::System.IntPtr info);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="WSASocketW", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System.IntPtr WSASocketW__0(
					global::System_Net_Sockets.AddressFamily__System_Net_Primitives addressFamily, 
					global::System_Net_Sockets.SocketType__System_Net_Sockets socketType, 
					global::System_Net_Sockets.ProtocolType__System_Net_Sockets protocolType, 
					global::System.IntPtr protocolInfo, 
					uint group, 
					global::_.Interop_Winsock_SocketConstructorFlags__System_Net_Sockets flags);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="WSASocketW", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System.IntPtr WSASocketW__1(
					global::System_Net_Sockets.AddressFamily__System_Net_Primitives addressFamily, 
					global::System_Net_Sockets.SocketType__System_Net_Sockets socketType, 
					int protocolType, 
					global::System.IntPtr protocolInfo, 
					int group, 
					int flags);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="closesocket", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives closesocket__0(global::System.IntPtr socketHandle);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="setsockopt", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt__3(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					global::System.IntPtr* pointer, 
					int optionLength);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="setsockopt", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt__4(
					global::System.IntPtr socketHandle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					byte* optionValue, 
					int optionLength);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives WSAConnect(
					global::System.IntPtr socketHandle, 
					byte* socketAddress, 
					int socketAddressSize, 
					global::System.IntPtr inBuffer, 
					global::System.IntPtr outBuffer, 
					global::System.IntPtr sQOS, 
					global::System.IntPtr gQOS);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="ioctlsocket", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives ioctlsocket__0(
					global::System.IntPtr handle, 
					int cmd, 
					int* argp);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", EntryPoint="setsockopt", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives setsockopt__5(
					global::System.IntPtr handle, 
					global::System_Net_Sockets.SocketOptionLevel__System_Net_Sockets optionLevel, 
					global::System_Net_Sockets.SocketOptionName__System_Net_Sockets optionName, 
					global::_.Interop_Winsock_Linger__System_Net_Sockets* linger, 
					int optionLength);

		[global::System.Runtime.InteropServices.DllImport("ws2_32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System_Net_Sockets.SocketError__System_Net_Primitives WSAIoctl(
					global::System.IntPtr socketHandle, 
					int ioControlCode, 
					global::System.Guid* guid, 
					int guidSize, 
					global::System.IntPtr* funcPtr, 
					int funcPtrSize, 
					int* bytesTransferred, 
					global::System.IntPtr shouldBeNull, 
					global::System.IntPtr shouldBeNull2);
	}

	public unsafe static partial class kernelbase_dll_PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("kernelbase.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static global::System.IntPtr OpenCommPort(
					uint uPortNumber, 
					int dwDesiredAccess, 
					int dwFlagsAndAttributes);
	}

	public unsafe static partial class advapi32_dll_PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", EntryPoint="LookupPrivilegeValueW", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int LookupPrivilegeValue(
					ushort* lpSystemName, 
					ushort* lpName, 
					global::_.Interop_Advapi32_LUID__System_Diagnostics_Process* lpLuid);

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int OpenProcessToken(
					global::System.IntPtr ProcessHandle, 
					int DesiredAccess, 
					global::System.IntPtr* TokenHandle);

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int AdjustTokenPrivileges(
					global::System.IntPtr TokenHandle, 
					int DisableAllPrivileges, 
					global::_.Interop_Advapi32_TokenPrivileges__System_Diagnostics_Process__Impl.UnsafeType* NewState, 
					int BufferLength, 
					global::System.IntPtr PreviousState, 
					global::System.IntPtr ReturnLength);

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int RevertToSelf();

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int ImpersonateLoggedOnUser(global::System.IntPtr userToken);

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int OpenThreadToken(
					global::System.IntPtr ThreadHandle, 
					global::System_Security_Principal.TokenAccessLevels__System_Security_Principal_Windows dwDesiredAccess, 
					int bOpenAsSelf, 
					global::System.IntPtr* phThreadToken);

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", EntryPoint="OpenProcessToken", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int OpenProcessToken__0(
					global::System.IntPtr ProcessToken, 
					global::System_Security_Principal.TokenAccessLevels__System_Security_Principal_Windows DesiredAccess, 
					global::System.IntPtr* TokenHandle);

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static uint LsaNtStatusToWinError(uint status);

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int DuplicateTokenEx(
					global::System.IntPtr hExistingToken, 
					uint dwDesiredAccess, 
					global::System.IntPtr lpTokenAttributes, 
					uint ImpersonationLevel, 
					uint TokenType, 
					global::System.IntPtr* phNewToken);

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int GetTokenInformation(
					global::System.IntPtr TokenHandle, 
					uint TokenInformationClass, 
					global::System.IntPtr TokenInformation, 
					uint TokenInformationLength, 
					uint* ReturnLength);

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static uint LsaLookupSids(
					global::System.IntPtr handle, 
					int count, 
					global::System.IntPtr* sids, 
					global::System.IntPtr* referencedDomains, 
					global::System.IntPtr* names);

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static uint LsaLookupNames2(
					global::System.IntPtr handle, 
					int flags, 
					int count, 
					global::_.Interop_UNICODE_STRING__System_Security_Principal_Windows__Impl.UnsafeType* names, 
					global::System.IntPtr* referencedDomains, 
					global::System.IntPtr* sids);

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static uint LsaOpenPolicy(
					ushort* systemName, 
					global::_.Interop_LSA_OBJECT_ATTRIBUTES__System_Security_Principal_Windows* attributes, 
					int accessMask, 
					global::System.IntPtr* handle);

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int LsaClose(global::System.IntPtr handle);

		[global::System.Runtime.InteropServices.DllImport("advapi32.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int LsaFreeMemory(global::System.IntPtr handle);
	}

	public unsafe static partial class api_ms_win_core_com_l1_1_0_dll_PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("api-ms-win-core-com-l1-1-0.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int CoCreateInstance(
					byte* rclsid, 
					global::System.IntPtr pUnkOuter, 
					int dwClsContext, 
					byte* riid, 
					global::System.IntPtr* ppv);
	}

	public unsafe static partial class OleAut32_PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("OleAut32", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static void SysFreeString(global::System.IntPtr bstr);
	}

	public unsafe static partial class sspicli_dll_PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("sspicli.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int LsaGetLogonSessionData(
					global::_.Interop_LUID__System_Security_Principal_Windows* LogonId, 
					global::System.IntPtr* ppLogonSessionData);

		[global::System.Runtime.InteropServices.DllImport("sspicli.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.Winapi)]
		public extern static int LsaFreeReturnBuffer(global::System.IntPtr handle);
	}

	public unsafe static partial class api_ms_win_core_winrt_robuffer_l1_1_0_dll_PInvokes
	{
		[global::System.Runtime.InteropServices.DllImport("api-ms-win-core-winrt-robuffer-l1-1-0.dll", CallingConvention=global::System.Runtime.InteropServices.CallingConvention.StdCall)]
		public extern static int RoGetBufferMarshaler(void** bufferMarshalerPtr);
	}
}

