2 instantiations of NativeSafeHandle
Microsoft.AspNetCore.Server.IIS (2)
Core\IISHttpServer.cs (1)
165var safehandle = new NativeSafeHandle(pInProcessHandler);
WebHostBuilderIISExtensions.cs (1)
39services.AddSingleton(new IISNativeApplication(new NativeSafeHandle(iisConfigData.pNativeApplication)));
138 references to NativeSafeHandle
Microsoft.AspNetCore.Server.IIS (138)
_generated\48\LibraryImports.g.cs (56)
57private static partial int http_post_completion(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, int cbBytes) 62global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 92private 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) 97global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 127private static partial void http_indicate_completion(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, global::Microsoft.AspNetCore.Server.IIS.NativeMethods.REQUEST_NOTIFICATION_STATUS notificationStatus) 131global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 160private 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) 165global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessApplication_native__marshaller = new(); 195private 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) 202global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 235private static partial int http_flush_response_bytes(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, bool fMoreData, out bool fCompletionExpected) 243global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 277private static unsafe partial global::Windows.Win32.Networking.HttpServer.HTTP_REQUEST_V2* http_get_raw_request(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 282global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 312private static partial int http_stop_calls_into_managed(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessApplication) 317global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessApplication_native__marshaller = new(); 347private static partial int http_stop_incoming_requests(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessApplication) 352global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessApplication_native__marshaller = new(); 382private static partial int http_disable_buffering(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 387global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 417private static partial int http_set_response_status_code(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, ushort statusCode, string pszReason) 424global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 457private 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) 465global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 523private static partial int http_set_managed_context(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, nint pvManagedContext) 528global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 604private static partial int http_get_server_variable(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, string variableName, out string value) 614global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 657private static partial int http_set_server_variable(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, string variableName, string value) 664global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 699private 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) 707global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 742private 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) 749global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 782private static partial int http_enable_websockets(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 787global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 817private static partial int http_cancel_io(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 822global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 852private static partial int http_close_connection(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 857global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 887private static partial int http_set_close(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 892global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 922private static partial int http_response_set_need_goaway(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler) 927global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 957private 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) 963global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 994private static unsafe partial int http_has_response4(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, out bool isResponse4) 1001global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 1034private static unsafe partial int http_response_set_trailer(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, byte* pszHeaderName, byte* pszHeaderValue, ushort usHeaderValueLength, bool replace) 1040global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 1071private static unsafe partial int http_reset_stream(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, ulong errorCode) 1076global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 1106private 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) 1112global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new(); 1143private static partial int http_get_authentication_information(global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle pInProcessHandler, out string authType, out nint token) 1152global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Microsoft.AspNetCore.Server.IIS.Core.NativeSafeHandle>.ManagedToUnmanagedIn __pInProcessHandler_native__marshaller = new();
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)
42public bool IsWebSocketAvailable(NativeSafeHandle pInProcessHandler) 165var safehandle = new NativeSafeHandle(pInProcessHandler); 298public IISHttpContext CreateHttpContext(NativeSafeHandle pInProcessHandler) 308IISHttpContext 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)
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)