2 instantiations of NativeSafeHandle
Microsoft.AspNetCore.Server.IIS (2)
Core\IISHttpServer.cs (1)
161var safehandle = new NativeSafeHandle(pInProcessHandler);
WebHostBuilderIISExtensions.cs (1)
41services.AddSingleton(new IISNativeApplication(new NativeSafeHandle(iisConfigData.pNativeApplication)));
138 references to NativeSafeHandle
Microsoft.AspNetCore.Server.IIS (138)
Core\IISHttpContext.cs (2)
37protected readonly NativeSafeHandle _requestNativeHandle; 80NativeSafeHandle pInProcessHandler,
Core\IISHttpContextOfT.cs (1)
18public IISHttpContextOfT(MemoryPool<byte> memoryPool, IHttpApplication<TContext> application, NativeSafeHandle pInProcessHandler, IISServerOptions options, IISHttpServer server, ILogger logger, bool useLatin1)
Core\IISHttpServer.cs (4)
41public bool IsWebSocketAvailable(NativeSafeHandle pInProcessHandler) 161var safehandle = new NativeSafeHandle(pInProcessHandler); 294public IISHttpContext CreateHttpContext(NativeSafeHandle pInProcessHandler) 304IISHttpContext CreateHttpContext(NativeSafeHandle pInProcessHandler);
Core\IISNativeApplication.cs (2)
8private readonly NativeSafeHandle _nativeApplication; 12public IISNativeApplication(NativeSafeHandle nativeApplication)
Core\IO\AsyncIOEngine.cs (2)
14private readonly NativeSafeHandle _handler; 25public AsyncIOEngine(IISHttpContext context, NativeSafeHandle handler)
Core\IO\AsyncIOEngine.Flush.cs (2)
14private NativeSafeHandle? _requestHandler; 22public void Initialize(NativeSafeHandle requestHandler, bool moreData)
Core\IO\AsyncIOEngine.Read.cs (2)
17private NativeSafeHandle? _requestHandler; 26public void Initialize(NativeSafeHandle requestHandler, Memory<byte> memory)
Core\IO\AsyncIOEngine.Write.cs (1)
19protected override unsafe int WriteChunks(NativeSafeHandle requestHandler, int chunkCount, HTTP_DATA_CHUNK* dataChunks,
Core\IO\AsyncWriteOperationBase.cs (4)
14private NativeSafeHandle? _requestHandler; 18public void Initialize(NativeSafeHandle requestHandler, ReadOnlySequence<byte> buffer) 97private unsafe int WriteSequence(NativeSafeHandle requestHandler, int nChunks, ReadOnlySequence<byte> buffer, HTTP_DATA_CHUNK* pDataChunks, out bool fCompletionExpected) 122protected abstract unsafe int WriteChunks(NativeSafeHandle requestHandler, int chunkCount, HTTP_DATA_CHUNK* dataChunks, out bool completionExpected);
Core\IO\WebSocketsAsyncIOEngine.cs (2)
13private readonly NativeSafeHandle _handler; 23public WebSocketsAsyncIOEngine(IISHttpContext context, NativeSafeHandle handler)
Core\IO\WebSocketsAsyncIOEngine.Initialize.cs (2)
14private NativeSafeHandle? _requestHandler; 21public void Initialize(NativeSafeHandle requestHandler)
Core\IO\WebSocketsAsyncIOEngine.Read.cs (2)
31private NativeSafeHandle? _requestHandler; 58public void Initialize(NativeSafeHandle requestHandler, Memory<byte> memory)
Core\IO\WebSocketsAsyncIOEngine.Write.cs (1)
35protected override unsafe int WriteChunks(NativeSafeHandle requestHandler, int chunkCount, HTTP_DATA_CHUNK* dataChunks, out bool completionExpected)
Generated\Basic.CompilerLog.Util\Basic.CompilerLog.Util.Impl.BasicGeneratedFilesAnalyzerReference\LibraryImports.g.cs (56)
61private static partial int http_post_completion(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, int cbBytes) 68global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 98private static partial int http_set_completion_status(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS rquestNotificationStatus) 105global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 135private static partial void http_indicate_completion(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS notificationStatus) 141global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 170private static unsafe partial int register_callbacks(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessApplication, delegate* unmanaged<nint, nint, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS> requestCallback, delegate* unmanaged<nint, int> shutdownCallback, delegate* unmanaged<nint, void> disconnectCallback, delegate* unmanaged<nint, int, int, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS> asyncCallback, delegate* unmanaged<nint, void> requestsDrainedHandler, nint pvRequestContext, nint pvShutdownContext) 177global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessApplication_native__marshaller = new(); 207private static unsafe partial int http_write_response_bytes(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, global::Windows.Win32.Networking.HttpServer.HTTP_DATA_CHUNK* pDataChunks, int nChunks, out bool fCompletionExpected) 216global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 248private static partial int http_flush_response_bytes(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, bool fMoreData, out bool fCompletionExpected) 258global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 291private static unsafe partial global::Windows.Win32.Networking.HttpServer.HTTP_REQUEST_V2* http_get_raw_request(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 298global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 328private static partial int http_stop_calls_into_managed(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessApplication) 335global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessApplication_native__marshaller = new(); 365private static partial int http_stop_incoming_requests(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessApplication) 372global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessApplication_native__marshaller = new(); 402private static partial int http_disable_buffering(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 409global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 439private static partial int http_set_response_status_code(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, ushort statusCode, string pszReason) 448global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 481private static unsafe partial int http_read_request_bytes(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, byte* pvBuffer, int cbBuffer, out int dwBytesReceived, out bool fCompletionExpected) 491global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 550private static partial int http_set_managed_context(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, nint pvManagedContext) 557global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 634private static partial int http_get_server_variable(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, string variableName, out string value) 646global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 687private static partial int http_set_server_variable(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, string variableName, string value) 696global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 731private static unsafe partial int http_websockets_read_bytes(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, byte* pvBuffer, int cbBuffer, delegate* unmanaged<nint, nint, nint, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS> pfnCompletionCallback, nint pvCompletionContext, out int dwBytesReceived, out bool fCompletionExpected) 741global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 775private static unsafe partial int http_websockets_write_bytes(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, global::Windows.Win32.Networking.HttpServer.HTTP_DATA_CHUNK* pDataChunks, int nChunks, delegate* unmanaged<nint, nint, nint, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS> pfnCompletionCallback, nint pvCompletionContext, out bool fCompletionExpected) 784global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 816private static partial int http_enable_websockets(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 823global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 853private static partial int http_cancel_io(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 860global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 890private static partial int http_close_connection(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 897global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 927private static partial int http_set_close(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 934global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 964private static partial int http_response_set_need_goaway(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 971global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 1001private static unsafe partial int http_response_set_unknown_header(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, byte* pszHeaderName, byte* pszHeaderValue, ushort usHeaderValueLength, bool fReplace) 1009global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 1040private static unsafe partial int http_has_response4(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, out bool isResponse4) 1049global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 1081private static unsafe partial int http_response_set_trailer(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, byte* pszHeaderName, byte* pszHeaderValue, ushort usHeaderValueLength, bool replace) 1089global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 1120private static unsafe partial int http_reset_stream(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, ulong errorCode) 1127global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 1157private static unsafe partial int http_response_set_known_header(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, int headerId, byte* pHeaderValue, ushort length, bool fReplace) 1165global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 1196private static partial int http_get_authentication_information(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, out string authType, out nint token) 1207global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
NativeMethods.cs (55)
43private static partial int http_post_completion(NativeSafeHandle pInProcessHandler, int cbBytes); 46private static partial int http_set_completion_status(NativeSafeHandle pInProcessHandler, REQUEST_NOTIFICATION_STATUS rquestNotificationStatus); 49private static partial void http_indicate_completion(NativeSafeHandle pInProcessHandler, REQUEST_NOTIFICATION_STATUS notificationStatus); 52private static unsafe partial int register_callbacks(NativeSafeHandle pInProcessApplication, 62private static unsafe partial int http_write_response_bytes(NativeSafeHandle pInProcessHandler, HTTP_DATA_CHUNK* pDataChunks, int nChunks, [MarshalAs(UnmanagedType.Bool)] out bool fCompletionExpected); 65private static partial int http_flush_response_bytes(NativeSafeHandle pInProcessHandler, [MarshalAs(UnmanagedType.Bool)] bool fMoreData, [MarshalAs(UnmanagedType.Bool)] out bool fCompletionExpected); 68private static unsafe partial HTTP_REQUEST_V2* http_get_raw_request(NativeSafeHandle pInProcessHandler); 71private static partial int http_stop_calls_into_managed(NativeSafeHandle pInProcessApplication); 74private static partial int http_stop_incoming_requests(NativeSafeHandle pInProcessApplication); 77private static partial int http_disable_buffering(NativeSafeHandle pInProcessHandler); 80private static partial int http_set_response_status_code(NativeSafeHandle pInProcessHandler, ushort statusCode, [MarshalAs(UnmanagedType.LPStr)] string pszReason); 83private static unsafe partial int http_read_request_bytes(NativeSafeHandle pInProcessHandler, byte* pvBuffer, int cbBuffer, out int dwBytesReceived, [MarshalAs(UnmanagedType.Bool)] out bool fCompletionExpected); 89private static partial int http_set_managed_context(NativeSafeHandle pInProcessHandler, IntPtr pvManagedContext); 108NativeSafeHandle pInProcessHandler, 114NativeSafeHandle pInProcessHandler, 120NativeSafeHandle pInProcessHandler, 130NativeSafeHandle pInProcessHandler, 138private static partial int http_enable_websockets(NativeSafeHandle pInProcessHandler); 141private static partial int http_cancel_io(NativeSafeHandle pInProcessHandler); 144private static partial int http_close_connection(NativeSafeHandle pInProcessHandler); 147private static partial int http_set_close(NativeSafeHandle pInProcessHandler); 150private static partial int http_response_set_need_goaway(NativeSafeHandle pInProcessHandler); 153private static unsafe partial int http_response_set_unknown_header(NativeSafeHandle pInProcessHandler, byte* pszHeaderName, byte* pszHeaderValue, ushort usHeaderValueLength, [MarshalAs(UnmanagedType.Bool)] bool fReplace); 156private static unsafe partial int http_has_response4(NativeSafeHandle pInProcessHandler, [MarshalAs(UnmanagedType.Bool)] out bool isResponse4); 159private static unsafe partial int http_response_set_trailer(NativeSafeHandle pInProcessHandler, byte* pszHeaderName, byte* pszHeaderValue, ushort usHeaderValueLength, [MarshalAs(UnmanagedType.Bool)] bool replace); 162private static unsafe partial int http_reset_stream(NativeSafeHandle pInProcessHandler, ulong errorCode); 165private static unsafe partial int http_response_set_known_header(NativeSafeHandle pInProcessHandler, int headerId, byte* pHeaderValue, ushort length, [MarshalAs(UnmanagedType.Bool)] bool fReplace); 168private static partial int http_get_authentication_information(NativeSafeHandle pInProcessHandler, [MarshalAs(UnmanagedType.BStr)] out string authType, out IntPtr token); 173public static void HttpPostCompletion(NativeSafeHandle pInProcessHandler, int cbBytes) 178public static void HttpSetCompletionStatus(NativeSafeHandle pInProcessHandler, REQUEST_NOTIFICATION_STATUS rquestNotificationStatus) 183public static unsafe void HttpRegisterCallbacks(NativeSafeHandle pInProcessApplication, 195internal static unsafe int HttpWriteResponseBytes(NativeSafeHandle pInProcessHandler, HTTP_DATA_CHUNK* pDataChunks, int nChunks, out bool fCompletionExpected) 200public static int HttpFlushResponseBytes(NativeSafeHandle pInProcessHandler, bool fMoreData, out bool fCompletionExpected) 205internal static unsafe HTTP_REQUEST_V2* HttpGetRawRequest(NativeSafeHandle pInProcessHandler) 210public static void HttpStopCallsIntoManaged(NativeSafeHandle pInProcessApplication) 215public static void HttpStopIncomingRequests(NativeSafeHandle pInProcessApplication) 220public static void HttpDisableBuffering(NativeSafeHandle pInProcessHandler) 225public static void HttpSetResponseStatusCode(NativeSafeHandle pInProcessHandler, ushort statusCode, string pszReason) 230public static unsafe int HttpReadRequestBytes(NativeSafeHandle pInProcessHandler, byte* pvBuffer, int cbBuffer, out int dwBytesReceived, out bool fCompletionExpected) 240public static void HttpSetManagedContext(NativeSafeHandle pInProcessHandler, IntPtr pvManagedContext) 256public static bool HttpTryGetServerVariable(NativeSafeHandle pInProcessHandler, string variableName, out string value) 261public static void HttpSetServerVariable(NativeSafeHandle pInProcessHandler, string variableName, string value) 267NativeSafeHandle pInProcessHandler, 278NativeSafeHandle pInProcessHandler, 288public static void HttpEnableWebsockets(NativeSafeHandle pInProcessHandler) 293public static bool HttpTryCancelIO(NativeSafeHandle pInProcessHandler) 307public static void HttpCloseConnection(NativeSafeHandle pInProcessHandler) 312public static void HttpSetClose(NativeSafeHandle pInProcessHandler) 317public static unsafe void HttpResponseSetUnknownHeader(NativeSafeHandle pInProcessHandler, byte* pszHeaderName, byte* pszHeaderValue, ushort usHeaderValueLength, bool fReplace) 322public static unsafe void HttpResponseSetKnownHeader(NativeSafeHandle pInProcessHandler, int headerId, byte* pHeaderValue, ushort length, bool fReplace) 327internal static void HttpSetNeedGoAway(NativeSafeHandle pInProcessHandler) 332public static void HttpGetAuthenticationInformation(NativeSafeHandle pInProcessHandler, out string authType, out IntPtr token) 345internal static unsafe void HttpResponseSetTrailer(NativeSafeHandle pInProcessHandler, byte* pHeaderName, byte* pHeaderValue, ushort length, bool replace) 350internal static unsafe void HttpResetStream(NativeSafeHandle pInProcessHandler, ulong errorCode) 355internal static unsafe bool HttpHasResponse4(NativeSafeHandle pInProcessHandler)