64 references to NativeMethods
Microsoft.AspNetCore.Server.IIS (64)
Core\IISHttpContext.cs (17)
81: base((HTTP_REQUEST_V1*)NativeMethods.HttpGetRawRequest(pInProcessHandler), useLatin1: useLatin1) 310NativeMethods.HttpSetManagedContext(_requestNativeHandle, (IntPtr)_thisHandle); 414var statusCode = NativeMethods.HttpQueryRequestProperty( 424return statusCode == NativeMethods.HR_OK ? Marshal.PtrToStructure<HTTP_REQUEST_PROPERTY_SNI>((IntPtr)pBuffer) : default; 564NativeMethods.HttpHasResponse4(_requestNativeHandle); 573NativeMethods.HttpSetResponseStatusCode(_requestNativeHandle, (ushort)StatusCode, reasonPhrase); 580NativeMethods.HttpSetNeedGoAway(_requestNativeHandle); 614NativeMethods.HttpResponseSetUnknownHeader(_requestNativeHandle, pHeaderName, pHeaderValue, (ushort)headerValueBytes.Length, fReplace: isFirst); 619NativeMethods.HttpResponseSetKnownHeader(_requestNativeHandle, knownHeaderIndex, pHeaderValue, (ushort)headerValueBytes.Length, fReplace: isFirst); 653NativeMethods.HttpResponseSetTrailer(_requestNativeHandle, pHeaderName, pHeaderValue, (ushort)headerValueBytes.Length, replace: isFirst); 781public void PostCompletion(NativeMethods.REQUEST_NOTIFICATION_STATUS requestNotificationStatus) 783NativeMethods.HttpSetCompletionStatus(_requestNativeHandle, requestNotificationStatus); 784NativeMethods.HttpPostCompletion(_requestNativeHandle, 0); 837NativeMethods.HttpGetAuthenticationInformation(_requestNativeHandle, out var authenticationType, out var token); 890private static NativeMethods.REQUEST_NOTIFICATION_STATUS ConvertRequestCompletionResults(bool success) 892return success ? NativeMethods.REQUEST_NOTIFICATION_STATUS.RQ_NOTIFICATION_CONTINUE 893: NativeMethods.REQUEST_NOTIFICATION_STATUS.RQ_NOTIFICATION_FINISH_REQUEST;
Core\IISHttpContext.FeatureCollection.cs (4)
293return NativeMethods.HttpTryGetServerVariable(_requestNativeHandle, variableName, out var value) ? value : null; 305NativeMethods.HttpSetServerVariable(_requestNativeHandle, variableName, value); 495NativeMethods.HttpResetStream(_requestNativeHandle, (ulong)errorCode); 500NativeMethods.HttpDisableBuffering(_requestNativeHandle);
Core\IISHttpContext.IO.cs (1)
292NativeMethods.HttpCloseConnection(_requestNativeHandle);
Core\IISHttpServer.cs (10)
51_websocketAvailable = NativeMethods.HttpTryGetServerVariable(pInProcessHandler, WebSocketVersionString, out var webSocketsSupported) 72var iisConfigData = NativeMethods.HttpGetApplicationProperties(); 148private static NativeMethods.REQUEST_NOTIFICATION_STATUS HandleRequest(IntPtr pInProcessHandler, IntPtr pvRequestContext) 159return NativeMethods.REQUEST_NOTIFICATION_STATUS.RQ_NOTIFICATION_FINISH_REQUEST; 169return NativeMethods.REQUEST_NOTIFICATION_STATUS.RQ_NOTIFICATION_PENDING; 175return NativeMethods.REQUEST_NOTIFICATION_STATUS.RQ_NOTIFICATION_FINISH_REQUEST; 226private static NativeMethods.REQUEST_NOTIFICATION_STATUS OnAsyncCompletion(IntPtr pvManagedHttpContext, int hr, int bytes) 236return NativeMethods.REQUEST_NOTIFICATION_STATUS.RQ_NOTIFICATION_FINISH_REQUEST; 240return NativeMethods.REQUEST_NOTIFICATION_STATUS.RQ_NOTIFICATION_PENDING; 246return NativeMethods.REQUEST_NOTIFICATION_STATUS.RQ_NOTIFICATION_FINISH_REQUEST;
Core\IISNativeApplication.cs (5)
22NativeMethods.HttpStopIncomingRequests(_nativeApplication); 33NativeMethods.HttpStopCallsIntoManaged(_nativeApplication); 39delegate* unmanaged<IntPtr, IntPtr, NativeMethods.REQUEST_NOTIFICATION_STATUS> requestCallback, 42delegate* unmanaged<IntPtr, int, int, NativeMethods.REQUEST_NOTIFICATION_STATUS> asyncCallback, 47NativeMethods.HttpRegisterCallbacks(
Core\IO\AsyncIOEngine.cs (4)
124ioOperation.Complete(NativeMethods.ERROR_OPERATION_ABORTED, 0); 137NativeMethods.HttpTryCancelIO(_handler); 188nextContinuation = next.Complete(NativeMethods.ERROR_OPERATION_ABORTED, 0); 216NativeMethods.HttpTryCancelIO(_handler);
Core\IO\AsyncIOEngine.Flush.cs (1)
33hr = NativeMethods.HttpFlushResponseBytes(_requestHandler, _moreData, out var fCompletionExpected);
Core\IO\AsyncIOEngine.Read.cs (2)
37hr = NativeMethods.HttpReadRequestBytes( 64protected override bool IsSuccessfulResult(int hr) => hr == NativeMethods.ERROR_HANDLE_EOF;
Core\IO\AsyncIOEngine.Write.cs (1)
22return NativeMethods.HttpWriteResponseBytes(requestHandler, dataChunks, chunkCount, out completionExpected);
Core\IO\AsyncIOOperation.cs (2)
98if (hr != NativeMethods.ERROR_OPERATION_ABORTED) 101if (hr != NativeMethods.HR_OK && !IsSuccessfulResult(hr))
Core\IO\WebSocketsAsyncIOEngine.cs (2)
70NativeMethods.HttpEnableWebsockets(_handler); 122NativeMethods.HttpTryCancelIO(_handler);
Core\IO\WebSocketsAsyncIOEngine.Initialize.cs (1)
29hr = NativeMethods.HttpFlushResponseBytes(_requestHandler, fMoreData: true, out var completionExpected);
Core\IO\WebSocketsAsyncIOEngine.Read.cs (5)
15public static NativeMethods.REQUEST_NOTIFICATION_STATUS ReadCallback(IntPtr httpContext, IntPtr completionInfo, IntPtr completionContext) 19NativeMethods.HttpGetCompletionInfo(completionInfo, out var cbBytes, out var hr); 25return NativeMethods.REQUEST_NOTIFICATION_STATUS.RQ_NOTIFICATION_PENDING; 46hr = NativeMethods.HttpWebsocketsReadBytes( 79protected override bool IsSuccessfulResult(int hr) => hr == NativeMethods.ERROR_HANDLE_EOF;
Core\IO\WebSocketsAsyncIOEngine.Write.cs (4)
14private static NativeMethods.REQUEST_NOTIFICATION_STATUS WriteCallback(IntPtr httpContext, IntPtr completionInfo, IntPtr completionContext) 18NativeMethods.HttpGetCompletionInfo(completionInfo, out var cbBytes, out var hr); 23return NativeMethods.REQUEST_NOTIFICATION_STATUS.RQ_NOTIFICATION_PENDING; 37return NativeMethods.HttpWebsocketsWriteBytes(requestHandler, dataChunks, chunkCount, &WriteCallback, (IntPtr)_thisHandle, out completionExpected);
StartupHook.cs (3)
21if (!NativeMethods.IsAspNetCoreModuleLoaded()) 49var iisConfigData = NativeMethods.HttpGetApplicationProperties(); 69NativeMethods.HttpSetStartupErrorPageContent(content);
WebHostBuilderIISExtensions.cs (2)
28if (OperatingSystem.IsWindows() && NativeMethods.IsAspNetCoreModuleLoaded()) 30var iisConfigData = NativeMethods.HttpGetApplicationProperties();