609 references to UnsafeNclNativeMethods
System (609)
net\System\Net\_AuthenticationManagerBase.cs (1)
80
if (
UnsafeNclNativeMethods
.HttpApi.ExtendedProtectionSupported)
net\System\Net\_AutoWebProxyScriptEngine.cs (14)
61
SafeRegistryHandle.RegOpenCurrentUser(
UnsafeNclNativeMethods
.RegistryHelper.KEY_READ, out hkcu);
401
UnsafeNclNativeMethods
.RegistryHelper.HKEY_LOCAL_MACHINE, RegBlobWebProxyDataBuilder.ProxyKey);
407
UnsafeNclNativeMethods
.RegistryHelper.HKEY_LOCAL_MACHINE, RegBlobWebProxyDataBuilder.PolicyKey);
431
errorCode = hkcu.RegOpenKeyEx(subKey, 0,
UnsafeNclNativeMethods
.RegistryHelper.KEY_READ, out key);
436
errorCode =
UnsafeNclNativeMethods
.ErrorCodes.ERROR_NOT_FOUND;
441
errorCode = SafeRegistryHandle.RegOpenKeyEx(baseKey, subKey, 0,
UnsafeNclNativeMethods
.RegistryHelper.KEY_READ, out key);
452
errorCode = key.RegNotifyChangeKeyValue(true,
UnsafeNclNativeMethods
.RegistryHelper.REG_NOTIFY_CHANGE_LAST_SET, changeEvent.SafeWaitHandle, true);
611
UnsafeNclNativeMethods
.RegistryHelper.HKEY_LOCAL_MACHINE,
646
UnsafeNclNativeMethods
.RegistryHelper.HKEY_LOCAL_MACHINE,
692
private static volatile
UnsafeNclNativeMethods
.RasHelper s_RasHelper;
712
s_CurrentAutoDetector = new AutoDetector(
UnsafeNclNativeMethods
.RasHelper.GetCurrentConnectoid(), 1);
717
if (
UnsafeNclNativeMethods
.RasHelper.RasSupported)
719
s_RasHelper = new
UnsafeNclNativeMethods
.RasHelper();
752
s_CurrentAutoDetector = new AutoDetector(
UnsafeNclNativeMethods
.RasHelper.GetCurrentConnectoid(), currentVersion);
net\System\Net\_AutoWebProxyScriptHelper.cs (7)
589
UnsafeNclNativeMethods
.OSSOCK.WSAStringToAddress(
601
UnsafeNclNativeMethods
.OSSOCK.WSAStringToAddress(
643
int cbRequiredBytes = Marshal.SizeOf(typeof(
UnsafeNclNativeMethods
.OSSOCK.SOCKET_ADDRESS_LIST)) +
644
(SockAddrIn6List.Length -1)*Marshal.SizeOf(typeof(
UnsafeNclNativeMethods
.OSSOCK.SOCKET_ADDRESS));
660
UnsafeNclNativeMethods
.OSSOCK.SOCKET_ADDRESS_LIST* pList
661
= (
UnsafeNclNativeMethods
.OSSOCK.SOCKET_ADDRESS_LIST*)pSocketAddressList;
663
UnsafeNclNativeMethods
.OSSOCK.SOCKET_ADDRESS* pSocketAddresses =
net\System\Net\_ListenerAsyncResult.cs (11)
39
if (errorCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS &&
40
errorCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_MORE_DATA)
48
if (errorCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS)
82
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS &&
83
statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_IO_PENDING)
119
uint statusCode =
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS;
125
statusCode =
UnsafeNclNativeMethods
.HttpApi.HttpReceiveHttpRequest(
128
(uint)
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY,
135
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_INVALID_PARAMETER && m_RequestContext.RequestBlob->RequestId != 0)
143
else if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_MORE_DATA)
150
else if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS &&
net\System\Net\_ListenerRequestStream.cs (16)
126
dataRead =
UnsafeNclNativeMethods
.HttpApi.GetChunks(m_HttpContext.Request.RequestBuffer, m_HttpContext.Request.OriginalBlobAddress, ref m_DataChunkIndex, ref m_DataChunkOffset, buffer, offset, size);
149
flags = (uint)
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY;
153
UnsafeNclNativeMethods
.HttpApi.HttpReceiveRequestEntityBody(
165
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS && statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_HANDLE_EOF) {
180
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_HANDLE_EOF || dataRead == 0) {
211
dataRead =
UnsafeNclNativeMethods
.HttpApi.GetChunks(m_HttpContext.Request.RequestBuffer, m_HttpContext.Request.OriginalBlobAddress, ref m_DataChunkIndex, ref m_DataChunkOffset, buffer, offset, size);
242
flags = (uint)
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY;
246
UnsafeNclNativeMethods
.HttpApi.HttpReceiveRequestEntityBody(
264
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS && statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_IO_PENDING) {
266
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_HANDLE_EOF) {
277
else if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS &&
358
return
UnsafeNclNativeMethods
.HttpApi.GetChunks(m_HttpContext.Request.RequestBuffer,
399
if (errorCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS && errorCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_HANDLE_EOF) {
net\System\Net\_ListenerResponseStream.cs (48)
29
internal
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS ComputeLeftToWrite() {
31
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS flags =
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.NONE;
36
UnsafeNclNativeMethods
.HttpApi.HTTP_VERB method = m_HttpContext.GetKnownMethod();
37
m_LeftToWrite = method !=
UnsafeNclNativeMethods
.HttpApi.HTTP_VERB.HttpVerbHEAD ? m_HttpContext.Response.ContentLength64 : 0;
139
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS flags = ComputeLeftToWrite();
179
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK dataChunk = new
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK();
180
dataChunk.DataChunkType =
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
184
flags |= m_LeftToWrite == size ?
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.NONE :
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_MORE_DATA;
192
UnsafeNclNativeMethods
.HttpApi.HttpSendResponseEntityBody(
207
statusCode =
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS;
220
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS && statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_HANDLE_EOF) {
245
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS flags = ComputeLeftToWrite();
258
flags |= m_LeftToWrite==size ?
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.NONE :
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_MORE_DATA;
274
UnsafeNclNativeMethods
.HttpApi.HttpSendResponseEntityBody(
297
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS && statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_IO_PENDING) {
311
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS && HttpListener.SkipIOCPCallbackOnSuccess)
318
if ((flags &
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_MORE_DATA) == 0)
386
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS flags = ComputeLeftToWrite();
399
flags |=
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_DISCONNECT;
403
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK* pDataChunk = null;
405
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK dataChunk = new
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK();
406
dataChunk.DataChunkType =
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
418
UnsafeNclNativeMethods
.HttpApi.HttpSendResponseEntityBody(
433
statusCode =
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS;
443
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS && statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_HANDLE_EOF) {
474
UnsafeNclNativeMethods
.CancelIoEx(requestQueueHandle, asyncState.m_pOverlapped);
481
private
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK[] m_DataChunks;
497
internal
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK* pDataChunks {
503
return (
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK*)(Marshal.UnsafeAddrOfPinnedArrayElement(m_DataChunks, 0));
522
m_DataChunks = new
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK[chunked ? 3 : 1];
535
m_DataChunks[0] = new
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK();
536
m_DataChunks[0].DataChunkType =
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
541
m_DataChunks[1] = new
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK();
542
m_DataChunks[1].DataChunkType =
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
547
m_DataChunks[2] = new
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK();
548
m_DataChunks[2].DataChunkType =
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
555
m_DataChunks[0] = new
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK();
556
m_DataChunks[0].DataChunkType =
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
589
if (errorCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS && errorCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_HANDLE_EOF) {
net\System\Net\_LoggingObject.cs (1)
981
UnsafeNclNativeMethods
.DebugBreak();
net\System\Net\_NativeSSPI.cs (7)
119
status =
UnsafeNclNativeMethods
.NativeNTSSPI.EncryptMessage(ref context._handle, 0, inputOutput, sequenceNumber);
146
status =
UnsafeNclNativeMethods
.NativeNTSSPI.DecryptMessage(ref context._handle, inputOutput, sequenceNumber, null);
281
status =
UnsafeNclNativeMethods
.NativeNTSSPI.EncryptMessage(ref context._handle, 0, inputOutput, sequenceNumber);
310
status =
UnsafeNclNativeMethods
.NativeNTSSPI.DecryptMessage(ref context._handle, inputOutput, sequenceNumber, &qop);
348
status =
UnsafeNclNativeMethods
.NativeNTSSPI.EncryptMessage(ref context._handle, SECQOP_WRAP_NO_ENCRYPT, inputOutput, sequenceNumber);
377
status =
UnsafeNclNativeMethods
.NativeNTSSPI.DecryptMessage(ref context._handle, inputOutput, sequenceNumber, &qop);
450
status =
UnsafeNclNativeMethods
.SafeNetHandles.QuerySecurityContextToken(ref phContext._handle, out safeHandle);
net\System\Net\_NTAuthentication.cs (1)
514
SecurityStatus result =
UnsafeNclNativeMethods
.SspiHelper.SspiEncodeStringsAsAuthIdentity(
net\System\Net\_PooledStream.cs (3)
598
if (
UnsafeNclNativeMethods
.CancelIoEx(socket.SafeHandle, IntPtr.Zero) == 0) {
623
UnsafeNclNativeMethods
.CancelIoEx(socket4.SafeHandle, IntPtr.Zero);
640
UnsafeNclNativeMethods
.CancelIoEx(socket6.SafeHandle, IntPtr.Zero);
net\System\Net\_RegBlobWebProxyDataBuilder.cs (6)
99
errorCode = m_Registry.RegOpenKeyEx(ProxyKey, 0,
UnsafeNclNativeMethods
.RegistryHelper.KEY_READ, out key);
103
errorCode =
UnsafeNclNativeMethods
.ErrorCodes.ERROR_NOT_FOUND;
108
errorCode = SafeRegistryHandle.RegOpenKeyEx(
UnsafeNclNativeMethods
.RegistryHelper.HKEY_LOCAL_MACHINE, ProxyKey, 0,
UnsafeNclNativeMethods
.RegistryHelper.KEY_READ, out key);
110
if (errorCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS)
120
if (errorCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS)
net\System\Net\_SafeNetHandles.cs (69)
264
return
UnsafeNclNativeMethods
.SafeNetHandlesXPOrLater.GetAddrInfoW(nodename, servicename, ref hints, out outAddrInfo);
269
UnsafeNclNativeMethods
.SafeNetHandlesXPOrLater.freeaddrinfo(handle);
300
return
UnsafeNclNativeMethods
.SafeNetHandles.CloseHandle(handle);
342
return (
UnsafeNclNativeMethods
.SafeNetHandles.HttpCloseRequestQueue(handle) ==
343
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS);
385
return (
UnsafeNclNativeMethods
.HttpApi.HttpCloseServerSession(serverSessionId) ==
386
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS);
429
return
UnsafeNclNativeMethods
.WinHttp.WinHttpCloseHandle(handle);
447
return
UnsafeNclNativeMethods
.SspiHelper.SspiFreeAuthIdentity(handle) == SecurityStatus.OK;
487
res =
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.EnumerateSecurityPackagesW(out pkgnum, out pkgArray_SECURITY);
555
status =
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.QueryContextAttributesW(ref phContext._handle, contextAttribute, buffer);
616
status =
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.SetContextAttributesW(
634
return
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.FreeContextBuffer(handle) == 0;
665
SafeLocalFree result =
UnsafeNclNativeMethods
.SafeNetHandles.LocalAlloc(LMEM_FIXED, (UIntPtr) cb);
675
return
UnsafeNclNativeMethods
.SafeNetHandles.LocalFree(handle) == IntPtr.Zero;
696
return
UnsafeNclNativeMethods
.SafeNetHandles.GlobalFree(handle) == IntPtr.Zero;
716
SafeOverlappedFree result =
UnsafeNclNativeMethods
.SafeNetHandlesSafeOverlappedFree.LocalAlloc(LPTR, (UIntPtr) Win32.OverlappedSize);
754
return
UnsafeNclNativeMethods
.SafeNetHandles.LocalFree(handle) == IntPtr.Zero;
782
IntPtr hKernel32 =
UnsafeNclNativeMethods
.SafeNetHandles.GetModuleHandleW(KERNEL32);
785
UnsafeNclNativeMethods
.GetProcAddress(hKernel32, AddDllDirectory) != IntPtr.Zero) {
800
SafeLoadLibrary result =
UnsafeNclNativeMethods
.SafeNetHandles.LoadLibraryExW(library, null, _flags);
809
IntPtr ret =
UnsafeNclNativeMethods
.GetProcAddress(this, functionName);
814
return
UnsafeNclNativeMethods
.SafeNetHandles.FreeLibrary(handle);
845
UnsafeNclNativeMethods
.SafeNetHandles.CertFreeCertificateChain(handle);
880
UnsafeNclNativeMethods
.SafeNetHandles.CertFreeCertificateChainList(handle);
931
UnsafeNclNativeMethods
.NativePKI.CERT_SELECT_CRITERIA criteria =
932
new
UnsafeNclNativeMethods
.NativePKI.CERT_SELECT_CRITERIA();
955
criteria = new
UnsafeNclNativeMethods
.NativePKI.CERT_SELECT_CRITERIA();
959
UnsafeNclNativeMethods
.NativePKI.CERT_EXTENSION certExtension =
960
new
UnsafeNclNativeMethods
.NativePKI.CERT_EXTENSION();
1030
UnsafeNclNativeMethods
.SafeNetHandles.CertFreeCertificateContext(handle);
1119
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.AcquireCredentialsHandleW(
1172
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.AcquireCredentialsHandleW(
1221
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.AcquireCredentialsHandleW(
1277
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.AcquireCredentialsHandleW(
1384
return
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.FreeCredentialsHandle(ref _handle) == 0;
1709
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.InitializeSecurityContextW(
2025
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.AcceptSecurityContext(
2164
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.CompleteAuthToken(contextHandle.IsZero? null: &contextHandle, inSecurityBufferDescriptor);
2287
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.ApplyControlToken(contextHandle.IsZero ? null : &contextHandle, inSecurityBufferDescriptor);
2330
return
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.DeleteSecurityContext(ref _handle) == 0;
2586
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles.closesocket(handle);
2603
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles.ioctlsocket(
2613
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles.WSAEventSelect(
2620
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles.ioctlsocket(
2630
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles.closesocket(handle);
2653
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles.setsockopt(
2671
errorCode =
UnsafeNclNativeMethods
.SafeNetHandles.closesocket(handle);
2718
InnerSafeCloseSocket result =
UnsafeNclNativeMethods
.OSSOCK.WSASocket((AddressFamily) (-1),(SocketType) (-1),(ProtocolType) (-1), pinnedBuffer, 0, SocketConstructorFlags.WSA_FLAG_OVERLAPPED);
2727
InnerSafeCloseSocket result =
UnsafeNclNativeMethods
.OSSOCK.WSASocket(addressFamily, socketType, protocolType, IntPtr.Zero, 0, SocketConstructorFlags.WSA_FLAG_OVERLAPPED);
2736
InnerSafeCloseSocket result =
UnsafeNclNativeMethods
.SafeNetHandles.accept(socketHandle.DangerousGetHandle(), socketAddress, ref socketAddressSize);
2829
result =
UnsafeNclNativeMethods
.SafeNetHandles.LocalAllocChannelBinding(LMEM_FIXED, (UIntPtr)cb);
2842
return
UnsafeNclNativeMethods
.SafeNetHandles.LocalFree(handle) == IntPtr.Zero;
2915
status =
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.QueryContextAttributesW(ref phContext._handle, contextAttribute, buffer);
2938
return
UnsafeNclNativeMethods
.SafeNetHandles_SECURITY.FreeContextBuffer(handle) == 0;
2972
UnsafeNclNativeMethods
.SafeNetHandles.UnlockUrlCacheEntryFileW(ptrStr, 0);
3001
if (!
UnsafeNclNativeMethods
.SafeNetHandles.RetrieveUrlCacheEntryFileW(key, entryPtr, ref entryBufSize, 0))
3031
return
UnsafeNclNativeMethods
.RegistryHelper.RegOpenKeyEx(key, subKey, ulOptions, samDesired, out resultSubKey);
3036
return
UnsafeNclNativeMethods
.RegistryHelper.RegOpenKeyEx(this, subKey, ulOptions, samDesired, out resultSubKey);
3056
errorCode =
UnsafeNclNativeMethods
.RegistryHelper.RegQueryValueEx(this, name, IntPtr.Zero, out type, blob, ref size);
3057
if (errorCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_MORE_DATA &&
3058
(blob != null || errorCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS))
3066
if (errorCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS)
3073
case
UnsafeNclNativeMethods
.RegistryHelper.REG_BINARY:
3081
return
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS;
3084
return
UnsafeNclNativeMethods
.ErrorCodes.ERROR_NOT_SUPPORTED;
3090
return
UnsafeNclNativeMethods
.RegistryHelper.RegNotifyChangeKeyValue(this, watchSubTree, notifyFilter, regEvent, async);
3095
return
UnsafeNclNativeMethods
.RegistryHelper.RegOpenCurrentUser(samDesired, out resultKey);
3102
resClose =
UnsafeNclNativeMethods
.RegistryHelper.RegCloseKey(handle);
net\System\Net\_SecureChannel.cs (1)
1014
UnsafeNclNativeMethods
.AppXHelper.PrimaryWindowHandle.Value);
net\System\Net\_Semaphore.cs (2)
24
Handle =
UnsafeNclNativeMethods
.CreateSemaphore(IntPtr.Zero, initialCount, maxCount, IntPtr.Zero);
45
return
UnsafeNclNativeMethods
.ReleaseSemaphore(Handle, 1, IntPtr.Zero);
net\System\Net\_WinHttpWebProxyDataBuilder.cs (3)
15
UnsafeNclNativeMethods
.WinHttp.WINHTTP_CURRENT_USER_IE_PROXY_CONFIG ieProxyConfig =
16
new
UnsafeNclNativeMethods
.WinHttp.WINHTTP_CURRENT_USER_IE_PROXY_CONFIG();
22
if (
UnsafeNclNativeMethods
.WinHttp.WinHttpGetIEProxyConfigForCurrentUser(ref ieProxyConfig))
net\System\Net\Cache\IERequestCache.cs (1)
177
if (!
UnsafeNclNativeMethods
.UnsafeWinInetCache.UnlockUrlCacheEntryFileW(key, 0)) {
net\System\Net\Cache\WinInetCache.cs (6)
235
bool found =
UnsafeNclNativeMethods
.UnsafeWinInetCache.GetUrlCacheEntryInfoW(entry.Key, entryPtr, ref size);
339
StringBuilder sb = new StringBuilder(
UnsafeNclNativeMethods
.UnsafeWinInetCache.MAX_PATH);
340
if (
UnsafeNclNativeMethods
.UnsafeWinInetCache.CreateUrlCacheEntryW(entry.Key, entry.OptionalLength, entry.FileExt, sb, 0)) {
367
if (!
UnsafeNclNativeMethods
.UnsafeWinInetCache.CommitUrlCacheEntryW(
406
if (!
UnsafeNclNativeMethods
.UnsafeWinInetCache.SetUrlCacheEntryInfoW(newEntry.Key, bytePtr, attributes)) {
504
if (!
UnsafeNclNativeMethods
.UnsafeWinInetCache.DeleteUrlCacheEntryW(entry.Key)) {
net\System\Net\DNS.cs (4)
247
UnsafeNclNativeMethods
.OSSOCK.gethostbyname(
413
UnsafeNclNativeMethods
.OSSOCK.gethostbyaddr(
462
UnsafeNclNativeMethods
.OSSOCK.gethostname(
1205
UnsafeNclNativeMethods
.OSSOCK.GetNameInfoW(
net\System\Net\HttpListener.cs (92)
46
private
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST* m_MemoryBlob;
47
private
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST* m_OriginalBlobAddress;
51
protected void BaseConstruction(
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST* requestBlob)
93
internal
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST* RequestBlob
122
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST* blob = m_MemoryBlob;
127
protected void SetBlob(
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST* requestBlob)
169
private
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST* Allocate(uint size)
184
return (
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST*) Marshal.UnsafeAddrOfPinnedArrayElement(RequestBuffer, 0);
236
private
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST* Allocate(int size)
252
return (
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST*) Marshal.UnsafeAddrOfPinnedArrayElement(RequestBuffer, 0);
284
private static readonly Type ChannelBindingStatusType = typeof(
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS);
286
Marshal.SizeOf(typeof(
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST_CHANNEL_BIND_STATUS));
367
if (!
UnsafeNclNativeMethods
.HttpApi.Supported) {
371
Debug.Assert(
UnsafeNclNativeMethods
.HttpApi.ApiVersion ==
372
UnsafeNclNativeMethods
.HttpApi.HTTP_API_VERSION.Version20, "Invalid Http api version");
501
private void SetUrlGroupProperty(
UnsafeNclNativeMethods
.HttpApi.HTTP_SERVER_PROPERTY property, IntPtr info, uint infosize) {
502
uint statusCode =
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS;
510
statusCode =
UnsafeNclNativeMethods
.HttpApi.HttpSetUrlGroupProperty(
513
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS) {
524
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_LIMIT_INFO timeoutinfo =
525
new
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_LIMIT_INFO();
527
timeoutinfo.Flags =
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_PROPERTY_FLAG_PRESENT;
529
(ushort)timeouts[(int)
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.DrainEntityBody];
531
(ushort)timeouts[(int)
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.EntityBody];
533
(ushort)timeouts[(int)
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.RequestQueue];
535
(ushort)timeouts[(int)
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.IdleConnection];
537
(ushort)timeouts[(int)
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.HeaderWait];
543
UnsafeNclNativeMethods
.HttpApi.HTTP_SERVER_PROPERTY.HttpServerTimeoutsProperty,
544
infoptr, (uint)Marshal.SizeOf(typeof(
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_LIMIT_INFO)));
557
return
UnsafeNclNativeMethods
.HttpApi.Supported;
677
if (statusCode!=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS) {
678
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_ALREADY_EXISTS)
777
uint statusCode =
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS;
797
statusCode =
UnsafeNclNativeMethods
.HttpApi.HttpCreateServerSession(
798
UnsafeNclNativeMethods
.HttpApi.Version, &id, 0);
800
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS) {
809
statusCode =
UnsafeNclNativeMethods
.HttpApi.HttpCreateUrlGroup(
812
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS) {
904
uint statusCode =
UnsafeNclNativeMethods
.HttpApi.HttpCloseUrlGroup(m_UrlGroupId);
906
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS) {
922
UnsafeNclNativeMethods
.HttpApi.HTTP_BINDING_INFO info = new
UnsafeNclNativeMethods
.HttpApi.HTTP_BINDING_INFO();
923
info.Flags =
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_PROPERTY_FLAG_PRESENT;
928
SetUrlGroupProperty(
UnsafeNclNativeMethods
.HttpApi.HTTP_SERVER_PROPERTY.HttpServerBindingProperty,
929
infoptr, (uint)Marshal.SizeOf(typeof(
UnsafeNclNativeMethods
.HttpApi.HTTP_BINDING_INFO)));
942
UnsafeNclNativeMethods
.HttpApi.HTTP_BINDING_INFO info = new
UnsafeNclNativeMethods
.HttpApi.HTTP_BINDING_INFO();
943
info.Flags =
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.NONE;
948
uint statusCode =
UnsafeNclNativeMethods
.HttpApi.HttpSetUrlGroupProperty(m_UrlGroupId,
949
UnsafeNclNativeMethods
.HttpApi.HTTP_SERVER_PROPERTY.HttpServerBindingProperty,
950
infoptr, (uint)Marshal.SizeOf(typeof(
UnsafeNclNativeMethods
.HttpApi.HTTP_BINDING_INFO)));
952
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS) {
988
uint statusCode =
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS;
992
UnsafeNclNativeMethods
.SafeNetHandles.HttpCreateRequestQueue(
993
UnsafeNclNativeMethods
.HttpApi.Version, null, null, 0, out requestQueueHandle);
995
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS) {
1001
!
UnsafeNclNativeMethods
.SetFileCompletionNotificationModes(
1003
UnsafeNclNativeMethods
.FileCompletionNotificationModes.SkipCompletionPortOnSuccess |
1004
UnsafeNclNativeMethods
.FileCompletionNotificationModes.SkipSetEventOnHandle))
1099
UnsafeNclNativeMethods
.HttpApi.HttpAddUrlToUrlGroup(
1112
UnsafeNclNativeMethods
.HttpApi.HttpRemoveUrlFromUrlGroup(
1117
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_NOT_FOUND)
1129
if (statusCode!=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS) {
1130
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_ALREADY_EXISTS)
1154
uint statusCode =
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS;
1163
UnsafeNclNativeMethods
.HttpApi.HttpReceiveHttpRequest(
1166
(uint)
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_RECEIVE_REQUEST_FLAG_COPY_BODY,
1174
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_INVALID_PARAMETER && requestId != 0) {
1180
else if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_MORE_DATA)
1191
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS)
1262
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS &&
1263
statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_IO_PENDING)
1334
string verb =
UnsafeNclNativeMethods
.HttpApi.GetVerb(memoryBlob.RequestBlob);
1335
string authorizationHeader =
UnsafeNclNativeMethods
.HttpApi.GetKnownHeader(memoryBlob.RequestBlob, (int) HttpRequestHeader.Authorization);
2294
uint statusCode =
UnsafeNclNativeMethods
.HttpApi.HttpWaitForDisconnect(
2301
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS ||
2302
statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_IO_PENDING)
2310
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS && HttpListener.SkipIOCPCallbackOnSuccess)
2326
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE httpResponse = new
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE();
2327
httpResponse.Version = new
UnsafeNclNativeMethods
.HttpApi.HTTP_VERSION();
2348
UnsafeNclNativeMethods
.HttpApi.HTTP_UNKNOWN_HEADER[] headersArray = null;
2354
headersArray = new
UnsafeNclNativeMethods
.HttpApi.HTTP_UNKNOWN_HEADER[httpResponse.Headers.UnknownHeaderCount];
2362
httpResponse.Headers.pUnknownHeaders = (
UnsafeNclNativeMethods
.HttpApi.HTTP_UNKNOWN_HEADER*) Marshal.UnsafeAddrOfPinnedArrayElement(headersArray, 0);
2379
UnsafeNclNativeMethods
.HttpApi.HttpSendHttpResponse(
2415
if (statusCode!=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS) {
2462
statusCode =
UnsafeNclNativeMethods
.HttpApi.HttpReceiveClientCertificate(
2465
(uint)
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_RECEIVE_SECURE_CHANNEL_TOKEN,
2471
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS)
2484
else if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_MORE_DATA)
2491
else if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_INVALID_PARAMETER)
2506
} while (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS);
net\System\Net\HttpListenerContext.cs (5)
236
internal
UnsafeNclNativeMethods
.HttpApi.HTTP_VERB GetKnownMethod() {
238
return
UnsafeNclNativeMethods
.HttpApi.GetKnownVerb(Request.RequestBuffer, Request.OriginalBlobAddress);
246
uint statusCode =
UnsafeNclNativeMethods
.HttpApi.HttpCancelHttpRequest(requestQueueHandle, requestId,
253
uint statusCode =
UnsafeNclNativeMethods
.HttpApi.HttpCancelHttpRequest(requestQueueHandle, requestId,
259
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_CONNECTION_INVALID)
net\System\Net\HttpListenerRequest.cs (54)
39
private
UnsafeNclNativeMethods
.HttpApi.HTTP_SSL_CLIENT_CERT_INFO* m_MemoryBlob;
50
internal
UnsafeNclNativeMethods
.HttpApi.HTTP_SSL_CLIENT_CERT_INFO* RequestBlob
87
m_MemoryBlob = (
UnsafeNclNativeMethods
.HttpApi.HTTP_SSL_CLIENT_CERT_INFO*) Marshal.UnsafeAddrOfPinnedArrayElement(m_BackingBuffer, 0);
100
if (errorCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_MORE_DATA)
106
UnsafeNclNativeMethods
.HttpApi.HTTP_SSL_CLIENT_CERT_INFO* pClientCertInfo = asyncResult.RequestBlob;
111
UnsafeNclNativeMethods
.HttpApi.HttpReceiveClientCertificate(
114
(uint)
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.NONE,
120
if(errorCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_IO_PENDING ||
121
(errorCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS && !HttpListener.SkipIOCPCallbackOnSuccess))
127
if (errorCode!=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS) {
132
UnsafeNclNativeMethods
.HttpApi.HTTP_SSL_CLIENT_CERT_INFO* pClientCertInfo = asyncResult.m_MemoryBlob;
169
if(errorCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_IO_PENDING){
268
UnsafeNclNativeMethods
.HttpApi.HTTP_COOKED_URL cookedUrl = memoryBlob.RequestBlob->CookedUrl;
425
m_WebHeaders =
UnsafeNclNativeMethods
.HttpApi.GetHeaders(RequestBuffer, OriginalBlobAddress);
435
m_HttpMethod =
UnsafeNclNativeMethods
.HttpApi.GetVerb(RequestBuffer, OriginalBlobAddress);
753
m_RemoteEndPoint =
UnsafeNclNativeMethods
.HttpApi.GetRemoteEndPoint(RequestBuffer, OriginalBlobAddress);
763
m_LocalEndPoint =
UnsafeNclNativeMethods
.HttpApi.GetLocalEndPoint(RequestBuffer, OriginalBlobAddress);
835
UnsafeNclNativeMethods
.HttpApi.HttpReceiveClientCertificate(
838
(uint)
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.NONE,
845
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_MORE_DATA)
847
UnsafeNclNativeMethods
.HttpApi.HTTP_SSL_CLIENT_CERT_INFO* pClientCertInfo = asyncResult.RequestBlob;
852
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS &&
853
statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_IO_PENDING) {
860
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS &&
927
UnsafeNclNativeMethods
.HttpApi.HTTP_SSL_CLIENT_CERT_INFO* pClientCertInfo = (
UnsafeNclNativeMethods
.HttpApi.HTTP_SSL_CLIENT_CERT_INFO*) pClientCertInfoBlob;
933
UnsafeNclNativeMethods
.HttpApi.HttpReceiveClientCertificate(
936
(uint)
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.NONE,
943
if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_MORE_DATA) {
947
else if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS) {
972
GlobalLog.Assert(statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_NOT_FOUND, "HttpListenerRequest#{0}::ProcessClientCertificate()|Call to UnsafeNclNativeMethods.HttpApi.HttpReceiveClientCertificate() failed with statusCode {1}.", ValidationHelper.HashString(this), statusCode);
1013
return
UnsafeNclNativeMethods
.HttpApi.GetKnownHeader(RequestBuffer, OriginalBlobAddress, (int) header);
1031
if (
UnsafeNclNativeMethods
.TokenBindingOSHelper.SupportsTokenBinding)
1068
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST_TOKEN_BINDING_INFO* pTokenBindingInfo =
UnsafeNclNativeMethods
.HttpApi.GetTlsTokenBindingRequestInfo(RequestBuffer, OriginalBlobAddress);
1069
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST_TOKEN_BINDING_INFO_V1* pTokenBindingInfo_V1 = null;
1075
pTokenBindingInfo_V1 =
UnsafeNclNativeMethods
.HttpApi.GetTlsTokenBindingRequestInfo_V1(RequestBuffer, OriginalBlobAddress);
1086
UnsafeNclNativeMethods
.HttpApi.HeapAllocHandle handle = null;
1090
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST_V2* request = (
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST_V2*)pMemoryBlob;
1096
m_TokenBindingVerifyMessageStatus =
UnsafeNclNativeMethods
.HttpApi.TokenBindingVerifyMessage_V1(
1108
UnsafeNclNativeMethods
.HttpApi.TokenBindingVerifyMessage(
1144
private void GenerateTokenBindings(
UnsafeNclNativeMethods
.HttpApi.HeapAllocHandle handle)
1146
UnsafeNclNativeMethods
.HttpApi.TOKENBINDING_RESULT_LIST* pResultList = (
UnsafeNclNativeMethods
.HttpApi.TOKENBINDING_RESULT_LIST*)handle.DangerousGetHandle();
1149
UnsafeNclNativeMethods
.HttpApi.TOKENBINDING_RESULT_DATA* pThisResultData = &pResultList->resultData[i];
1156
if (pThisResultData->bindingType ==
UnsafeNclNativeMethods
.HttpApi.TOKENBINDING_TYPE.TOKENBINDING_TYPE_PROVIDED)
1160
else if (pThisResultData->bindingType ==
UnsafeNclNativeMethods
.HttpApi.TOKENBINDING_TYPE.TOKENBINDING_TYPE_REFERRED)
1172
private void GenerateTokenBindings_V1(
UnsafeNclNativeMethods
.HttpApi.HeapAllocHandle handle)
1174
UnsafeNclNativeMethods
.HttpApi.TOKENBINDING_RESULT_LIST_V1* pResultList = (
UnsafeNclNativeMethods
.HttpApi.TOKENBINDING_RESULT_LIST_V1*)handle.DangerousGetHandle();
1177
UnsafeNclNativeMethods
.HttpApi.TOKENBINDING_RESULT_DATA_V1* pThisResultData = &pResultList->resultData[i];
1189
if (pThisResultData->identifierData->bindingType ==
UnsafeNclNativeMethods
.HttpApi.TOKENBINDING_TYPE.TOKENBINDING_TYPE_PROVIDED)
1193
else if (pThisResultData->identifierData->bindingType ==
UnsafeNclNativeMethods
.HttpApi.TOKENBINDING_TYPE.TOKENBINDING_TYPE_REFERRED)
net\System\Net\HttpListenerResponse.cs (25)
37
private
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE m_NativeResponse;
43
m_NativeResponse = new
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE();
182
m_NativeResponse = new
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE();
474
internal unsafe uint SendHeaders(
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK* pDataChunk,
476
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS flags,
529
fixed (
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE* pResponse = &m_NativeResponse) {
535
UnsafeNclNativeMethods
.HttpApi.HttpSendHttpResponse(
548
statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS &&
558
fixed (
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE* pResponse = &m_NativeResponse) {
564
UnsafeNclNativeMethods
.HttpApi.HttpSendHttpResponse(
577
statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS &&
633
internal
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS ComputeHeaders() {
634
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS flags =
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.NONE;
669
flags =
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.NONE;
676
flags =
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.NONE; // seems like HTTP_SEND_RESPONSE_FLAG_MORE_DATA but this hangs the app;
683
if (flags==
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.NONE) {
684
flags =
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_DISCONNECT;
707
private List<GCHandle> SerializeHeaders(ref
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE_HEADERS headers,
709
UnsafeNclNativeMethods
.HttpApi.HTTP_UNKNOWN_HEADER[] unknownHeaders = null;
769
lookup =
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE_HEADER_ID.IndexOfKnownHeader(headerName);
786
fixed (
UnsafeNclNativeMethods
.HttpApi.HTTP_KNOWN_HEADER* pKnownHeaders = &headers.KnownHeaders) {
790
lookup =
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE_HEADER_ID.IndexOfKnownHeader(headerName);
805
unknownHeaders = new
UnsafeNclNativeMethods
.HttpApi.HTTP_UNKNOWN_HEADER[numUnknownHeaders];
808
headers.pUnknownHeaders = (
UnsafeNclNativeMethods
.HttpApi.HTTP_UNKNOWN_HEADER*)gcHandle.AddrOfPinnedObject();
net\System\Net\HttpListenerTimeoutManager.cs (12)
65
private TimeSpan GetTimeout(
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE type)
73
private void SetTimespanTimeout(
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE type, TimeSpan value)
114
return GetTimeout(
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.EntityBody);
118
SetTimespanTimeout(
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.EntityBody, value);
135
return GetTimeout(
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.DrainEntityBody);
139
SetTimespanTimeout(
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.DrainEntityBody, value);
151
return GetTimeout(
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.RequestQueue);
155
SetTimespanTimeout(
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.RequestQueue, value);
168
return GetTimeout(
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.IdleConnection);
172
SetTimespanTimeout(
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.IdleConnection, value);
186
return GetTimeout(
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.HeaderWait);
190
SetTimespanTimeout(
UnsafeNclNativeMethods
.HttpApi.HTTP_TIMEOUT_TYPE.HeaderWait, value);
net\System\Net\Internal.cs (7)
560
UnsafeNclNativeMethods
.OSSOCK.ioctlsocket(ipv4Socket, IoctlSocketConstants.FIONBIO, ref blocking);
566
UnsafeNclNativeMethods
.OSSOCK.ioctlsocket(ipv6Socket,IoctlSocketConstants.FIONBIO,ref blocking);
578
errorCode = (SocketError)
UnsafeNclNativeMethods
.OSSOCK.WSAIoctl_Blocking(
593
errorCode = (SocketError)
UnsafeNclNativeMethods
.OSSOCK.WSAEventSelect(ipv4Socket, ipv4Socket.GetEventHandle().SafeWaitHandle, AsyncEventBits.FdAddressListChange);
601
errorCode = (SocketError)
UnsafeNclNativeMethods
.OSSOCK.WSAIoctl_Blocking(
616
errorCode = (SocketError)
UnsafeNclNativeMethods
.OSSOCK.WSAEventSelect(ipv6Socket, ipv6Socket.GetEventHandle().SafeWaitHandle, AsyncEventBits.FdAddressListChange);
2016
UnsafeNclNativeMethods
.NativePKI.CertVerifyCertificateChainPolicy(
net\System\Net\IPAddress.cs (2)
193
UnsafeNclNativeMethods
.OSSOCK.WSAStringToAddress(
450
UnsafeNclNativeMethods
.OSSOCK.WSAAddressToString(
net\System\Net\Logging.cs (1)
291
uint threadId =
UnsafeNclNativeMethods
.GetCurrentThreadId();
net\System\Net\NetWebProxyFinder.cs (4)
463
scriptLocation = SafeDetectAutoProxyUrl(
UnsafeNclNativeMethods
.WinHttp.AutoDetectType.Dhcp);
468
scriptLocation = SafeDetectAutoProxyUrl(
UnsafeNclNativeMethods
.WinHttp.AutoDetectType.DnsA);
496
UnsafeNclNativeMethods
.WinHttp.AutoDetectType discoveryMethod)
505
bool success =
UnsafeNclNativeMethods
.WinHttp.WinHttpDetectAutoProxyConfigUrl(discoveryMethod, out autoProxyUrl);
net\System\Net\NetworkCredential.cs (2)
138
m_password =
UnsafeNclNativeMethods
.SecureStringHelper.CreateSecureString(value);
197
string decryptedString =
UnsafeNclNativeMethods
.SecureStringHelper.CreateString(m_password);
net\System\Net\NetworkInformation\NetworkAddressChange.cs (6)
260
UnsafeNclNativeMethods
.OSSOCK.ioctlsocket(s_ipv4Socket, IoctlSocketConstants.FIONBIO,ref blocking);
267
UnsafeNclNativeMethods
.OSSOCK.ioctlsocket(s_ipv6Socket,IoctlSocketConstants.FIONBIO,ref blocking);
294
errorCode = (SocketError)
UnsafeNclNativeMethods
.OSSOCK.WSAIoctl_Blocking(
308
errorCode = (SocketError)
UnsafeNclNativeMethods
.OSSOCK.WSAEventSelect(s_ipv4Socket, s_ipv4Socket.GetEventHandle().SafeWaitHandle, AsyncEventBits.FdAddressListChange);
322
errorCode = (SocketError)
UnsafeNclNativeMethods
.OSSOCK.WSAIoctl_Blocking(
336
errorCode = (SocketError)
UnsafeNclNativeMethods
.OSSOCK.WSAEventSelect(s_ipv6Socket, s_ipv6Socket.GetEventHandle().SafeWaitHandle, AsyncEventBits.FdAddressListChange);
net\System\Net\NetworkInformation\ping.cs (1)
704
if (async && error ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_IO_PENDING)
net\System\Net\NetworkInformation\SafeCancelMibChangeNotify.cs (1)
20
return (err ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS);
net\System\Net\NetworkInformation\TeredoHelper.cs (3)
73
uint err =
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS;
94
if (err ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_IO_PENDING)
106
if (err !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS)
net\System\Net\Sockets\_AcceptOverlappedAsyncResult.cs (1)
82
errorCode =
UnsafeNclNativeMethods
.OSSOCK.setsockopt(
net\System\Net\Sockets\_BaseOverlappedAsyncResult.cs (1)
361
bool success =
UnsafeNclNativeMethods
.OSSOCK.WSAGetOverlappedResult(
net\System\Net\Sockets\_ConnectOverlappedAsyncResult.cs (1)
41
errorCode =
UnsafeNclNativeMethods
.OSSOCK.setsockopt(
net\System\Net\Sockets\_DynamicWinsockMethods.cs (1)
119
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSAIoctl(
net\System\Net\Sockets\_ReceiveMessageOverlappedAsyncResult.cs (11)
24
private
UnsafeNclNativeMethods
.OSSOCK.WSAMsg* m_Message;
33
private static readonly int s_ControlDataSize = Marshal.SizeOf(typeof(
UnsafeNclNativeMethods
.OSSOCK.ControlData));
34
private static readonly int s_ControlDataIPv6Size = Marshal.SizeOf(typeof(
UnsafeNclNativeMethods
.OSSOCK.ControlDataIPv6));
36
private static readonly int s_WSAMsgSize = Marshal.SizeOf(typeof(
UnsafeNclNativeMethods
.OSSOCK.WSAMsg));
117
m_Message = (
UnsafeNclNativeMethods
.OSSOCK.WSAMsg*) Marshal.UnsafeAddrOfPinnedArrayElement(m_MessageBuffer, 0);
143
UnsafeNclNativeMethods
.OSSOCK.ControlData controlData = (
UnsafeNclNativeMethods
.OSSOCK.ControlData)Marshal.PtrToStructure(m_Message->controlBuffer.Pointer, typeof(
UnsafeNclNativeMethods
.OSSOCK.ControlData));
152
UnsafeNclNativeMethods
.OSSOCK.ControlDataIPv6 controlData = (
UnsafeNclNativeMethods
.OSSOCK.ControlDataIPv6)Marshal.PtrToStructure(m_Message->controlBuffer.Pointer, typeof(
UnsafeNclNativeMethods
.OSSOCK.ControlDataIPv6));
net\System\Net\Sockets\Socket.cs (98)
114
private readonly static int protocolInformationSize = Marshal.SizeOf(typeof(
UnsafeNclNativeMethods
.OSSOCK.WSAPROTOCOL_INFO));
185
UnsafeNclNativeMethods
.OSSOCK.WSAPROTOCOL_INFO protocolInfo = (
UnsafeNclNativeMethods
.OSSOCK.WSAPROTOCOL_INFO)Marshal.PtrToStructure((IntPtr)pinnedBuffer, typeof(
UnsafeNclNativeMethods
.OSSOCK.WSAPROTOCOL_INFO));
232
errorCode =
UnsafeNclNativeMethods
.OSSOCK.getsockname(
354
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.ioctlsocket(
408
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.getsockname(
455
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.getpeername(
950
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.bind(
1175
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.listen(
1343
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSASend_Blocking(
1458
!
UnsafeNclNativeMethods
.OSSOCK.TransmitFile_Blocking(m_Handle.DangerousGetHandle(), fileHandle, 0, 0, SafeNativeOverlapped.Zero, asyncResult.TransmitFileBuffers, flags) :
1459
!
UnsafeNclNativeMethods
.OSSOCK.TransmitFile_Blocking2(m_Handle.DangerousGetHandle(), IntPtr.Zero, 0, 0, SafeNativeOverlapped.Zero, asyncResult.TransmitFileBuffers, flags))
1546
bytesTransferred =
UnsafeNclNativeMethods
.OSSOCK.send(m_Handle.DangerousGetHandle(), null, 0, socketFlags);
1549
bytesTransferred =
UnsafeNclNativeMethods
.OSSOCK.send(
1632
bytesTransferred =
UnsafeNclNativeMethods
.OSSOCK.sendto(
1644
bytesTransferred =
UnsafeNclNativeMethods
.OSSOCK.sendto(
1777
bytesTransferred =
UnsafeNclNativeMethods
.OSSOCK.recv(m_Handle.DangerousGetHandle(), null, 0, socketFlags);
1780
bytesTransferred =
UnsafeNclNativeMethods
.OSSOCK.recv(m_Handle.DangerousGetHandle(), pinnedBuffer+offset, size, socketFlags);
1879
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSARecv_Blocking(
2102
bytesTransferred =
UnsafeNclNativeMethods
.OSSOCK.recvfrom(m_Handle.DangerousGetHandle(), null, 0, socketFlags, socketAddress.m_Buffer, ref socketAddress.m_Size );
2104
bytesTransferred =
UnsafeNclNativeMethods
.OSSOCK.recvfrom(m_Handle.DangerousGetHandle(), pinnedBuffer+offset, size, socketFlags, socketAddress.m_Buffer, ref socketAddress.m_Size );
2197
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSAIoctl_Blocking(
2250
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSAIoctl_Blocking_Internal(
2323
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.setsockopt(
2432
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.getsockopt(
2470
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.getsockopt(
2506
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.getsockopt(
2559
UnsafeNclNativeMethods
.OSSOCK.select(
2568
UnsafeNclNativeMethods
.OSSOCK.select(
2636
UnsafeNclNativeMethods
.OSSOCK.select(
2645
UnsafeNclNativeMethods
.OSSOCK.select(
2810
errorCode = (SocketError)
UnsafeNclNativeMethods
.OSSOCK.WSADuplicateSocket(m_Handle, (uint)targetProcessId, pinnedBuffer);
2884
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSAConnect(
3022
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSAEnumNetworkEvents(
3523
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSASend(
3642
result =
UnsafeNclNativeMethods
.OSSOCK.TransmitFile(m_Handle,fileHandle,0,0,asyncResult.OverlappedHandle,asyncResult.TransmitFileBuffers,flags);
3645
result =
UnsafeNclNativeMethods
.OSSOCK.TransmitFile2(m_Handle,IntPtr.Zero,0,0,asyncResult.OverlappedHandle,asyncResult.TransmitFileBuffers,flags);
3757
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSASend(
4027
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSASendTo(
4269
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSARecv(
4385
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSARecv(
4847
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSARecvFrom(
5640
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.shutdown(m_Handle, (int) how);
5962
UnsafeNclNativeMethods
.OSSOCK.WSAStartup(
5994
UnsafeNclNativeMethods
.OSSOCK.WSASocket(
6010
UnsafeNclNativeMethods
.OSSOCK.WSASocket(
6184
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSAConnect(
6312
errorCode =
UnsafeNclNativeMethods
.OSSOCK.ioctlsocket(
6328
errorCode =
UnsafeNclNativeMethods
.OSSOCK.shutdown(m_Handle, (int) SocketShutdown.Send);
6332
errorCode =
UnsafeNclNativeMethods
.OSSOCK.setsockopt(
6348
errorCode = (SocketError)
UnsafeNclNativeMethods
.OSSOCK.recv(m_Handle.DangerousGetHandle(), null, 0, SocketFlags.None);
6361
errorCode =
UnsafeNclNativeMethods
.OSSOCK.ioctlsocket(
6436
UnsafeNclNativeMethods
.OSSOCK.shutdown(m_Handle, (int)how);
6478
errorCode =
UnsafeNclNativeMethods
.OSSOCK.setsockopt(
6550
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.setsockopt(
6588
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.setsockopt(
6619
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.setsockopt(
6647
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.getsockopt(
6678
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.getsockopt(
6731
SocketError errorCode =
UnsafeNclNativeMethods
.OSSOCK.getsockopt(
6777
errorCode =
UnsafeNclNativeMethods
.OSSOCK.ioctlsocket(
7005
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSASend_Blocking(
7235
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSASend(
7469
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSAEventSelect(m_Handle, IntPtr.Zero, AsyncEventBits.FdNone);
7556
errorCode =
UnsafeNclNativeMethods
.OSSOCK.WSAEventSelect(m_Handle, m_AsyncEvent.SafeWaitHandle, blockEventBits);
7994
socketError =
UnsafeNclNativeMethods
.OSSOCK.WSARecv(
8004
socketError =
UnsafeNclNativeMethods
.OSSOCK.WSARecv(
8083
socketError =
UnsafeNclNativeMethods
.OSSOCK.WSARecvFrom(
8094
socketError =
UnsafeNclNativeMethods
.OSSOCK.WSARecvFrom(
8236
socketError =
UnsafeNclNativeMethods
.OSSOCK.WSASend(
8246
socketError =
UnsafeNclNativeMethods
.OSSOCK.WSASend(
8387
socketError =
UnsafeNclNativeMethods
.OSSOCK.WSASendTo(
8398
socketError =
UnsafeNclNativeMethods
.OSSOCK.WSASendTo(
8475
internal
UnsafeNclNativeMethods
.OSSOCK.TransmitPacketsElementFlags m_Flags;
8501
Initialize(filepath, null, offset, count,
UnsafeNclNativeMethods
.OSSOCK.TransmitPacketsElementFlags.File,
8524
Initialize(null, buffer, offset, count,
UnsafeNclNativeMethods
.OSSOCK.TransmitPacketsElementFlags.Memory,
8529
UnsafeNclNativeMethods
.OSSOCK.TransmitPacketsElementFlags flags, bool endOfPacket) {
8537
m_Flags |=
UnsafeNclNativeMethods
.OSSOCK.TransmitPacketsElementFlags.EndOfPacket;
8563
get { return (m_Flags &
UnsafeNclNativeMethods
.OSSOCK.TransmitPacketsElementFlags.EndOfPacket) != 0; }
8581
internal static readonly int s_ControlDataSize = Marshal.SizeOf(typeof(
UnsafeNclNativeMethods
.OSSOCK.ControlData));
8582
internal static readonly int s_ControlDataIPv6Size = Marshal.SizeOf(typeof(
UnsafeNclNativeMethods
.OSSOCK.ControlDataIPv6));
8583
internal static readonly int s_WSAMsgSize = Marshal.SizeOf(typeof(
UnsafeNclNativeMethods
.OSSOCK.WSAMsg));
8668
internal
UnsafeNclNativeMethods
.OSSOCK.TransmitPacketsElement[] m_SendPacketsDescriptor;
9228
UnsafeNclNativeMethods
.OSSOCK.WSAMsg* pMessage = (
UnsafeNclNativeMethods
.OSSOCK.WSAMsg*)m_PtrWSAMessageBuffer;;
9619
new
UnsafeNclNativeMethods
.OSSOCK.TransmitPacketsElement[m_SendPacketsElementsFileCount + m_SendPacketsElementsBufferCount];
9830
socketError =
UnsafeNclNativeMethods
.OSSOCK.setsockopt(
9866
socketError =
UnsafeNclNativeMethods
.OSSOCK.setsockopt(
9948
UnsafeNclNativeMethods
.OSSOCK.WSAMsg* PtrMessage = (
UnsafeNclNativeMethods
.OSSOCK.WSAMsg*)Marshal.UnsafeAddrOfPinnedArrayElement(m_WSAMessageBuffer, 0);
9952
UnsafeNclNativeMethods
.OSSOCK.ControlData controlData = (
UnsafeNclNativeMethods
.OSSOCK.ControlData)Marshal.PtrToStructure(PtrMessage->controlBuffer.Pointer, typeof(
UnsafeNclNativeMethods
.OSSOCK.ControlData));
9960
UnsafeNclNativeMethods
.OSSOCK.ControlDataIPv6 controlData = (
UnsafeNclNativeMethods
.OSSOCK.ControlDataIPv6)Marshal.PtrToStructure(PtrMessage->controlBuffer.Pointer, typeof(
UnsafeNclNativeMethods
.OSSOCK.ControlDataIPv6));
10054
bool success =
UnsafeNclNativeMethods
.OSSOCK.WSAGetOverlappedResult(
net\System\Net\Sockets\SocketErrors.cs (2)
392
IOPending = (int)
UnsafeNclNativeMethods
.ErrorCodes.ERROR_IO_PENDING, // 997
398
OperationAborted = (int)
UnsafeNclNativeMethods
.ErrorCodes.ERROR_OPERATION_ABORTED, // 995, WSA_OPERATION_ABORTED
net\System\Net\WebHeaderCollection.cs (11)
273
return this[
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST_HEADER_ID.ToString((int)header)];
279
this[
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST_HEADER_ID.ToString((int)header)] = value;
301
return this[
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE_HEADER_ID.ToString((int)header)];
312
this[
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE_HEADER_ID.ToString((int)header)] = value;
320
this.Add(
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST_HEADER_ID.ToString((int)header), value);
332
this.Add(
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE_HEADER_ID.ToString((int)header), value);
339
this.Set(
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST_HEADER_ID.ToString((int)header), value);
351
this.Set(
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE_HEADER_ID.ToString((int)header), value);
364
this.SetInternal(
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE_HEADER_ID.ToString((int)header), value);
372
this.Remove(
UnsafeNclNativeMethods
.HttpApi.HTTP_REQUEST_HEADER_ID.ToString((int)header));
379
this.Remove(
UnsafeNclNativeMethods
.HttpApi.HTTP_RESPONSE_HEADER_ID.ToString((int)header));
net\System\Net\WebSockets\WebSocketHelpers.cs (3)
310
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_OPAQUE |
311
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_MORE_DATA |
312
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA,
net\System\Net\WebSockets\WebSocketHttpListenerDuplexStream.cs (22)
269
UnsafeNclNativeMethods
.HttpApi.HttpReceiveRequestEntityBody2(
278
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS &&
279
statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_IO_PENDING &&
280
statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_HANDLE_EOF)
284
else if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS &&
493
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS flags =
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.NONE;
511
flags |=
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_DISCONNECT;
515
flags |=
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_MORE_DATA;
519
flags |=
UnsafeNclNativeMethods
.HttpApi.HTTP_FLAGS.HTTP_SEND_RESPONSE_FLAG_BUFFER_DATA;
525
UnsafeNclNativeMethods
.HttpApi.HttpSendResponseEntityBody2(
537
if (statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS &&
538
statusCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_IO_PENDING)
542
else if (statusCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS &&
858
private
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK[] m_DataChunks;
1121
m_DataChunks = new
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK[2];
1123
m_DataChunks[0] = new
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK();
1124
m_DataChunks[0].DataChunkType =
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
1125
m_DataChunks[1] = new
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK();
1126
m_DataChunks[1].DataChunkType =
UnsafeNclNativeMethods
.HttpApi.HTTP_DATA_CHUNK_TYPE.HttpDataChunkFromMemory;
1265
if (errorCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS ||
1266
errorCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_HANDLE_EOF)
net\System\Net\WinHttpWebProxyFinder.cs (40)
21
session =
UnsafeNclNativeMethods
.WinHttp.WinHttpOpen(null,
22
UnsafeNclNativeMethods
.WinHttp.AccessType.NoProxy, null, null, 0);
40
if (!
UnsafeNclNativeMethods
.WinHttp.WinHttpSetTimeouts(session, timeout, timeout, timeout, timeout))
68
int errorCode = (int)
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.AudodetectionFailed;
79
if (errorCode == (int)
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.UnrecognizedScheme)
157
UnsafeNclNativeMethods
.WinHttp.WINHTTP_AUTOPROXY_OPTIONS autoProxyOptions =
158
new
UnsafeNclNativeMethods
.WinHttp.WINHTTP_AUTOPROXY_OPTIONS();
168
autoProxyOptions.Flags =
UnsafeNclNativeMethods
.WinHttp.AutoProxyFlags.AutoDetect;
170
autoProxyOptions.AutoDetectFlags =
UnsafeNclNativeMethods
.WinHttp.AutoDetectType.Dhcp |
171
UnsafeNclNativeMethods
.WinHttp.AutoDetectType.DnsA;
176
autoProxyOptions.Flags =
UnsafeNclNativeMethods
.WinHttp.AutoProxyFlags.AutoProxyConfigUrl;
178
autoProxyOptions.AutoDetectFlags =
UnsafeNclNativeMethods
.WinHttp.AutoDetectType.None;
190
if ((errorCode == (int)
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.LoginFailure) &&
210
ref
UnsafeNclNativeMethods
.WinHttp.WINHTTP_AUTOPROXY_OPTIONS autoProxyOptions,
216
UnsafeNclNativeMethods
.WinHttp.WINHTTP_PROXY_INFO proxyInfo =
217
new
UnsafeNclNativeMethods
.WinHttp.WINHTTP_PROXY_INFO();
225
success =
UnsafeNclNativeMethods
.WinHttp.WinHttpGetProxyForUrl(session,
256
GlobalLog.Assert(errorCode !=
UnsafeNclNativeMethods
.ErrorCodes.ERROR_INVALID_PARAMETER,
262
switch ((
UnsafeNclNativeMethods
.WinHttp.ErrorCodes)errorCode)
264
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.AutoProxyServiceError:
265
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.AudodetectionFailed:
266
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.BadAutoProxyScript:
267
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.LoginFailure:
268
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.OperationCancelled:
269
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.Timeout:
270
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.UnableToDownloadScript:
271
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.UnrecognizedScheme:
280
if (errorCode ==
UnsafeNclNativeMethods
.ErrorCodes.ERROR_SUCCESS)
285
switch ((
UnsafeNclNativeMethods
.WinHttp.ErrorCodes)errorCode)
287
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.AudodetectionFailed:
290
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.UnableToDownloadScript:
293
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.UnrecognizedScheme:
296
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.BadAutoProxyScript:
297
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.InvalidUrl:
298
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.AutoProxyServiceError:
327
switch ((
UnsafeNclNativeMethods
.WinHttp.ErrorCodes)errorCode)
329
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.Success:
330
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.InvalidUrl:
333
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.BadAutoProxyScript:
336
case
UnsafeNclNativeMethods
.WinHttp.ErrorCodes.AutoProxyServiceError:
net\System\URI.cs (2)
267
UnsafeNclNativeMethods
.CoCreateInstance(
270
UnsafeNclNativeMethods
.CLSCTX_SERVER,