|
// <auto-generated/>
namespace System.Diagnostics
{
public static unsafe partial class Debugger
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "DebugDebugger_IsNativeDebuggerAttached", ExactSpelling = true)]
private static extern partial int IsNativeDebuggerAttachedInternal();
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhCollect", ExactSpelling = true)]
internal static extern partial void RhCollect(int generation, global::System.InternalGCCollectionMode mode, global::Interop.BOOL lowMemoryP);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial void RhWaitForPendingFinalizers(bool allowReentrantWait)
{
int __allowReentrantWait_native;
// Marshal - Convert managed data to native data.
__allowReentrantWait_native = (int)(allowReentrantWait ? 1 : 0);
{
__PInvoke(__allowReentrantWait_native);
}
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhWaitForPendingFinalizers", ExactSpelling = true)]
static extern unsafe void __PInvoke(int __allowReentrantWait_native);
}
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhGetGcTotalMemory", ExactSpelling = true)]
internal static extern partial long RhGetGcTotalMemory();
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhRegisterFrozenSegment", ExactSpelling = true)]
internal static unsafe extern partial nint RhRegisterFrozenSegment(void* pSegmentStart, nuint allocSize, nuint commitSize, nuint reservedSize);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhUpdateFrozenSegment", ExactSpelling = true)]
internal static unsafe extern partial void RhUpdateFrozenSegment(nint seg, void* allocated, void* committed);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhUnregisterFrozenSegment", ExactSpelling = true)]
internal static extern partial void RhUnregisterFrozenSegment(nint pSegmentHandle);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhStartNoGCRegion", ExactSpelling = true)]
internal static extern partial int RhStartNoGCRegion(long totalSize, global::Interop.BOOL hasLohSize, long lohSize, global::Interop.BOOL disallowFullBlockingGC);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhEndNoGCRegion", ExactSpelling = true)]
internal static extern partial int RhEndNoGCRegion();
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhEnumerateConfigurationValues", ExactSpelling = true)]
internal static unsafe extern partial void RhEnumerateConfigurationValues(void* configurationContext, delegate* unmanaged<void*, byte*, byte*, global::System.Runtime.RuntimeImports.GCConfigurationType, long, void> callback);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhRefreshMemoryLimit", ExactSpelling = true)]
internal static extern partial int RhRefreshMemoryLimit(global::System.Runtime.RuntimeImports.GCHeapHardLimitInfo heapHardLimitInfo);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhEnableNoGCRegionCallback", ExactSpelling = true)]
internal static unsafe extern partial int RhEnableNoGCRegionCallback(void* callback, long totalSize);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhGetGenerationBudget", ExactSpelling = true)]
internal static extern partial long RhGetGenerationBudget(int generation);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhGetTotalAllocatedBytesPrecise", ExactSpelling = true)]
internal static extern partial long RhGetTotalAllocatedBytesPrecise();
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhAllocateNewArray", ExactSpelling = true)]
internal static unsafe extern partial void RhAllocateNewArray(global::Internal.Runtime.MethodTable* pArrayEEType, uint numElements, uint flags, void* pResult);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhAllocateNewObject", ExactSpelling = true)]
internal static unsafe extern partial void RhAllocateNewObject(nint pEEType, uint flags, void* pResult);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhAllocateThunksMapping", ExactSpelling = true)]
internal static unsafe extern partial int RhAllocateThunksMapping(nint* ppMapping);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhSpinWait", ExactSpelling = true)]
internal static extern partial void RhSpinWait(int iterations);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhSpinWait", ExactSpelling = true)]
internal static extern partial void RhLongSpinWait(int iterations);
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhYield", ExactSpelling = true)]
private static extern partial int _RhYield();
}
}
namespace System.Runtime
{
internal static unsafe partial class RuntimeImports
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial void RhSetCurrentThreadName(string name)
{
byte* __name_native = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __name_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__name_native__marshaller.FromManaged(name, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__name_native = __name_native__marshaller.ToUnmanaged();
__PInvoke(__name_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__name_native__marshaller.Free();
}
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "RhSetCurrentThreadName", ExactSpelling = true)]
static extern unsafe void __PInvoke(byte* __name_native);
}
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Abort", ExactSpelling = true)]
internal static extern partial void Abort();
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Exit", ExactSpelling = true)]
internal static extern partial void Exit(int exitCode);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int MProtect(nint addr, ulong len, global::Interop.Sys.MemoryMappedProtections prot)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(addr, len, prot);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MProtect", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __addr_native, ulong __len_native, global::Interop.Sys.MemoryMappedProtections __prot_native);
}
}
}
namespace System
{
internal static unsafe partial class SpanHelpers
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "memmove", ExactSpelling = true)]
private static unsafe extern partial void* memmove(void* dest, void* src, nuint len);
}
}
namespace System
{
internal static unsafe partial class SpanHelpers
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "memset", ExactSpelling = true)]
private static unsafe extern partial void* memset(void* dest, int value, nuint len);
}
}
namespace System.Threading
{
public static unsafe partial class Interlocked
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "Interlocked_MemoryBarrierProcessWide", ExactSpelling = true)]
private static extern partial void _MemoryBarrierProcessWide();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int GetCalendars(string localeName, global::System.Globalization.CalendarId[] calendars, int calendarsCapacity)
{
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __calendars_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<global::System.Globalization.CalendarId, global::System.Globalization.CalendarId>.ManagedToUnmanagedIn.GetPinnableReference(calendars))
fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
{
__retVal = __PInvoke((ushort*)__localeName_native, (global::System.Globalization.CalendarId*)__calendars_native, calendarsCapacity);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetCalendars", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __localeName_native, global::System.Globalization.CalendarId* __calendars_native, int __calendarsCapacity_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Globalization.ResultCode GetCalendarInfo(string localeName, global::System.Globalization.CalendarId calendarId, global::System.Globalization.CalendarDataType calendarDataType, char* result, int resultCapacity)
{
global::Interop.Globalization.ResultCode __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
{
__retVal = __PInvoke((ushort*)__localeName_native, calendarId, calendarDataType, result, resultCapacity);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetCalendarInfo", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::Interop.Globalization.ResultCode __PInvoke(ushort* __localeName_native, global::System.Globalization.CalendarId __calendarId_native, global::System.Globalization.CalendarDataType __calendarDataType_native, char* __result_native, int __resultCapacity_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
private static unsafe partial bool EnumCalendarInfo(nint callback, string localeName, global::System.Globalization.CalendarId calendarId, global::System.Globalization.CalendarDataType calendarDataType, nint context)
{
bool __retVal;
int __retVal_native;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
{
__retVal_native = __PInvoke(callback, (ushort*)__localeName_native, calendarId, calendarDataType, context);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_EnumCalendarInfo", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(nint __callback_native, ushort* __localeName_native, global::System.Globalization.CalendarId __calendarId_native, global::System.Globalization.CalendarDataType __calendarDataType_native, nint __context_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLatestJapaneseEra", ExactSpelling = true)]
internal static extern partial int GetLatestJapaneseEra();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial bool GetJapaneseEraStartDate(int era, out int startYear, out int startMonth, out int startDay)
{
startYear = default;
startMonth = default;
startDay = default;
bool __retVal;
int __retVal_native;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (int* __startDay_native = &startDay)
fixed (int* __startMonth_native = &startMonth)
fixed (int* __startYear_native = &startYear)
{
__retVal_native = __PInvoke(era, __startYear_native, __startMonth_native, __startDay_native);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetJapaneseEraStartDate", ExactSpelling = true)]
static extern unsafe int __PInvoke(int __era_native, int* __startYear_native, int* __startMonth_native, int* __startDay_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial void ChangeCase(char* src, int srcLen, char* dstBuffer, int dstBufferCapacity, bool bToUpper)
{
int __bToUpper_native;
// Marshal - Convert managed data to native data.
__bToUpper_native = (int)(bToUpper ? 1 : 0);
{
__PInvoke(src, srcLen, dstBuffer, dstBufferCapacity, __bToUpper_native);
}
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_ChangeCase", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
[return: System.Runtime.InteropServices.MarshalAsAttribute((global::System.Runtime.InteropServices.UnmanagedType)2)]
static extern unsafe void __PInvoke(char* __src_native, int __srcLen_native, char* __dstBuffer_native, int __dstBufferCapacity_native, int __bToUpper_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial void ChangeCaseInvariant(char* src, int srcLen, char* dstBuffer, int dstBufferCapacity, bool bToUpper)
{
int __bToUpper_native;
// Marshal - Convert managed data to native data.
__bToUpper_native = (int)(bToUpper ? 1 : 0);
{
__PInvoke(src, srcLen, dstBuffer, dstBufferCapacity, __bToUpper_native);
}
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_ChangeCaseInvariant", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
[return: System.Runtime.InteropServices.MarshalAsAttribute((global::System.Runtime.InteropServices.UnmanagedType)2)]
static extern unsafe void __PInvoke(char* __src_native, int __srcLen_native, char* __dstBuffer_native, int __dstBufferCapacity_native, int __bToUpper_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial void ChangeCaseTurkish(char* src, int srcLen, char* dstBuffer, int dstBufferCapacity, bool bToUpper)
{
int __bToUpper_native;
// Marshal - Convert managed data to native data.
__bToUpper_native = (int)(bToUpper ? 1 : 0);
{
__PInvoke(src, srcLen, dstBuffer, dstBufferCapacity, __bToUpper_native);
}
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_ChangeCaseTurkish", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
[return: System.Runtime.InteropServices.MarshalAsAttribute((global::System.Runtime.InteropServices.UnmanagedType)2)]
static extern unsafe void __PInvoke(char* __src_native, int __srcLen_native, char* __dstBuffer_native, int __dstBufferCapacity_native, int __bToUpper_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_InitOrdinalCasingPage", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
internal static unsafe extern partial void InitOrdinalCasingPage(int pageNumber, char* pTarget);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Globalization.ResultCode GetSortHandle(string localeName, out nint sortHandle)
{
sortHandle = default;
byte* __localeName_native = default;
global::Interop.Globalization.ResultCode __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __localeName_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__localeName_native__marshaller.FromManaged(localeName, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (nint* __sortHandle_native = &sortHandle)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__localeName_native = __localeName_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__localeName_native, __sortHandle_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__localeName_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetSortHandle", ExactSpelling = true)]
static extern unsafe global::Interop.Globalization.ResultCode __PInvoke(byte* __localeName_native, nint* __sortHandle_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_CloseSortHandle", ExactSpelling = true)]
internal static extern partial void CloseSortHandle(nint handle);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_CompareString", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
internal static unsafe extern partial int CompareString(nint sortHandle, char* lpStr1, int cwStr1Len, char* lpStr2, int cwStr2Len, global::System.Globalization.CompareOptions options);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_IndexOf", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
internal static unsafe extern partial int IndexOf(nint sortHandle, char* target, int cwTargetLength, char* pSource, int cwSourceLength, global::System.Globalization.CompareOptions options, int* matchLengthPtr);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_LastIndexOf", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
internal static unsafe extern partial int LastIndexOf(nint sortHandle, char* target, int cwTargetLength, char* pSource, int cwSourceLength, global::System.Globalization.CompareOptions options, int* matchLengthPtr);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool StartsWith(nint sortHandle, char* target, int cwTargetLength, char* source, int cwSourceLength, global::System.Globalization.CompareOptions options, int* matchedLength)
{
bool __retVal;
int __retVal_native;
{
__retVal_native = __PInvoke(sortHandle, target, cwTargetLength, source, cwSourceLength, options, matchedLength);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_StartsWith", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(nint __sortHandle_native, char* __target_native, int __cwTargetLength_native, char* __source_native, int __cwSourceLength_native, global::System.Globalization.CompareOptions __options_native, int* __matchedLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool EndsWith(nint sortHandle, char* target, int cwTargetLength, char* source, int cwSourceLength, global::System.Globalization.CompareOptions options, int* matchedLength)
{
bool __retVal;
int __retVal_native;
{
__retVal_native = __PInvoke(sortHandle, target, cwTargetLength, source, cwSourceLength, options, matchedLength);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_EndsWith", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(nint __sortHandle_native, char* __target_native, int __cwTargetLength_native, char* __source_native, int __cwSourceLength_native, global::System.Globalization.CompareOptions __options_native, int* __matchedLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial bool StartsWith(nint sortHandle, string target, int cwTargetLength, string source, int cwSourceLength, global::System.Globalization.CompareOptions options)
{
bool __retVal;
int __retVal_native;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __source_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(source))
fixed (void* __target_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(target))
{
__retVal_native = __PInvoke(sortHandle, (ushort*)__target_native, cwTargetLength, (ushort*)__source_native, cwSourceLength, options);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_StartsWith", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(nint __sortHandle_native, ushort* __target_native, int __cwTargetLength_native, ushort* __source_native, int __cwSourceLength_native, global::System.Globalization.CompareOptions __options_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial bool EndsWith(nint sortHandle, string target, int cwTargetLength, string source, int cwSourceLength, global::System.Globalization.CompareOptions options)
{
bool __retVal;
int __retVal_native;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __source_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(source))
fixed (void* __target_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(target))
{
__retVal_native = __PInvoke(sortHandle, (ushort*)__target_native, cwTargetLength, (ushort*)__source_native, cwSourceLength, options);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_EndsWith", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(nint __sortHandle_native, ushort* __target_native, int __cwTargetLength_native, ushort* __source_native, int __cwSourceLength_native, global::System.Globalization.CompareOptions __options_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetSortKey", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
internal static unsafe extern partial int GetSortKey(nint sortHandle, char* str, int strLength, byte* sortKey, int sortKeyLength, global::System.Globalization.CompareOptions options);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetSortVersion", ExactSpelling = true)]
internal static extern partial int GetSortVersion(nint sortHandle);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_LoadICU", ExactSpelling = true)]
internal static extern partial int LoadICU();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial void InitICUFunctions(nint icuuc, nint icuin, string version, string suffix)
{
byte* __version_native = default;
byte* __suffix_native = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __suffix_native__marshaller = new();
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __version_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__suffix_native__marshaller.FromManaged(suffix, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
__version_native__marshaller.FromManaged(version, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__suffix_native = __suffix_native__marshaller.ToUnmanaged();
__version_native = __version_native__marshaller.ToUnmanaged();
__PInvoke(icuuc, icuin, __version_native, __suffix_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__suffix_native__marshaller.Free();
__version_native__marshaller.Free();
}
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_InitICUFunctions", ExactSpelling = true)]
static extern unsafe void __PInvoke(nint __icuuc_native, nint __icuin_native, byte* __version_native, byte* __suffix_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetICUVersion", ExactSpelling = true)]
internal static extern partial int GetICUVersion();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int ToAscii(uint flags, global::System.ReadOnlySpan<char> src, int srcLen, global::System.Span<char> dstBuffer, int dstBufferCapacity)
{
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __dstBuffer_native = &global::System.Runtime.InteropServices.Marshalling.SpanMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(dstBuffer))
fixed (void* __src_native = &global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(src))
{
__retVal = __PInvoke(flags, (char*)__src_native, srcLen, (char*)__dstBuffer_native, dstBufferCapacity);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_ToAscii", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(uint __flags_native, char* __src_native, int __srcLen_native, char* __dstBuffer_native, int __dstBufferCapacity_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int ToUnicode(uint flags, global::System.ReadOnlySpan<char> src, int srcLen, global::System.Span<char> dstBuffer, int dstBufferCapacity)
{
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __dstBuffer_native = &global::System.Runtime.InteropServices.Marshalling.SpanMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(dstBuffer))
fixed (void* __src_native = &global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(src))
{
__retVal = __PInvoke(flags, (char*)__src_native, srcLen, (char*)__dstBuffer_native, dstBufferCapacity);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_ToUnicode", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(uint __flags_native, char* __src_native, int __srcLen_native, char* __dstBuffer_native, int __dstBufferCapacity_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool GetLocaleName(string localeName, char* value, int valueLength)
{
bool __retVal;
int __retVal_native;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
{
__retVal_native = __PInvoke((ushort*)__localeName_native, value, valueLength);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLocaleName", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __localeName_native, char* __value_native, int __valueLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool GetLocaleInfoString(string localeName, uint localeStringData, char* value, int valueLength, string uiLocaleName)
{
bool __retVal;
int __retVal_native;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __uiLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(uiLocaleName))
fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
{
__retVal_native = __PInvoke((ushort*)__localeName_native, localeStringData, value, valueLength, (ushort*)__uiLocaleName_native);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLocaleInfoString", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __localeName_native, uint __localeStringData_native, char* __value_native, int __valueLength_native, ushort* __uiLocaleName_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool GetDefaultLocaleName(char* value, int valueLength)
{
bool __retVal;
int __retVal_native;
{
__retVal_native = __PInvoke(value, valueLength);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetDefaultLocaleName", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(char* __value_native, int __valueLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial bool IsPredefinedLocale(string localeName)
{
bool __retVal;
int __retVal_native;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
{
__retVal_native = __PInvoke((ushort*)__localeName_native);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_IsPredefinedLocale", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __localeName_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool GetLocaleTimeFormat(string localeName, bool shortFormat, char* value, int valueLength)
{
int __shortFormat_native;
bool __retVal;
int __retVal_native;
// Marshal - Convert managed data to native data.
__shortFormat_native = (int)(shortFormat ? 1 : 0);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
{
__retVal_native = __PInvoke((ushort*)__localeName_native, __shortFormat_native, value, valueLength);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLocaleTimeFormat", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __localeName_native, int __shortFormat_native, char* __value_native, int __valueLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial bool GetLocaleInfoInt(string localeName, uint localeNumberData, ref int value)
{
bool __retVal;
int __retVal_native;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (int* __value_native = &value)
fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
{
__retVal_native = __PInvoke((ushort*)__localeName_native, localeNumberData, __value_native);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLocaleInfoInt", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __localeName_native, uint __localeNumberData_native, int* __value_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial bool GetLocaleInfoGroupingSizes(string localeName, uint localeGroupingData, ref int primaryGroupSize, ref int secondaryGroupSize)
{
bool __retVal;
int __retVal_native;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (int* __secondaryGroupSize_native = &secondaryGroupSize)
fixed (int* __primaryGroupSize_native = &primaryGroupSize)
fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
{
__retVal_native = __PInvoke((ushort*)__localeName_native, localeGroupingData, __primaryGroupSize_native, __secondaryGroupSize_native);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLocaleInfoGroupingSizes", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __localeName_native, uint __localeGroupingData_native, int* __primaryGroupSize_native, int* __secondaryGroupSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int GetLocales(char[] value, int valueLength)
{
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __value_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(value))
{
__retVal = __PInvoke((char*)__value_native, valueLength);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetLocales", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(char* __value_native, int __valueLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_IsNormalized", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
internal static unsafe extern partial int IsNormalized(global::System.Text.NormalizationForm normalizationForm, char* src, int srcLen);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_NormalizeString", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
internal static unsafe extern partial int NormalizeString(global::System.Text.NormalizationForm normalizationForm, char* src, int srcLen, char* dstBuffer, int dstBufferCapacity);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.Globalization.ResultCode GetTimeZoneDisplayName(string localeName, string timeZoneId, global::Interop.Globalization.TimeZoneDisplayNameType type, char* result, int resultLength)
{
global::Interop.Globalization.ResultCode __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __timeZoneId_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(timeZoneId))
fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
{
__retVal = __PInvoke((ushort*)__localeName_native, (ushort*)__timeZoneId_native, type, result, resultLength);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_GetTimeZoneDisplayName", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::Interop.Globalization.ResultCode __PInvoke(ushort* __localeName_native, ushort* __timeZoneId_native, global::Interop.Globalization.TimeZoneDisplayNameType __type_native, char* __result_native, int __resultLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int WindowsIdToIanaId(string windowsId, nint region, char* ianaId, int ianaIdLength)
{
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __windowsId_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(windowsId))
{
__retVal = __PInvoke((ushort*)__windowsId_native, region, ianaId, ianaIdLength);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_WindowsIdToIanaId", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __windowsId_native, nint __region_native, char* __ianaId_native, int __ianaIdLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Globalization
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int IanaIdToWindowsId(string ianaId, char* windowsId, int windowsIdLength)
{
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __ianaId_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(ianaId))
{
__retVal = __PInvoke((ushort*)__ianaId_native, windowsId, windowsIdLength);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Globalization.Native", EntryPoint = "GlobalizationNative_IanaIdToWindowsId", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __ianaId_native, char* __windowsId_native, int __windowsIdLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "LCIDToLocaleName", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
internal static unsafe extern partial int LCIDToLocaleName(int locale, char* pLocaleName, int cchName, uint dwFlags);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int LocaleNameToLCID(string lpName, uint dwFlags)
{
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __lpName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpName))
{
__retVal = __PInvoke((ushort*)__lpName_native, dwFlags);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "LocaleNameToLCID", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __lpName_native, uint __dwFlags_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int LCMapStringEx(string lpLocaleName, uint dwMapFlags, char* lpSrcStr, int cchSrc, void* lpDestStr, int cchDest, void* lpVersionInformation, void* lpReserved, nint sortHandle)
{
int __lastError;
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __lpLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpLocaleName))
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke((ushort*)__lpLocaleName_native, dwMapFlags, lpSrcStr, cchSrc, lpDestStr, cchDest, lpVersionInformation, lpReserved, sortHandle);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "LCMapStringEx", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __lpLocaleName_native, uint __dwMapFlags_native, char* __lpSrcStr_native, int __cchSrc_native, void* __lpDestStr_native, int __cchDest_native, void* __lpVersionInformation_native, void* __lpReserved_native, nint __sortHandle_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "FindNLSStringEx", ExactSpelling = true, SetLastError = false)]
internal static unsafe extern partial int FindNLSStringEx(char* lpLocaleName, uint dwFindNLSStringFlags, char* lpStringSource, int cchSource, char* lpStringValue, int cchValue, int* pcchFound, void* lpVersionInformation, void* lpReserved, nint sortHandle);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "CompareStringEx", ExactSpelling = true)]
internal static unsafe extern partial int CompareStringEx(char* lpLocaleName, uint dwCmpFlags, char* lpString1, int cchCount1, char* lpString2, int cchCount2, void* lpVersionInformation, void* lpReserved, nint lParam);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int CompareStringOrdinal(char* lpString1, int cchCount1, char* lpString2, int cchCount2, bool bIgnoreCase)
{
int __bIgnoreCase_native;
int __retVal;
// Marshal - Convert managed data to native data.
__bIgnoreCase_native = (int)(bIgnoreCase ? 1 : 0);
{
__retVal = __PInvoke(lpString1, cchCount1, lpString2, cchCount2, __bIgnoreCase_native);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "CompareStringOrdinal", ExactSpelling = true)]
static extern unsafe int __PInvoke(char* __lpString1_native, int __cchCount1_native, char* __lpString2_native, int __cchCount2_native, int __bIgnoreCase_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "FindStringOrdinal", ExactSpelling = true, SetLastError = false)]
internal static unsafe extern partial int FindStringOrdinal(uint dwFindStringOrdinalFlags, char* lpStringSource, int cchSource, char* lpStringValue, int cchValue, global::Interop.BOOL bIgnoreCase);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool IsNLSDefinedString(int Function, uint dwFlags, nint lpVersionInformation, char* lpString, int cchStr)
{
bool __retVal;
int __retVal_native;
{
__retVal_native = __PInvoke(Function, dwFlags, lpVersionInformation, lpString, cchStr);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "IsNLSDefinedString", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(int __Function_native, uint __dwFlags_native, nint __lpVersionInformation_native, char* __lpString_native, int __cchStr_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetUserPreferredUILanguages", ExactSpelling = true)]
internal static unsafe extern partial global::Interop.BOOL GetUserPreferredUILanguages(uint dwFlags, uint* pulNumLanguages, char* pwszLanguagesBuffer, uint* pcchLanguagesBuffer);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int GetLocaleInfoEx(string lpLocaleName, uint LCType, void* lpLCData, int cchData)
{
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __lpLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpLocaleName))
{
__retVal = __PInvoke((ushort*)__lpLocaleName_native, LCType, lpLCData, cchData);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetLocaleInfoEx", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __lpLocaleName_native, uint __LCType_native, void* __lpLCData_native, int __cchData_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool EnumSystemLocalesEx(delegate* unmanaged<char*, uint, void*, global::Interop.BOOL> lpLocaleEnumProcEx, uint dwFlags, void* lParam, nint reserved)
{
bool __retVal;
int __retVal_native;
{
__retVal_native = __PInvoke(lpLocaleEnumProcEx, dwFlags, lParam, reserved);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "EnumSystemLocalesEx", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(delegate* unmanaged<char*, uint, void*, global::Interop.BOOL> __lpLocaleEnumProcEx_native, uint __dwFlags_native, void* __lParam_native, nint __reserved_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool EnumTimeFormatsEx(delegate* unmanaged<char*, void*, global::Interop.BOOL> lpTimeFmtEnumProcEx, string lpLocaleName, uint dwFlags, void* lParam)
{
bool __retVal;
int __retVal_native;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __lpLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpLocaleName))
{
__retVal_native = __PInvoke(lpTimeFmtEnumProcEx, (ushort*)__lpLocaleName_native, dwFlags, lParam);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "EnumTimeFormatsEx", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(delegate* unmanaged<char*, void*, global::Interop.BOOL> __lpTimeFmtEnumProcEx_native, ushort* __lpLocaleName_native, uint __dwFlags_native, void* __lParam_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int GetCalendarInfoEx(string lpLocaleName, uint Calendar, nint lpReserved, uint CalType, nint lpCalData, int cchData, out int lpValue)
{
lpValue = default;
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (int* __lpValue_native = &lpValue)
fixed (void* __lpLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpLocaleName))
{
__retVal = __PInvoke((ushort*)__lpLocaleName_native, Calendar, lpReserved, CalType, lpCalData, cchData, __lpValue_native);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetCalendarInfoEx", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __lpLocaleName_native, uint __Calendar_native, nint __lpReserved_native, uint __CalType_native, nint __lpCalData_native, int __cchData_native, int* __lpValue_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int GetCalendarInfoEx(string lpLocaleName, uint Calendar, nint lpReserved, uint CalType, nint lpCalData, int cchData, nint lpValue)
{
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __lpLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpLocaleName))
{
__retVal = __PInvoke((ushort*)__lpLocaleName_native, Calendar, lpReserved, CalType, lpCalData, cchData, lpValue);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetCalendarInfoEx", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __lpLocaleName_native, uint __Calendar_native, nint __lpReserved_native, uint __CalType_native, nint __lpCalData_native, int __cchData_native, nint __lpValue_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetUserGeoID", ExactSpelling = true)]
internal static extern partial int GetUserGeoID(int geoClass);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetGeoInfoW", ExactSpelling = true)]
internal static unsafe extern partial int GetGeoInfo(int location, int geoType, char* lpGeoData, int cchData, int LangId);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool EnumCalendarInfoExEx(delegate* unmanaged<char*, uint, nint, void*, global::Interop.BOOL> pCalInfoEnumProcExEx, string lpLocaleName, uint Calendar, string lpReserved, uint CalType, void* lParam)
{
bool __retVal;
int __retVal_native;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __lpReserved_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpReserved))
fixed (void* __lpLocaleName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpLocaleName))
{
__retVal_native = __PInvoke(pCalInfoEnumProcExEx, (ushort*)__lpLocaleName_native, Calendar, (ushort*)__lpReserved_native, CalType, lParam);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "EnumCalendarInfoExEx", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(delegate* unmanaged<char*, uint, nint, void*, global::Interop.BOOL> __pCalInfoEnumProcExEx_native, ushort* __lpLocaleName_native, uint __Calendar_native, ushort* __lpReserved_native, uint __CalType_native, void* __lParam_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool GetNLSVersionEx(int function, string localeName, global::Interop.Kernel32.NlsVersionInfoEx* lpVersionInformation)
{
bool __retVal;
int __retVal_native;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __localeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(localeName))
{
__retVal_native = __PInvoke(function, (ushort*)__localeName_native, lpVersionInformation);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "GetNLSVersionEx", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(int __function_native, ushort* __localeName_native, global::Interop.Kernel32.NlsVersionInfoEx* __lpVersionInformation_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Kernel32
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int ResolveLocaleName(string lpNameToResolve, char* lpLocaleName, int cchLocaleName)
{
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __lpNameToResolve_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(lpNameToResolve))
{
__retVal = __PInvoke((ushort*)__lpNameToResolve_native, lpLocaleName, cchLocaleName);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("kernel32.dll", EntryPoint = "ResolveLocaleName", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(ushort* __lpNameToResolve_native, char* __lpLocaleName_native, int __cchLocaleName_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Normaliz
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int IdnToAscii(uint dwFlags, global::System.ReadOnlySpan<char> lpUnicodeCharStr, int cchUnicodeChar, global::System.Span<char> lpASCIICharStr, int cchASCIIChar)
{
int __lastError;
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __lpASCIICharStr_native = &global::System.Runtime.InteropServices.Marshalling.SpanMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(lpASCIICharStr))
fixed (void* __lpUnicodeCharStr_native = &global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(lpUnicodeCharStr))
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(dwFlags, (char*)__lpUnicodeCharStr_native, cchUnicodeChar, (char*)__lpASCIICharStr_native, cchASCIIChar);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("Normaliz.dll", EntryPoint = "IdnToAscii", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(uint __dwFlags_native, char* __lpUnicodeCharStr_native, int __cchUnicodeChar_native, char* __lpASCIICharStr_native, int __cchASCIIChar_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Normaliz
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int IdnToUnicode(uint dwFlags, global::System.ReadOnlySpan<char> lpASCIICharStr, int cchASCIIChar, global::System.Span<char> lpUnicodeCharStr, int cchUnicodeChar)
{
int __lastError;
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __lpUnicodeCharStr_native = &global::System.Runtime.InteropServices.Marshalling.SpanMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(lpUnicodeCharStr))
fixed (void* __lpASCIICharStr_native = &global::System.Runtime.InteropServices.Marshalling.ReadOnlySpanMarshaller<char, char>.ManagedToUnmanagedIn.GetPinnableReference(lpASCIICharStr))
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(dwFlags, (char*)__lpASCIICharStr_native, cchASCIIChar, (char*)__lpUnicodeCharStr_native, cchUnicodeChar);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("Normaliz.dll", EntryPoint = "IdnToUnicode", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(uint __dwFlags_native, char* __lpASCIICharStr_native, int __cchASCIIChar_native, char* __lpUnicodeCharStr_native, int __cchUnicodeChar_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Normaliz
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial global::Interop.BOOL IsNormalizedString(global::System.Text.NormalizationForm normForm, char* source, int length)
{
int __lastError;
global::Interop.BOOL __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(normForm, source, length);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("Normaliz.dll", EntryPoint = "IsNormalizedString", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe global::Interop.BOOL __PInvoke(global::System.Text.NormalizationForm __normForm_native, char* __source_native, int __length_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Normaliz
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int NormalizeString(global::System.Text.NormalizationForm normForm, char* source, int sourceLength, char* destination, int destinationLength)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(normForm, source, sourceLength, destination, destinationLength);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("Normaliz.dll", EntryPoint = "NormalizeString", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe int __PInvoke(global::System.Text.NormalizationForm __normForm_native, char* __source_native, int __sourceLength_native, char* __destination_native, int __destinationLength_native);
}
}
}
namespace System.Diagnostics.Tracing
{
internal static unsafe partial class EventPipeInternal
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "EventPipeInternal_Enable", ExactSpelling = true)]
private static unsafe extern partial ulong Enable(char* outputFile, global::System.Diagnostics.Tracing.EventPipeSerializationFormat format, uint circularBufferSizeInMB, global::System.Diagnostics.Tracing.EventPipeInternal.EventPipeProviderConfigurationNative* providers, uint numProviders);
}
}
namespace System.Diagnostics.Tracing
{
internal static unsafe partial class EventPipeInternal
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "EventPipeInternal_Disable", ExactSpelling = true)]
internal static extern partial void Disable(ulong sessionID);
}
}
namespace System.Diagnostics.Tracing
{
internal static unsafe partial class EventPipeInternal
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial nint CreateProvider(string providerName, delegate* unmanaged<byte*, int, byte, long, long, global::Interop.Advapi32.EVENT_FILTER_DESCRIPTOR*, void*, void> callbackFunc, void* callbackContext)
{
nint __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __providerName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(providerName))
{
__retVal = __PInvoke((ushort*)__providerName_native, callbackFunc, callbackContext);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "EventPipeInternal_CreateProvider", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe nint __PInvoke(ushort* __providerName_native, delegate* unmanaged<byte*, int, byte, long, long, global::Interop.Advapi32.EVENT_FILTER_DESCRIPTOR*, void*, void> __callbackFunc_native, void* __callbackContext_native);
}
}
}
namespace System.Diagnostics.Tracing
{
internal static unsafe partial class EventPipeInternal
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "EventPipeInternal_DefineEvent", ExactSpelling = true)]
internal static unsafe extern partial nint DefineEvent(nint provHandle, uint eventID, long keywords, uint eventVersion, uint level, void* pMetadata, uint metadataLength);
}
}
namespace System.Diagnostics.Tracing
{
internal static unsafe partial class EventPipeInternal
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial nint GetProvider(string providerName)
{
nint __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __providerName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(providerName))
{
__retVal = __PInvoke((ushort*)__providerName_native);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "EventPipeInternal_GetProvider", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe nint __PInvoke(ushort* __providerName_native);
}
}
}
namespace System.Diagnostics.Tracing
{
internal static unsafe partial class EventPipeInternal
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "EventPipeInternal_DeleteProvider", ExactSpelling = true)]
internal static extern partial void DeleteProvider(nint provHandle);
}
}
namespace System.Diagnostics.Tracing
{
internal static unsafe partial class EventPipeInternal
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int EventActivityIdControl(uint controlCode, ref global::System.Guid activityId)
{
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::System.Guid* __activityId_native = &activityId)
{
__retVal = __PInvoke(controlCode, __activityId_native);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "EventPipeInternal_EventActivityIdControl", ExactSpelling = true)]
static extern unsafe int __PInvoke(uint __controlCode_native, global::System.Guid* __activityId_native);
}
}
}
namespace System.Diagnostics.Tracing
{
internal static unsafe partial class EventPipeInternal
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "EventPipeInternal_WriteEventData", ExactSpelling = true)]
internal static unsafe extern partial void WriteEventData(nint eventHandle, global::System.Diagnostics.Tracing.EventProvider.EventData* pEventData, uint dataCount, global::System.Guid* activityId, global::System.Guid* relatedActivityId);
}
}
namespace System.Diagnostics.Tracing
{
internal static unsafe partial class EventPipeInternal
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool GetSessionInfo(ulong sessionID, global::System.Diagnostics.Tracing.EventPipeSessionInfo* pSessionInfo)
{
bool __retVal;
int __retVal_native;
{
__retVal_native = __PInvoke(sessionID, pSessionInfo);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "EventPipeInternal_GetSessionInfo", ExactSpelling = true)]
static extern unsafe int __PInvoke(ulong __sessionID_native, global::System.Diagnostics.Tracing.EventPipeSessionInfo* __pSessionInfo_native);
}
}
}
namespace System.Diagnostics.Tracing
{
internal static unsafe partial class EventPipeInternal
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool GetNextEvent(ulong sessionID, global::System.Diagnostics.Tracing.EventPipeEventInstanceData* pInstance)
{
bool __retVal;
int __retVal_native;
{
__retVal_native = __PInvoke(sessionID, pInstance);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "EventPipeInternal_GetNextEvent", ExactSpelling = true)]
static extern unsafe int __PInvoke(ulong __sessionID_native, global::System.Diagnostics.Tracing.EventPipeEventInstanceData* __pInstance_native);
}
}
}
namespace System.Diagnostics.Tracing
{
internal static unsafe partial class EventPipeInternal
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool SignalSession(ulong sessionID)
{
bool __retVal;
int __retVal_native;
{
__retVal_native = __PInvoke(sessionID);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "EventPipeInternal_SignalSession", ExactSpelling = true)]
static extern unsafe int __PInvoke(ulong __sessionID_native);
}
}
}
namespace System.Diagnostics.Tracing
{
internal static unsafe partial class EventPipeInternal
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool WaitForSessionSignal(ulong sessionID, int timeoutMs)
{
bool __retVal;
int __retVal_native;
{
__retVal_native = __PInvoke(sessionID, timeoutMs);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "EventPipeInternal_WaitForSessionSignal", ExactSpelling = true)]
static extern unsafe int __PInvoke(ulong __sessionID_native, int __timeoutMs_native);
}
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
private static unsafe partial void LogExceptionThrown(string exceptionTypeName, string exceptionMessage, nint faultingIP, uint hresult, ushort flags, ushort ClrInstanceID)
{
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (void* __exceptionMessage_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(exceptionMessage))
fixed (void* __exceptionTypeName_native = &global::System.Runtime.InteropServices.Marshalling.Utf16StringMarshaller.GetPinnableReference(exceptionTypeName))
{
__PInvoke((ushort*)__exceptionTypeName_native, (ushort*)__exceptionMessage_native, faultingIP, hresult, flags, ClrInstanceID);
}
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogExceptionThrown", ExactSpelling = true, CharSet = global::System.Runtime.InteropServices.CharSet.Unicode)]
static extern unsafe void __PInvoke(ushort* __exceptionTypeName_native, ushort* __exceptionMessage_native, nint __faultingIP_native, uint __hresult_native, ushort __flags_native, ushort __ClrInstanceID_native);
}
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogContentionLockCreated", ExactSpelling = true)]
private static extern partial void LogContentionLockCreated(nint LockID, nint AssociatedObjectID, ushort ClrInstanceID);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogContentionStart", ExactSpelling = true)]
private static extern partial void LogContentionStart(global::System.Diagnostics.Tracing.NativeRuntimeEventSource.ContentionFlagsMap ContentionFlags, ushort ClrInstanceID, nint LockID, nint AssociatedObjectID, ulong LockOwnerThreadID);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogContentionStop", ExactSpelling = true)]
private static extern partial void LogContentionStop(global::System.Diagnostics.Tracing.NativeRuntimeEventSource.ContentionFlagsMap ContentionFlags, ushort ClrInstanceID, double DurationNs);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkerThreadStart", ExactSpelling = true)]
private static extern partial void LogThreadPoolWorkerThreadStart(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkerThreadStop", ExactSpelling = true)]
private static extern partial void LogThreadPoolWorkerThreadStop(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkerThreadWait", ExactSpelling = true)]
private static extern partial void LogThreadPoolWorkerThreadWait(uint ActiveWorkerThreadCount, uint RetiredWorkerThreadCount, ushort ClrInstanceID);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolMinMaxThreads", ExactSpelling = true)]
private static extern partial void LogThreadPoolMinMaxThreads(ushort MinWorkerThreads, ushort MaxWorkerThreads, ushort MinIOCompletionThreads, ushort MaxIOCompletionThreads, ushort ClrInstanceID);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentSample", ExactSpelling = true)]
private static extern partial void LogThreadPoolWorkerThreadAdjustmentSample(double Throughput, ushort ClrInstanceID);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentAdjustment", ExactSpelling = true)]
private static extern partial void LogThreadPoolWorkerThreadAdjustmentAdjustment(double AverageThroughput, uint NewWorkerThreadCount, global::System.Diagnostics.Tracing.NativeRuntimeEventSource.ThreadAdjustmentReasonMap Reason, ushort ClrInstanceID);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkerThreadAdjustmentStats", ExactSpelling = true)]
private static extern partial void LogThreadPoolWorkerThreadAdjustmentStats(double Duration, double Throughput, double ThreadPoolWorkerThreadWait, double ThroughputWave, double ThroughputErrorEstimate, double AverageThroughputErrorEstimate, double ThroughputRatio, double Confidence, double NewControlSetting, ushort NewThreadWaveMagnitude, ushort ClrInstanceID);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
private static partial void LogThreadPoolIOEnqueue(nint NativeOverlapped, nint Overlapped, bool MultiDequeues, ushort ClrInstanceID)
{
int __MultiDequeues_native;
// Marshal - Convert managed data to native data.
__MultiDequeues_native = (int)(MultiDequeues ? 1 : 0);
{
__PInvoke(NativeOverlapped, Overlapped, __MultiDequeues_native, ClrInstanceID);
}
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolIOEnqueue", ExactSpelling = true)]
static extern unsafe void __PInvoke(nint __NativeOverlapped_native, nint __Overlapped_native, int __MultiDequeues_native, ushort __ClrInstanceID_native);
}
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolIODequeue", ExactSpelling = true)]
private static extern partial void LogThreadPoolIODequeue(nint NativeOverlapped, nint Overlapped, ushort ClrInstanceID);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolWorkingThreadCount", ExactSpelling = true)]
private static extern partial void LogThreadPoolWorkingThreadCount(uint Count, ushort ClrInstanceID);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogThreadPoolIOPack", ExactSpelling = true)]
private static extern partial void LogThreadPoolIOPack(nint NativeOverlapped, nint Overlapped, ushort ClrInstanceID);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogWaitHandleWaitStart", ExactSpelling = true)]
private static extern partial void LogWaitHandleWaitStart(global::System.Diagnostics.Tracing.NativeRuntimeEventSource.WaitHandleWaitSourceMap WaitSource, nint AssociatedObjectID, ushort ClrInstanceID);
}
}
namespace System.Diagnostics.Tracing
{
internal sealed unsafe partial class NativeRuntimeEventSource
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "NativeRuntimeEventSource_LogWaitHandleWaitStop", ExactSpelling = true)]
private static extern partial void LogWaitHandleWaitStop(ushort ClrInstanceID);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ConvertErrorPlatformToPal", ExactSpelling = true)]
internal static extern partial global::Interop.Error ConvertErrorPlatformToPal(int platformErrno);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ConvertErrorPalToPlatform", ExactSpelling = true)]
internal static extern partial int ConvertErrorPalToPlatform(global::Interop.Error error);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_StrErrorR", ExactSpelling = true)]
private static unsafe extern partial byte* StrErrorR(int platformErrno, byte* buffer, int bufferSize);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int Access(string path, global::Interop.Sys.AccessMode mode)
{
int __lastError;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, mode);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Access", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.AccessMode __mode_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int ChDir(string path)
{
int __lastError;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ChDir", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int ChMod(string path, int mode)
{
int __lastError;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, mode);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ChMod", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, int __mode_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int FChMod(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, int mode)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, mode);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FChMod", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, int __mode_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int Close(nint fd)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(fd);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Close", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
internal static unsafe partial class Fcntl
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int DangerousSetIsNonBlocking(nint fd, int isNonBlocking)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(fd, isNonBlocking);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlSetIsNonBlocking", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, int __isNonBlocking_native);
}
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
internal static unsafe partial class Fcntl
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int SetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, int isNonBlocking)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, isNonBlocking);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlSetIsNonBlocking", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, int __isNonBlocking_native);
}
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
internal static unsafe partial class Fcntl
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int GetIsNonBlocking(global::System.Runtime.InteropServices.SafeHandle fd, out bool isNonBlocking)
{
int __lastError;
isNonBlocking = default;
nint __fd_native = default;
int __isNonBlocking_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, &__isNonBlocking_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
// Unmarshal - Convert native data to managed data.
isNonBlocking = __isNonBlocking_native != 0;
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlGetIsNonBlocking", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, int* __isNonBlocking_native);
}
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
internal static unsafe partial class Fcntl
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int SetFD(global::System.Runtime.InteropServices.SafeHandle fd, int flags)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, flags);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlSetFD", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, int __flags_native);
}
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
internal static unsafe partial class Fcntl
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int GetFD(global::System.Runtime.InteropServices.SafeHandle fd)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlGetFD", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native);
}
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
internal static unsafe partial class Fcntl
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int GetFD(nint fd)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(fd);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FcntlGetFD", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native);
}
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int CopyFile(global::Microsoft.Win32.SafeHandles.SafeFileHandle source, global::Microsoft.Win32.SafeHandles.SafeFileHandle destination, long sourceLength)
{
int __lastError;
nint __source_native = default;
nint __destination_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __destination_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __source_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__destination_native__marshaller.FromManaged(destination);
__source_native__marshaller.FromManaged(source);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__destination_native = __destination_native__marshaller.ToUnmanaged();
__source_native = __source_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__source_native, __destination_native, sourceLength);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__destination_native__marshaller.Free();
__source_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_CopyFile", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __source_native, nint __destination_native, long __sourceLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial nint LoadLibrary(string filename)
{
byte* __filename_native = default;
nint __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __filename_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__filename_native__marshaller.FromManaged(filename, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__filename_native = __filename_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__filename_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__filename_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LoadLibrary", ExactSpelling = true)]
static extern unsafe nint __PInvoke(byte* __filename_native);
}
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetLoadLibraryError", ExactSpelling = true)]
internal static extern partial nint GetLoadLibraryError();
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetProcAddress", ExactSpelling = true)]
internal static extern partial nint GetProcAddress(nint handle, byte* symbol);
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial nint GetProcAddress(nint handle, string symbol)
{
byte* __symbol_native = default;
nint __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __symbol_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__symbol_native__marshaller.FromManaged(symbol, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__symbol_native = __symbol_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(handle, __symbol_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__symbol_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetProcAddress", ExactSpelling = true)]
static extern unsafe nint __PInvoke(nint __handle_native, byte* __symbol_native);
}
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FreeLibrary", ExactSpelling = true)]
internal static extern partial void FreeLibrary(nint handle);
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial nint GetDefaultSearchOrderPseudoHandle()
{
int __lastError;
nint __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke();
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetDefaultSearchOrderPseudoHandle", ExactSpelling = true)]
static extern unsafe nint __PInvoke();
}
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetErrNo", ExactSpelling = true)]
internal static extern partial int GetErrNo();
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetErrNo", ExactSpelling = true)]
internal static extern partial void SetErrNo(int errorCode);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial bool FileSystemSupportsLocking(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, global::Interop.Sys.LockOperations lockOperation, bool accessWrite)
{
nint __fd_native = default;
int __accessWrite_native = default;
bool __retVal = default;
int __retVal_native = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__accessWrite_native = (int)(accessWrite ? 1 : 0);
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
__retVal_native = __PInvoke(__fd_native, lockOperation, __accessWrite_native);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FileSystemSupportsLocking", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.LockOperations __lockOperation_native, int __accessWrite_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int FLock(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, global::Interop.Sys.LockOperations operation)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, operation);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FLock", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.LockOperations __operation_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int FLock(nint fd, global::Interop.Sys.LockOperations operation)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(fd, operation);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FLock", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.LockOperations __operation_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int FSync(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FSync", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int FTruncate(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, long length)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, length);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FTruncate", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, long __length_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial double GetCpuUtilization(ref global::Interop.Sys.ProcessCpuInformation previousCpuInfo)
{
double __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.ProcessCpuInformation* __previousCpuInfo_native = &previousCpuInfo)
{
__retVal = __PInvoke(__previousCpuInfo_native);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetCpuUtilization", ExactSpelling = true)]
static extern unsafe double __PInvoke(global::Interop.Sys.ProcessCpuInformation* __previousCpuInfo_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int Pipe(int* pipefd, global::Interop.Sys.PipeFlags flags)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(pipefd, flags);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Pipe", ExactSpelling = true)]
static extern unsafe int __PInvoke(int* __pipefd_native, global::Interop.Sys.PipeFlags __flags_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
private static unsafe partial byte* GetCwd(byte* buffer, int bufferLength)
{
int __lastError;
byte* __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(buffer, bufferLength);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetCwd", ExactSpelling = true)]
static extern unsafe byte* __PInvoke(byte* __buffer_native, int __bufferLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial byte* GetEnv(string name)
{
byte* __name_native = default;
byte* __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __name_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__name_native__marshaller.FromManaged(name, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__name_native = __name_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__name_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__name_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetEnv", ExactSpelling = true)]
static extern unsafe byte* __PInvoke(byte* __name_native);
}
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetEnviron", ExactSpelling = true)]
internal static unsafe extern partial byte** GetEnviron();
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FreeEnviron", ExactSpelling = true)]
internal static unsafe extern partial void FreeEnviron(byte** environ);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
private static unsafe partial int GetHostName(byte* name, int nameLength)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(name, nameLength);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetHostName", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __name_native, int __nameLength_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetOSArchitecture", ExactSpelling = true)]
internal static extern partial int GetOSArchitecture();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial string GetProcessPath()
{
int __lastError;
bool __invokeSucceeded = default;
string __retVal = default;
byte* __retVal_native = default;
try
{
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal_native = __PInvoke();
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
__invokeSucceeded = true;
// Unmarshal - Convert native data to managed data.
__retVal = global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ConvertToManaged(__retVal_native);
}
finally
{
if (__invokeSucceeded)
{
// CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.Free(__retVal_native);
}
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetProcessPath", ExactSpelling = true)]
static extern unsafe byte* __PInvoke();
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetNonCryptographicallySecureRandomBytes", ExactSpelling = true)]
internal static unsafe extern partial void GetNonCryptographicallySecureRandomBytes(byte* buffer, int length);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetCryptographicallySecureRandomBytes", ExactSpelling = true)]
internal static unsafe extern partial int GetCryptographicallySecureRandomBytes(byte* buffer, int length);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetSystemTimeAsTicks", ExactSpelling = true)]
internal static extern partial long GetSystemTimeAsTicks();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetLowResolutionTimestamp", ExactSpelling = true)]
internal static extern partial long GetLowResolutionTimestamp();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetTimestamp", ExactSpelling = true)]
internal static extern partial long GetTimestamp();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
private static partial int GetUnixVersion(byte[] version, ref int capacity)
{
int __lastError;
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (int* __capacity_native = &capacity)
fixed (void* __version_native = &global::System.Runtime.InteropServices.Marshalling.ArrayMarshaller<byte, byte>.ManagedToUnmanagedIn.GetPinnableReference(version))
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke((byte*)__version_native, __capacity_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetUnixVersion", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __version_native, int* __capacity_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
public static partial string GetUnixRelease()
{
int __lastError;
bool __invokeSucceeded = default;
string __retVal = default;
byte* __retVal_native = default;
try
{
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal_native = __PInvoke();
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
__invokeSucceeded = true;
// Unmarshal - Convert native data to managed data.
__retVal = global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ConvertToManaged(__retVal_native);
}
finally
{
if (__invokeSucceeded)
{
// CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.Free(__retVal_native);
}
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetUnixRelease", ExactSpelling = true)]
static extern unsafe byte* __PInvoke();
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int LChflags(string path, uint flags)
{
int __lastError;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, flags);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LChflags", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, uint __flags_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int FChflags(global::System.Runtime.InteropServices.SafeHandle fd, uint flags)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, flags);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FChflags", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, uint __flags_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LChflagsCanSetHiddenFlag", ExactSpelling = true)]
private static extern partial int LChflagsCanSetHiddenFlag();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_CanGetHiddenFlag", ExactSpelling = true)]
private static extern partial int CanGetHiddenFlag();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int Link(string source, string link)
{
int __lastError;
byte* __source_native = default;
byte* __link_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __link_native__marshaller = new();
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __source_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__link_native__marshaller.FromManaged(link, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
__source_native__marshaller.FromManaged(source, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__link_native = __link_native__marshaller.ToUnmanaged();
__source_native = __source_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__source_native, __link_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__link_native__marshaller.Free();
__source_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Link", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __source_native, byte* __link_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int LockFileRegion(global::System.Runtime.InteropServices.SafeHandle fd, long offset, long length, global::Interop.Sys.LockType lockType)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, offset, length, lockType);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LockFileRegion", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, long __offset_native, long __length_native, global::Interop.Sys.LockType __lockType_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Log", ExactSpelling = true)]
internal static unsafe extern partial void Log(byte* buffer, int count);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LogError", ExactSpelling = true)]
internal static unsafe extern partial void LogError(byte* buffer, int count);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_Create", ExactSpelling = true)]
internal static extern partial nint LowLevelMonitor_Create();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_Destroy", ExactSpelling = true)]
internal static extern partial void LowLevelMonitor_Destroy(nint monitor);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_Acquire", ExactSpelling = true)]
internal static extern partial void LowLevelMonitor_Acquire(nint monitor);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_Release", ExactSpelling = true)]
internal static extern partial void LowLevelMonitor_Release(nint monitor);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_Wait", ExactSpelling = true)]
internal static extern partial void LowLevelMonitor_Wait(nint monitor);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial bool LowLevelMonitor_TimedWait(nint monitor, int timeoutMilliseconds)
{
bool __retVal;
int __retVal_native;
{
__retVal_native = __PInvoke(monitor, timeoutMilliseconds);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_TimedWait", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __monitor_native, int __timeoutMilliseconds_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelMonitor_Signal_Release", ExactSpelling = true)]
internal static extern partial void LowLevelMonitor_Signal_Release(nint monitor);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial long LSeek(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, long offset, global::Interop.Sys.SeekWhence whence)
{
int __lastError;
nint __fd_native = default;
long __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, offset, whence);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LSeek", ExactSpelling = true)]
static extern unsafe long __PInvoke(nint __fd_native, long __offset_native, global::Interop.Sys.SeekWhence __whence_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_AlignedAlloc", ExactSpelling = true)]
internal static extern partial void* AlignedAlloc(nuint alignment, nuint size);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_AlignedFree", ExactSpelling = true)]
internal static extern partial void AlignedFree(void* ptr);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_AlignedRealloc", ExactSpelling = true)]
internal static extern partial void* AlignedRealloc(void* ptr, nuint alignment, nuint new_size);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Calloc", ExactSpelling = true)]
internal static extern partial void* Calloc(nuint num, nuint size);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Free", ExactSpelling = true)]
internal static extern partial void Free(void* ptr);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Malloc", ExactSpelling = true)]
internal static extern partial void* Malloc(nuint size);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Realloc", ExactSpelling = true)]
internal static extern partial void* Realloc(void* ptr, nuint new_size);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int MkDir(global::System.ReadOnlySpan<char> path, int mode)
{
int __lastError;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, mode);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MkDir", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, int __mode_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial byte* MkdTemp(byte* template)
{
int __lastError;
byte* __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(template);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MkdTemp", ExactSpelling = true)]
static extern unsafe byte* __PInvoke(byte* __template_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial nint MksTemps(byte* template, int suffixlen)
{
int __lastError;
nint __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(template, suffixlen);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MksTemps", ExactSpelling = true)]
static extern unsafe nint __PInvoke(byte* __template_native, int __suffixlen_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial nint MMap(nint addr, ulong len, global::Interop.Sys.MemoryMappedProtections prot, global::Interop.Sys.MemoryMappedFlags flags, global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, long offset)
{
int __lastError;
nint __fd_native = default;
nint __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(addr, len, prot, flags, __fd_native, offset);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MMap", ExactSpelling = true)]
static extern unsafe nint __PInvoke(nint __addr_native, ulong __len_native, global::Interop.Sys.MemoryMappedProtections __prot_native, global::Interop.Sys.MemoryMappedFlags __flags_native, nint __fd_native, long __offset_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial nint MMap(nint addr, ulong len, global::Interop.Sys.MemoryMappedProtections prot, global::Interop.Sys.MemoryMappedFlags flags, nint fd, long offset)
{
int __lastError;
nint __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(addr, len, prot, flags, fd, offset);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MMap", ExactSpelling = true)]
static extern unsafe nint __PInvoke(nint __addr_native, ulong __len_native, global::Interop.Sys.MemoryMappedProtections __prot_native, global::Interop.Sys.MemoryMappedFlags __flags_native, nint __fd_native, long __offset_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int MUnmap(nint addr, ulong len)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(addr, len);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_MUnmap", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __addr_native, ulong __len_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetAllMountPoints", ExactSpelling = true)]
private static unsafe extern partial int GetAllMountPoints(delegate* unmanaged<void*, byte*, void> onFound, void* context);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial global::Microsoft.Win32.SafeHandles.SafeFileHandle Open(string filename, global::Interop.Sys.OpenFlags flags, int mode)
{
int __lastError;
bool __invokeSucceeded = default;
byte* __filename_native = default;
global::Microsoft.Win32.SafeHandles.SafeFileHandle __retVal = default;
nint __retVal_native = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new();
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __filename_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__filename_native__marshaller.FromManaged(filename, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__filename_native = __filename_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal_native = __PInvoke(__filename_native, flags, mode);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
__invokeSucceeded = true;
// UnmarshalCapture - Capture the native data into marshaller instances in case conversion to managed data throws an exception.
__retVal_native__marshaller.FromUnmanaged(__retVal_native);
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native__marshaller.ToManaged();
}
finally
{
if (__invokeSucceeded)
{
// CleanupCalleeAllocated - Perform cleanup of callee allocated resources.
__retVal_native__marshaller.Free();
}
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__filename_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Open", ExactSpelling = true)]
static extern unsafe nint __PInvoke(byte* __filename_native, global::Interop.Sys.OpenFlags __flags_native, int __mode_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
private static partial int PathConf(string path, global::Interop.Sys.PathConfName name)
{
int __lastError;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, name);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PathConf", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.PathConfName __name_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int PosixFAdvise(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, long offset, long length, global::Interop.Sys.FileAdvice advice)
{
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__fd_native, offset, length, advice);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PosixFAdvise", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, long __offset_native, long __length_native, global::Interop.Sys.FileAdvice __advice_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int FAllocate(global::Microsoft.Win32.SafeHandles.SafeFileHandle fd, long offset, long length)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, offset, length);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FAllocate", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, long __offset_native, long __length_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int PRead(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize, long fileOffset)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, buffer, bufferSize, fileOffset);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PRead", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __bufferSize_native, long __fileOffset_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial long ReadV(global::System.Runtime.InteropServices.SafeHandle fd, global::Interop.Sys.IOVector* vectors, int vectorCount)
{
int __lastError;
nint __fd_native = default;
long __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, vectors, vectorCount);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ReadV", ExactSpelling = true)]
static extern unsafe long __PInvoke(nint __fd_native, global::Interop.Sys.IOVector* __vectors_native, int __vectorCount_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial long PReadV(global::System.Runtime.InteropServices.SafeHandle fd, global::Interop.Sys.IOVector* vectors, int vectorCount, long fileOffset)
{
int __lastError;
nint __fd_native = default;
long __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, vectors, vectorCount, fileOffset);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PReadV", ExactSpelling = true)]
static extern unsafe long __PInvoke(nint __fd_native, global::Interop.Sys.IOVector* __vectors_native, int __vectorCount_native, long __fileOffset_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int PWrite(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize, long fileOffset)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, buffer, bufferSize, fileOffset);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PWrite", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __bufferSize_native, long __fileOffset_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial long PWriteV(global::System.Runtime.InteropServices.SafeHandle fd, global::Interop.Sys.IOVector* vectors, int vectorCount, long fileOffset)
{
int __lastError;
nint __fd_native = default;
long __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, vectors, vectorCount, fileOffset);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_PWriteV", ExactSpelling = true)]
static extern unsafe long __PInvoke(nint __fd_native, global::Interop.Sys.IOVector* __vectors_native, int __vectorCount_native, long __fileOffset_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int Read(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, buffer, count);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Read", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __count_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int ReadFromNonblocking(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int count)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, buffer, count);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ReadFromNonblocking", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __count_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial long WriteV(global::System.Runtime.InteropServices.SafeHandle fd, global::Interop.Sys.IOVector* vectors, int vectorCount)
{
int __lastError;
nint __fd_native = default;
long __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, vectors, vectorCount);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_WriteV", ExactSpelling = true)]
static extern unsafe long __PInvoke(nint __fd_native, global::Interop.Sys.IOVector* __vectors_native, int __vectorCount_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial nint OpenDir(string path)
{
int __lastError;
byte* __path_native = default;
nint __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_OpenDir", ExactSpelling = true)]
static extern unsafe nint __PInvoke(byte* __path_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ReadDir", ExactSpelling = true)]
internal static unsafe extern partial int ReadDir(nint dir, global::Interop.Sys.DirectoryEntry* outputEntry);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int CloseDir(nint dir)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(dir);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_CloseDir", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __dir_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
private static partial int ReadLink(global::System.ReadOnlySpan<char> path, ref byte buffer, int bufferSize)
{
int __lastError;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (byte* __buffer_native = &buffer)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, __buffer_native, bufferSize);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_ReadLink", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, byte* __buffer_native, int __bufferSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int Rename(global::System.ReadOnlySpan<char> oldPath, global::System.ReadOnlySpan<char> newPath)
{
int __lastError;
byte* __oldPath_native = default;
byte* __newPath_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn __newPath_native__marshaller = new();
scoped global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn __oldPath_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__newPath_native__marshaller.FromManaged(newPath, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
__oldPath_native__marshaller.FromManaged(oldPath, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__newPath_native = __newPath_native__marshaller.ToUnmanaged();
__oldPath_native = __oldPath_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__oldPath_native, __newPath_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__newPath_native__marshaller.Free();
__oldPath_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Rename", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __oldPath_native, byte* __newPath_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int RmDir(string path)
{
int __lastError;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_RmDir", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native);
}
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SchedGetCpu", ExactSpelling = true)]
internal static extern partial int SchedGetCpu();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int FStat(global::System.Runtime.InteropServices.SafeHandle fd, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FStat", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int Stat(string path, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Stat", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int LStat(string path, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LStat", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int Stat(global::System.ReadOnlySpan<char> path, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Stat", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int LStat(global::System.ReadOnlySpan<char> path, out global::Interop.Sys.FileStatus output)
{
int __lastError;
output = default;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.SpanOfCharAsUtf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.FileStatus* __output_native = &output)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, __output_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LStat", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.FileStatus* __output_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int SymLink(string target, string linkPath)
{
int __lastError;
byte* __target_native = default;
byte* __linkPath_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __linkPath_native__marshaller = new();
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __target_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__linkPath_native__marshaller.FromManaged(linkPath, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
__target_native__marshaller.FromManaged(target, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__linkPath_native = __linkPath_native__marshaller.ToUnmanaged();
__target_native = __target_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__target_native, __linkPath_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__linkPath_native__marshaller.Free();
__target_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SymLink", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __target_native, byte* __linkPath_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial long SysConf(global::Interop.Sys.SysConfName name)
{
int __lastError;
long __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(name);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SysConf", ExactSpelling = true)]
static extern unsafe long __PInvoke(global::Interop.Sys.SysConfName __name_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial void SysLog(global::Interop.Sys.SysLogPriority priority, string message, string arg1)
{
byte* __message_native = default;
byte* __arg1_native = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __arg1_native__marshaller = new();
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __message_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__arg1_native__marshaller.FromManaged(arg1, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
__message_native__marshaller.FromManaged(message, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__arg1_native = __arg1_native__marshaller.ToUnmanaged();
__message_native = __message_native__marshaller.ToUnmanaged();
__PInvoke(priority, __message_native, __arg1_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__arg1_native__marshaller.Free();
__message_native__marshaller.Free();
}
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SysLog", ExactSpelling = true)]
static extern unsafe void __PInvoke(global::Interop.Sys.SysLogPriority __priority_native, byte* __message_native, byte* __arg1_native);
}
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial bool CreateThread(nint stackSize, delegate* unmanaged<nint, nint> startAddress, nint parameter)
{
bool __retVal;
int __retVal_native;
{
__retVal_native = __PInvoke(stackSize, startAddress, parameter);
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_CreateThread", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __stackSize_native, delegate* unmanaged<nint, nint> __startAddress_native, nint __parameter_native);
}
}
}
internal static unsafe partial class Interop
{
internal unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_TryGetUInt32OSThreadId", ExactSpelling = true)]
internal static unsafe extern partial uint TryGetUInt32OSThreadId();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int Unlink(string pathname)
{
int __lastError;
byte* __pathname_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __pathname_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__pathname_native__marshaller.FromManaged(pathname, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__pathname_native = __pathname_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__pathname_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__pathname_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Unlink", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __pathname_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int UTimensat(string path, global::Interop.Sys.TimeSpec* times)
{
int __lastError;
byte* __path_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __path_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__path_native__marshaller.FromManaged(path, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__path_native = __path_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__path_native, times);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__path_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_UTimensat", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __path_native, global::Interop.Sys.TimeSpec* __times_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int FUTimens(global::System.Runtime.InteropServices.SafeHandle fd, global::Interop.Sys.TimeSpec* times)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, times);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_FUTimens", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, global::Interop.Sys.TimeSpec* __times_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int Write(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, buffer, bufferSize);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Write", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __bufferSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int Write(nint fd, byte* buffer, int bufferSize)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(fd, buffer, bufferSize);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_Write", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __bufferSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int WriteToNonblocking(global::System.Runtime.InteropServices.SafeHandle fd, byte* buffer, int bufferSize)
{
int __lastError;
nint __fd_native = default;
int __retVal = default;
// Setup - Perform required setup.
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::System.Runtime.InteropServices.SafeHandle>.ManagedToUnmanagedIn __fd_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__fd_native__marshaller.FromManaged(fd);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__fd_native = __fd_native__marshaller.ToUnmanaged();
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(__fd_native, buffer, bufferSize);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__fd_native__marshaller.Free();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_WriteToNonblocking", ExactSpelling = true)]
static extern unsafe int __PInvoke(nint __fd_native, byte* __buffer_native, int __bufferSize_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetEUid", ExactSpelling = true)]
internal static extern partial uint GetEUid();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetEGid", ExactSpelling = true)]
private static extern partial uint GetEGid();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
private static unsafe partial int GetGroups(int ngroups, uint* groups)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(ngroups, groups);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetGroups", ExactSpelling = true)]
static extern unsafe int __PInvoke(int __ngroups_native, uint* __groups_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int GetPwUidR(uint uid, out global::Interop.Sys.Passwd pwd, byte* buf, int bufLen)
{
pwd = default;
int __retVal;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.Passwd* __pwd_native = &pwd)
{
__retVal = __PInvoke(uid, __pwd_native, buf, bufLen);
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPwUidR", ExactSpelling = true)]
static extern unsafe int __PInvoke(uint __uid_native, global::Interop.Sys.Passwd* __pwd_native, byte* __buf_native, int __bufLen_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static unsafe partial int GetPwNamR(string name, out global::Interop.Sys.Passwd pwd, byte* buf, int bufLen)
{
pwd = default;
byte* __name_native = default;
int __retVal = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __name_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__name_native__marshaller.FromManaged(name, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (global::Interop.Sys.Passwd* __pwd_native = &pwd)
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__name_native = __name_native__marshaller.ToUnmanaged();
__retVal = __PInvoke(__name_native, __pwd_native, buf, bufLen);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__name_native__marshaller.Free();
}
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPwNamR", ExactSpelling = true)]
static extern unsafe int __PInvoke(byte* __name_native, global::Interop.Sys.Passwd* __pwd_native, byte* __buf_native, int __bufLen_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPid", ExactSpelling = true)]
internal static extern partial int GetPid();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetSid", ExactSpelling = true)]
internal static extern partial int GetSid(int pid);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial bool InitializeTerminalAndSignalHandling()
{
int __lastError;
bool __retVal;
int __retVal_native;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal_native = __PInvoke();
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_InitializeTerminalAndSignalHandling", ExactSpelling = true)]
static extern unsafe int __PInvoke();
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial void SetKeypadXmit(global::Microsoft.Win32.SafeHandles.SafeFileHandle terminalHandle, string terminfoString)
{
nint __terminalHandle_native = default;
byte* __terminfoString_native = default;
// Setup - Perform required setup.
scoped global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn __terminfoString_native__marshaller = new();
global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.Win32.SafeHandles.SafeFileHandle>.ManagedToUnmanagedIn __terminalHandle_native__marshaller = new();
try
{
// Marshal - Convert managed data to native data.
__terminfoString_native__marshaller.FromManaged(terminfoString, stackalloc byte[global::System.Runtime.InteropServices.Marshalling.Utf8StringMarshaller.ManagedToUnmanagedIn.BufferSize]);
__terminalHandle_native__marshaller.FromManaged(terminalHandle);
{
// PinnedMarshal - Convert managed data to native data that requires the managed data to be pinned.
__terminfoString_native = __terminfoString_native__marshaller.ToUnmanaged();
__terminalHandle_native = __terminalHandle_native__marshaller.ToUnmanaged();
__PInvoke(__terminalHandle_native, __terminfoString_native);
}
}
finally
{
// CleanupCallerAllocated - Perform cleanup of caller allocated resources.
__terminfoString_native__marshaller.Free();
__terminalHandle_native__marshaller.Free();
}
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetKeypadXmit", ExactSpelling = true)]
static extern unsafe void __PInvoke(nint __terminalHandle_native, byte* __terminfoString_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_UninitializeTerminal", ExactSpelling = true)]
internal static extern partial void UninitializeTerminal();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_SetPosixSignalHandler", ExactSpelling = true)]
internal static unsafe extern partial void SetPosixSignalHandler(delegate* unmanaged<int, global::System.Runtime.InteropServices.PosixSignal, int> handler);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial bool EnablePosixSignalHandling(int signal)
{
int __lastError;
bool __retVal;
int __retVal_native;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal_native = __PInvoke(signal);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_EnablePosixSignalHandling", ExactSpelling = true)]
static extern unsafe int __PInvoke(int __signal_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_DisablePosixSignalHandling", ExactSpelling = true)]
internal static extern partial void DisablePosixSignalHandling(int signal);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_HandleNonCanceledPosixSignal", ExactSpelling = true)]
internal static extern partial void HandleNonCanceledPosixSignal(int signal);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPlatformSignalNumber", ExactSpelling = true)]
internal static extern partial int GetPlatformSignalNumber(global::System.Runtime.InteropServices.PosixSignal signal);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_GetPlatformSIGSTOP", ExactSpelling = true)]
internal static extern partial int GetPlatformSIGSTOP();
}
}
namespace System.Runtime.Intrinsics.X86
{
public abstract unsafe partial class X86Base
{
[global::System.Runtime.InteropServices.DllImportAttribute("*", EntryPoint = "X86Base_CpuId", ExactSpelling = true)]
private static unsafe extern partial void CpuId(int* cpuInfo, int functionId, int subFunctionId);
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int LowLevelCrossProcessMutex_Init(void* mutex)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(mutex);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelCrossProcessMutex_Init", ExactSpelling = true)]
static extern unsafe int __PInvoke(void* __mutex_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int LowLevelCrossProcessMutex_Acquire(void* mutex, int timeoutMilliseconds)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(mutex, timeoutMilliseconds);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelCrossProcessMutex_Acquire", ExactSpelling = true)]
static extern unsafe int __PInvoke(void* __mutex_native, int __timeoutMilliseconds_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int LowLevelCrossProcessMutex_Release(void* mutex)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(mutex);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelCrossProcessMutex_Release", ExactSpelling = true)]
static extern unsafe int __PInvoke(void* __mutex_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial int LowLevelCrossProcessMutex_Destroy(void* mutex)
{
int __lastError;
int __retVal;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal = __PInvoke(mutex);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelCrossProcessMutex_Destroy", ExactSpelling = true)]
static extern unsafe int __PInvoke(void* __mutex_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelCrossProcessMutex_Size", ExactSpelling = true)]
internal static extern partial int LowLevelCrossProcessMutex_Size();
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial void LowLevelCrossProcessMutex_GetOwnerProcessAndThreadId(void* mutex, out uint processId, out uint threadId)
{
int __lastError;
processId = default;
threadId = default;
// Pin - Pin data in preparation for calling the P/Invoke.
fixed (uint* __threadId_native = &threadId)
fixed (uint* __processId_native = &processId)
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__PInvoke(mutex, __processId_native, __threadId_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelCrossProcessMutex_GetOwnerProcessAndThreadId", ExactSpelling = true)]
[global::System.Runtime.InteropServices.SuppressGCTransitionAttribute]
static extern unsafe void __PInvoke(void* __mutex_native, uint* __processId_native, uint* __threadId_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial void LowLevelCrossProcessMutex_SetOwnerProcessAndThreadId(void* mutex, uint processId, uint threadId)
{
int __lastError;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__PInvoke(mutex, processId, threadId);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelCrossProcessMutex_SetOwnerProcessAndThreadId", ExactSpelling = true)]
[global::System.Runtime.InteropServices.SuppressGCTransitionAttribute]
static extern unsafe void __PInvoke(void* __mutex_native, uint __processId_native, uint __threadId_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial bool LowLevelCrossProcessMutex_IsAbandoned(void* mutex)
{
int __lastError;
bool __retVal;
byte __retVal_native;
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__retVal_native = __PInvoke(mutex);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
// Unmarshal - Convert native data to managed data.
__retVal = __retVal_native != 0;
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
return __retVal;
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelCrossProcessMutex_IsAbandoned", ExactSpelling = true)]
[global::System.Runtime.InteropServices.SuppressGCTransitionAttribute]
static extern unsafe byte __PInvoke(void* __mutex_native);
}
}
}
internal static unsafe partial class Interop
{
internal static unsafe partial class Sys
{
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.Interop.LibraryImportGenerator", "11.0.14.26904")]
internal static partial void LowLevelCrossProcessMutex_SetAbandoned(void* mutex, bool abandoned)
{
int __lastError;
byte __abandoned_native;
// Marshal - Convert managed data to native data.
__abandoned_native = (byte)(abandoned ? 1 : 0);
{
global::System.Runtime.InteropServices.Marshal.SetLastSystemError(0);
__PInvoke(mutex, __abandoned_native);
__lastError = global::System.Runtime.InteropServices.Marshal.GetLastSystemError();
}
global::System.Runtime.InteropServices.Marshal.SetLastPInvokeError(__lastError);
// Local P/Invoke
[global::System.Runtime.InteropServices.DllImportAttribute("libSystem.Native", EntryPoint = "SystemNative_LowLevelCrossProcessMutex_SetAbandoned", ExactSpelling = true)]
[global::System.Runtime.InteropServices.SuppressGCTransitionAttribute]
static extern unsafe void __PInvoke(void* __mutex_native, byte __abandoned_native);
}
}
}
|