420 references to Interop
System.Net.Http.WinHttpHandler (420)
_generated\0\LibraryImports.g.cs (77)
8public static unsafe partial global::Interop.Crypt32.CERT_CONTEXT* CertEnumCertificatesInStore(nint hCertStore, global::Interop.Crypt32.CERT_CONTEXT* pPrevCertContext) 11global::Interop.Crypt32.CERT_CONTEXT* __retVal; 22static extern unsafe global::Interop.Crypt32.CERT_CONTEXT* __PInvoke(nint __hCertStore_native, global::Interop.Crypt32.CERT_CONTEXT* __pPrevCertContext_native); 59internal static partial bool CertVerifyCertificateChainPolicy(nint pszPolicyOID, global::Microsoft.Win32.SafeHandles.SafeX509ChainHandle pChainContext, ref global::Interop.Crypt32.CERT_CHAIN_POLICY_PARA pPolicyPara, ref global::Interop.Crypt32.CERT_CHAIN_POLICY_STATUS pPolicyStatus) 72fixed (global::Interop.Crypt32.CERT_CHAIN_POLICY_STATUS* __pPolicyStatus_native = &pPolicyStatus) 73fixed (global::Interop.Crypt32.CERT_CHAIN_POLICY_PARA* __pPolicyPara_native = &pPolicyPara) 95static extern unsafe int __PInvoke(nint __pszPolicyOID_native, nint __pChainContext_native, global::Interop.Crypt32.CERT_CHAIN_POLICY_PARA* __pPolicyPara_native, global::Interop.Crypt32.CERT_CHAIN_POLICY_STATUS* __pPolicyStatus_native); 155public static partial global::Interop.WinHttp.SafeWinHttpHandle WinHttpOpen(nint userAgent, uint accessType, string proxyName, string proxyBypass, int flags) 159global::Interop.WinHttp.SafeWinHttpHandle __retVal = default; 162global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new(); 230public static partial global::Interop.WinHttp.SafeWinHttpHandle WinHttpConnect(global::Interop.WinHttp.SafeWinHttpHandle sessionHandle, string serverName, ushort serverPort, uint reserved) 235global::Interop.WinHttp.SafeWinHttpHandle __retVal = default; 238global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new(); 239global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __sessionHandle_native__marshaller = new(); 286public static partial global::Interop.WinHttp.SafeWinHttpHandle WinHttpOpenRequest(global::Interop.WinHttp.SafeWinHttpHandle connectHandle, string verb, string objectName, string version, string referrer, string acceptTypes, uint flags) 291global::Interop.WinHttp.SafeWinHttpHandle __retVal = default; 294global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedOut __retVal_native__marshaller = new(); 295global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __connectHandle_native__marshaller = new(); 346public static partial bool WinHttpAddRequestHeaders(global::Interop.WinHttp.SafeWinHttpHandle requestHandle, global::System.Text.StringBuilder headers, uint headersLength, uint modifiers) 354global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __requestHandle_native__marshaller = new(); 358__headers_native = (void*)global::Interop.WinHttp.SimpleStringBufferMarshaller.ConvertToUnmanaged(headers); 374global::Interop.WinHttp.SimpleStringBufferMarshaller.Free(__headers_native); 392public static partial bool WinHttpAddRequestHeaders(global::Interop.WinHttp.SafeWinHttpHandle requestHandle, string headers, uint headersLength, uint modifiers) 399global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __requestHandle_native__marshaller = new(); 437public static partial bool WinHttpSendRequest(global::Interop.WinHttp.SafeWinHttpHandle requestHandle, nint headers, uint headersLength, nint optional, uint optionalLength, uint totalLength, nint context) 444global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __requestHandle_native__marshaller = new(); 480public static partial bool WinHttpReceiveResponse(global::Interop.WinHttp.SafeWinHttpHandle requestHandle, nint reserved) 487global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __requestHandle_native__marshaller = new(); 523public static partial bool WinHttpQueryDataAvailable(global::Interop.WinHttp.SafeWinHttpHandle requestHandle, nint parameterIgnoredAndShouldBeNullForAsync) 530global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __requestHandle_native__marshaller = new(); 566public static partial bool WinHttpReadData(global::Interop.WinHttp.SafeWinHttpHandle requestHandle, nint buffer, uint bufferSize, nint parameterIgnoredAndShouldBeNullForAsync) 573global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __requestHandle_native__marshaller = new(); 609public static partial bool WinHttpQueryHeaders(global::Interop.WinHttp.SafeWinHttpHandle requestHandle, uint infoLevel, string name, nint buffer, ref uint bufferLength, ref uint index) 616global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __requestHandle_native__marshaller = new(); 656public static partial bool WinHttpQueryHeaders(global::Interop.WinHttp.SafeWinHttpHandle requestHandle, uint infoLevel, string name, ref uint number, ref uint bufferLength, nint index) 663global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __requestHandle_native__marshaller = new(); 703public static partial bool WinHttpQueryOption(global::Interop.WinHttp.SafeWinHttpHandle handle, uint option, ref nint buffer, ref uint bufferSize) 710global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new(); 749public static partial bool WinHttpQueryOption(global::Interop.WinHttp.SafeWinHttpHandle handle, uint option, nint buffer, ref uint bufferSize) 756global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new(); 794public static partial bool WinHttpQueryOption(global::Interop.WinHttp.SafeWinHttpHandle handle, uint option, ref uint buffer, ref uint bufferSize) 801global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new(); 840public static partial bool WinHttpWriteData(global::Interop.WinHttp.SafeWinHttpHandle requestHandle, nint buffer, uint bufferSize, nint parameterIgnoredAndShouldBeNullForAsync) 847global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __requestHandle_native__marshaller = new(); 883public static partial bool WinHttpSetOption(global::Interop.WinHttp.SafeWinHttpHandle handle, uint option, ref uint optionData, uint optionLength) 890global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new(); 928public static partial bool WinHttpSetOption(global::Interop.WinHttp.SafeWinHttpHandle handle, uint option, nint optionData, uint optionLength) 935global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new(); 971public static partial bool WinHttpSetCredentials(global::Interop.WinHttp.SafeWinHttpHandle requestHandle, uint authTargets, uint authScheme, string userName, string password, nint reserved) 978global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __requestHandle_native__marshaller = new(); 1017public static partial bool WinHttpQueryAuthSchemes(global::Interop.WinHttp.SafeWinHttpHandle requestHandle, out uint supportedSchemes, out uint firstScheme, out uint authTarget) 1027global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __requestHandle_native__marshaller = new(); 1067public static partial bool WinHttpSetTimeouts(global::Interop.WinHttp.SafeWinHttpHandle handle, int resolveTimeout, int connectTimeout, int sendTimeout, int receiveTimeout) 1074global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new(); 1110public static partial bool WinHttpGetIEProxyConfigForCurrentUser(out global::Interop.WinHttp.WINHTTP_CURRENT_USER_IE_PROXY_CONFIG proxyConfig) 1117fixed (global::Interop.WinHttp.WINHTTP_CURRENT_USER_IE_PROXY_CONFIG* __proxyConfig_native = &proxyConfig) 1130static extern unsafe int __PInvoke(global::Interop.WinHttp.WINHTTP_CURRENT_USER_IE_PROXY_CONFIG* __proxyConfig_native); 1140public static partial bool WinHttpGetProxyForUrl(global::Interop.WinHttp.SafeWinHttpHandle sessionHandle, string url, ref global::Interop.WinHttp.WINHTTP_AUTOPROXY_OPTIONS autoProxyOptions, out global::Interop.WinHttp.WINHTTP_PROXY_INFO proxyInfo) 1145global::Interop.WinHttp.WINHTTP_AUTOPROXY_OPTIONS.Marshaller.Native __autoProxyOptions_native = default; 1149global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __sessionHandle_native__marshaller = new(); 1153__autoProxyOptions_native = global::Interop.WinHttp.WINHTTP_AUTOPROXY_OPTIONS.Marshaller.ConvertToUnmanaged(autoProxyOptions); 1156fixed (global::Interop.WinHttp.WINHTTP_PROXY_INFO* __proxyInfo_native = &proxyInfo) 1168autoProxyOptions = global::Interop.WinHttp.WINHTTP_AUTOPROXY_OPTIONS.Marshaller.ConvertToManaged(__autoProxyOptions_native); 1173global::Interop.WinHttp.WINHTTP_AUTOPROXY_OPTIONS.Marshaller.Free(__autoProxyOptions_native); 1181static extern unsafe int __PInvoke(nint __sessionHandle_native, ushort* __url_native, global::Interop.WinHttp.WINHTTP_AUTOPROXY_OPTIONS.Marshaller.Native* __autoProxyOptions_native, global::Interop.WinHttp.WINHTTP_PROXY_INFO* __proxyInfo_native); 1191public static partial nint WinHttpSetStatusCallback(global::Interop.WinHttp.SafeWinHttpHandle handle, global::Interop.WinHttp.WINHTTP_STATUS_CALLBACK callback, uint notificationFlags, nint reserved) 1198global::System.Runtime.InteropServices.Marshalling.SafeHandleMarshaller<global::Interop.WinHttp.SafeWinHttpHandle>.ManagedToUnmanagedIn __handle_native__marshaller = new();
src\runtime\src\libraries\Common\src\Interop\Windows\Crypt32\Interop.certificates.cs (2)
13[LibraryImport(Interop.Libraries.Crypt32, SetLastError = true)] 17[LibraryImport(Interop.Libraries.Crypt32, SetLastError = true)]
src\runtime\src\libraries\Common\src\Interop\Windows\SChannel\UnmanagedCertificateContext.IntPtr.cs (5)
20Interop.Crypt32.CERT_CONTEXT context = *(Interop.Crypt32.CERT_CONTEXT*)certContext; 24Interop.Crypt32.CERT_CONTEXT* last = null; 28Interop.Crypt32.CERT_CONTEXT* next = 29Interop.Crypt32.CertEnumCertificatesInStore(context.hCertStore, last);
src\runtime\src\libraries\Common\src\Interop\Windows\WinHttp\Interop.SafeWinHttpHandle.cs (1)
56return Interop.WinHttp.WinHttpCloseHandle(handle);
src\runtime\src\libraries\Common\src\Interop\Windows\WinHttp\Interop.winhttp.cs (24)
15[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 22[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 27[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 34[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 44[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 76[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 84[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 95[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 101[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 107[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 115[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 125[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 135[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 143[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 151[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 159[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 167[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 175[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 183[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 193[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 201[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 210[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 215[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)] 223[LibraryImport(Interop.Libraries.WinHttp, SetLastError = true, StringMarshalling = StringMarshalling.Utf16)]
src\runtime\src\libraries\Common\src\System\Net\Security\CertificateValidation.Windows.cs (14)
42var eppStruct = new Interop.Crypt32.SSL_EXTRA_CERT_CHAIN_POLICY_PARA() 44cbSize = (uint)sizeof(Interop.Crypt32.SSL_EXTRA_CERT_CHAIN_POLICY_PARA), 46dwAuthType = isServer ? Interop.Crypt32.AuthType.AUTHTYPE_CLIENT : Interop.Crypt32.AuthType.AUTHTYPE_SERVER, 51var cppStruct = new Interop.Crypt32.CERT_CHAIN_POLICY_PARA() 53cbSize = (uint)sizeof(Interop.Crypt32.CERT_CHAIN_POLICY_PARA), 62(Interop.Crypt32.CertChainPolicyIgnoreFlags.CERT_CHAIN_POLICY_IGNORE_ALL & 63~Interop.Crypt32.CertChainPolicyIgnoreFlags.CERT_CHAIN_POLICY_IGNORE_INVALID_NAME_FLAG); 67if (status == Interop.Crypt32.CertChainPolicyErrors.CERT_E_CN_NO_MATCH) 83private static unsafe uint Verify(SafeX509ChainHandle chainContext, ref Interop.Crypt32.CERT_CHAIN_POLICY_PARA cpp) 85Interop.Crypt32.CERT_CHAIN_POLICY_STATUS status = default; 86status.cbSize = (uint)sizeof(Interop.Crypt32.CERT_CHAIN_POLICY_STATUS); 89Interop.Crypt32.CertVerifyCertificateChainPolicy( 90(IntPtr)Interop.Crypt32.CertChainPolicy.CERT_CHAIN_POLICY_SSL,
System\Net\Http\WinHttpAuthHelper.cs (27)
6using SafeWinHttpHandle = Interop.WinHttp.SafeWinHttpHandle; 40Interop.WinHttp.WINHTTP_AUTH_SCHEME_NEGOTIATE, 41Interop.WinHttp.WINHTTP_AUTH_SCHEME_NTLM, 42Interop.WinHttp.WINHTTP_AUTH_SCHEME_DIGEST, 43Interop.WinHttp.WINHTTP_AUTH_SCHEME_BASIC 67Interop.WinHttp.WINHTTP_QUERY_STATUS_CODE); 86if (!Interop.WinHttp.WinHttpQueryAuthSchemes( 99Debug.Assert(authTarget == Interop.WinHttp.WINHTTP_AUTH_TARGET_SERVER); 139if (!Interop.WinHttp.WinHttpQueryAuthSchemes( 152Debug.Assert(authTarget == Interop.WinHttp.WINHTTP_AUTH_TARGET_PROXY); 210Interop.WinHttp.WINHTTP_AUTH_TARGET_PROXY); 228Interop.WinHttp.WINHTTP_AUTH_TARGET_SERVER); 293Debug.Assert(authTarget == Interop.WinHttp.WINHTTP_AUTH_TARGET_PROXY || 294authTarget == Interop.WinHttp.WINHTTP_AUTH_TARGET_SERVER); 297(authTarget == Interop.WinHttp.WINHTTP_AUTH_TARGET_PROXY ? 298Interop.WinHttp.WINHTTP_AUTOLOGON_SECURITY_LEVEL_MEDIUM : 299Interop.WinHttp.WINHTTP_AUTOLOGON_SECURITY_LEVEL_LOW) : 300Interop.WinHttp.WINHTTP_AUTOLOGON_SECURITY_LEVEL_HIGH; 302if (!Interop.WinHttp.WinHttpSetOption( 304Interop.WinHttp.WINHTTP_OPTION_AUTOLOGON_POLICY, 307WinHttpException.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpSetOption)); 323Debug.Assert(authTarget == Interop.WinHttp.WINHTTP_AUTH_TARGET_PROXY || 324authTarget == Interop.WinHttp.WINHTTP_AUTH_TARGET_SERVER); 339if (authScheme == Interop.WinHttp.WINHTTP_AUTH_SCHEME_NEGOTIATE || 340authScheme == Interop.WinHttp.WINHTTP_AUTH_SCHEME_NTLM) 370if (!Interop.WinHttp.WinHttpSetCredentials( 378WinHttpException.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpSetCredentials));
System\Net\Http\WinHttpChannelBinding.cs (6)
8using SafeWinHttpHandle = Interop.WinHttp.SafeWinHttpHandle; 21if (!Interop.WinHttp.WinHttpQueryOption(requestHandle, Interop.WinHttp.WINHTTP_OPTION_SERVER_CBT, IntPtr.Zero, ref dataSize)) 23if (Marshal.GetLastWin32Error() == Interop.WinHttp.ERROR_INSUFFICIENT_BUFFER) 27if (Interop.WinHttp.WinHttpQueryOption(requestHandle, Interop.WinHttp.WINHTTP_OPTION_SERVER_CBT, data, ref dataSize))
System\Net\Http\WinHttpCookieContainerAdapter.cs (9)
8using SafeWinHttpHandle = Interop.WinHttp.SafeWinHttpHandle; 34requestHandle, Interop.WinHttp.WINHTTP_QUERY_SET_COOKIE, ref buffer, ref index, out cookieHeader)) 59if (!Interop.WinHttp.WinHttpAddRequestHeaders( 63Interop.WinHttp.WINHTTP_ADDREQ_FLAG_REPLACE)) 66if (lastError != Interop.WinHttp.ERROR_WINHTTP_HEADER_NOT_FOUND) 68throw WinHttpException.CreateExceptionUsingError(lastError, nameof(Interop.WinHttp.WinHttpAddRequestHeaders)); 77if (!Interop.WinHttp.WinHttpAddRequestHeaders( 81Interop.WinHttp.WINHTTP_ADDREQ_FLAG_ADD)) 83throw WinHttpException.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpAddRequestHeaders));
System\Net\Http\WinHttpException.cs (6)
42Interop.WinHttp.ERROR_WINHTTP_CONNECTION_ERROR => unchecked((int)Interop.WinHttp.WININET_E_CONNECTION_RESET), 45_ => Interop.HRESULT_FROM_WIN32(error), 79IntPtr moduleHandle = Interop.Kernel32.GetModuleHandle(Interop.Libraries.WinHttp); 80string httpError = Interop.Kernel32.GetMessage(error, moduleHandle);
System\Net\Http\WinHttpHandler.cs (107)
19using SafeWinHttpHandle = Interop.WinHttp.SafeWinHttpHandle; 762if (!Interop.WinHttp.WinHttpAddRequestHeaders( 766Interop.WinHttp.WINHTTP_ADDREQ_FLAG_ADD)) 768throw WinHttpException.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpAddRequestHeaders)); 810accessType = Interop.WinHttp.WINHTTP_ACCESS_TYPE_NO_PROXY; 815accessType = Interop.WinHttp.WINHTTP_ACCESS_TYPE_DEFAULT_PROXY; 820accessType = Interop.WinHttp.WINHTTP_ACCESS_TYPE_AUTOMATIC_PROXY; 825sessionHandle = Interop.WinHttp.WinHttpOpen( 828Interop.WinHttp.WINHTTP_NO_PROXY_NAME, 829Interop.WinHttp.WINHTTP_NO_PROXY_BYPASS, 830(int)Interop.WinHttp.WINHTTP_FLAG_ASYNC); 831ThrowOnInvalidHandle(sessionHandle, nameof(Interop.WinHttp.WinHttpOpen)); 835if (!Interop.WinHttp.WinHttpSetOption( 837Interop.WinHttp.WINHTTP_OPTION_ASSURED_NON_BLOCKING_CALLBACKS, 844if (lastError != Interop.WinHttp.ERROR_WINHTTP_INVALID_OPTION) 846throw WinHttpException.CreateExceptionUsingError(lastError, nameof(Interop.WinHttp.WinHttpSetOption)); 888connectHandle = Interop.WinHttp.WinHttpConnect( 893ThrowOnInvalidHandle(connectHandle, nameof(Interop.WinHttp.WinHttpConnect)); 1004SetWinHttpOption(state.RequestHandle, Interop.WinHttp.WINHTTP_OPTION_RECEIVE_TIMEOUT, ref optionData); 1048requestHandle = Interop.WinHttp.WinHttpOpenRequest( 1053Interop.WinHttp.WINHTTP_NO_REFERER, 1054Interop.WinHttp.WINHTTP_DEFAULT_ACCEPT_TYPES, 1063if (lastError != Interop.WinHttp.ERROR_INVALID_PARAMETER || chunkedModeForSend != WinHttpChunkMode.Automatic) 1065ThrowOnInvalidHandle(requestHandle, nameof(Interop.WinHttp.WinHttpOpenRequest)); 1073requestHandle = Interop.WinHttp.WinHttpOpenRequest( 1078Interop.WinHttp.WINHTTP_NO_REFERER, 1079Interop.WinHttp.WINHTTP_DEFAULT_ACCEPT_TYPES, 1082ThrowOnInvalidHandle(requestHandle, nameof(Interop.WinHttp.WinHttpOpenRequest)); 1090uint flags = Interop.WinHttp.WINHTTP_FLAG_ESCAPE_DISABLE; 1093flags |= Interop.WinHttp.WINHTTP_FLAG_SECURE; 1097flags |= Interop.WinHttp.WINHTTP_FLAG_AUTOMATIC_CHUNKING; 1118var tcpKeepalive = new Interop.WinHttp.tcp_keepalive 1131Interop.WinHttp.WINHTTP_OPTION_TCP_KEEPALIVE, 1133(uint)sizeof(Interop.WinHttp.tcp_keepalive)); 1148if (!Interop.WinHttp.WinHttpSetOption(sessionHandle, Interop.WinHttp.WINHTTP_OPTION_REQUIRE_STREAM_END, ref optionData)) 1161SetWinHttpOption(sessionHandle, Interop.WinHttp.WINHTTP_OPTION_MAX_CONNS_PER_SERVER, ref optionData); 1162SetWinHttpOption(sessionHandle, Interop.WinHttp.WINHTTP_OPTION_MAX_CONNS_PER_1_0_SERVER, ref optionData); 1178optionData |= Interop.WinHttp.WINHTTP_FLAG_SECURE_PROTOCOL_SSL2; 1183optionData |= Interop.WinHttp.WINHTTP_FLAG_SECURE_PROTOCOL_SSL3; 1190optionData |= Interop.WinHttp.WINHTTP_FLAG_SECURE_PROTOCOL_TLS1; 1195optionData |= Interop.WinHttp.WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_1; 1201optionData |= Interop.WinHttp.WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2; 1207optionData |= Interop.WinHttp.WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3; 1214unchecked((int)Interop.WinHttp.ERROR_INVALID_PARAMETER), 1218SetWinHttpOption(sessionHandle, Interop.WinHttp.WINHTTP_OPTION_SECURE_PROTOCOLS, ref optionData); 1226using (SafeWinHttpHandle sessionHandle = Interop.WinHttp.WinHttpOpen( 1228Interop.WinHttp.WINHTTP_ACCESS_TYPE_NO_PROXY, 1229Interop.WinHttp.WINHTTP_NO_PROXY_NAME, 1230Interop.WinHttp.WINHTTP_NO_PROXY_BYPASS, 1231(int)Interop.WinHttp.WINHTTP_FLAG_ASYNC)) 1233uint optionData = Interop.WinHttp.WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_3; 1235handler.SetWinHttpOption(sessionHandle, Interop.WinHttp.WINHTTP_OPTION_SECURE_PROTOCOLS, ref optionData); 1247if (!Interop.WinHttp.WinHttpSetTimeouts( 1254WinHttpException.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpSetTimeouts)); 1285Interop.WinHttp.WINHTTP_PROXY_INFO proxyInfo = default; 1298proxyInfo.AccessType = Interop.WinHttp.WINHTTP_ACCESS_TYPE_NO_PROXY; 1302proxyInfo.AccessType = Interop.WinHttp.WINHTTP_ACCESS_TYPE_NAMED_PROXY; 1316Interop.WinHttp.WINHTTP_OPTION_PROXY, 1342optionData |= Interop.WinHttp.WINHTTP_DECOMPRESSION_FLAG_GZIP; 1347optionData |= Interop.WinHttp.WINHTTP_DECOMPRESSION_FLAG_DEFLATE; 1350SetWinHttpOption(requestHandle, Interop.WinHttp.WINHTTP_OPTION_DECOMPRESSION, ref optionData); 1363Interop.WinHttp.WINHTTP_OPTION_MAX_HTTP_AUTOMATIC_REDIRECTS, 1368Interop.WinHttp.WINHTTP_OPTION_REDIRECT_POLICY_DISALLOW_HTTPS_TO_HTTP : 1369Interop.WinHttp.WINHTTP_OPTION_REDIRECT_POLICY_NEVER; 1370SetWinHttpOption(requestHandle, Interop.WinHttp.WINHTTP_OPTION_REDIRECT_POLICY, ref optionData); 1378uint optionData = Interop.WinHttp.WINHTTP_DISABLE_COOKIES; 1379SetWinHttpOption(requestHandle, Interop.WinHttp.WINHTTP_OPTION_DISABLE_FEATURE, ref optionData); 1392Interop.WinHttp.SECURITY_FLAG_IGNORE_UNKNOWN_CA | 1393Interop.WinHttp.SECURITY_FLAG_IGNORE_CERT_WRONG_USAGE | 1394Interop.WinHttp.SECURITY_FLAG_IGNORE_CERT_CN_INVALID | 1395Interop.WinHttp.SECURITY_FLAG_IGNORE_CERT_DATE_INVALID; 1396SetWinHttpOption(requestHandle, Interop.WinHttp.WINHTTP_OPTION_SECURITY_FLAGS, ref optionData); 1401optionData = Interop.WinHttp.WINHTTP_ENABLE_SSL_REVOCATION; 1402SetWinHttpOption(requestHandle, Interop.WinHttp.WINHTTP_OPTION_ENABLE_FEATURE, ref optionData); 1427Interop.WinHttp.WINHTTP_OPTION_CLIENT_CERT_CONTEXT, 1429(uint)Marshal.SizeOf<Interop.Crypt32.CERT_CONTEXT>()); 1448uint optionData = Interop.WinHttp.WINHTTP_HTTP2_PLUS_CLIENT_CERT_FLAG; 1449if (Interop.WinHttp.WinHttpSetOption( 1451Interop.WinHttp.WINHTTP_OPTION_ENABLE_HTTP2_PLUS_CLIENT_CERT, 1467if (Interop.WinHttp.WinHttpSetOption(sessionHandle, Interop.WinHttp.WINHTTP_OPTION_DISABLE_STREAM_QUEUE, ref optionData)) 1482Interop.WinHttp.WINHTTP_OPTION_CLIENT_CERT_CONTEXT, 1500Interop.WinHttp.WINHTTP_AUTH_TARGET_SERVER, 1507SetWinHttpOption(requestHandle, Interop.WinHttp.WINHTTP_OPTION_MAX_RESPONSE_HEADER_SIZE, ref optionData); 1509SetWinHttpOption(requestHandle, Interop.WinHttp.WINHTTP_OPTION_MAX_RESPONSE_DRAIN_SIZE, ref optionData); 1515uint optionData = (requestVersion == HttpVersion20) ? Interop.WinHttp.WINHTTP_PROTOCOL_FLAG_HTTP2 : 0; 1516if (Interop.WinHttp.WinHttpSetOption( 1518Interop.WinHttp.WINHTTP_OPTION_ENABLE_HTTP_PROTOCOL, 1532if (!Interop.WinHttp.WinHttpSetOption( 1537WinHttpException.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpSetOption)); 1548if (!Interop.WinHttp.WinHttpSetOption( 1554WinHttpException.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpSetOption)); 1614Interop.WinHttp.WINHTTP_STATUS_CALLBACK callback) 1617Interop.WinHttp.WINHTTP_CALLBACK_FLAG_ALL_COMPLETIONS | 1618Interop.WinHttp.WINHTTP_CALLBACK_FLAG_HANDLES | 1619Interop.WinHttp.WINHTTP_CALLBACK_FLAG_REDIRECT | 1620Interop.WinHttp.WINHTTP_CALLBACK_FLAG_SEND_REQUEST | 1621Interop.WinHttp.WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER; 1623IntPtr oldCallback = Interop.WinHttp.WinHttpSetStatusCallback( 1629if (oldCallback == new IntPtr(Interop.WinHttp.WINHTTP_INVALID_STATUS_CALLBACK)) 1632if (lastError != Interop.WinHttp.ERROR_INVALID_HANDLE) // Ignore error if handle was already closed. 1634throw WinHttpException.CreateExceptionUsingError(lastError, nameof(Interop.WinHttp.WinHttpSetStatusCallback)); 1659if (!Interop.WinHttp.WinHttpSendRequest( 1674WinHttpException.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpSendRequest)); 1699if (!Interop.WinHttp.WinHttpReceiveResponse(state.RequestHandle, IntPtr.Zero)) 1701throw WinHttpException.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpReceiveResponse));
System\Net\Http\WinHttpRequestCallback.cs (42)
16using SafeWinHttpHandle = Interop.WinHttp.SafeWinHttpHandle; 27public static Interop.WinHttp.WINHTTP_STATUS_CALLBACK StaticCallbackDelegate = 28new Interop.WinHttp.WINHTTP_STATUS_CALLBACK(WinHttpCallback); 66case Interop.WinHttp.WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER: 74case Interop.WinHttp.WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING: 78case Interop.WinHttp.WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE: 82case Interop.WinHttp.WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE: 88case Interop.WinHttp.WINHTTP_CALLBACK_STATUS_READ_COMPLETE: 92case Interop.WinHttp.WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE: 96case Interop.WinHttp.WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE: 100case Interop.WinHttp.WINHTTP_CALLBACK_STATUS_REDIRECT: 105case Interop.WinHttp.WINHTTP_CALLBACK_STATUS_SENDING_REQUEST: 109case Interop.WinHttp.WINHTTP_CALLBACK_STATUS_REQUEST_ERROR: 111statusInformationLength == Marshal.SizeOf<Interop.WinHttp.WINHTTP_ASYNC_RESULT>(), 113" must be sizeof(WINHTTP_ASYNC_RESULT)=" + Marshal.SizeOf<Interop.WinHttp.WINHTTP_ASYNC_RESULT>()); 115var asyncResult = Marshal.PtrToStructure<Interop.WinHttp.WINHTTP_ASYNC_RESULT>(statusInformation); 284if (!Interop.WinHttp.WinHttpQueryOption( 286Interop.WinHttp.WINHTTP_OPTION_SERVER_CERT_CONTEXT, 293if (lastError == Interop.WinHttp.ERROR_WINHTTP_INCORRECT_HANDLE_STATE) 312Interop.Crypt32.CertFreeCertificateContext(certHandle); 319Interop.WinHttp.WINHTTP_CONNECTION_INFO connectionInfo; 320Interop.WinHttp.WINHTTP_CONNECTION_INFO* pConnectionInfo = &connectionInfo; 321uint infoSize = (uint)sizeof(Interop.WinHttp.WINHTTP_CONNECTION_INFO); 322if (Interop.WinHttp.WinHttpQueryOption( 325Interop.WinHttp.WINHTTP_OPTION_CONNECTION_INFO, 422(int)Interop.WinHttp.ERROR_WINHTTP_SECURE_FAILURE, "X509Chain.Build", ex); 433(int)Interop.WinHttp.ERROR_WINHTTP_SECURE_FAILURE, "ServerCertificateValidationCallback"); 438private static void OnRequestError(WinHttpRequestState state, Interop.WinHttp.WINHTTP_ASYNC_RESULT asyncResult) 448case Interop.WinHttp.API_SEND_REQUEST: 452case Interop.WinHttp.API_RECEIVE_RESPONSE: 453if (asyncResult.dwError == Interop.WinHttp.ERROR_WINHTTP_RESEND_REQUEST) 458else if (asyncResult.dwError == Interop.WinHttp.ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED) 470else if (asyncResult.dwError == Interop.WinHttp.ERROR_WINHTTP_OPERATION_CANCELLED) 480case Interop.WinHttp.API_QUERY_DATA_AVAILABLE: 481if (asyncResult.dwError == Interop.WinHttp.ERROR_WINHTTP_OPERATION_CANCELLED) 493case Interop.WinHttp.API_READ_DATA: 494if (asyncResult.dwError == Interop.WinHttp.ERROR_WINHTTP_OPERATION_CANCELLED) 505case Interop.WinHttp.API_WRITE_DATA: 507if (asyncResult.dwError == Interop.WinHttp.ERROR_WINHTTP_OPERATION_CANCELLED) 534if (!Interop.WinHttp.WinHttpAddRequestHeaders( 538Interop.WinHttp.WINHTTP_ADDREQ_FLAG_REPLACE)) 541if (lastError != Interop.WinHttp.ERROR_WINHTTP_HEADER_NOT_FOUND)
System\Net\Http\WinHttpRequestState.cs (1)
13using SafeWinHttpHandle = Interop.WinHttp.SafeWinHttpHandle;
System\Net\Http\WinHttpRequestStream.cs (5)
11using SafeWinHttpHandle = Interop.WinHttp.SafeWinHttpHandle; 230if (!Interop.WinHttp.WinHttpWriteData( 237new IOException(SR.net_http_io_write, WinHttpException.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpWriteData)))); 251if (!Interop.WinHttp.WinHttpWriteData( 258new IOException(SR.net_http_io_write, WinHttpException.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpWriteData))));
System\Net\Http\WinHttpResponseParser.cs (29)
12using SafeWinHttpHandle = Interop.WinHttp.SafeWinHttpHandle; 43int versionLength = GetResponseHeader(requestHandle, Interop.WinHttp.WINHTTP_QUERY_VERSION, buffer); 53Interop.WinHttp.WINHTTP_QUERY_STATUS_CODE); 55int reasonPhraseLength = GetResponseHeader(requestHandle, Interop.WinHttp.WINHTTP_QUERY_STATUS_TEXT, buffer); 90if (!Interop.WinHttp.WinHttpQueryHeaders( 92infoLevel | Interop.WinHttp.WINHTTP_QUERY_FLAG_NUMBER, 93Interop.WinHttp.WINHTTP_HEADER_NAME_BY_INDEX, 98WinHttpException.ThrowExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpQueryHeaders)); 143if (lastError == Interop.WinHttp.ERROR_WINHTTP_HEADER_NOT_FOUND) 149if (lastError == Interop.WinHttp.ERROR_INSUFFICIENT_BUFFER) 169throw WinHttpException.CreateExceptionUsingError(lastError, nameof(Interop.WinHttp.WinHttpQueryHeaders)); 189if (lastError == Interop.WinHttp.ERROR_WINHTTP_HEADER_NOT_FOUND) 194Debug.Assert(lastError != Interop.WinHttp.ERROR_INSUFFICIENT_BUFFER, "buffer must be of sufficient size."); 196throw WinHttpException.CreateExceptionUsingError(lastError, nameof(Interop.WinHttp.WinHttpQueryHeaders)); 212uint infoLevel = Interop.WinHttp.WINHTTP_QUERY_RAW_HEADERS_CRLF; 215infoLevel |= Interop.WinHttp.WINHTTP_QUERY_FLAG_TRAILERS; 222Debug.Assert(isTrailingHeaders || lastError != Interop.WinHttp.ERROR_WINHTTP_HEADER_NOT_FOUND); 224if (lastError != Interop.WinHttp.ERROR_INSUFFICIENT_BUFFER && 225(!isTrailingHeaders || lastError != Interop.WinHttp.ERROR_WINHTTP_HEADER_NOT_FOUND)) 227throw WinHttpException.CreateExceptionUsingError(lastError, nameof(Interop.WinHttp.WinHttpQueryHeaders)); 248bool result = Interop.WinHttp.WinHttpQueryHeaders( 251Interop.WinHttp.WINHTTP_HEADER_NAME_BY_INDEX, 287Interop.WinHttp.WINHTTP_QUERY_RAW_HEADERS_CRLF, 327Interop.WinHttp.WINHTTP_QUERY_RAW_HEADERS_CRLF | Interop.WinHttp.WINHTTP_QUERY_FLAG_TRAILERS, 344if (Interop.WinHttp.WinHttpQueryOption( 346Interop.WinHttp.WINHTTP_OPTION_HTTP_PROTOCOL_USED, 350if ((data & Interop.WinHttp.WINHTTP_PROTOCOL_FLAG_HTTP2) != 0) 352if (NetEventSource.Log.IsEnabled()) NetEventSource.Info(requestHandle, nameof(Interop.WinHttp.WINHTTP_PROTOCOL_FLAG_HTTP2));
System\Net\Http\WinHttpResponseStream.cs (9)
11using SafeWinHttpHandle = Interop.WinHttp.SafeWinHttpHandle; 124if (!Interop.WinHttp.WinHttpQueryDataAvailable(_requestHandle, IntPtr.Zero)) 126throw new IOException(SR.net_http_io_read, WinHttpException.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpQueryDataAvailable))); 141if (!Interop.WinHttp.WinHttpReadData(_requestHandle, Marshal.UnsafeAddrOfPinnedArrayElement(buffer, 0), (uint)Math.Min(bytesAvailable, buffer.Length), IntPtr.Zero)) 143throw new IOException(SR.net_http_io_read, WinHttpException.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpReadData))); 225if (!Interop.WinHttp.WinHttpQueryDataAvailable(_requestHandle, IntPtr.Zero)) 227throw new IOException(SR.net_http_io_read, WinHttpException.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpQueryDataAvailable))); 236if (!Interop.WinHttp.WinHttpReadData( 242throw new IOException(SR.net_http_io_read, WinHttpException.CreateExceptionUsingLastError(nameof(Interop.WinHttp.WinHttpReadData)));
System\Net\Http\WinHttpTraceHelper.cs (46)
22public static void TraceAsyncError(object thisOrContextObject, Interop.WinHttp.WINHTTP_ASYNC_RESULT asyncResult, [CallerMemberName] string? memberName = null) 38Interop.WinHttp.API_RECEIVE_RESPONSE => "API_RECEIVE_RESPONSE", 39Interop.WinHttp.API_QUERY_DATA_AVAILABLE => "API_QUERY_DATA_AVAILABLE", 40Interop.WinHttp.API_READ_DATA => "API_READ_DATA", 41Interop.WinHttp.API_WRITE_DATA => "API_WRITE_DATA", 42Interop.WinHttp.API_SEND_REQUEST => "API_SEND_REQUEST", 49Interop.WinHttp.ERROR_FILE_NOT_FOUND => "ERROR_FILE_NOT_FOUND", 50Interop.WinHttp.ERROR_INVALID_HANDLE => "ERROR_INVALID_HANDLE", 51Interop.WinHttp.ERROR_INVALID_PARAMETER => "ERROR_INVALID_PARAMETER", 52Interop.WinHttp.ERROR_INSUFFICIENT_BUFFER => "ERROR_INSUFFICIENT_BUFFER", 53Interop.WinHttp.ERROR_NOT_FOUND => "ERROR_NOT_FOUND", 54Interop.WinHttp.ERROR_WINHTTP_INVALID_OPTION => "WINHTTP_INVALID_OPTION", 55Interop.WinHttp.ERROR_WINHTTP_LOGIN_FAILURE => "WINHTTP_LOGIN_FAILURE", 56Interop.WinHttp.ERROR_WINHTTP_OPERATION_CANCELLED => "WINHTTP_OPERATION_CANCELLED", 57Interop.WinHttp.ERROR_WINHTTP_INCORRECT_HANDLE_STATE => "WINHTTP_INCORRECT_HANDLE_STATE", 58Interop.WinHttp.ERROR_WINHTTP_CONNECTION_ERROR => "WINHTTP_CONNECTION_ERROR", 59Interop.WinHttp.ERROR_WINHTTP_RESEND_REQUEST => "WINHTTP_RESEND_REQUEST", 60Interop.WinHttp.ERROR_WINHTTP_CLIENT_AUTH_CERT_NEEDED => "WINHTTP_CLIENT_AUTH_CERT_NEEDED", 61Interop.WinHttp.ERROR_WINHTTP_HEADER_NOT_FOUND => "WINHTTP_HEADER_NOT_FOUND", 62Interop.WinHttp.ERROR_WINHTTP_SECURE_FAILURE => "WINHTTP_SECURE_FAILURE", 63Interop.WinHttp.ERROR_WINHTTP_AUTODETECTION_FAILED => "WINHTTP_AUTODETECTION_FAILED", 70Interop.WinHttp.WINHTTP_CALLBACK_STATUS_RESOLVING_NAME => "STATUS_RESOLVING_NAME", 71Interop.WinHttp.WINHTTP_CALLBACK_STATUS_NAME_RESOLVED => "STATUS_NAME_RESOLVED", 72Interop.WinHttp.WINHTTP_CALLBACK_STATUS_CONNECTING_TO_SERVER => "STATUS_CONNECTING_TO_SERVER", 73Interop.WinHttp.WINHTTP_CALLBACK_STATUS_CONNECTED_TO_SERVER => "STATUS_CONNECTED_TO_SERVER", 74Interop.WinHttp.WINHTTP_CALLBACK_STATUS_SENDING_REQUEST => "STATUS_SENDING_REQUEST", 75Interop.WinHttp.WINHTTP_CALLBACK_STATUS_REQUEST_SENT => "STATUS_REQUEST_SENT", 76Interop.WinHttp.WINHTTP_CALLBACK_STATUS_RECEIVING_RESPONSE => "STATUS_RECEIVING_RESPONSE", 77Interop.WinHttp.WINHTTP_CALLBACK_STATUS_RESPONSE_RECEIVED => "STATUS_RESPONSE_RECEIVED", 78Interop.WinHttp.WINHTTP_CALLBACK_STATUS_CLOSING_CONNECTION => "STATUS_CLOSING_CONNECTION", 79Interop.WinHttp.WINHTTP_CALLBACK_STATUS_CONNECTION_CLOSED => "STATUS_CONNECTION_CLOSED", 80Interop.WinHttp.WINHTTP_CALLBACK_STATUS_HANDLE_CREATED => "STATUS_HANDLE_CREATED", 81Interop.WinHttp.WINHTTP_CALLBACK_STATUS_HANDLE_CLOSING => "STATUS_HANDLE_CLOSING", 82Interop.WinHttp.WINHTTP_CALLBACK_STATUS_DETECTING_PROXY => "STATUS_DETECTING_PROXY", 83Interop.WinHttp.WINHTTP_CALLBACK_STATUS_REDIRECT => "STATUS_REDIRECT", 84Interop.WinHttp.WINHTTP_CALLBACK_STATUS_INTERMEDIATE_RESPONSE => "STATUS_INTERMEDIATE_RESPONSE", 85Interop.WinHttp.WINHTTP_CALLBACK_STATUS_SECURE_FAILURE => "STATUS_SECURE_FAILURE", 86Interop.WinHttp.WINHTTP_CALLBACK_STATUS_HEADERS_AVAILABLE => "STATUS_HEADERS_AVAILABLE", 87Interop.WinHttp.WINHTTP_CALLBACK_STATUS_DATA_AVAILABLE => "STATUS_DATA_AVAILABLE", 88Interop.WinHttp.WINHTTP_CALLBACK_STATUS_READ_COMPLETE => "STATUS_READ_COMPLETE", 89Interop.WinHttp.WINHTTP_CALLBACK_STATUS_WRITE_COMPLETE => "STATUS_WRITE_COMPLETE", 90Interop.WinHttp.WINHTTP_CALLBACK_STATUS_REQUEST_ERROR => "STATUS_REQUEST_ERROR", 91Interop.WinHttp.WINHTTP_CALLBACK_STATUS_SENDREQUEST_COMPLETE => "STATUS_SENDREQUEST_COMPLETE", 92Interop.WinHttp.WINHTTP_CALLBACK_STATUS_GETPROXYFORURL_COMPLETE => "STATUS_GETPROXYFORURL_COMPLETE", 93Interop.WinHttp.WINHTTP_CALLBACK_STATUS_CLOSE_COMPLETE => "STATUS_CLOSE_COMPLETE", 94Interop.WinHttp.WINHTTP_CALLBACK_STATUS_SHUTDOWN_COMPLETE => "STATUS_SHUTDOWN_COMPLETE",
System\Net\Http\WinHttpTrailersHelper.cs (9)
7using SafeWinHttpHandle = Interop.WinHttp.SafeWinHttpHandle; 41using SafeWinHttpHandle sessionHandle = Interop.WinHttp.WinHttpOpen( 43Interop.WinHttp.WINHTTP_ACCESS_TYPE_DEFAULT_PROXY, 44Interop.WinHttp.WINHTTP_NO_PROXY_NAME, 45Interop.WinHttp.WINHTTP_NO_PROXY_BYPASS, 46(int)Interop.WinHttp.WINHTTP_FLAG_ASYNC); 51if (Interop.WinHttp.WinHttpQueryOption(sessionHandle, Interop.WinHttp.WINHTTP_OPTION_STREAM_ERROR_CODE, ref buffer, ref bufferSize)) 61return lastError != Interop.WinHttp.ERROR_INVALID_PARAMETER;
System\Net\Http\WinHttpTransportContext.cs (1)
7using SafeWinHttpHandle = Interop.WinHttp.SafeWinHttpHandle;