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