462 instantiations of IntPtr
Microsoft.AspNetCore.Http.Extensions.Tests (4)
RequestDelegateFactoryTests.cs (2)
319new object[] { (Action<HttpContext, IntPtr[]>)Store, new[] { "-42" },new[] { new IntPtr(-42) } }, 370new object[] { (Action<HttpContext, IntPtr>)Store, "-42", new IntPtr(-42) },
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (1)
125new object[] { "IntPtr[]", new[] { "-42" },new[] { new IntPtr(-42) } },
RequestDelegateGenerator\RequestDelegateCreationTests.TryParse.cs (1)
33new object[] { "IntPtr", "-42", new IntPtr(-42) },
Microsoft.AspNetCore.Server.HttpSys (8)
AuthenticationManager.cs (1)
137IntPtr infoptr = new IntPtr(&authInfo);
NativeInterop\HttpServerSessionHandle.cs (1)
22SetHandle(new IntPtr(1));
NativeInterop\UrlGroup.cs (5)
63SetProperty(HTTP_SERVER_PROPERTY.HttpServerQosProperty, new IntPtr(&qosSettings), (uint)QosInfoSize); 74SetProperty(HTTP_SERVER_PROPERTY.HttpServerDelegationProperty, new IntPtr(&propertyInfo), (uint)RequestPropertyInfoSize); 84SetProperty(HTTP_SERVER_PROPERTY.HttpServerDelegationProperty, new IntPtr(&propertyInfo), (uint)RequestPropertyInfoSize, throwOnError); 117var infoptr = new IntPtr(&info); 133var infoptr = new IntPtr(&info);
TimeoutManager.cs (1)
222var infoptr = new IntPtr(&timeoutinfo);
Microsoft.AspNetCore.Server.IISIntegration (1)
IISMiddleware.cs (1)
178var handle = new IntPtr(hexHandle);
Microsoft.AspNetCore.Server.Kestrel.Core (1)
Internal\Infrastructure\HttpUtilities.cs (1)
95return string.Create(span.Length, new IntPtr(source), s_getHeaderName);
Microsoft.Build (11)
BackEnd\Node\NativeMethods.cs (1)
25internal static readonly IntPtr InvalidHandle = new IntPtr(-1);
InprocTrackingNativeMethods.cs (10)
98Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 104Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 110Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 116Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 122Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 128Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 134Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 140Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 146Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 220Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1));
Microsoft.Build.Engine (2)
LocalProvider\NativeMethods.cs (1)
17internal static readonly IntPtr InvalidHandle = new IntPtr(-1);
Shared\NativeMethodsShared.cs (1)
34internal static IntPtr NullIntPtr = new IntPtr(0);
Microsoft.Build.Framework (2)
NativeMethods.cs (2)
61internal static IntPtr NullIntPtr = new IntPtr(0); 62internal static IntPtr InvalidHandle = new IntPtr(-1);
Microsoft.Build.Tasks.Core (7)
ManifestUtil\EmbeddedManifestReader.cs (1)
15private static readonly IntPtr s_id1 = new IntPtr(1);
ManifestUtil\mansign2.cs (4)
422IntPtr pIssuerKeyHash = new IntPtr(); 536publicKeyBlob.pbData = new IntPtr(pbPublicKeyBlob); 537IntPtr pPublicKeyToken = new IntPtr(); 928IntPtr pvLicense = new IntPtr(pbLicense);
ManifestUtil\NativeMethods.cs (1)
14public static readonly IntPtr RT_MANIFEST = new IntPtr(24);
NativeMethods.cs (1)
528internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1);
Microsoft.Build.Utilities.Core (10)
InprocTrackingNativeMethods.cs (10)
98Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 104Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 110Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 116Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 122Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 128Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 134Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 140Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 146Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1)); 220Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1));
Microsoft.Build.Utilities.UnitTests (1)
NativeMethods.cs (1)
25internal static readonly IntPtr InvalidHandle = new IntPtr(-1);
Microsoft.DotNet.RemoteExecutor.Tests (2)
RemoteExecutorTests.cs (2)
119System.Runtime.InteropServices.Marshal.StructureToPtr(1, new IntPtr(1), true); 143System.Runtime.InteropServices.Marshal.StructureToPtr(1, new IntPtr(1), true);
MSBuildTaskHost (2)
NativeMethods.cs (2)
61internal static IntPtr NullIntPtr = new IntPtr(0); 62internal static IntPtr InvalidHandle = new IntPtr(-1);
PresentationCore (19)
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (2)
547Marshal.StructureToPtr(packetProperties[i], new IntPtr(pElement), false); 579Marshal.DestroyStructure(new IntPtr(pElement), typeof(MS.Win32.Recognizer.PACKET_PROPERTY));
MS\Internal\Text\TextInterface\DWriteUtil.cs (1)
39System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(hr, new System.IntPtr(-1));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\CharacterBuffer.cs (3)
228return new IntPtr(((char*)gcHandle.AddrOfPinnedObject().ToPointer()) + offset); 327return new IntPtr(((char*)gcHandle.AddrOfPinnedObject().ToPointer()) + offset); 436return new IntPtr(_unsafeString + offset);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (2)
149return Marshal.GetExceptionForHR(hr, new IntPtr(-1)); 156Marshal.ThrowExceptionForHR(hr, new IntPtr(-1));
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (2)
211result.CommHandle = new SecurityCriticalDataClass<IntPtr>((IntPtr.Size == 4 ? new IntPtr((int)commHandle) : new IntPtr(commHandle)));
System\Windows\InterOp\HwndAppCommandInputProvider.cs (1)
69return handled ? new IntPtr(1) : IntPtr.Zero ;
System\Windows\InterOp\HwndStylusInputProvider.cs (3)
52UnsafeNativeMethods.SetProp(new HandleRef(this, sourceHandle), "MicrosoftTabletPenServiceProperty", new HandleRef(null, new IntPtr(MultiTouchEnabledFlag))); 141result = new IntPtr(flags); 154result = new IntPtr(0x0001); // tell UIHub the flick has already been handled.
System\Windows\InterOp\HwndTarget.cs (2)
106private static readonly IntPtr Handled = new IntPtr(0x1); 1474return new IntPtr(Marshal.GetHRForException(e));
System\Windows\Media\GlyphTypeface.cs (1)
1290Marshal.Copy(new IntPtr(pMilPathGeometry), data, 0, checked((int)size));
System\Windows\Media\Imaging\BitmapSource.cs (1)
1881Marshal.Copy(managedArray, y * rectRowSize, new IntPtr(rowPtr), rectRowSize);
System\Windows\Media\Imaging\WriteableBitmap.cs (1)
559buffer = new IntPtr(((long) buffer) + (long) offsetInBytes);
PresentationFramework (31)
Microsoft\Win32\CommonDialog.cs (1)
245return new IntPtr(1);
MS\Internal\IO\Packaging\UnsafeIndexingFilterStream.cs (3)
97IntPtr pBytesRead = new IntPtr(&bytesRead); 107_oleStream.Read(new IntPtr(bufferPointer), count, pBytesRead); 138IntPtr positionAddress = new IntPtr(&position);
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (1)
521____return_value__ = FindAdapter(new IntPtr(thisPtr))._Current;
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (2)
270____return_value__ = FindAdapter(new IntPtr(thisPtr)).GetAt(index); 291____return_value__ = FindAdapter(new IntPtr(thisPtr)).IndexOf(Marshaler<T>.FromAbi(value), out __index);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (1)
149return Marshal.GetExceptionForHR(hr, new IntPtr(-1));
System\Windows\Application.cs (1)
2121refInt = new IntPtr(1);
System\Windows\Documents\ImmComposition.cs (4)
1353IntPtr lret = new IntPtr(requestSize); 1397Marshal.Copy(surrounding.ToCharArray(), 0, new IntPtr((void*)p), surrounding.Length); 1557return new IntPtr(1); 1759lret = UnsafeNativeMethods.SendMessage(hwndDefIme, s_MsImeMouseMessage, new IntPtr(wParam), himc);
System\Windows\Interop\DynamicScriptObject.cs (1)
318dp.rgdispidNamedArgs = new IntPtr(&propertyPutDispId);
System\Windows\Shell\WindowChromeWorker.cs (6)
563IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1)); 623retVal = new IntPtr((int) (WVR.REDRAW)); 676return new IntPtr((int)HT.CLIENT); 683return new IntPtr((int)_GetHTFromResizeGripDirection(direction)); 709return new IntPtr((int)ht); 870NativeMethods.SetWindowLongPtr(_hwnd, GWL.STYLE, new IntPtr((int)dwNewStyle));
System\Windows\Standard\NativeMethods.cs (7)
1595handle = new IntPtr(dwCookie); 2856ret = new IntPtr(NativeMethodsSetLastError.GetWindowLong(hwnd, (int)nIndex)); 3033return new IntPtr(SetClassLongPtr32(hwnd, nIndex, dwNewLong.ToInt32())); 3058if (!_SetProcessWorkingSetSize(hProcess, new IntPtr(dwMinimumWorkingSetSize), new IntPtr(dwMaximumWorkingSetSize))) 3072return new IntPtr(NativeMethodsSetLastError.SetWindowLong(hwnd, (int)nIndex, dwNewLong.ToInt32())); 3225if (!_UnregisterClassAtom(new IntPtr(atom), hinstance))
System\Windows\SystemCommands.cs (2)
39NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero); 93NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
System\Windows\Window.cs (2)
2191UnsafeNativeMethods.UnsafeSendMessage(CriticalHandle, WindowMessage.WM_CLOSE, new IntPtr(), new IntPtr());
PresentationUI (2)
MS\Internal\Documents\PeoplePickerWrapper.cs (2)
417IntPtr nameOffset = new IntPtr(_ptrToDsObjectNames.ToInt64() + dsObject.offsetName); 448IntPtr offset = new IntPtr(_ptrToDsObjectNames.ToInt64() +
ReachFramework (7)
MS\Internal\Printing\Configuration\WinSpoolPrinterCapabilities.cs (1)
561IntPtr strAddr = new IntPtr(baseAddr.ToInt64() + offset);
PrintConfig\PTProvider.cs (6)
640stream.Seek(0, 1 /* STREAM_SEEK_CUR */, new IntPtr(&iStreamPosition)); 670dst.Write(src, (int)byteCount, new IntPtr(&totalBytesWritten)); 691dst.Write(data, bytesToWrite, new IntPtr(&bytesWritten)); 724src.Read(dst, (int)byteCount, new IntPtr(&totalBytesRead)); 745src.Read(data, bytesToRead, new IntPtr(&bytesRead)); 769stream.Seek(0, 1 /* STREAM_SEEK_CUR */, new IntPtr(&iStreamPosition));
System.Diagnostics.Process (1)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.ParseMapModules.cs (1)
74module.BaseAddress = new IntPtr((void*)parsedLine.StartAddress);
System.IO.Compression (2)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (2)
204: base(new IntPtr(-1), true) 212get { return handle == new IntPtr(-1); }
System.IO.Hashing (1)
System\IO\Hashing\XxHash128.cs (1)
224Unsafe.WriteUnaligned(ref Unsafe.AddByteOffset(ref dest0, new IntPtr(sizeof(ulong))), low);
System.IO.MemoryMappedFiles (3)
Microsoft\Win32\SafeMemoryMappedViewHandle.Unix.cs (1)
19handle = new IntPtr(-1);
System\IO\MemoryMappedFiles\MemoryMappedView.Unix.cs (2)
61fd = new SafeFileHandle(new IntPtr(-1), false); 103new SafeFileHandle(new IntPtr(-1), false), // ignore the actual fd even if there was one
System.IO.Pipes (3)
Microsoft\Win32\SafeHandles\SafePipeHandle.cs (1)
16: this(new IntPtr(DefaultInvalidHandle), true)
System\IO\Pipes\PipeStream.Unix.cs (2)
455reader.SetHandle(new IntPtr(fds[Interop.Sys.ReadEndOfPipe])); 456writer.SetHandle(new IntPtr(fds[Interop.Sys.WriteEndOfPipe]));
System.Net.Ping (1)
System\Net\NetworkInformation\Ping.RawSocket.cs (1)
451Marshal.Copy(new IntPtr(&icmpHeader), result, offset, icmpHeaderSize);
System.Net.WebSockets (2)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (2)
204: base(new IntPtr(-1), true) 212get { return handle == new IntPtr(-1); }
System.Private.CoreLib (19)
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\CriticalHandleMinusOneIsInvalid.cs (2)
13: base(new IntPtr(-1)) 17public override bool IsInvalid => handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\CriticalHandleZeroOrMinusOneIsInvalid.cs (1)
17public override bool IsInvalid => handle == IntPtr.Zero || handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (1)
53SetHandle(new IntPtr(-1));
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeHandleMinusOneIsInvalid.cs (2)
12protected SafeHandleMinusOneIsInvalid(bool ownsHandle) : base(new IntPtr(-1), ownsHandle) 16public override bool IsInvalid => handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeHandleZeroOrMinusOneIsInvalid.cs (1)
16public override bool IsInvalid => handle == IntPtr.Zero || handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\System\Threading\Overlapped.cs (2)
33: this(offsetLo, offsetHi, new IntPtr(hEvent), ar) 59set => EventHandleIntPtr = new IntPtr(value);
src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (1)
28private static IntPtr InvalidHandleValue => new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
15protected static readonly IntPtr InvalidHandle = new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.FullGlobalizationData.cs (1)
83regionPtr = new IntPtr(regionInAscii);
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (2)
113AsAnyMarshaler marshaler = new AsAnyMarshaler(new IntPtr(&nativeArrayMarshalerState)); 180AsAnyMarshaler marshaler = new AsAnyMarshaler(new IntPtr(&nativeArrayMarshalerState));
src\System\Runtime\Loader\AssemblyLoadContext.CoreCLR.cs (2)
78LoadFromStream(_nativeAssemblyLoadContext, new IntPtr(ptrAssembly), arrAssembly.Length, 79new IntPtr(ptrSymbols), arrSymbols.Length, ObjectHandleOnStack.Create(ref loadedAssembly));
src\System\StubHelpers.cs (3)
369return new IntPtr(pNative); 965IntPtr pNativeHomeAddr = new IntPtr(&pNativeHome); 1172new IntPtr(&pNativeHome));
UIAutomationClient (10)
MS\Internal\Automation\HwndProxyElementProvider.cs (3)
135if (Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETTEXT, new IntPtr(ilen + 1), str) == IntPtr.Zero) 1465if (visibilityOverride == new IntPtr(1)) 1469else if (visibilityOverride == new IntPtr(2))
MS\Internal\Automation\input.cs (2)
64ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 ); 81ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 );
MS\Internal\Automation\Misc.cs (1)
416result = new IntPtr(iResult);
MS\Win32\UnsafeNativeMethods.cs (3)
22public static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); 267public static readonly IntPtr HTTRANSPARENT = new IntPtr(-1); 268public static readonly IntPtr HTCLIENT = new IntPtr(1);
System\Windows\Automation\Automation.cs (1)
177if ( HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.HWND.Cast( new IntPtr( (int)val ) ) ) )
UIAutomationClientSideProviders (307)
MS\Internal\AutomationProxies\Accessible.cs (2)
167wParam = new IntPtr(UnsafeNativeMethods.GetCurrentProcessId()); 170IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject));
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (1)
125ReadFrom(ptr, new IntPtr(maxLength * sizeof (char)));
MS\Internal\AutomationProxies\CommonXSendMessage.cs (177)
90IntPtr remoteTextArea = new IntPtr((byte*)rmem.Address.ToPointer() + cbSize); 105rmem.WriteTo(lParam, new IntPtr(cbSize)); 124rmem.ReadFrom(new IntPtr((byte*)rmem.Address.ToPointer() + cbSize), new IntPtr(pchRes), new IntPtr(maxLength * sizeof(char))); 235rmem.WriteTo(ptrStructure, new IntPtr(cbSize)); 247rmem.ReadFrom(ptrStructure, new IntPtr(cbSize)); 282rmem.WriteTo(ptrStructure, new IntPtr(cbSize)); 285IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam)); 294rmem.ReadFrom(ptrStructure, new IntPtr(cbSize)); 337rmem1.WriteTo(ptrStructure1, new IntPtr(cbSize1)); 338rmem2.WriteTo(ptrStructure2, new IntPtr(cbSize2)); 350rmem1.ReadFrom(ptrStructure1, new IntPtr(cbSize1)); 351rmem2.ReadFrom(ptrStructure2, new IntPtr(cbSize2)); 379rmem.WriteTo(ptrStructure, new IntPtr(cbSize)); 385rmem.ReadFrom(ptrStructure, new IntPtr(cbSize)); 410return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 417new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), 425return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 439return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType())); 445return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 451return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 467return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 474bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 486bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 507new IntPtr(group.iGroupID), new IntPtr(&group), Marshal.SizeOf(group.GetType())); 514new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 521new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 540new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 551new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 562new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 585new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 596new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 607new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 632return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszHeader), item.cchHeader); 644return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszHeader), item32.cchHeader); 656return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszHeader), item64.cchHeader); 682textAddress = new IntPtr(&item.pszHeader); 687textAddress = new IntPtr(&item.pszSubsetTitle); 691return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true); 700textAddress = new IntPtr(&item32.pszHeader); 705textAddress = new IntPtr(&item32.pszSubsetTitle); 709return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true); 718textAddress = new IntPtr(&item64.pszHeader); 723textAddress = new IntPtr(&item64.pszSubsetTitle); 727return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), textAddress, size, true); 753return XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 760bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 773bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 794return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 800return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), 801new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), 809return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 835return XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 842bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 855bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 876return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 883hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), 884Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), item32.cchTextMax, 891return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 917return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 924bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 937bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 958return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 964return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 970return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 991if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo), 1000if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo32), 1003hitTestItem = new IntPtr(hitTestInfo32.hItem); 1009if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo64), 1012hitTestItem = new IntPtr(hitTestInfo64.hItem); 1029return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1036hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), 1037Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), item32.cchTextMax, 1044return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1070return XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()), ErrorValue.Zero); 1077bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), ErrorValue.Zero); 1090bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), ErrorValue.Zero); 1122IntPtr wParam = new IntPtr(maxTextLength); 1127hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item), 1128Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), maxTextLength, true); 1135hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item32), 1136Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), maxTextLength, 1144hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item64), 1145Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), maxTextLength, true); 1185IntPtr localRectStart = new IntPtr(&rectW32.left); 1187remoteMem.WriteTo(localRectStart, new IntPtr(cMem)); 1189if (Misc.ProxySendMessageInt(hwnd, msg, new IntPtr(index), remoteMem.Address) != 0) 1191remoteMem.ReadFrom(localRectStart, new IntPtr(cMem)); 1258if (Misc.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero) 1353XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1368if (Misc.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1401XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1416if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1449XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1464if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1581nativeItem.pszText = new IntPtr(item.pszText); 1584nativeItem.lParam = new IntPtr(item.lParam); 1626nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 1670nativeItem.pszText = new IntPtr(item.pszText); 1671nativeItem.hbm = new IntPtr(item.hbm); 1674nativeItem.lParam = new IntPtr(item.lParam); 1678nativeItem.pvFilter = new IntPtr(item.pvFilter); 1726nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 1775nativeItem.pszText = new IntPtr(item.pszText); 1778nativeItem.lParam = new IntPtr(item.lParam); 1829nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 1881nativeItem.pszText = new IntPtr(item.pszText); 1884nativeItem.lParam = new IntPtr(item.lParam); 1888nativeItem.puColumns = new IntPtr(item.puColumns); 1946nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 1992nativeItem.pszHeader = new IntPtr(item.pszHeader); 1994nativeItem.pszFooter = new IntPtr(item.pszFooter); 2073nativeItem.pszHeader = new IntPtr(item.pszHeader); 2075nativeItem.pszFooter = new IntPtr(item.pszFooter); 2289nativeItem.iString = new IntPtr(item.iString); 2381nativeItem.hItem = new IntPtr(item.hItem); 2384nativeItem.pszText = new IntPtr(item.pszText); 2389nativeItem.lParam = new IntPtr(item.lParam); 2440nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 2467nativeHitTestInfo.hItem = new IntPtr(hitTestInfo.hItem); 2494nativeHitTestInfo.hItem = new IntPtr(hitTestInfo64.hItem); 2531nativeItem.hwnd = new IntPtr(item.hwnd); 2534nativeItem.hinst = new IntPtr(item.hinst); 2535nativeItem.pszText = new IntPtr(item.pszText); 2536nativeItem.lParam = new IntPtr(item.lParam); 2579nativeItem.lParam = new IntPtr(unchecked((int)item.lParam));
MS\Internal\AutomationProxies\Input.cs (3)
119mi.union.mouseInput.dwExtraInfo = new IntPtr( 0 ); 142ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 ); 164ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 );
MS\Internal\AutomationProxies\Misc.cs (1)
589VirtualAlloc(new IntPtr((byte *)memAddr.ToPointer() + cbSize - pageSize), new UIntPtr(pageSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_NOACCESS);
MS\Internal\AutomationProxies\WindowsButton.cs (4)
503Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 517Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 566return Misc.InTheShellProcess(_hwnd) && UnsafeNativeMethods.GetProp(_hwnd, "StartButtonTag") == new IntPtr(304); 711IntPtr selectedRadiobutton = new IntPtr(0);
MS\Internal\AutomationProxies\WindowsComboBox.cs (5)
395IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.CBN_EDITUPDATE)); 579Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 584Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 707int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 725return Misc.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (1)
159if (XSendMessage.XSend(hwnd, WM_GETCONTROLNAME, new IntPtr(Misc.MaxLengthNameProperty), ref winFormsID, Misc.MaxLengthNameProperty))
MS\Internal\AutomationProxies\WindowsHyperlink.cs (4)
219bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 284return XSendMessage.XSend(_hwnd, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM)); 402return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 499bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
MS\Internal\AutomationProxies\WindowsListBox.cs (19)
610return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 733int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 748string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen); 946Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 992return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 1001SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item)); 1005SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1020return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR; 1049return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1066Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect); 1135Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item)); 1140Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1156new IntPtr(NativeMethods.Util.MAKELONG( 1170Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1175IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.LBN_SELCHANGE)); 1194return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (16)
1242return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags)); 1259return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1)); 1276if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1352return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1376IntPtr partialVisible = (partialOK) ? IntPtr.Zero : new IntPtr (1); 1378return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0; 1426result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1434result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1497if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETSUBITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1798if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMPOSITION, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(pt.GetType()))) 1816return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask));
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (6)
309XSendMessage.XSendGetIndex(_hwnd, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 340bool lresult = XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 497bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (7)
244return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 388while (XSendMessage.XSend (hwnd, NativeMethods.LVM_GETNEXTITEMINDEX, new IntPtr(&ii), flags, Marshal.SizeOf(ii.GetType()))) 395bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(ii.iGroup), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 468XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPMETRICS, IntPtr.Zero, new IntPtr(&(metric.cbSize)), metric.cbSize, XSendMessage.ErrorValue.NoCheck); 705new IntPtr(_groupID), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (2)
77XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, new IntPtr(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewItem.cs (4)
137if (XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETITEMINDEXRECT, new IntPtr(&ii), new IntPtr(&itemRectangle), Marshal.SizeOf(ii.GetType()), Marshal.SizeOf(itemRectangle.GetType()))) 974IntPtr keyUpLParam = new IntPtr (scanCode + (1 << 31) + (1 << 30)); 977Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode));
MS\Internal\AutomationProxies\WindowsMenu.cs (4)
2605if (!Misc.ReadProcessMemory(hProcess, dwItemData, new IntPtr(&msaaMenuInfo), new IntPtr(readSize), out count)) 2628if (Misc.ReadProcessMemory(hProcess, msaaMenuInfo.pszWText, new IntPtr(text), new IntPtr(readSize), out count))
MS\Internal\AutomationProxies\WindowsProgressbar.cs (1)
160int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (5)
208return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 401if (!XSendMessage.XSend(hwnd, NativeMethods.RB_GETRECT, new IntPtr(item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 435if (XSendMessage.XSend(_hwnd, NativeMethods.RB_GETBANDINFOA, new IntPtr(_item), new IntPtr(&rebarBandInfo), Marshal.SizeOf(rebarBandInfo.GetType()), XSendMessage.ErrorValue.Zero))
MS\Internal\AutomationProxies\WindowsSlider.cs (5)
182Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 287Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val)); 464XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 476XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck);
MS\Internal\AutomationProxies\WindowsStatusBar.cs (1)
599int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (7)
168index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 291Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 305return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 491Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 578result = XSendMessage.XSend(_hwnd, NativeMethods.HDM_GETITEMRECT, new IntPtr(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 737Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
MS\Internal\AutomationProxies\WindowsTab.cs (7)
281index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType())); 661result = XSendMessage.XSend(hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(count - 1), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 1011Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1280if (!XSendMessage.XSend(_hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(_item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 1314Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (8)
306if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 435if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 475return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 521Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 605int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 650|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 657if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 684if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
74if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 80if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTreeView.cs (14)
413return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0; 419return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0; 438if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0) 444fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0; 525return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem); 531return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask)); 559IntPtr rectangle = new IntPtr (&(rc.left)); 560IntPtr partialDisplay = (labelOnly) ? new IntPtr (1) : IntPtr.Zero; 650IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 672return new IntPtr(idChild); 1288int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED)); 1603IntPtr pAddress = new IntPtr((long)address + (image * readSize)); 1607if (!Misc.ReadProcessMemory(hProcess, pAddress, new IntPtr(&ent), new IntPtr(readSize), out count))
MS\Win32\UnsafeNativeMethods.cs (1)
386result = new IntPtr(iResult);
UIAutomationTypes (3)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (2)
904public static HandleRef HWND_TOPMOST = new HandleRef(null, new IntPtr(-1)); 905public static HandleRef HWND_NOTOPMOST = new HandleRef(null, new IntPtr(-2));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsOther.cs (1)
361public static IntPtr HWND_MESSAGE = new IntPtr(-3);
11532 references to IntPtr
http2cat (9)
src\Shared\ServerInfrastructure\StringUtilities.cs (9)
28var resultString = string.Create(span.Length, (IntPtr)source, s_getAsciiOrUTF8StringNonNullCharacters); 53private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiOrUTF8StringNonNullCharacters = (Span<char> buffer, IntPtr state) => 76return string.Create(span.Length, (IntPtr)source, s_getAsciiStringNonNullCharacters); 80private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiStringNonNullCharacters = (Span<char> buffer, IntPtr state) => 102return string.Create(span.Length, (IntPtr)source, s_getLatin1StringNonNullCharacters); 106private static readonly unsafe SpanAction<char, IntPtr> s_getLatin1StringNonNullCharacters = (Span<char> buffer, IntPtr state) =>
IIS.FunctionalTests (9)
src\Shared\ServerInfrastructure\StringUtilities.cs (9)
28var resultString = string.Create(span.Length, (IntPtr)source, s_getAsciiOrUTF8StringNonNullCharacters); 53private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiOrUTF8StringNonNullCharacters = (Span<char> buffer, IntPtr state) => 76return string.Create(span.Length, (IntPtr)source, s_getAsciiStringNonNullCharacters); 80private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiStringNonNullCharacters = (Span<char> buffer, IntPtr state) => 102return string.Create(span.Length, (IntPtr)source, s_getLatin1StringNonNullCharacters); 106private static readonly unsafe SpanAction<char, IntPtr> s_getLatin1StringNonNullCharacters = (Span<char> buffer, IntPtr state) =>
IIS.LongTests (9)
src\Shared\ServerInfrastructure\StringUtilities.cs (9)
28var resultString = string.Create(span.Length, (IntPtr)source, s_getAsciiOrUTF8StringNonNullCharacters); 53private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiOrUTF8StringNonNullCharacters = (Span<char> buffer, IntPtr state) => 76return string.Create(span.Length, (IntPtr)source, s_getAsciiStringNonNullCharacters); 80private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiStringNonNullCharacters = (Span<char> buffer, IntPtr state) => 102return string.Create(span.Length, (IntPtr)source, s_getLatin1StringNonNullCharacters); 106private static readonly unsafe SpanAction<char, IntPtr> s_getLatin1StringNonNullCharacters = (Span<char> buffer, IntPtr state) =>
IIS.NewHandler.FunctionalTests (9)
src\Shared\ServerInfrastructure\StringUtilities.cs (9)
28var resultString = string.Create(span.Length, (IntPtr)source, s_getAsciiOrUTF8StringNonNullCharacters); 53private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiOrUTF8StringNonNullCharacters = (Span<char> buffer, IntPtr state) => 76return string.Create(span.Length, (IntPtr)source, s_getAsciiStringNonNullCharacters); 80private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiStringNonNullCharacters = (Span<char> buffer, IntPtr state) => 102return string.Create(span.Length, (IntPtr)source, s_getLatin1StringNonNullCharacters); 106private static readonly unsafe SpanAction<char, IntPtr> s_getLatin1StringNonNullCharacters = (Span<char> buffer, IntPtr state) =>
IIS.NewShim.FunctionalTests (9)
src\Shared\ServerInfrastructure\StringUtilities.cs (9)
28var resultString = string.Create(span.Length, (IntPtr)source, s_getAsciiOrUTF8StringNonNullCharacters); 53private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiOrUTF8StringNonNullCharacters = (Span<char> buffer, IntPtr state) => 76return string.Create(span.Length, (IntPtr)source, s_getAsciiStringNonNullCharacters); 80private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiStringNonNullCharacters = (Span<char> buffer, IntPtr state) => 102return string.Create(span.Length, (IntPtr)source, s_getLatin1StringNonNullCharacters); 106private static readonly unsafe SpanAction<char, IntPtr> s_getLatin1StringNonNullCharacters = (Span<char> buffer, IntPtr state) =>
IIS.ShadowCopy.Tests (9)
src\Shared\ServerInfrastructure\StringUtilities.cs (9)
28var resultString = string.Create(span.Length, (IntPtr)source, s_getAsciiOrUTF8StringNonNullCharacters); 53private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiOrUTF8StringNonNullCharacters = (Span<char> buffer, IntPtr state) => 76return string.Create(span.Length, (IntPtr)source, s_getAsciiStringNonNullCharacters); 80private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiStringNonNullCharacters = (Span<char> buffer, IntPtr state) => 102return string.Create(span.Length, (IntPtr)source, s_getLatin1StringNonNullCharacters); 106private static readonly unsafe SpanAction<char, IntPtr> s_getLatin1StringNonNullCharacters = (Span<char> buffer, IntPtr state) =>
IIS.Tests (5)
Utilities\TestServer.cs (5)
144private int Main(IntPtr argc, IntPtr argv) 190private delegate int hostfxr_main_fn(IntPtr argc, IntPtr argv); 208private static partial IntPtr LoadLibrary([MarshalAs(UnmanagedType.LPWStr)] string lpFileName);
IISExpress.FunctionalTests (9)
src\Shared\ServerInfrastructure\StringUtilities.cs (9)
28var resultString = string.Create(span.Length, (IntPtr)source, s_getAsciiOrUTF8StringNonNullCharacters); 53private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiOrUTF8StringNonNullCharacters = (Span<char> buffer, IntPtr state) => 76return string.Create(span.Length, (IntPtr)source, s_getAsciiStringNonNullCharacters); 80private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiStringNonNullCharacters = (Span<char> buffer, IntPtr state) => 102return string.Create(span.Length, (IntPtr)source, s_getLatin1StringNonNullCharacters); 106private static readonly unsafe SpanAction<char, IntPtr> s_getLatin1StringNonNullCharacters = (Span<char> buffer, IntPtr state) =>
InMemory.FunctionalTests (1)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Components (1)
src\Shared\QueryStringEnumerable.cs (1)
104(IntPtr)(&span), static (dest, ptr) => ((ReadOnlySpan<char>*)ptr)->Replace(dest, '+', ' '))).AsMemory();
Microsoft.AspNetCore.Cryptography.Internal (49)
Cng\BCryptBuffer.cs (1)
15public IntPtr pvBuffer; // Pointer to buffer
Cng\BCryptUtil.cs (1)
21hAlgorithm: IntPtr.Zero,
SafeHandles\BCryptAlgorithmHandle.cs (2)
32int ntstatus = UnsafeNativeMethods.BCryptCreateHash(this, out retVal, IntPtr.Zero, 0, pbKey, cbKey, dwFlags: 0); 55int ntstatus = UnsafeNativeMethods.BCryptGenerateSymmetricKey(this, out retVal, IntPtr.Zero, 0, pbSecret, cbSecret, 0);
SafeHandles\BCryptHashHandle.cs (1)
21int ntstatus = UnsafeNativeMethods.BCryptDuplicateHash(this, out duplicateHandle, IntPtr.Zero, 0, 0);
SafeHandles\NCryptDescriptorHandle.cs (1)
24pMemPara: IntPtr.Zero,
SafeHandles\SafeLibraryHandle.cs (11)
28IntPtr pfnProc = UnsafeNativeMethods.GetProcAddress(this, lpProcName); 29return (pfnProc != IntPtr.Zero); 68Arguments: IntPtr.Zero /* unused */); 90IntPtr pfnProc = UnsafeNativeMethods.GetProcAddress(this, lpProcName); 91if (pfnProc == IntPtr.Zero) 113SafeLibraryHandle handle = UnsafeNativeMethods.LoadLibraryEx(filename, IntPtr.Zero, LOAD_LIBRARY_SEARCH_SYSTEM32); 144IntPtr Arguments 159IntPtr hModule); 172out IntPtr phModule); 177internal static partial IntPtr GetProcAddress( 194IntPtr hFile,
SafeHandles\SecureLocalAllocHandle.cs (5)
16private readonly IntPtr _cb; 18private SecureLocalAllocHandle(IntPtr cb) 23public IntPtr Length 34public static SecureLocalAllocHandle Allocate(IntPtr cb) 44private void AllocateImpl(IntPtr cb)
UnsafeBufferUtil.cs (5)
78public static void BlockCopy(LocalAllocHandle from, LocalAllocHandle to, IntPtr length) 80if (length == IntPtr.Zero) 91if (sizeof(IntPtr) == 4) 185public static void SecureZeroMemory(byte* buffer, IntPtr length) 187if (sizeof(IntPtr) == 4)
UnsafeNativeMethods.cs (22)
40IntPtr hAlgorithm, 53IntPtr pbHashObject, 107IntPtr hHash); 120IntPtr hKey); 132IntPtr pbHashObject, 178IntPtr pbKeyObject, 192IntPtr hAlgorithm, 281IntPtr szDataDescr, 283IntPtr pvReserved, 284IntPtr pPromptStruct, 311IntPtr ppszDataDescr, 313IntPtr pvReserved, 314IntPtr pPromptStruct, 359IntPtr hDescriptor); 382IntPtr pMemPara, 398IntPtr pMemPara, 399IntPtr hWnd, 411IntPtr phDescriptor, 415IntPtr pMemPara, 416IntPtr hWnd, 432IntPtr pMemPara, 433IntPtr hWnd,
Microsoft.AspNetCore.Cryptography.Internal.Tests (12)
Cng\BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO_Tests.cs (8)
20Assert.Equal(IntPtr.Zero, (IntPtr)cipherModeInfo.pbNonce); 22Assert.Equal(IntPtr.Zero, (IntPtr)cipherModeInfo.pbAuthData); 24Assert.Equal(IntPtr.Zero, (IntPtr)cipherModeInfo.pbTag); 26Assert.Equal(IntPtr.Zero, (IntPtr)cipherModeInfo.pbMacContext);
SafeHandles\SecureLocalAllocHandleTests.cs (1)
17var controlHandle = SecureLocalAllocHandle.Allocate((IntPtr)cbExpected);
UnsafeBufferUtilTests.cs (3)
54UnsafeBufferUtil.BlockCopy(from: controlHandle, to: testHandle, length: (IntPtr)cbExpected); 149UnsafeBufferUtil.SecureZeroMemory((byte*)&x, length: (IntPtr)sizeof(long)); 157return SecureLocalAllocHandle.Allocate((IntPtr)cb);
Microsoft.AspNetCore.Cryptography.KeyDerivation (3)
PBKDF2\Win8Pbkdf2Provider.cs (3)
161pBuffers[0].pvBuffer = (IntPtr)(&iterCount); 165pBuffers[1].pvBuffer = (IntPtr)pbSalt; 171pBuffers[2].pvBuffer = (IntPtr)pszHashAlgorithm;
Microsoft.AspNetCore.DataProtection (22)
Cng\DpapiSecretSerializerHelper.cs (16)
90szDataDescr: IntPtr.Zero, 92pvReserved: IntPtr.Zero, 93pPromptStruct: IntPtr.Zero, 104Marshal.Copy((IntPtr)dataOut.pbData, retVal, 0, dataLength); 113Marshal.FreeHGlobal((IntPtr)dataOut.pbData); 157pMemPara: IntPtr.Zero, 158hWnd: IntPtr.Zero, 233ppszDataDescr: IntPtr.Zero, 235pvReserved: IntPtr.Zero, 236pPromptStruct: IntPtr.Zero, 254Marshal.FreeHGlobal((IntPtr)dataOut.pbData); 280phDescriptor: IntPtr.Zero, 284pMemPara: IntPtr.Zero, 285hWnd: IntPtr.Zero, 345pMemPara: IntPtr.Zero, 346hWnd: IntPtr.Zero,
Repositories\RegistryXmlRepository.cs (1)
84var registryView = IntPtr.Size == 4 ? RegistryView.Registry32 : RegistryView.Registry64;
Secret.cs (2)
134var handle = SecureLocalAllocHandle.Allocate((IntPtr)checked((int)cbPlaintext)); 150var encryptedMemoryHandle = SecureLocalAllocHandle.Allocate((IntPtr)numTotalBytesToAllocate);
SP800_108\Win8SP800_108_CTR_HMACSHA512Provider.cs (3)
36pBuffers[0].pvBuffer = (IntPtr)pbLabel; 40pBuffers[1].pvBuffer = (IntPtr)pbContext; 44pBuffers[2].pvBuffer = (IntPtr)pszHashAlgorithm;
Microsoft.AspNetCore.DataProtection.Tests (22)
Cng\CngAuthenticatedEncryptorBaseTests.cs (22)
19.Setup(o => o.DecryptHook(It.IsAny<IntPtr>(), 2, It.IsAny<IntPtr>(), 4)) 20.Returns((IntPtr pbCiphertext, uint cbCiphertext, IntPtr pbAdditionalAuthenticatedData, uint cbAdditionalAuthenticatedData) => 44.Setup(o => o.DecryptHook(It.IsAny<IntPtr>(), 2, It.IsAny<IntPtr>(), 0)) 45.Returns((IntPtr pbCiphertext, uint cbCiphertext, IntPtr pbAdditionalAuthenticatedData, uint cbAdditionalAuthenticatedData) => 49Assert.NotEqual(IntPtr.Zero, pbAdditionalAuthenticatedData); // CNG will complain if this pointer is zero 69.Setup(o => o.DecryptHook(It.IsAny<IntPtr>(), 0, It.IsAny<IntPtr>(), 4)) 70.Returns((IntPtr pbCiphertext, uint cbCiphertext, IntPtr pbAdditionalAuthenticatedData, uint cbAdditionalAuthenticatedData) => 73Assert.NotEqual(IntPtr.Zero, pbCiphertext); // CNG will complain if this pointer is zero 91public abstract byte[] DecryptHook(IntPtr pbCiphertext, uint cbCiphertext, IntPtr pbAdditionalAuthenticatedData, uint cbAdditionalAuthenticatedData); 95return DecryptHook((IntPtr)pbCiphertext, cbCiphertext, (IntPtr)pbAdditionalAuthenticatedData, cbAdditionalAuthenticatedData); 98public abstract byte[] EncryptHook(IntPtr pbPlaintext, uint cbPlaintext, IntPtr pbAdditionalAuthenticatedData, uint cbAdditionalAuthenticatedData, uint cbPreBuffer, uint cbPostBuffer); 102return EncryptHook((IntPtr)pbPlaintext, cbPlaintext, (IntPtr)pbAdditionalAuthenticatedData, cbAdditionalAuthenticatedData, cbPreBuffer, cbPostBuffer);
Microsoft.AspNetCore.Http.Extensions (4)
src\Shared\ParameterBindingMethodCache.cs (4)
659else if (type == typeof(IntPtr)) 661method = typeof(IntPtr).GetMethod( 662nameof(IntPtr.TryParse), 664new[] { typeof(string), typeof(NumberStyles), typeof(IFormatProvider), typeof(IntPtr).MakeByRefType() });
Microsoft.AspNetCore.Http.Extensions.Tests (3)
ParameterBindingMethodCacheTests.cs (1)
22[InlineData(typeof(IntPtr))]
RequestDelegateFactoryTests.cs (2)
319new object[] { (Action<HttpContext, IntPtr[]>)Store, new[] { "-42" },new[] { new IntPtr(-42) } }, 370new object[] { (Action<HttpContext, IntPtr>)Store, "-42", new IntPtr(-42) },
Microsoft.AspNetCore.InternalTesting (6)
DumpCollector\DumpCollector.Windows.cs (6)
23if (!NativeMethods.MiniDumpWriteDump(process.Handle, (uint)process.Id, stream.SafeFileHandle, NativeMethods.MINIDUMP_TYPE.MiniDumpWithFullMemory, ref exceptionInfo, IntPtr.Zero, IntPtr.Zero)) 35public static extern bool MiniDumpWriteDump(IntPtr hProcess, uint ProcessId, SafeFileHandle hFile, MINIDUMP_TYPE DumpType, ref MINIDUMP_EXCEPTION_INFORMATION ExceptionParam, IntPtr UserStreamParam, IntPtr CallbackParam); 42public IntPtr ExceptionPointers;
Microsoft.AspNetCore.Mvc.Abstractions (4)
src\Shared\ParameterBindingMethodCache.cs (4)
659else if (type == typeof(IntPtr)) 661method = typeof(IntPtr).GetMethod( 662nameof(IntPtr.TryParse), 664new[] { typeof(string), typeof(NumberStyles), typeof(IFormatProvider), typeof(IntPtr).MakeByRefType() });
Microsoft.AspNetCore.OpenApi (4)
src\Shared\ParameterBindingMethodCache.cs (4)
659else if (type == typeof(IntPtr)) 661method = typeof(IntPtr).GetMethod( 662nameof(IntPtr.TryParse), 664new[] { typeof(string), typeof(NumberStyles), typeof(IFormatProvider), typeof(IntPtr).MakeByRefType() });
Microsoft.AspNetCore.Routing (2)
Matching\ILEmitTrieFactory.cs (1)
55return (IntPtr.Size == 8) &&
Matching\JumpTableBuilder.cs (1)
69var threshold = IntPtr.Size == 8 ? 100 : 50;
Microsoft.AspNetCore.Routing.Tests (1)
Matching\ILEmitTrieFactoryTest.cs (1)
13var is64Bit = IntPtr.Size == 8;
Microsoft.AspNetCore.Server.HttpSys (70)
AuthenticationManager.cs (1)
137IntPtr infoptr = new IntPtr(&authInfo);
NativeInterop\HttpApi.cs (7)
17internal static partial uint HttpReceiveRequestEntityBody(SafeHandle requestQueueHandle, ulong requestId, uint flags, IntPtr pEntityBuffer, uint entityBufferLength, out uint bytesReturned, SafeNativeOverlapped pOverlapped); 26internal static unsafe partial uint HttpSendHttpResponse(SafeHandle requestQueueHandle, ulong requestId, uint flags, Windows.Win32.Networking.HttpServer.HTTP_RESPONSE_V2* pHttpResponse, Windows.Win32.Networking.HttpServer.HTTP_CACHE_POLICY* pCachePolicy, uint* pBytesSent, IntPtr pReserved1, uint Reserved2, SafeNativeOverlapped pOverlapped, IntPtr pLogData); 32internal static unsafe partial uint HttpSendResponseEntityBody(SafeHandle requestQueueHandle, ulong requestId, uint flags, ushort entityChunkCount, Windows.Win32.Networking.HttpServer.HTTP_DATA_CHUNK* pEntityChunks, uint* pBytesSent, IntPtr pReserved1, uint Reserved2, SafeNativeOverlapped pOverlapped, IntPtr pLogData); 38void* qualifier, uint qualifierSize, void* output, uint outputSize, uint* bytesReturned, IntPtr overlapped); 40internal unsafe delegate uint HttpSetRequestPropertyInvoker(SafeHandle requestQueueHandle, ulong requestId, HTTP_REQUEST_PROPERTY propertyId, void* input, uint inputSize, IntPtr overlapped);
NativeInterop\SafeLibraryHandle.cs (8)
26IntPtr pfnProc = UnsafeNativeMethods.GetProcAddress(this, lpProcName); 27return (pfnProc != IntPtr.Zero); 35IntPtr pfnProc = UnsafeNativeMethods.GetProcAddress(this, lpProcName); 36if (pfnProc == IntPtr.Zero) 58SafeLibraryHandle handle = UnsafeNativeMethods.LoadLibraryEx(filename, IntPtr.Zero, LOAD_LIBRARY_SEARCH_SYSTEM32); 78internal static partial bool FreeLibrary(IntPtr hModule); 82internal static partial IntPtr GetProcAddress( 90IntPtr hFile,
NativeInterop\SafeNativeOverlapped.cs (7)
18: base(IntPtr.Zero, true) 23: base(IntPtr.Zero, true) 25SetHandle((IntPtr)handle); 31get { return handle == IntPtr.Zero; } 38IntPtr oldHandle = Interlocked.Exchange(ref handle, IntPtr.Zero); 41if (oldHandle != IntPtr.Zero && !HasShutdownStarted)
NativeInterop\UrlGroup.cs (4)
87internal unsafe void SetProperty(HTTP_SERVER_PROPERTY property, IntPtr info, uint infosize, bool throwOnError = true) 89Debug.Assert(info != IntPtr.Zero, "SetUrlGroupProperty called with invalid pointer"); 117var infoptr = new IntPtr(&info); 133var infoptr = new IntPtr(&info);
RequestProcessing\ClientCertLoader.cs (1)
279Marshal.Copy((IntPtr)pClientCertInfo->pCertEncoded, certEncoded, 0, certEncoded.Length);
RequestProcessing\RequestContext.cs (3)
228IntPtr.Zero); 232return Marshal.PtrToStructure<HTTP_REQUEST_PROPERTY_SNI>((IntPtr)pBuffer); 252(uint)sizeof(HTTP_REQUEST_PROPERTY_STREAM_ERROR), IntPtr.Zero);
RequestProcessing\RequestStreamAsyncResult.cs (2)
14private readonly IntPtr _pinnedBuffer; 46internal IntPtr PinnedBuffer
RequestProcessing\Response.cs (4)
334IntPtr.Zero, 337IntPtr.Zero); 352IntPtr.Zero, 355IntPtr.Zero);
RequestProcessing\ResponseBody.cs (4)
364IntPtr.Zero, 367IntPtr.Zero); 687IntPtr.Zero, 690IntPtr.Zero);
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
src\Shared\HttpSys\NativeInterop\CookedUrl.cs (4)
23return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pFullUrl.Value, _nativeCookedUrl.FullUrlLength / 2); 32return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pHost.Value, _nativeCookedUrl.HostLength / 2); 41return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pAbsPath.Value, _nativeCookedUrl.AbsPathLength / 2); 50return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pQueryString.Value, _nativeCookedUrl.QueryStringLength / 2);
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (3)
26_buffer = new byte[((size / IntPtr.Size) + 2) * IntPtr.Size]; // sizeof DWORD 66internal static unsafe SocketAddress? CopyOutAddress(IntPtr address)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (10)
29private IntPtr _originalBufferAddress; 178_originalBufferAddress = (IntPtr)_nativeRequest; 269return Marshal.PtrToStringAnsi((IntPtr)NativeRequest->pRawUrl.Value, NativeRequest->RawUrlLength); 659var address = (IntPtr)(pMemoryBlob + _bufferAlignment - (byte*)_originalBufferAddress + source); 732return GetRequestInfo((IntPtr)_nativeRequest, (HTTP_REQUEST_V2*)_nativeRequest); 744private IReadOnlyDictionary<int, ReadOnlyMemory<byte>> GetRequestInfo(IntPtr baseAddress, HTTP_REQUEST_V2* nativeRequest) 775return GetClientCertificate((IntPtr)_nativeRequest, (HTTP_REQUEST_V2*)_nativeRequest); 788private X509Certificate2? GetClientCertificate(IntPtr baseAddress, HTTP_REQUEST_V2* nativeRequest) 811Marshal.Copy((IntPtr)clientCert, certEncoded, 0, certEncoded.Length);
src\Shared\ServerInfrastructure\StringUtilities.cs (9)
28var resultString = string.Create(span.Length, (IntPtr)source, s_getAsciiOrUTF8StringNonNullCharacters); 53private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiOrUTF8StringNonNullCharacters = (Span<char> buffer, IntPtr state) => 76return string.Create(span.Length, (IntPtr)source, s_getAsciiStringNonNullCharacters); 80private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiStringNonNullCharacters = (Span<char> buffer, IntPtr state) => 102return string.Create(span.Length, (IntPtr)source, s_getLatin1StringNonNullCharacters); 106private static readonly unsafe SpanAction<char, IntPtr> s_getLatin1StringNonNullCharacters = (Span<char> buffer, IntPtr state) =>
TimeoutManager.cs (1)
222var infoptr = new IntPtr(&timeoutinfo);
ValidationHelper.cs (1)
37else if (objectValue is IntPtr ptr)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
HttpsTests.cs (1)
212tlsCopy = Marshal.PtrToStructure<HTTP_SSL_PROTOCOL_INFO>((IntPtr)handle.Pointer);
Microsoft.AspNetCore.Server.IIS (118)
Core\IISConfigurationData.cs (14)
13public IntPtr pNativeApplication; 27public IntPtr pNativeApplication; 28public IntPtr pwzFullApplicationPath; 29public IntPtr pwzVirtualApplicationPath; 33public IntPtr pwzBindings; 41native.pwzFullApplicationPath = managed.pwzFullApplicationPath is null ? IntPtr.Zero : Marshal.StringToBSTR(managed.pwzFullApplicationPath); 42native.pwzVirtualApplicationPath = managed.pwzVirtualApplicationPath is null ? IntPtr.Zero : Marshal.StringToBSTR(managed.pwzVirtualApplicationPath); 46native.pwzBindings = managed.pwzBindings is null ? IntPtr.Zero : Marshal.StringToBSTR(managed.pwzBindings); 53if (native.pwzFullApplicationPath != IntPtr.Zero) 57if (native.pwzVirtualApplicationPath != IntPtr.Zero) 61if (native.pwzBindings != IntPtr.Zero) 72pwzFullApplicationPath = native.pwzFullApplicationPath == IntPtr.Zero ? string.Empty : Marshal.PtrToStringBSTR(native.pwzFullApplicationPath), 73pwzVirtualApplicationPath = native.pwzVirtualApplicationPath == IntPtr.Zero ? string.Empty : Marshal.PtrToStringBSTR(native.pwzVirtualApplicationPath), 77pwzBindings = native.pwzBindings == IntPtr.Zero ? string.Empty : Marshal.PtrToStringBSTR(native.pwzBindings),
Core\IISHttpContext.cs (5)
310NativeMethods.HttpSetManagedContext(_requestNativeHandle, (IntPtr)_thisHandle); 422IntPtr.Zero); 424return statusCode == NativeMethods.HR_OK ? Marshal.PtrToStructure<HTTP_REQUEST_PROPERTY_SNI>((IntPtr)pBuffer) : default; 837NativeMethods.HttpGetAuthenticationInformation(_requestNativeHandle, out var authenticationType, out var token); 839if (token != IntPtr.Zero && authenticationType != null)
Core\IISHttpContext.FeatureCollection.cs (1)
394Marshal.Copy((IntPtr)NativeRequest->pSslInfo->pClientCertInfo->pCertEncoded, rawCertificateCopy, 0, rawCertificateCopy.Length);
Core\IISHttpServer.cs (8)
106(IntPtr)_httpServerHandle, 107(IntPtr)_httpServerHandle); 148private static NativeMethods.REQUEST_NOTIFICATION_STATUS HandleRequest(IntPtr pInProcessHandler, IntPtr pvRequestContext) 180private static int HandleShutdown(IntPtr pvRequestContext) 204private static void OnDisconnect(IntPtr pvManagedHttpContext) 226private static NativeMethods.REQUEST_NOTIFICATION_STATUS OnAsyncCompletion(IntPtr pvManagedHttpContext, int hr, int bytes) 251private static void OnRequestsDrained(IntPtr serverContext)
Core\IISNativeApplication.cs (8)
39delegate* unmanaged<IntPtr, IntPtr, NativeMethods.REQUEST_NOTIFICATION_STATUS> requestCallback, 40delegate* unmanaged<IntPtr, int> shutdownCallback, 41delegate* unmanaged<IntPtr, void> disconnectCallback, 42delegate* unmanaged<IntPtr, int, int, NativeMethods.REQUEST_NOTIFICATION_STATUS> asyncCallback, 43delegate* unmanaged<IntPtr, void> requestsDrainedHandler, 44IntPtr pvRequestContext, 45IntPtr pvShutdownContext)
Core\IO\WebSocketsAsyncIOEngine.Read.cs (4)
15public static NativeMethods.REQUEST_NOTIFICATION_STATUS ReadCallback(IntPtr httpContext, IntPtr completionInfo, IntPtr completionContext) 51(IntPtr)_thisHandle,
Core\IO\WebSocketsAsyncIOEngine.Write.cs (4)
14private static NativeMethods.REQUEST_NOTIFICATION_STATUS WriteCallback(IntPtr httpContext, IntPtr completionInfo, IntPtr completionContext) 37return NativeMethods.HttpWebsocketsWriteBytes(requestHandler, dataChunks, chunkCount, &WriteCallback, (IntPtr)_thisHandle, out completionExpected);
Core\NativeSafeHandle.cs (4)
13public override bool IsInvalid => handle == IntPtr.Zero; 16public NativeSafeHandle(IntPtr handle) : base(IntPtr.Zero, ownsHandle: true) 23handle = IntPtr.Zero;
NativeMethods.cs (43)
25public static partial bool CloseHandle(IntPtr handle); 28private static partial IntPtr GetModuleHandle([MarshalAs(UnmanagedType.LPWStr)] string lpModuleName); 32return GetModuleHandle(AspNetCoreModuleDll) != IntPtr.Zero; 53delegate* unmanaged<IntPtr, IntPtr, REQUEST_NOTIFICATION_STATUS> requestCallback, 54delegate* unmanaged<IntPtr, int> shutdownCallback, 55delegate* unmanaged<IntPtr, void> disconnectCallback, 56delegate* unmanaged<IntPtr, int, int, REQUEST_NOTIFICATION_STATUS> asyncCallback, 57delegate* unmanaged<IntPtr, void> requestsDrainedHandler, 58IntPtr pvRequestContext, 59IntPtr pvShutdownContext); 86private static partial void http_get_completion_info(IntPtr pCompletionInfo, out int cbBytes, out int hr); 89private static partial int http_set_managed_context(NativeSafeHandle pInProcessHandler, IntPtr pvManagedContext); 104IntPtr overlapped); 123delegate* unmanaged<IntPtr, IntPtr, IntPtr, REQUEST_NOTIFICATION_STATUS> pfnCompletionCallback, 124IntPtr pvCompletionContext, 133delegate* unmanaged<IntPtr, IntPtr, IntPtr, REQUEST_NOTIFICATION_STATUS> pfnCompletionCallback, 134IntPtr pvCompletionContext, 165private static partial int http_get_authentication_information(NativeSafeHandle pInProcessHandler, [MarshalAs(UnmanagedType.BStr)] out string authType, out IntPtr token); 181delegate* unmanaged<IntPtr, IntPtr, REQUEST_NOTIFICATION_STATUS> requestCallback, 182delegate* unmanaged<IntPtr, int> shutdownCallback, 183delegate* unmanaged<IntPtr, void> disconnectCallback, 184delegate* unmanaged<IntPtr, int, int, REQUEST_NOTIFICATION_STATUS> asyncCallback, 185delegate* unmanaged<IntPtr, void> requestsDrainedHandler, 186IntPtr pvRequestContext, 187IntPtr pvShutdownContext) 232public static void HttpGetCompletionInfo(IntPtr pCompletionInfo, out int cbBytes, out int hr) 237public static void HttpSetManagedContext(NativeSafeHandle pInProcessHandler, IntPtr pvManagedContext) 248public static unsafe int HttpQueryRequestProperty(ulong requestId, HTTP_REQUEST_PROPERTY propertyId, void* qualifier, uint qualifierSize, void* output, uint outputSize, uint* bytesReturned, IntPtr overlapped) 267delegate* unmanaged<IntPtr, IntPtr, IntPtr, REQUEST_NOTIFICATION_STATUS> pfnCompletionCallback, 268IntPtr pvCompletionContext, out int dwBytesReceived, 278delegate* unmanaged<IntPtr, IntPtr, IntPtr, REQUEST_NOTIFICATION_STATUS> pfnCompletionCallback, 279IntPtr pvCompletionContext, 324public static void HttpGetAuthenticationInformation(NativeSafeHandle pInProcessHandler, out string authType, out IntPtr token)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
src\Shared\HttpSys\NativeInterop\CookedUrl.cs (4)
23return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pFullUrl.Value, _nativeCookedUrl.FullUrlLength / 2); 32return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pHost.Value, _nativeCookedUrl.HostLength / 2); 41return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pAbsPath.Value, _nativeCookedUrl.AbsPathLength / 2); 50return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pQueryString.Value, _nativeCookedUrl.QueryStringLength / 2);
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (3)
26_buffer = new byte[((size / IntPtr.Size) + 2) * IntPtr.Size]; // sizeof DWORD 66internal static unsafe SocketAddress? CopyOutAddress(IntPtr address)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (10)
29private IntPtr _originalBufferAddress; 178_originalBufferAddress = (IntPtr)_nativeRequest; 269return Marshal.PtrToStringAnsi((IntPtr)NativeRequest->pRawUrl.Value, NativeRequest->RawUrlLength); 659var address = (IntPtr)(pMemoryBlob + _bufferAlignment - (byte*)_originalBufferAddress + source); 732return GetRequestInfo((IntPtr)_nativeRequest, (HTTP_REQUEST_V2*)_nativeRequest); 744private IReadOnlyDictionary<int, ReadOnlyMemory<byte>> GetRequestInfo(IntPtr baseAddress, HTTP_REQUEST_V2* nativeRequest) 775return GetClientCertificate((IntPtr)_nativeRequest, (HTTP_REQUEST_V2*)_nativeRequest); 788private X509Certificate2? GetClientCertificate(IntPtr baseAddress, HTTP_REQUEST_V2* nativeRequest) 811Marshal.Copy((IntPtr)clientCert, certEncoded, 0, certEncoded.Length);
src\Shared\ServerInfrastructure\StringUtilities.cs (9)
28var resultString = string.Create(span.Length, (IntPtr)source, s_getAsciiOrUTF8StringNonNullCharacters); 53private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiOrUTF8StringNonNullCharacters = (Span<char> buffer, IntPtr state) => 76return string.Create(span.Length, (IntPtr)source, s_getAsciiStringNonNullCharacters); 80private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiStringNonNullCharacters = (Span<char> buffer, IntPtr state) => 102return string.Create(span.Length, (IntPtr)source, s_getLatin1StringNonNullCharacters); 106private static readonly unsafe SpanAction<char, IntPtr> s_getLatin1StringNonNullCharacters = (Span<char> buffer, IntPtr state) =>
Microsoft.AspNetCore.Server.IISIntegration (2)
IISMiddleware.cs (1)
178var handle = new IntPtr(hexHandle);
NativeMethods.cs (1)
14public static partial bool CloseHandle(IntPtr handle);
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (24)
IISExpressDeployer.cs (11)
448internal delegate bool EnumWindowProc(IntPtr hwnd, IntPtr lParam); 450internal static partial uint GetWindowThreadProcessId(IntPtr hwnd, out uint lpdwProcessId); 453internal static partial bool PostMessage([MarshalUsing(typeof(HandleRefMarshaller))] HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam); 456internal static partial bool EnumWindows(EnumWindowProc callback, IntPtr lParam); 458internal static partial int GetClassName(IntPtr hWnd, [Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U2)] char[] lpClassName, int nMaxCount); 472public IntPtr ToUnmanaged() => _handle.Handle; 520if (!WindowsNativeMethods.PostMessage(hWnd, 0x12, IntPtr.Zero, IntPtr.Zero)) 530}, IntPtr.Zero);
ProcessTracker.cs (13)
13private static readonly IntPtr _jobHandle = IntiailizeProcessTracker(); 15private static IntPtr IntiailizeProcessTracker() 20return IntPtr.Zero; 24var jobHandle = CreateJobObject(IntPtr.Zero, name: $"ProcessTracker{Environment.ProcessId}"); 35var extendedInfoPtr = Marshal.AllocHGlobal(length); 56if (_jobHandle != IntPtr.Zero) 67private static partial IntPtr CreateJobObject(IntPtr lpJobAttributes, string name); 71private static partial bool SetInformationJobObject(IntPtr job, JobObjectInfoType infoType, 72IntPtr lpJobObjectInfo, uint cbJobObjectInfoLength); 76private static partial bool AssignProcessToJobObject(IntPtr job, IntPtr process);
Microsoft.AspNetCore.Server.Kestrel.Core (93)
Internal\Http\HttpHeaders.Generated.cs (77)
7533if (((ReadUnalignedLittleEndian_ushort(ref nameStart) & 0xdfdfu) == 0x4956u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)2) & 0xdfu) == 0x41u)) 7562if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfffu) == 0x5441503au) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)4) & 0xdfu) == 0x48u)) 7568else if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfdfu) == 0x474e4152u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)4) & 0xdfu) == 0x45u)) 7577if ((firstTerm6 == 0x45434341u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x5450u)) 7583else if ((firstTerm6 == 0x4b4f4f43u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4549u)) 7589else if ((firstTerm6 == 0x45505845u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x5443u)) 7595else if ((firstTerm6 == 0x4749524fu) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4e49u)) 7601else if ((firstTerm6 == 0x47415250u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x414du)) 7609if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfffu) == 0x54454d3au) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4f48u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)6) & 0xdfu) == 0x44u)) 7615else if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfffu) == 0x4843533au) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4d45u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)6) & 0xdfu) == 0x45u)) 7621else if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfdfu) == 0x47474142u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4741u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)6) & 0xdfu) == 0x45u)) 7627else if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfdfu) == 0x45464552u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4552u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)6) & 0xdfu) == 0x52u)) 7633else if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfdfu) == 0x52475055u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4441u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)6) & 0xdfu) == 0x45u)) 7639else if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfdfu) == 0x4e524157u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4e49u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)6) & 0xdfu) == 0x47u)) 7667if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfffuL) == 0x4f434f544f52503auL) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)8) & 0xdfu) == 0x4cu)) 7673else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x54414c534e415254uL) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)8) & 0xdfu) == 0x45u)) 7681if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x495443454e4e4f43uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x4e4fu)) 7687else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfffdfdfdfdfuL) == 0x4547412d52455355uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x544eu)) 7693else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfffuL) == 0x49524f485455413auL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x5954u)) 7699else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfffdfdfdfdfuL) == 0x494c412d5045454buL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x4556u)) 7705else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xffdfdfdfdfdfdfdfuL) == 0x2d54534555514552uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x4449u)) 7711else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x4154534543415254uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x4554u)) 7719if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x5241504543415254uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x4e45u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)10) & 0xdfu) == 0x54u)) 7727if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xffdfdfdfdfdfdfdfuL) == 0x2d544e45544e4f43uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x45505954u)) 7733else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfffdfdfdfdfuL) == 0x4d49542d43505247uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x54554f45u)) 7739else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfffdfdfdfuL) == 0x57524f462d58414duL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x53445241u)) 7747if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x5a49524f48545541uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x4f495441u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)12) & 0xdfu) == 0x4eu)) 7753else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfffdfdfdfdfdfuL) == 0x4f432d4548434143uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x4f52544eu) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)12) & 0xdfu) == 0x4cu)) 7759else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfffdfdfdfdfuL) == 0x434e452d43505247uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x4e49444fu) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)12) & 0xdfu) == 0x47u)) 7765else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xffdfdfdfdfffdfdfuL) == 0x2d454e4f4e2d4649uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x4354414du) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)12) & 0xdfu) == 0x48u)) 7773if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfffdfdfdfdfdfdfuL) == 0x432d545045434341uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x53524148u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(6 * sizeof(ushort)))) & 0xdfdfu) == 0x5445u)) 7779else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xffdfdfdfdfdfdfdfuL) == 0x2d544e45544e4f43uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x474e454cu) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(6 * sizeof(ushort)))) & 0xdfdfu) == 0x4854u)) 7796if ((firstTerm15 == 0x452d545045434341uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x444f434eu) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(6 * sizeof(ushort)))) & 0xdfdfu) == 0x4e49u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)14) & 0xdfu) == 0x47u)) 7802else if ((firstTerm15 == 0x4c2d545045434341uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x55474e41u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(6 * sizeof(ushort)))) & 0xdfdfu) == 0x4741u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)14) & 0xdfu) == 0x45u)) 7810if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfffdfdfuL) == 0x4649444f4d2d4649uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfdfdfffdfdfdfuL) == 0x434e49532d444549uL) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)16) & 0xdfu) == 0x45u)) 7816else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x524546534e415254uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfdfdfdfdfdfffuL) == 0x4e49444f434e452duL) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)16) & 0xdfu) == 0x47u)) 7824if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x54414c4552524f43uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfdfdfffdfdfdfuL) == 0x544e4f432d4e4f49uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(8 * sizeof(ushort)))) & 0xdfdfu) == 0x5845u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)18) & 0xdfu) == 0x54u)) 7830else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfffdfdfuL) == 0x444f4d4e552d4649uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfffdfdfdfdfdfuL) == 0x49532d4445494649uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(8 * sizeof(ushort)))) & 0xdfdfu) == 0x434eu) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)18) & 0xdfu) == 0x45u)) 7836else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfffdfdfdfdfdfuL) == 0x55412d59584f5250uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfdfdfdfdfdfdfuL) == 0x54415a49524f4854uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(8 * sizeof(ushort)))) & 0xdfdfu) == 0x4f49u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)18) & 0xdfu) == 0x4eu)) 7844if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfffdfdfdfdfuL) == 0x4343412d43505247uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfdfdfffdfdfdfuL) == 0x4f434e452d545045uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x474e4944u)) 7852if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xffdfdfdfdfdfdfdfuL) == 0x2d45444152475055uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfdfdfdfdfdfdfuL) == 0x4552554345534e49uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ulong)))) & 0xdfdfdfdfdfdfdfffuL) == 0x545345555145522duL) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)24) & 0xdfu) == 0x53u)) 7860if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfffdfdfdfdfdfdfuL) == 0x432d535345434341uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfffdfdfdfdfdfdfuL) == 0x522d4c4f52544e4fuL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ulong)))) & 0xdfffdfdfdfdfdfdfuL) == 0x4d2d545345555145uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(6 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x4f485445u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)28) & 0xdfu) == 0x44u)) 7868if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfffdfdfdfdfdfdfuL) == 0x432d535345434341uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfffdfdfdfdfdfdfuL) == 0x522d4c4f52544e4fuL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ulong)))) & 0xdfffdfdfdfdfdfdfuL) == 0x482d545345555145uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(6 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x45444145u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(14 * sizeof(ushort)))) & 0xdfdfu) == 0x5352u))
Internal\Infrastructure\HttpUtilities.cs (2)
31private static readonly SpanAction<char, IntPtr> s_getHeaderName = GetHeaderName; 99private static unsafe void GetHeaderName(Span<char> buffer, IntPtr state)
Internal\Infrastructure\KestrelEventSource.cs (5)
403DataPointer = (IntPtr)arg1Ptr, 408DataPointer = (IntPtr)arg2Ptr, 413DataPointer = (IntPtr)arg3Ptr, 418DataPointer = (IntPtr)arg4Ptr, 423DataPointer = (IntPtr)arg5Ptr,
src\Shared\ServerInfrastructure\StringUtilities.cs (9)
28var resultString = string.Create(span.Length, (IntPtr)source, s_getAsciiOrUTF8StringNonNullCharacters); 53private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiOrUTF8StringNonNullCharacters = (Span<char> buffer, IntPtr state) => 76return string.Create(span.Length, (IntPtr)source, s_getAsciiStringNonNullCharacters); 80private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiStringNonNullCharacters = (Span<char> buffer, IntPtr state) => 102return string.Create(span.Length, (IntPtr)source, s_getLatin1StringNonNullCharacters); 106private static readonly unsafe SpanAction<char, IntPtr> s_getLatin1StringNonNullCharacters = (Span<char> buffer, IntPtr state) =>
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (10)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
src\Shared\ServerInfrastructure\StringUtilities.cs (9)
28var resultString = string.Create(span.Length, (IntPtr)source, s_getAsciiOrUTF8StringNonNullCharacters); 53private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiOrUTF8StringNonNullCharacters = (Span<char> buffer, IntPtr state) => 76return string.Create(span.Length, (IntPtr)source, s_getAsciiStringNonNullCharacters); 80private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiStringNonNullCharacters = (Span<char> buffer, IntPtr state) => 102return string.Create(span.Length, (IntPtr)source, s_getLatin1StringNonNullCharacters); 106private static readonly unsafe SpanAction<char, IntPtr> s_getLatin1StringNonNullCharacters = (Span<char> buffer, IntPtr state) =>
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (2)
SocketTransportOptions.cs (1)
136new SafeSocketHandle((IntPtr)fileHandle.FileHandle, ownsHandle: false)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Shared.Tests (27)
src\Shared\HttpSys\NativeInterop\CookedUrl.cs (4)
23return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pFullUrl.Value, _nativeCookedUrl.FullUrlLength / 2); 32return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pHost.Value, _nativeCookedUrl.HostLength / 2); 41return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pAbsPath.Value, _nativeCookedUrl.AbsPathLength / 2); 50return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pQueryString.Value, _nativeCookedUrl.QueryStringLength / 2);
src\Shared\HttpSys\NativeInterop\SocketAddress.cs (3)
26_buffer = new byte[((size / IntPtr.Size) + 2) * IntPtr.Size]; // sizeof DWORD 66internal static unsafe SocketAddress? CopyOutAddress(IntPtr address)
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (10)
29private IntPtr _originalBufferAddress; 178_originalBufferAddress = (IntPtr)_nativeRequest; 269return Marshal.PtrToStringAnsi((IntPtr)NativeRequest->pRawUrl.Value, NativeRequest->RawUrlLength); 659var address = (IntPtr)(pMemoryBlob + _bufferAlignment - (byte*)_originalBufferAddress + source); 732return GetRequestInfo((IntPtr)_nativeRequest, (HTTP_REQUEST_V2*)_nativeRequest); 744private IReadOnlyDictionary<int, ReadOnlyMemory<byte>> GetRequestInfo(IntPtr baseAddress, HTTP_REQUEST_V2* nativeRequest) 775return GetClientCertificate((IntPtr)_nativeRequest, (HTTP_REQUEST_V2*)_nativeRequest); 788private X509Certificate2? GetClientCertificate(IntPtr baseAddress, HTTP_REQUEST_V2* nativeRequest) 811Marshal.Copy((IntPtr)clientCert, certEncoded, 0, certEncoded.Length);
src\Shared\QueryStringEnumerable.cs (1)
104(IntPtr)(&span), static (dest, ptr) => ((ReadOnlySpan<char>*)ptr)->Replace(dest, '+', ' '))).AsMemory();
src\Shared\ServerInfrastructure\StringUtilities.cs (9)
28var resultString = string.Create(span.Length, (IntPtr)source, s_getAsciiOrUTF8StringNonNullCharacters); 53private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiOrUTF8StringNonNullCharacters = (Span<char> buffer, IntPtr state) => 76return string.Create(span.Length, (IntPtr)source, s_getAsciiStringNonNullCharacters); 80private static readonly unsafe SpanAction<char, IntPtr> s_getAsciiStringNonNullCharacters = (Span<char> buffer, IntPtr state) => 102return string.Create(span.Length, (IntPtr)source, s_getLatin1StringNonNullCharacters); 106private static readonly unsafe SpanAction<char, IntPtr> s_getLatin1StringNonNullCharacters = (Span<char> buffer, IntPtr state) =>
Microsoft.AspNetCore.WebUtilities (1)
src\Shared\QueryStringEnumerable.cs (1)
104(IntPtr)(&span), static (dest, ptr) => ((ReadOnlySpan<char>*)ptr)->Replace(dest, '+', ' '))).AsMemory();
Microsoft.Build (24)
BackEnd\Components\Communications\NodeLauncher.cs (2)
179if (processInfo.hProcess != IntPtr.Zero && processInfo.hProcess != NativeMethods.InvalidHandle) 184if (processInfo.hThread != IntPtr.Zero && processInfo.hThread != NativeMethods.InvalidHandle)
BackEnd\Node\NativeMethods.cs (11)
20internal static readonly IntPtr NullPtr = IntPtr.Zero; 25internal static readonly IntPtr InvalidHandle = new IntPtr(-1); 60IntPtr lpEnvironment, 148internal IntPtr lpReserved2; 153internal IntPtr hStdInput; 158internal IntPtr hStdOutput; 163internal IntPtr hStdError; 187public IntPtr lpSecurityDescriptor; 206public IntPtr hProcess; 211public IntPtr hThread;
EnvironmentUtilities.cs (1)
11public static bool Is64BitProcess => Marshal.SizeOf<IntPtr>() == 8;
InprocTrackingNativeMethods.cs (6)
153private static readonly Lazy<string> fileTrackerDllName = new Lazy<string>(() => RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "FileTrackerA4.dll" : (IntPtr.Size == sizeof(Int32)) ? "FileTracker32.dll" : "FileTracker64.dll"); 188private static extern IntPtr GetProcAddress(SafeHandle moduleHandle, String procName); 236IntPtr entryPoint = GetProcAddress(s_fileTrackerDllHandle, entryPointName); 238if (IntPtr.Zero == entryPoint) 283: base(IntPtr.Zero, true) 291{ return IntPtr.Zero == handle; }
Logging\InProcessConsoleConfiguration.cs (2)
31IntPtr stdOut = NativeMethodsShared.GetStdHandle(NativeMethodsShared.STD_OUTPUT_HANDLE); 81IntPtr stdHandle = NativeMethodsShared.GetStdHandle(NativeMethodsShared.STD_OUTPUT_HANDLE);
WindowsNative.cs (1)
278internal static extern bool FindClose(IntPtr findFileHandle);
XMakeAttributes.cs (1)
446currentArchitecture = (IntPtr.Size == sizeof(Int64)) ? MSBuildArchitectureValues.x64 : MSBuildArchitectureValues.x86;
Microsoft.Build.Engine (51)
LocalProvider\NativeMethods.cs (30)
16internal static readonly IntPtr NullPtr = IntPtr.Zero; 17internal static readonly IntPtr InvalidHandle = new IntPtr(-1); 41IntPtr TokenHandle, 42IntPtr SidToCheck, 51IntPtr siaNtAuthority, 57out IntPtr pSid 61internal static extern IntPtr LocalFree(IntPtr hMem); 64internal static extern IntPtr FreeSid(IntPtr pSid); 74IntPtr pNtAuthority = Marshal.AllocHGlobal(6); 78IntPtr psidRidGroup; 100internal static extern bool InitializeSecurityDescriptor(IntPtr pSecurityDescriptor, int dwRevision); 106IntPtr pSecurityDescriptor, 109IntPtr pDacl, 117IntPtr hFile, 118IntPtr lpFileMappingAttributes, 126internal static extern IntPtr MapViewOfFile 132IntPtr dwNumberOfBytesToMap // use IntPtr here because the size will need to change based on processor architecture (32 vs 64bit) 140IntPtr lpBaseAddress 154IntPtr lpEnvironment, 166ref IntPtr SecurityDescriptor, 187internal IntPtr lpReserved2; 188internal IntPtr hStdInput; 189internal IntPtr hStdOutput; 190internal IntPtr hStdError; 208private IntPtr hProcess; 209private IntPtr hThread; 218public IntPtr lpSecurityDescriptor;
LocalProvider\SharedMemory.cs (12)
155IntPtr pointerToSecurityAttributes = NativeMethods.NullPtr; 156IntPtr pSDNative = IntPtr.Zero; 227(IntPtr)(size + 4) 547Marshal.WriteInt32((IntPtr)pageFileView, (int)writeLength); 552(IntPtr)((int)pageFileView + 4), //Destination (+4 because of the int written to the memory file with the write length) 574Marshal.WriteInt32((IntPtr)pageFileView, (int)writeStream.Position); 581(IntPtr)((int)pageFileView + writeStartPosition + 4), // Destination + 4 for the int indicating the size of the data to be copied to the memory file 713int endWritePosition = Marshal.ReadInt32((IntPtr)((int)pageFileView)); 718(IntPtr)((int)pageFileView + 4 + readStream.Position), // Source 898Marshal.WriteInt32((IntPtr)pageFileView, (int)writeStream.Position); 910private IntPtr pageFileView;
Logging\BaseConsoleLogger.cs (1)
330IntPtr stdHandle = Microsoft.Build.BuildEngine.Shared.NativeMethods.GetStdHandle(Microsoft.Build.BuildEngine.Shared.NativeMethods.STD_OUTPUT_HANDLE);
Shared\NativeMethodsShared.cs (8)
32internal static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 34internal static IntPtr NullIntPtr = new IntPtr(0); 130internal static extern bool FreeLibrary([In] IntPtr module); 133internal static extern IntPtr GetProcAddress(IntPtr module, string procName); 136internal static extern IntPtr LoadLibrary(string fileName); 158internal static extern IntPtr GetStdHandle(int nStdHandle); 161internal static extern uint GetFileType(IntPtr hFile);
Microsoft.Build.Engine.OM.UnitTests (1)
WindowsNative.cs (1)
278internal static extern bool FindClose(IntPtr findFileHandle);
Microsoft.Build.Engine.UnitTests (3)
BackEnd\TargetUpToDateChecker_Tests.cs (2)
1004NativeMethodsShared.FILE_SHARE_READ, IntPtr.Zero, NativeMethodsShared.OPEN_EXISTING, 1006IntPtr.Zero))
ConsoleLogger_Tests.cs (1)
2462IntPtr stdHandle = NativeMethodsShared.GetStdHandle(NativeMethodsShared.STD_OUTPUT_HANDLE);
Microsoft.Build.Framework (41)
ArraySortHelper.cs (5)
615if (typeof(T) == typeof(IntPtr)) 649if (typeof(T) == typeof(IntPtr)) 1172if (typeof(TKey) == typeof(IntPtr)) 1206if (typeof(TKey) == typeof(IntPtr)) 1302(IntPtr)(int)((value * 0x07C4ACDDu) >> 27));
NativeMethods.cs (33)
59internal static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 61internal static IntPtr NullIntPtr = new IntPtr(0); 62internal static IntPtr InvalidHandle = new IntPtr(-1); 159public IntPtr GroupInfo; 246internal IntPtr lpMinimumApplicationAddress; 247internal IntPtr lpMaximumApplicationAddress; 248internal IntPtr dwActiveProcessorMask; 349public IntPtr PebBaseAddress; 402public IntPtr lpSecurityDescriptor; 520if (!GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP.RelationProcessorCore, IntPtr.Zero, ref len) && 528if (GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP.RelationProcessorCore, (IntPtr)bufferPtr, ref len)) 848internal static extern bool GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP RelationshipType, IntPtr Buffer, ref uint ReturnedLength); 1103IntPtr.Zero, 1106IntPtr.Zero); 1397int bufferSize = GetFullPathWin32(path, 0, null, IntPtr.Zero); 1399int fullPathLength = GetFullPathWin32(path, bufferSize, buffer, IntPtr.Zero); 1405private static unsafe int GetFullPathWin32(string target, int bufferLength, char* buffer, IntPtr mustBeZero) 1463IntPtr outputStream = GetStdHandle((int)handleType); 1508IntPtr stdOut = GetStdHandle((int)handleType); 1543internal static extern bool FreeLibrary([In] IntPtr module); 1547internal static extern IntPtr GetProcAddress(IntPtr module, string procName); 1551internal static extern IntPtr LoadLibrary(string fileName); 1565internal static extern IntPtr GetStdHandle(int nStdHandle); 1569internal static extern uint GetFileType(IntPtr hFile); 1572internal static extern bool GetConsoleMode(IntPtr hConsoleHandle, out uint lpMode); 1575internal static extern bool SetConsoleMode(IntPtr hConsoleHandle, uint dwMode); 1608internal static extern unsafe int GetFullPathName(string target, int bufferLength, char* buffer, IntPtr mustBeZero); 1637internal static extern bool ReadFile(SafeFileHandle hFile, byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead, IntPtr lpOverlapped); 1646public static extern int CoWaitForMultipleHandles(COWAIT_FLAGS dwFlags, int dwTimeout, int cHandles, [MarshalAs(UnmanagedType.LPArray)] IntPtr[] pHandles, out int pdwIndex); 1661IntPtr lpSecurityAttributes, 1664IntPtr hTemplateFile); 1677internal static extern bool CloseHandle(IntPtr hObject);
SegmentedArrayHelper.cs (1)
92return (2 * IntPtr.Size) + (elementSize * segmentSize);
VisualStudioLocationHelper.cs (2)
98var result = GetSetupConfiguration(out query, IntPtr.Zero); 112IntPtr reserved);
Microsoft.Build.Tasks.Core (204)
BootstrapperUtil\NativeMethods.cs (4)
14internal static extern IntPtr BeginUpdateResourceW(String fileName, bool deleteExistingResource); 17internal static extern bool UpdateResourceW(IntPtr hUpdate, IntPtr lpType, String lpName, short wLanguage, byte[] data, int cbData); 20internal static extern bool EndUpdateResource(IntPtr hUpdate, bool fDiscard);
BootstrapperUtil\ResourceUpdater.cs (9)
45IntPtr hUpdate = IntPtr.Zero; 50while (IntPtr.Zero == hUpdate && Marshal.GetHRForLastWin32Error() == ERROR_SHARING_VIOLATION && beginUpdateRetries > 0) // If it equals 0x80070020 (ERROR_SHARING_VIOLATION), sleep & retry 59if (IntPtr.Zero == hUpdate) 68if (hUpdate != IntPtr.Zero) 74if (!NativeMethods.UpdateResourceW(hUpdate, (IntPtr)resource.Type, resource.Name, 0, data, data.Length)) 86if (!NativeMethods.UpdateResourceW(hUpdate, (IntPtr)42, "COUNT", 0, countArray, countArray.Length)) 109if (!NativeMethods.UpdateResourceW(hUpdate, (IntPtr)42, dataName, 0, fileContent, fileLength)) 119if (!NativeMethods.UpdateResourceW(hUpdate, (IntPtr)42, keyName, 0, data, data.Length))
Copy.cs (3)
562var successFlags = new IntPtr[DestinationFiles.Length]; 612successFlags[fileIndex] = (IntPtr)1; 639if (successFlags[i] != (IntPtr)0)
EnvironmentUtilities.cs (1)
11public static bool Is64BitProcess => Marshal.SizeOf<IntPtr>() == 8;
Interop.cs (2)
31void QueryCustomPolicy([In][MarshalAs(UnmanagedType.LPWStr)] string pwszUrl, [In][ComAliasName("UrlMonTypeLib.GUID")] ref GUID guidKey, [Out] IntPtr ppPolicy, out int pcbPolicy, [In] ref byte pContext, [In] int cbContext, [In] int dwReserved); 48void GetWindow([Out][ComAliasName("UrlMonTypeLib.wireHWND")] IntPtr phwnd);
IVbcHostObject5.cs (2)
23int CompileAsync(out IntPtr buildSucceededEvent, out IntPtr buildFailedEvent);
ManifestUtil\ComImporter.cs (5)
48if (NativeMethods.SfcIsFileProtected(IntPtr.Zero, path) != 0) 65IntPtr typeLibAttrPtr = IntPtr.Zero; 89IntPtr tinfoAttrPtr = IntPtr.Zero;
ManifestUtil\EmbeddedManifestReader.cs (14)
15private static readonly IntPtr s_id1 = new IntPtr(1); 20IntPtr hModule = IntPtr.Zero; 23hModule = NativeMethods.LoadLibraryExW(path, IntPtr.Zero, NativeMethods.LOAD_LIBRARY_AS_DATAFILE); 24if (hModule == IntPtr.Zero) 29NativeMethods.EnumResourceNames(hModule, NativeMethods.RT_MANIFEST, callback, IntPtr.Zero); 33if (hModule != IntPtr.Zero) 40private bool EnumResNameCallback(IntPtr hModule, IntPtr pType, IntPtr pName, IntPtr param) 46IntPtr hResInfo = NativeMethods.FindResource(hModule, pName, NativeMethods.RT_MANIFEST); 47if (hResInfo == IntPtr.Zero) 51IntPtr hResource = NativeMethods.LoadResource(hModule, hResInfo);
ManifestUtil\mansign2.cs (43)
94internal IntPtr pbData; 103internal IntPtr pwszHash; // Hash. 104internal IntPtr pwszDescription; // Description. 105internal IntPtr pwszDescriptionUrl; // Description URL. 106internal IntPtr pChainContext; // Signer's chain context. 116internal IntPtr pChainContext; // Timestamper's chain context. 124IntPtr GetProcessHeap(); 130[In] IntPtr hHeap, 132[In] IntPtr lpMem); 162[In] IntPtr pCertContext, 163[In, Out] ref IntPtr ppwszPublicKeyHash); 170[In, Out] ref IntPtr ppwszPublicKeyToken); 176[In, Out] ref IntPtr ppwszPublicKeyToken); 188internal IntPtr pbEncoded; // BYTE* 189internal IntPtr pTimeStamp; // PCRYPT_TIMESTAMP_INFO->_CRYPT_TIMESTAMP_INFO* 196internal IntPtr pbData; 202internal IntPtr pszTSAPolicyId; 206internal IntPtr rgExtension; 221[In, Out] ref IntPtr ppTsContext, 222[In, Out] ref IntPtr ppTsSigner, 223[In, Out] ref IntPtr phStore); 227internal static extern bool CertFreeCertificateContext(IntPtr pCertContext); 231internal static extern bool CertCloseStore(IntPtr pCertContext, int dwFlags); 235internal static extern void CryptMemFree(IntPtr pv); 422IntPtr pIssuerKeyHash = new IntPtr(); 537IntPtr pPublicKeyToken = new IntPtr(); 812IntPtr ppTsContext = IntPtr.Zero; 813IntPtr ppTsSigner = IntPtr.Zero; 814IntPtr phStore = IntPtr.Zero; 843pszTSAPolicyId = IntPtr.Zero, 849para.Nonce.pbData = (IntPtr)pbNonce; 874if (ppTsContext != IntPtr.Zero) 879if (ppTsSigner != IntPtr.Zero) 884if (phStore != IntPtr.Zero) 928IntPtr pvLicense = new IntPtr(pbLicense); 1303if (signerInfo.pChainContext != IntPtr.Zero) 1309if (signerInfo.pwszHash != IntPtr.Zero) 1313if (signerInfo.pwszDescription != IntPtr.Zero) 1317if (signerInfo.pwszDescriptionUrl != IntPtr.Zero) 1424if (timestamperInfo.pChainContext != IntPtr.Zero)
ManifestUtil\NativeMethods.cs (23)
14public static readonly IntPtr RT_MANIFEST = new IntPtr(24); 16public static extern IntPtr LoadLibraryExW(string strFileName, IntPtr hFile, UInt32 ulFlags); 20public static extern bool FreeLibrary(IntPtr hModule); 22public static extern IntPtr FindResource(IntPtr hModule, IntPtr pName, IntPtr pType); 24public static extern IntPtr LoadResource(IntPtr hModule, IntPtr hResource); 26public static extern uint SizeofResource(IntPtr hModule, IntPtr hResource); 28public static extern IntPtr LockResource(IntPtr hGlobal); 30public static extern int EnumResourceNames(IntPtr hModule, IntPtr pType, EnumResNameProc enumFunc, IntPtr param); 31public delegate bool EnumResNameProc(IntPtr hModule, IntPtr pType, IntPtr pName, IntPtr param); 43public static extern int SfcIsFileProtected(IntPtr RpcHandle, string ProtFileName);
ManifestUtil\SecurityUtil.cs (4)
682IntPtr hModule = IntPtr.Zero; 728hModule = NativeMethods.LoadLibraryExW(Path.Combine(clrDllDir, "clr.dll"), IntPtr.Zero, NativeMethods.LOAD_LIBRARY_AS_DATAFILE); 754if (hModule != IntPtr.Zero)
NativeMethods.cs (92)
37void GetTypeAttr(out IntPtr ppTypeAttr); 39void GetFuncDesc(int index, out IntPtr ppFuncDesc); 40void GetVarDesc(int index, out IntPtr ppVarDesc); 42void GetRefTypeOfImplType(int index, out IntPtr href); 45void Invoke([MarshalAs(UnmanagedType.IUnknown)] Object pvInstance, int memid, Int16 wFlags, ref System.Runtime.InteropServices.ComTypes.DISPPARAMS pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, out int puArgErr); 47void GetDllEntry(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, IntPtr pBstrDllName, IntPtr pBstrName, IntPtr pwOrdinal); 48void GetRefTypeInfo(IntPtr hRef, out IFixedTypeInfo ppTI); 49void AddressOfMember(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, out IntPtr ppv); 54void ReleaseTypeAttr(IntPtr pTypeAttr); 56void ReleaseFuncDesc(IntPtr pFuncDesc); 58void ReleaseVarDesc(IntPtr pVarDesc); 103object OpenScopeOnMemory([In] IntPtr pData, [In] UInt32 cbData, [In] UInt32 dwOpenFlags, [In] ref Guid riid); 115void CountEnum(IntPtr iRef, ref UInt32 ulCount); 241int GetCustomAttributeByName(UInt32 mdTokenObj, [MarshalAs(UnmanagedType.LPWStr)] string szName, out IntPtr ppData, out uint pDataSize); 270void GetAssemblyProps(UInt32 mdAsm, out IntPtr pPublicKeyPtr, out UInt32 ucbPublicKeyPtr, out UInt32 uHashAlg, [MarshalAs(UnmanagedType.LPArray)] char[] strName, UInt32 cchNameIn, out UInt32 cchNameRequired, IntPtr amdInfo, out UInt32 dwFlags); 271void GetAssemblyRefProps(UInt32 mdAsmRef, out IntPtr ppbPublicKeyOrToken, out UInt32 pcbPublicKeyOrToken, [MarshalAs(UnmanagedType.LPArray)] char[] strName, UInt32 cchNameIn, out UInt32 pchNameOut, IntPtr amdInfo, out IntPtr ppbHashValue, out UInt32 pcbHashValue, out UInt32 pdwAssemblyRefFlags); 272void GetFileProps([In] UInt32 mdFile, [MarshalAs(UnmanagedType.LPArray)] char[] strName, UInt32 cchName, out UInt32 cchNameRequired, out IntPtr bHashData, out UInt32 cchHashBytes, out UInt32 dwFileFlags); 275void EnumAssemblyRefs([In, Out] ref IntPtr phEnum, [MarshalAs(UnmanagedType.LPArray), Out] UInt32[] asmRefs, UInt32 asmRefCount, out UInt32 iFetched); 276void EnumFiles([In, Out] ref IntPtr phEnum, [MarshalAs(UnmanagedType.LPArray), Out] UInt32[] fileRefs, UInt32 fileRefCount, out UInt32 iFetched); 285void CloseEnum([In] IntPtr phEnum); 329public IntPtr rpLocale; 331public IntPtr rpProcessors; 333public IntPtr rOses; 403IntPtr pvProperty, 409IntPtr pvProperty, 427IntPtr pvReserved, 429out IntPtr ppv); 456IntPtr pvReserved, 505internal IntPtr lpReserved2; 506internal IntPtr hStdInput; 507internal IntPtr hStdOutput; 508internal IntPtr hStdError; 514public IntPtr hProcess; 515public IntPtr hThread; 527internal static readonly IntPtr NullPtr = IntPtr.Zero; 528internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1); 781internal IntPtr pbData; 797private static extern bool CreateHardLink(string newFileName, string exitingFileName, IntPtr securityAttributes); 807hardLinkCreated = CreateHardLink(newFileName, exitingFileName, IntPtr.Zero /* reserved, must be NULL */); 917internal static extern IntPtr CreateFile(string lpFileName, uint dwDesiredAccess, FileShare dwShareMode, 918IntPtr lpSecurityAttributes, FileMode dwCreationDisposition, uint dwFlagsAndAttributes, IntPtr hTemplateFile); 924internal static extern uint GetFileType(IntPtr hFile); 931internal static extern bool CloseHandle(IntPtr hObject); 937internal static extern IntPtr CreateFileMapping(IntPtr hFile, IntPtr lpFileMappingAttributes, uint flProtect, 944internal static extern IntPtr MapViewOfFile(IntPtr hFileMapping, uint dwDesiredAccess, uint dwFileOffsetHigh, uint dwFileOffsetLow, IntPtr dwNumberOfBytesToMap); 951internal static extern bool UnmapViewOfFile(IntPtr lpBaseAddress); 961IntPtr lpProcessAttributes, 962IntPtr lpThreadAttributes, 966IntPtr lpEnvironment, 975internal static extern IntPtr ImageNtHeader(IntPtr imageBase); 981internal static extern IntPtr ImageRvaToVa(IntPtr ntHeaders, IntPtr imageBase, uint Rva, out IntPtr LastRvaSection); 1009IntPtr pUnkReserved, 1012IntPtr pvReserved); 1021IntPtr pvReserved); 1040internal static extern IntPtr PFXImportCertStore([In] IntPtr blob, [In] string password, [In] CryptFlags flags); 1047internal static extern bool CertCloseStore([In] IntPtr CertStore, CertStoreClose Flags); 1053internal static extern IntPtr CertEnumCertificatesInStore([In] IntPtr CertStore, [In] IntPtr PrevCertContext); 1060internal static extern bool CryptAcquireCertificatePrivateKey([In] IntPtr CertContext, [In] uint flags, [In] IntPtr reserved, [In, Out] ref IntPtr CryptProv, [In, Out] ref KeySpec KeySpec, [In, Out, MarshalAs(UnmanagedType.Bool)] ref bool CallerFreeProv); 1067internal static extern bool CryptGetUserKey([In] IntPtr CryptProv, [In] KeySpec KeySpec, [In, Out] ref IntPtr Key); 1074internal static extern bool CryptExportKey([In] IntPtr Key, [In] IntPtr ExpKey, [In] BlobType type, [In] uint Flags, [In] IntPtr Data, [In, Out] ref uint DataLen); 1081internal static extern bool CryptDestroyKey(IntPtr hKey); 1088internal static extern bool CryptReleaseContext([In] IntPtr Prov, [In] uint Flags); 1095internal static extern bool CertFreeCertificateContext(IntPtr CertContext); 1200internal static unsafe int CorSigUncompressData(IntPtr data, out int uncompressedDataLength) 1298IntPtr.Zero); 1305IntPtr.Zero, 1308IntPtr.Zero); 1359int hr = _assemblyEnum.GetNextAssembly((IntPtr)0, out IAssemblyName fusionName, 0);
WindowsNative.cs (1)
278internal static extern bool FindClose(IntPtr findFileHandle);
XMakeAttributes.cs (1)
446currentArchitecture = (IntPtr.Size == sizeof(Int64)) ? MSBuildArchitectureValues.x64 : MSBuildArchitectureValues.x86;
Microsoft.Build.Tasks.UnitTests (21)
MockUnmanagedMemoryHelper.cs (19)
18private List<IntPtr> _allocatedHandles; 22private IntPtr _mainAllocationHandle = IntPtr.Zero; 25private Dictionary<IntPtr, List<IntPtr>> _dependentAllocations = new Dictionary<IntPtr, List<IntPtr>>(); 32_allocatedHandles = new List<IntPtr>(); 40public IntPtr AllocateHandle(int cb) 42IntPtr handle = Marshal.AllocHGlobal(cb); 45if (_mainAllocationHandle != IntPtr.Zero) 49_dependentAllocations.Add(_mainAllocationHandle, new List<IntPtr>()); 66public void FreeHandle(IntPtr handle) 68Assert.True(_allocatedHandles.Exists(new Predicate<IntPtr>( 69delegate (IntPtr ptr) { return ptr == handle; }))); 88public void EnterSubAllocationScope(IntPtr mainAllocation) 90Assert.Equal(IntPtr.Zero, _mainAllocationHandle); 100Assert.NotEqual(IntPtr.Zero, _mainAllocationHandle); 102_mainAllocationHandle = IntPtr.Zero;
NativeMethodsShared_Tests.cs (2)
38IntPtr kernel32Dll = NativeMethodsShared.LoadLibrary("kernel32.dll"); 41IntPtr processHandle = NativeMethodsShared.NullIntPtr;
Microsoft.Build.UnGAC (2)
NativeMethods.cs (1)
18uint UninstallAssembly(uint dwFlags, [MarshalAs(UnmanagedType.LPWStr)] string pszAssemblyName, IntPtr pRefData, ref ulong pulDisposition);
Program.cs (1)
44hresult = assemblyCache.UninstallAssembly(dwFlags: 0, pszAssemblyName: assembly, pRefData: IntPtr.Zero, pulDisposition: 0);
Microsoft.Build.Utilities.Core (8)
EnvironmentUtilities.cs (1)
11public static bool Is64BitProcess => Marshal.SizeOf<IntPtr>() == 8;
InprocTrackingNativeMethods.cs (6)
153private static readonly Lazy<string> fileTrackerDllName = new Lazy<string>(() => RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "FileTrackerA4.dll" : (IntPtr.Size == sizeof(Int32)) ? "FileTracker32.dll" : "FileTracker64.dll"); 188private static extern IntPtr GetProcAddress(SafeHandle moduleHandle, String procName); 236IntPtr entryPoint = GetProcAddress(s_fileTrackerDllHandle, entryPointName); 238if (IntPtr.Zero == entryPoint) 283: base(IntPtr.Zero, true) 291{ return IntPtr.Zero == handle; }
WindowsNative.cs (1)
278internal static extern bool FindClose(IntPtr findFileHandle);
Microsoft.Build.Utilities.UnitTests (13)
NativeMethods.cs (11)
20internal static readonly IntPtr NullPtr = IntPtr.Zero; 25internal static readonly IntPtr InvalidHandle = new IntPtr(-1); 60IntPtr lpEnvironment, 148internal IntPtr lpReserved2; 153internal IntPtr hStdInput; 158internal IntPtr hStdOutput; 163internal IntPtr hStdError; 187public IntPtr lpSecurityDescriptor; 206public IntPtr hProcess; 211public IntPtr hThread;
NativeMethodsShared_Tests.cs (2)
38IntPtr kernel32Dll = NativeMethodsShared.LoadLibrary("kernel32.dll"); 41IntPtr processHandle = NativeMethodsShared.NullIntPtr;
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (1)
141new PredefinedTypeInfo(PredefinedType.PT_INTPTR, typeof(IntPtr), "System.IntPtr", FUNDTYPE.FT_STRUCT),
Microsoft.DotNet.RemoteExecutor (6)
MiniDump.cs (6)
31if (MiniDumpWriteDump(process.SafeHandle, process.Id, fs.SafeFileHandle, MiniDumpType, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero) == 0) 44IntPtr ExceptionParam, 45IntPtr UserStreamParam, 46IntPtr CallbackParam);
Microsoft.DotNet.SignCheckLibrary (78)
Interop\ICLRStrongName.cs (14)
22int GetHashFromBlob([In] IntPtr pbBlob, [MarshalAs(UnmanagedType.U4)] [In] int cchBlob, [MarshalAs(UnmanagedType.U4)] [In, Out] ref int piHashAlg, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4)] [Out] byte[] pbHash, [MarshalAs(UnmanagedType.U4)] [In] int cchHash, [MarshalAs(UnmanagedType.U4)] out int pchHash); 31int GetHashFromHandle([In] IntPtr hFile, [MarshalAs(UnmanagedType.U4)] [In, Out] ref int piHashAlg, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] [Out] byte[] pbHash, [MarshalAs(UnmanagedType.U4)] [In] int cchHash, [MarshalAs(UnmanagedType.U4)] out int pchHash); 38int StrongNameFreeBuffer([In] IntPtr pbMemory); 44int StrongNameGetBlobFromImage([In] IntPtr pbBase, [MarshalAs(UnmanagedType.U4)] [In] int dwLength, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] [Out] byte[] pbBlob, [MarshalAs(UnmanagedType.U4)] [In, Out] ref int pcbBlob); 47int StrongNameGetPublicKey([MarshalAs(UnmanagedType.LPWStr)] [In] string pwzKeyContainer, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)] [In] byte[] pbKeyBlob, [MarshalAs(UnmanagedType.U4)] [In] int cbKeyBlob, out IntPtr ppbPublicKeyBlob, [MarshalAs(UnmanagedType.U4)] out int pcbPublicKeyBlob); 57int StrongNameKeyGen([MarshalAs(UnmanagedType.LPWStr)] [In] string pwzKeyContainer, [MarshalAs(UnmanagedType.U4)] [In] int dwFlags, out IntPtr ppbKeyBlob, [MarshalAs(UnmanagedType.U4)] out int pcbKeyBlob); 60int StrongNameKeyGenEx([MarshalAs(UnmanagedType.LPWStr)] [In] string pwzKeyContainer, [MarshalAs(UnmanagedType.U4)] [In] int dwFlags, [MarshalAs(UnmanagedType.U4)] [In] int dwKeySize, out IntPtr ppbKeyBlob, [MarshalAs(UnmanagedType.U4)] out int pcbKeyBlob); 66int StrongNameSignatureGeneration([MarshalAs(UnmanagedType.LPWStr)] [In] string pwzFilePath, [MarshalAs(UnmanagedType.LPWStr)] [In] string pwzKeyContainer, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] [In] byte[] pbKeyBlob, [MarshalAs(UnmanagedType.U4)] [In] int cbKeyBlob, [In, Out] IntPtr ppbSignatureBlob, [MarshalAs(UnmanagedType.U4)] out int pcbSignatureBlob); 69int StrongNameSignatureGenerationEx([MarshalAs(UnmanagedType.LPWStr)] [In] string wszFilePath, [MarshalAs(UnmanagedType.LPWStr)] [In] string wszKeyContainer, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3)] [In] byte[] pbKeyBlob, [MarshalAs(UnmanagedType.U4)] [In] int cbKeyBlob, [In, Out] IntPtr ppbSignatureBlob, [MarshalAs(UnmanagedType.U4)] out int pcbSignatureBlob, [MarshalAs(UnmanagedType.U4)] [In] int dwFlags); 84int StrongNameSignatureVerificationFromImage([In] IntPtr pbBase, [MarshalAs(UnmanagedType.U4)] [In] int dwLength, [MarshalAs(UnmanagedType.U4)] [In] int dwInFlags, [MarshalAs(UnmanagedType.U4)] out int dwOutFlags); 87int StrongNameTokenFromAssembly([MarshalAs(UnmanagedType.LPWStr)] [In] string pwzFilePath, out IntPtr ppbStrongNameToken, [MarshalAs(UnmanagedType.U4)] out int pcbStrongNameToken); 90int StrongNameTokenFromAssemblyEx([MarshalAs(UnmanagedType.LPWStr)] [In] string pwzFilePath, out IntPtr ppbStrongNameToken, [MarshalAs(UnmanagedType.U4)] out int pcbStrongNameToken, out IntPtr ppbPublicKeyBlob, [MarshalAs(UnmanagedType.U4)] out int pcbPublicKeyBlob); 93int StrongNameTokenFromPublicKey([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] [In] byte[] pbPublicKeyBlob, [MarshalAs(UnmanagedType.U4)] [In] int cbPublicKeyBlob, out IntPtr ppbStrongNameToken, [MarshalAs(UnmanagedType.U4)] out int pcbStrongNameToken);
Interop\Ole32.cs (1)
17IntPtr snbExclude, // must be NULL
Interop\StructuredStorage.cs (4)
44int hresult = Ole32.StgOpenStorage(filename, null, STGM.STGM_READ | STGM.STGM_SHARE_EXCLUSIVE, IntPtr.Zero, 0, out rootStorage); 53rootStorage.EnumElements(0, IntPtr.Zero, 0, out rootStorageEnum); 109rootStorage.OpenStorage(storageName, null, (STGM.STGM_READ | STGM.STGM_SHARE_EXCLUSIVE), IntPtr.Zero, 0, out stg); 126stg.CopyTo(0, null, IntPtr.Zero, fileStg);
Interop\WinCrypt.cs (21)
174IntPtr pvObject, 181ref IntPtr phCertStore, 182ref IntPtr phMsg, 183ref IntPtr ppvContext); 187IntPtr hCryptMsg, 190IntPtr pvData, 195IntPtr hCryptMsg, 219IntPtr hAdditionalStore, 220[Out] out IntPtr ppTsContext, 221[Out] out IntPtr ppTSSigner, 222[Out] out IntPtr phStore); 225internal static extern void CryptMemFree([In] IntPtr pv); 229internal static extern bool CertFreeCertificateContext([In] IntPtr pCertContext); 233internal static extern bool CertCloseStore([In] IntPtr hCertStore, [In] uint dwFlags); 242public IntPtr pbData; 274public IntPtr pCertInfo; 278public IntPtr hCertStore; 294public IntPtr pbEncoded; 298public IntPtr pTimeStamp; 310public IntPtr pvAccuracy; 315public IntPtr rgExtension;
Interop\WinTrust.cs (3)
15public static extern uint WinVerifyTrust(IntPtr hWnd, IntPtr pgActionID, IntPtr pWinTrustData);
Interop\WinTrustData.cs (5)
13public IntPtr pPolicyCallbackData; 14public IntPtr pSIPClientData; 18public IntPtr pFile; // We're not interested in other union members 20public IntPtr hWVTStateData; 21public IntPtr pwszURLReference;
Interop\WinTrustFileInfo.cs (2)
15public IntPtr hFile; 16public IntPtr pgKnownSubject;
Verification\AuthentiCode.cs (16)
25hFile = IntPtr.Zero, 26pgKnownSubject = IntPtr.Zero 38hWVTStateData = IntPtr.Zero, 40pPolicyCallbackData = IntPtr.Zero, 41pSIPClientData = IntPtr.Zero, 42pwszURLReference = IntPtr.Zero 48IntPtr pGuid = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(Guid))); 49IntPtr pData = Marshal.AllocHGlobal(Marshal.SizeOf(typeof(WinTrustData))); 53uint result = WinTrust.WinVerifyTrust(IntPtr.Zero, pGuid, pData); 107IntPtr certStore = IntPtr.Zero; 108IntPtr msg = IntPtr.Zero; 109IntPtr context = IntPtr.Zero; 130if (!WinCrypt.CryptMsgGetParam(msg, WinCrypt.CMSG_ENCODED_MESSAGE, 0, IntPtr.Zero, ref cbData))
Verification\StrongName.cs (2)
30IntPtr tokenPtr = IntPtr.Zero;
Verification\VsixVerifier.cs (10)
70IntPtr TSContextPtr = IntPtr.Zero; 71IntPtr TSSignerPtr = IntPtr.Zero; 72IntPtr StoreHandle = IntPtr.Zero; 79IntPtr.Zero, 105if (IntPtr.Zero != TSContextPtr) 109if (IntPtr.Zero != TSSignerPtr) 113if (IntPtr.Zero != StoreHandle)
Microsoft.Extensions.Caching.Memory (2)
MemoryCache.cs (2)
248if (IntPtr.Size == 4) 269if (IntPtr.Size == 4)
Microsoft.Extensions.Hosting.WindowsServices (2)
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.CloseHandle.cs (1)
13internal static partial bool CloseHandle(IntPtr handle);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.CreateToolhelp32Snapshot.cs (1)
30internal IntPtr th32DefaultHeapID;
Microsoft.Extensions.Logging.Console (5)
ConsoleLoggerProvider.cs (1)
90var stdOutHandle = Interop.Kernel32.GetStdHandle(Interop.Kernel32.STD_OUTPUT_HANDLE);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.GetConsoleMode.cs (3)
13internal static partial bool GetConsoleMode(IntPtr handle, out int mode); 15internal static bool IsGetConsoleModeCallSuccessful(IntPtr handle) 22internal static partial bool SetConsoleMode(IntPtr handle, int mode);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.GetStdHandle.cs (1)
15internal static partial IntPtr GetStdHandle(int nStdHandle); // param is NOT a handle, but it returns one!
Microsoft.Extensions.Logging.EventSource (2)
LoggingEventSource.cs (2)
514eventData.DataPointer = (IntPtr)pinnedString; 520eventData.DataPointer = (IntPtr)Unsafe.AsPointer(ref value);
Microsoft.Win32.Registry (1)
artifacts\obj\Microsoft.Win32.Registry\Debug\net9.0\Microsoft.Win32.Registry.notsupported.cs (1)
120public SafeRegistryHandle(System.IntPtr preexistingHandle, bool ownsHandle) : base (default(bool)) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Registry); }
MSBuild (2)
WindowsNative.cs (1)
278internal static extern bool FindClose(IntPtr findFileHandle);
XMakeAttributes.cs (1)
446currentArchitecture = (IntPtr.Size == sizeof(Int64)) ? MSBuildArchitectureValues.x64 : MSBuildArchitectureValues.x86;
MSBuildTaskHost (33)
Concurrent\ConcurrentDictionary.cs (1)
87return IntPtr.Size == 8;
NativeMethods.cs (31)
59internal static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 61internal static IntPtr NullIntPtr = new IntPtr(0); 62internal static IntPtr InvalidHandle = new IntPtr(-1); 159public IntPtr GroupInfo; 246internal IntPtr lpMinimumApplicationAddress; 247internal IntPtr lpMaximumApplicationAddress; 248internal IntPtr dwActiveProcessorMask; 349public IntPtr PebBaseAddress; 402public IntPtr lpSecurityDescriptor; 520if (!GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP.RelationProcessorCore, IntPtr.Zero, ref len) && 528if (GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP.RelationProcessorCore, (IntPtr)bufferPtr, ref len)) 848internal static extern bool GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP RelationshipType, IntPtr Buffer, ref uint ReturnedLength); 1103IntPtr.Zero, 1106IntPtr.Zero); 1397int bufferSize = GetFullPathWin32(path, 0, null, IntPtr.Zero); 1399int fullPathLength = GetFullPathWin32(path, bufferSize, buffer, IntPtr.Zero); 1405private static unsafe int GetFullPathWin32(string target, int bufferLength, char* buffer, IntPtr mustBeZero) 1543internal static extern bool FreeLibrary([In] IntPtr module); 1547internal static extern IntPtr GetProcAddress(IntPtr module, string procName); 1551internal static extern IntPtr LoadLibrary(string fileName); 1565internal static extern IntPtr GetStdHandle(int nStdHandle); 1569internal static extern uint GetFileType(IntPtr hFile); 1572internal static extern bool GetConsoleMode(IntPtr hConsoleHandle, out uint lpMode); 1575internal static extern bool SetConsoleMode(IntPtr hConsoleHandle, uint dwMode); 1608internal static extern unsafe int GetFullPathName(string target, int bufferLength, char* buffer, IntPtr mustBeZero); 1637internal static extern bool ReadFile(SafeFileHandle hFile, byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead, IntPtr lpOverlapped); 1646public static extern int CoWaitForMultipleHandles(COWAIT_FLAGS dwFlags, int dwTimeout, int cHandles, [MarshalAs(UnmanagedType.LPArray)] IntPtr[] pHandles, out int pdwIndex); 1661IntPtr lpSecurityAttributes, 1664IntPtr hTemplateFile); 1677internal static extern bool CloseHandle(IntPtr hObject);
XMakeAttributes.cs (1)
450string currentArchitecture = (IntPtr.Size == sizeof(Int64)) ? MSBuildArchitectureValues.x64 : MSBuildArchitectureValues.x86;
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
304[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IntPtr))]
netstandard (1)
netstandard.cs (1)
880[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IntPtr))]
PresentationCore (1528)
MS\Internal\AppModel\CookieHandler.cs (2)
114if (UnsafeNativeMethods.InternetGetCookieEx(uriString, null, null, ref size, 0, IntPtr.Zero)) 121if (UnsafeNativeMethods.InternetGetCookieEx(uriString, null, sb, ref size, 0, IntPtr.Zero))
MS\Internal\Automation\AutomationPatternInfo.cs (1)
20internal delegate object WrapObject( AutomationPeer peer, object iface, IntPtr hwnd );
MS\Internal\Automation\ElementUtil.cs (2)
143internal static Rect GetScreenRect( IntPtr hwnd, UIElement el ) 164internal static Visual GetElementFromPoint( IntPtr hwnd, Visual root, Point pointScreen )
MS\Internal\Classification.cs (12)
182internal IntPtr CombiningCharsIndexes; // Two dimentional array of base char classes, 186internal IntPtr CombiningMarkIndexes; // Combining mark classes array, with length = length 189internal IntPtr CombinationChars; // Two dimentional array of combined characters 201internal IntPtr UnicodeClasses; 202internal IntPtr CharacterAttributes; 203internal IntPtr Mirroring; 216_unicodeClassTable = new SecurityCriticalData<IntPtr>(ct.UnicodeClasses); 217_charAttributeTable = new SecurityCriticalData<IntPtr>(ct.CharacterAttributes); 218_mirroredCharTable = new SecurityCriticalData<IntPtr>(ct.Mirroring); 425static private readonly SecurityCriticalData<IntPtr> _unicodeClassTable; 426static private readonly SecurityCriticalData<IntPtr> _charAttributeTable; 427static private readonly SecurityCriticalData<IntPtr> _mirroredCharTable;
MS\Internal\DpiUtil\DpiUtil.cs (9)
38internal static DpiAwarenessContextHandle GetDpiAwarenessContext(IntPtr hWnd) 54internal static PROCESS_DPI_AWARENESS GetProcessDpiAwareness(IntPtr hWnd) 60/// Equivalent to <see cref="GetProcessDpiAwareness(IntPtr)"/> 64/// <remarks>See remarks for <see cref="GetProcessDpiAwareness(IntPtr)"/></remarks> 65internal static DpiAwarenessContextValue GetProcessDpiAwarenessContextValue(IntPtr hWnd) 130internal static DpiScale2 GetWindowDpi(IntPtr hWnd, bool fallbackToNearestMonitorHeuristic) 140/// <param name="fallbackToNearestMonitorHeuristic">The semantics of this parameter are identical to that in <see cref="GetWindowDpi(IntPtr, bool)"/></param> 142internal static HwndDpiInfo GetExtendedDpiInfoForWindow(IntPtr hWnd, bool fallbackToNearestMonitorHeuristic) 155internal static HwndDpiInfo GetExtendedDpiInfoForWindow(IntPtr hWnd)
MS\Internal\DpiUtil\DpiUtil+DpiAwarenessContextHelper.cs (3)
46internal static DpiAwarenessContextHandle GetDpiAwarenessContext(IntPtr hWnd) 69private static DpiAwarenessContextHandle GetProcessDpiAwarenessContext(IntPtr hWnd) 103private static DpiAwarenessContextHandle GetWindowDpiAwarenessContext(IntPtr hWnd)
MS\Internal\DpiUtil\DpiUtil+DpiAwarenessScope.cs (6)
34hWnd: IntPtr.Zero) 53hWnd: IntPtr.Zero) 72DpiAwarenessContextValue dpiAwarenessContextEnumValue, bool updateIfThreadInMixedHostingMode, IntPtr hWnd) 93IntPtr hWnd) 111(hWnd == IntPtr.Zero || !this.IsWindowUnawareOrSystemAware(hWnd))) 170private bool IsWindowUnawareOrSystemAware(IntPtr hWnd)
MS\Internal\DpiUtil\DpiUtil+HwndDpiInfo.cs (5)
30internal HwndDpiInfo(IntPtr hWnd, bool fallbackToNearestMonitorHeuristic) : base( 48ContainingMonitorScreenRect = NearestMonitorInfoFromWindow(IntPtr.Zero).rcMonitor; 55private static NativeMethods.MONITORINFOEX NearestMonitorInfoFromWindow(IntPtr hwnd) 57IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(null, hwnd), NativeMethods.MONITOR_DEFAULTTONEAREST); 58if (hMonitor == IntPtr.Zero)
MS\Internal\DpiUtil\DpiUtil+ProcessDpiAwarenessHelper.cs (3)
66internal static PROCESS_DPI_AWARENESS GetProcessDpiAwareness(IntPtr hWnd) 91private static PROCESS_DPI_AWARENESS GetProcessDpiAwarenessFromWindow(IntPtr hWnd) 94if (hWnd != IntPtr.Zero)
MS\Internal\DpiUtil\DpiUtil+SystemDpiHelper.cs (4)
109HandleRef hWndDesktop = new HandleRef(IntPtr.Zero, IntPtr.Zero); 110HandleRef hDC = new HandleRef(IntPtr.Zero, UnsafeNativeMethods.GetDC(hWndDesktop)); 111if (hDC.Handle == IntPtr.Zero)
MS\Internal\DpiUtil\DpiUtil+WindowDpiScaleHelper.cs (7)
45internal static DpiScale2 GetWindowDpi(IntPtr hWnd, bool fallbackToNearestMonitorHeuristic) 81private static DpiScale2 GetDpiForWindow(IntPtr hWnd) 83uint dpi = SafeNativeMethods.GetDpiForWindow(new HandleRef(IntPtr.Zero, hWnd)); 92private static DpiScale2 GetDpiForWindowFromNearestMonitor(IntPtr hWnd) 94IntPtr hMon = 95SafeNativeMethods.MonitorFromWindow(new HandleRef(IntPtr.Zero, hWnd), NativeMethods.MONITOR_DEFAULTTONEAREST); 98int hr = (int)UnsafeNativeMethods.GetDpiForMonitor(new HandleRef(IntPtr.Zero, hMon), MONITOR_DPI_TYPE.MDT_EFFECTIVE_DPI, out dpiX, out dpiY);
MS\Internal\FontCache\FontCacheUtil.cs (7)
96Marshal.Copy((IntPtr)_pointer, b, 0, Size); 372HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 375IntPtr dc = MS.Win32.UnsafeNativeMethods.GetDC(desktopWnd); 378if (dc == IntPtr.Zero) 855IntPtr.Zero 883_viewHandle = UnsafeNativeMethods.MapViewOfFileEx(_mappingHandle, UnsafeNativeMethods.FILE_MAP_READ, 0, 0, IntPtr.Zero, IntPtr.Zero);
MS\Internal\FontFace\FontDriver.cs (1)
269Marshal.Copy((IntPtr)fontData, fontCopy, 0, fileSize);
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (24)
346IntPtr hModule = MS.Win32.UnsafeNativeMethods.LoadLibrary(path); 350if ( hModule != IntPtr.Zero ) 353new HandleRef(null, hModule), "GetAlternateList") != IntPtr.Zero ? 357return hModule != IntPtr.Zero ? true : false; 423IntPtr packets = IntPtr.Zero; 429if (packets == IntPtr.Zero) 460out IntPtr packets, 466packets = IntPtr.Zero; 567private void ReleaseResourcesinPacketDescription(MS.Win32.Recognizer.PACKET_DESCRIPTION pd, IntPtr packets) 569if ( pd.pPacketProperties != IntPtr.Zero ) 584pd.pPacketProperties = IntPtr.Zero; 587if ( pd.pguidButtons != IntPtr.Zero ) 590pd.pguidButtons = IntPtr.Zero; 593if ( packets != IntPtr.Zero ) 596packets = IntPtr.Zero; 613IntPtr[] pRecoAlternates = new IntPtr[IRAS_DefaultCount]; 652if (pRecoAlternates[i] != IntPtr.Zero) 656pRecoAlternates[i] = IntPtr.Zero; 673IntPtr ptr = IntPtr.Zero; 687Debug.Assert(!(bestResultColumnCount != 0 && pRecoLattice->pLatticeColumns == IntPtr.Zero), "Invalid results!"); 688if ( bestResultColumnCount > 0 && pRecoLattice->pLatticeColumns != IntPtr.Zero )
MS\Internal\Interop\NativePointerCriticalHandle.cs (5)
12public NativePointerCriticalHandle(IntPtr nativePointer) 13: base(IntPtr.Zero) 18public override bool IsInvalid => handle == IntPtr.Zero; 27: base((IntPtr)nativePointer) 35handle = IntPtr.Zero;
MS\Internal\Shaping\TypefaceMap.cs (1)
101IntPtr ptext = characterBufferReference.CharacterBuffer.PinAndGetCharacterPointer(characterBufferReference.OffsetToFirstChar, out gcHandle);
MS\Internal\SystemDrawingHelper.cs (10)
40internal static IntPtr GetHandleFromMetafile(Object data) 43return (extensions != null) ? extensions.GetHandleFromMetafile(data) : IntPtr.Zero; 47internal static Object GetMetafileFromHemf(IntPtr hMetafile) 62internal static IntPtr GetHBitmap(object data, out int width, out int height) 71return IntPtr.Zero; 75internal static IntPtr GetHBitmapFromBitmap(object data) 78return (extensions != null) ? extensions.GetHBitmapFromBitmap(data) : IntPtr.Zero; 82internal static IntPtr ConvertMetafileToHBitmap(IntPtr handle) 85return (extensions != null) ? extensions.ConvertMetafileToHBitmap(handle) : IntPtr.Zero;
MS\Internal\Text\TextInterface\DWriteLoader.cs (7)
12private static IntPtr _dwrite; 21if (_dwrite == IntPtr.Zero) 34if (_dwrite != IntPtr.Zero) 38_dwrite = IntPtr.Zero; 52private static IntPtr LoadDWriteLibraryAndGetProcAddress(out delegate* unmanaged<int, void*, void*, int> DWriteCreateFactory) 54IntPtr hDWriteLibrary = NativeLibrary.Load("dwrite.dll", typeof(DWriteLoader).Assembly, DllImportSearchPath.System32); 56if (hDWriteLibrary != IntPtr.Zero)
MS\Internal\Text\TextInterface\Factory.cs (5)
62IntPtr pIDWriteFontFileLoaderMirror = Marshal.GetComInterfaceForObject( 82IntPtr pIDWriteFontCollectionLoaderMirror = Marshal.GetComInterfaceForObject( 301IntPtr pIDWriteFontCollectionLoaderMirror = Marshal.GetComInterfaceForObject( 354IntPtr pIDWriteFontCollectionLoaderMirror = Marshal.GetComInterfaceForObject( 366IntPtr pIDWriteFontFileLoaderMirror = Marshal.GetComInterfaceForObject(
MS\Internal\TextFormatting\FullTextBreakpoint.cs (12)
40private SecurityCriticalDataForSet<IntPtr> _ploline; // native object representing this break 41private SecurityCriticalDataForSet<IntPtr> _penaltyResource; // unsafe handle to the internal factors used to determines penalty of the break. By default, the lifetime of this resource is managed by _ploline. 61IntPtr penaltyRestriction, 84TextFormatterContext context = settings.Formatter.AcquireContext(fullText, IntPtr.Zero); 86IntPtr previousBreakRecord = IntPtr.Zero; 182_ploline = new SecurityCriticalDataForSet<IntPtr>(lsbreaks.pplolineArray[breakIndex]); 185_penaltyResource = new SecurityCriticalDataForSet<IntPtr>(lsbreaks.plinepenaltyArray[breakIndex]); 216if(_ploline.Value != IntPtr.Zero) 219_ploline.Value = IntPtr.Zero; 220_penaltyResource.Value = IntPtr.Zero; 252internal override SecurityCriticalDataForSet<IntPtr> GetTextPenaltyResource()
MS\Internal\TextFormatting\FullTextLine.cs (22)
52private SecurityCriticalDataForSet<IntPtr> _ploline; // actual LS line 53private SecurityCriticalDataForSet<IntPtr> _ploc; // actual LS context 159if (_ploline.Value != System.IntPtr.Zero) 163_ploline.Value = System.IntPtr.Zero; 181_ploline = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 229TextFormatterContext context = _metrics._formatter.AcquireContext(fullText, IntPtr.Zero); 244IntPtr ploline; 250IntPtr.Zero, // single-line formatting does not require break record 281IntPtr.Zero, // single-line formatting does not require break record 595if (_ploline.Value != System.IntPtr.Zero) 867if(_ploline.Value == IntPtr.Zero) 1002if (_ploline.Value == IntPtr.Zero) 1150if (_ploline.Value == System.IntPtr.Zero) 1243if (_ploline.Value == IntPtr.Zero) 1520if (_ploline.Value == IntPtr.Zero) 2132if (_ploline.Value != System.IntPtr.Zero) 2200return _metrics.GetTextLineBreak(IntPtr.Zero); 2455Debug.Assert(_ploline.Value != IntPtr.Zero); 2468(System.IntPtr)plsqsubl, 2508Debug.Assert(_ploline.Value != IntPtr.Zero); 2525(System.IntPtr)plsqsubl,
MS\Internal\TextFormatting\LineServices.cs (179)
43IntPtr pols, 49IntPtr pols, 56IntPtr pols, 59IntPtr pstyle, 67ref IntPtr lsplsrun 71IntPtr pols, 79IntPtr pols, 92IntPtr pols, 99IntPtr pols, 114IntPtr pols, 123IntPtr pols, 131IntPtr pols, 139IntPtr pols, 151IntPtr pols, 160IntPtr pols, 169IntPtr pols, 172ref IntPtr lsplsrun, 175ref IntPtr lsplsrunAddedChar, 182IntPtr pols, 194IntPtr pols, 206IntPtr pols, 207IntPtr* plsplsruns, 224IntPtr pols, 225IntPtr *plsplsruns, 242IntPtr pols, 264IntPtr pols, 288IntPtr pols, 302IntPtr pols, 314IntPtr pols, 326IntPtr pols, 338IntPtr pols, 357IntPtr pols, // Line Layout context 363IntPtr pols, // Line Layout context 376IntPtr pols, // Line Layout context 685public IntPtr szParaSeparator; 686public IntPtr szLineSeparator; 687public IntPtr szHidden; 688public IntPtr szNbsp; 689public IntPtr szObjectTerminator; 690public IntPtr szObjectReplacement; 719public IntPtr plsTbd; 759public IntPtr pfnCreateILSObj; 760public IntPtr pfnDestroyILSObj; 761public IntPtr pfnSetDoc; 762public IntPtr pfnCreateLNObj; 763public IntPtr pfnDestroyLNObj; 764public IntPtr pfnFmt; 765public IntPtr pfnFmtResume; 766public IntPtr pfnGetModWidthPrecedingChar; 767public IntPtr pfnGetModWidthFollowingChar; 768public IntPtr pfnTruncate; 769public IntPtr pfnFindPrevBreakOppInside; 770public IntPtr pfnFindNextBreakOppInside; 771public IntPtr pfnFindBreakOppBeforeCpTruncate; 772public IntPtr pfnFindBreakOppAfterCpTruncate; 773public IntPtr pfnCreateStartOppInside; 774public IntPtr pfnProposeBreakAfter; 775public IntPtr pfnProposeBreakBefore; 776public IntPtr pfnCreateBreakOppAfter; 777public IntPtr pfnCreateStartOppBefore; 778public IntPtr pfnCreateDobjFragment; 779public IntPtr pfnForceBreak; 780public IntPtr pfnCreateBreakRecord; 781public IntPtr pfnSetBreak; 782public IntPtr pfnDestroyStartOpp; 783public IntPtr pfnDestroyBreakOpp; 784public IntPtr pfnDuplicateBreakRecord; 785public IntPtr pfnDestroyBreakRecord; 786public IntPtr pfnGetSpecialEffectsFromDobj; 787public IntPtr pfnGetSpecialEffectsFromDobjFragment; 788public IntPtr pfnGetSubmissionInfoFromDobj; 789public IntPtr pfnGetSublinesFromDobj; 790public IntPtr pfnGetSubmissionInfoFromDobjFragment; 791public IntPtr pfnGetSubsFromDobjFragment; 792public IntPtr pfnFExpandWithPrecedingChar; 793public IntPtr pfnFExpandWithFollowingChar; 794public IntPtr pfnCalcPresentation; 795public IntPtr pfnQueryPointPcp; 796public IntPtr pfnQueryCpPpoint; 797public IntPtr pfnEnum; 798public IntPtr pfnDisplay; 799public IntPtr pfnDestroyDobj; 800public IntPtr pfnDestroyDobjFragment; 823public IntPtr plsimethods; // array of installed objects LSIMETHODS 880public IntPtr pols; // Opaque client object 883public IntPtr pfnNewPtr; 884public IntPtr pfnDisposePtr; 885public IntPtr pfnReallocPtr; 888public IntPtr pfnFetchRun; 890public IntPtr pfnGetNumericSeparators; 891public IntPtr pfnCheckForDigit; 894public IntPtr pfnFetchTabs; 895public IntPtr pfnReleaseTabsBuffer; 896public IntPtr pfnGetBreakThroughTab; 897public IntPtr pfnGetPosTabProps; 898public IntPtr pfnFGetLastLineJustification; 899public IntPtr pfnCheckParaBoundaries; 901public IntPtr pfnCheckRunKernability; 902public IntPtr pfnGetRunCharKerning; 906public IntPtr pfnGetBorderInfo; 907public IntPtr pfnReleaseRun; 908public IntPtr pfnReleaseRunBuffer; 912public IntPtr pfnGetHyphenInfo; 915public IntPtr pfnDrawBorder; 916public IntPtr pfnFInterruptUnderline; 917public IntPtr pfnFInterruptShade; 918public IntPtr pfnFInterruptBorder; 919public IntPtr pfnShadeRectangle; 921public IntPtr pfnDrawSplatLine; 923public IntPtr pfnGetGlyphs; 926public IntPtr pfnReleaseGlyphBuffers; 927public IntPtr pfnGetGlyphExpansionInfo; 928public IntPtr pfnGetGlyphExpansionInkInfo; 929public IntPtr pfnGetGlyphRunInk; 930public IntPtr pfnGetEms; 931public IntPtr pfnPunctStartLine; 932public IntPtr pfnModWidthOnRun; 933public IntPtr pfnModWidthSpace; 934public IntPtr pfnCompOnRun; 935public IntPtr pfnCompWidthSpace; 936public IntPtr pfnExpOnRun; 937public IntPtr pfnExpWidthSpace; 938public IntPtr pfnGetModWidthClasses; 939public IntPtr pfnGetBreakingClasses; 940public IntPtr pfnFTruncateBefore; 941public IntPtr pfnCanBreakBeforeChar; 942public IntPtr pfnCanBreakAfterChar; 943public IntPtr pfnFHangingPunct; 944public IntPtr pfnGetSnapGrid; 945public IntPtr pfnDrawEffects; 946public IntPtr pfnFCancelHangingPunct; 947public IntPtr pfnModifyCompAtLastChar; 953public IntPtr pfnGetCharAlignmentStartLine; 954public IntPtr pfnGetCharAlignmentEndLine; 955public IntPtr pfnGetGlyphAlignmentStartLine; 956public IntPtr pfnGetGlyphAlignmentEndLine; 957public IntPtr pfnGetPriorityForGoodTypography; 961public IntPtr pfnEnumPen; 965public IntPtr pfnAssertFailedPtr; 1013public IntPtr pbreakrecobj; 1169public IntPtr plsrun; 1193public IntPtr plsCellDetails; // client-defined structure 1216public IntPtr* plinepenaltyArray; // array of unsafe handle to TSLINEPENALITYINFO struct, each per each break 1218public IntPtr* pplolineArray; // array of unsafe handle to Loline struct, each per each break 1417out IntPtr ploc 1422IntPtr ploc 1427IntPtr ploc, 1432IntPtr pInputBreakRec, 1434out IntPtr pploline, 1441IntPtr ploline, 1448IntPtr ploline, 1449out IntPtr pbreakrec 1454IntPtr pBreakRec, 1461IntPtr pBreakRec, 1462out IntPtr pBreakRecClone 1467IntPtr ploline 1472IntPtr ploc, 1478IntPtr ploc, 1486IntPtr ploc, 1494IntPtr ploline, 1502IntPtr ploline, 1510IntPtr ploline, 1513IntPtr pSubLineInfo, // passing raw pinned pointer for out array 1520IntPtr ploline, 1523IntPtr pSubLineInfo, // passing raw pinned pointer for out array 1530IntPtr ploc, // Line Services context 1532IntPtr previousBreakRecord, 1533IntPtr ploparabreak, 1534IntPtr ptslinevariantRestriction, 1541IntPtr ploc, // Line Services context 1544IntPtr previousParaBreakRecord, 1545ref IntPtr pploparabreak, 1552IntPtr ploparabreak, 1559IntPtr ploc, // Line Services context 1577IntPtr ploc, // Line Services context 1578out IntPtr penaltyModuleHandle 1583IntPtr penaltyModuleHandle 1588IntPtr penaltyModuleHandle, 1589out IntPtr penaltyModuleInternalHandle
MS\Internal\TextFormatting\LineServicesCallbacks.cs (38)
91IntPtr pols, // Line Layout context 94IntPtr pstyle, // current demanded style 102ref IntPtr lsplsrun // [out] fetched run 246lsplsrun = (IntPtr)plsrun; 299IntPtr pols, // Line Layout context 387IntPtr pols, // Line Layout context 432System.IntPtr pols, // Line Layout context 479IntPtr pols, // Line Layout context 571IntPtr pols, // Line Layout context 603IntPtr pols, // Line Layout context 606ref IntPtr lsplsrun, // [out] Marker run 609ref IntPtr lsplsrunAddedChar, // [out] Added character run 661lsplsrun = (IntPtr)plsrun; 678IntPtr pols, // Line Layout context 742IntPtr pols, // Line Layout context 816IntPtr pols, // Line Layout context 856IntPtr pols, // Line Layout context 893IntPtr pols, // Line Layout context 935IntPtr pols, // Line Layout context 1000IntPtr pols, // Line Layout context 1438IntPtr pols, // Line Layout context 1510IntPtr pols, // Line Layout context 1605IntPtr pols, // Line Layout context 1606IntPtr* plsplsruns, // array of plsruns 1696IntPtr pols, // Line Layout context 1697IntPtr* plsplsruns, // array of plsruns 1781IntPtr* plsplsruns, 1799IntPtr pols, // Line Layout context 1888IntPtr pols, // Line Layout context 1938IntPtr pols, // Line Layout context 2042IntPtr pols, // Line Layout context 2167IntPtr pols, // Line Layout context 2311System.IntPtr pols, // Line Layout context 2338Marshal.StructureToPtr(inlineInit, (System.IntPtr)objectInfo, false); 2360System.IntPtr pols, // Line Layout context 2452System.IntPtr pols, // Line Layout context 2607IntPtr pols, // ls context 2725IntPtr pols, // pointer to context
MS\Internal\TextFormatting\LineServicesRun.cs (2)
118IntPtr controlChar 143IntPtr controlChar,
MS\Internal\TextFormatting\TextFormatterImp.cs (2)
525IntPtr ploc 539if (ploc == IntPtr.Zero)
MS\Internal\TextFormatting\TextMetrics.cs (7)
301internal TextLineBreak GetTextLineBreak(IntPtr ploline) 303IntPtr pbreakrec = IntPtr.Zero; 305if (ploline != IntPtr.Zero) 321new SecurityCriticalDataForSet<IntPtr>(pbreakrec) 324return (pbreakrec != IntPtr.Zero) ? new TextLineBreak(null, new SecurityCriticalDataForSet<IntPtr>(pbreakrec)) : null;
MS\Internal\TextFormatting\TextPenaltyModule.cs (7)
37private SecurityCriticalDataForSet<IntPtr> _ploPenaltyModule; // Pointer to LS penalty module 44internal TextPenaltyModule(SecurityCriticalDataForSet<IntPtr> ploc) 46IntPtr ploPenaltyModule; 78if (_ploPenaltyModule.Value != IntPtr.Zero) 81_ploPenaltyModule.Value = IntPtr.Zero; 93internal IntPtr DangerousGetHandle() 100IntPtr penaltyModuleInternalHandle;
MS\Internal\TextFormatting\TextStore.cs (6)
2406internal static IntPtr PwchParaSeparator; 2407internal static IntPtr PwchLineSeparator; 2408internal static IntPtr PwchNbsp; 2409internal static IntPtr PwchHidden; 2410internal static IntPtr PwchObjectTerminator; 2411internal static IntPtr PwchObjectReplacement;
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\InputPane.cs (1)
81private InputPane(IntPtr? hwnd)
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\InputPaneRcw.cs (3)
27IntPtr hstring = IntPtr.Zero; 62IInputPane2 GetForWindow([In] IntPtr appWindow, [In] ref Guid riid);
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\NativeMethods.cs (4)
26out IntPtr hstring); 29internal static extern int WindowsDeleteString(IntPtr hstring); 32internal static extern unsafe int RoGetActivationFactory(IntPtr runtimeClassId, ref Guid iid, [MarshalAs(UnmanagedType.Interface)] out object factory); 35internal static extern unsafe int RoActivateInstance(IntPtr runtimeClassId, [MarshalAs(UnmanagedType.Interface)] out object instance);
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\UISettingsRcw.cs (3)
20IntPtr hstring = IntPtr.Zero; 40void GetIids(out uint iidCount, out IntPtr iids);
MS\Win32\UnsafeNativeMethodsPenimc.cs (18)
82private static IntPtr _pimcActCtxCookie = IntPtr.Zero; 89internal static extern IntPtr RegisterDllForSxSCOM(); 107if (_pimcActCtxCookie == IntPtr.Zero) 113if ((_pimcActCtxCookie = RegisterDllForSxSCOM()) == IntPtr.Zero) 125if (_pimcActCtxCookie != IntPtr.Zero) 129_pimcActCtxCookie = IntPtr.Zero; 500IntPtr commHandle, 501IntPtr handleReset, 506out IntPtr pPackets); 525IntPtr[] commHandles, 526IntPtr handleReset, 532out IntPtr pPackets); 549IntPtr commHandle, 565internal static extern bool CreateResetEvent(out IntPtr handle); 574internal static extern bool DestroyResetEvent(IntPtr handle); 583internal static extern bool RaiseResetEvent(IntPtr handle); 634private static extern bool DeactivateActCtx(int flags, IntPtr activationCtxCookie);
MS\Win32\UnsafeNativeMethodsPointer.cs (16)
340internal IntPtr device; 342internal IntPtr monitor; 390internal IntPtr sourceDevice; 391internal IntPtr hwndTarget; 535internal static extern bool GetPointerDeviceCursors([In] IntPtr device, [In, Out] ref UInt32 cursorCount, [In, Out] POINTER_DEVICE_CURSOR_INFO[] cursors); 553internal static extern bool GetPointerDeviceProperties([In] IntPtr device, [In, Out] ref UInt32 propertyCount, [In, Out] POINTER_DEVICE_PROPERTY[] pointerProperties); 559internal static extern bool GetPointerDeviceRects([In] IntPtr device, [In, Out] ref RECT pointerDeviceRect, [In, Out] ref RECT displayRect); 594internal delegate void INTERACTION_CONTEXT_OUTPUT_CALLBACK(IntPtr clientData, ref INTERACTION_CONTEXT_OUTPUT output); 601internal static extern void CreateInteractionContext([Out] out IntPtr interactionContext); 608internal static extern void DestroyInteractionContext([In] IntPtr interactionContext); 617internal static extern void SetInteractionConfigurationInteractionContext([In] IntPtr interactionContext, [In] UInt32 configurationCount, [In] INTERACTION_CONTEXT_CONFIGURATION[] configuration); 626internal static extern void RegisterOutputCallbackInteractionContext([In] IntPtr interactionContext, [In] INTERACTION_CONTEXT_OUTPUT_CALLBACK outputCallback, [In, Optional] IntPtr clientData); 635internal static extern void SetPropertyInteractionContext([In] IntPtr interactionContext, [In] INTERACTION_CONTEXT_PROPERTY contextProperty, [In] UInt32 value); 644internal static extern void BufferPointerPacketsInteractionContext([In] IntPtr interactionContext, [In] UInt32 entriesCount, [In] POINTER_INFO[] pointerInfo); 651internal static extern void ProcessBufferedPacketsInteractionContext([In] IntPtr interactionContext);
MS\Win32\UnsafeNativeMethodsTablet.cs (25)
26internal static extern int DestroyRecognizer([In] IntPtr hRec); 32internal static extern int DestroyContext([In] IntPtr hRecContext); 35internal static extern int AddStroke([In] ContextSafeHandle hRecContext, [In] ref PACKET_DESCRIPTION packetDesc, [In] uint cbPackets, [In] IntPtr pByte, [In, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.XFORM xForm); 47internal static extern int GetAlternateList([In] ContextSafeHandle hRecContext, [In, Out] ref RECO_RANGE recoRange, [In, Out] ref uint cAlts, [In, Out] IntPtr[] recAtls, [In] ALT_BREAKS breaks); 50internal static extern int DestroyAlternate([In] IntPtr hRecAtls); 53internal static extern int GetString([In] IntPtr hRecAtls, [Out] out RECO_RANGE recoRange, [In, Out]ref uint size, [In, Out] StringBuilder recoString); 56internal static extern int GetConfidenceLevel([In] IntPtr hRecAtls, [Out] out RECO_RANGE recoRange, [Out] out RecognitionConfidence confidenceLevel); 62internal static extern int GetLatticePtr([In] ContextSafeHandle hRecContext, [In] ref IntPtr pRecoLattice); 79: base(IntPtr.Zero, ownHandle) 90return IsClosed || handle == IntPtr.Zero; 96Debug.Assert(handle != IntPtr.Zero); 114: base(IntPtr.Zero, ownHandle) 125return IsClosed || handle == IntPtr.Zero; 136Debug.Assert(handle != IntPtr.Zero); 199public IntPtr pPacketProperties; 201public IntPtr pguidButtons; 266public IntPtr pPropertyValue; 279public IntPtr apProps; 299public IntPtr pData; 321public IntPtr pStrokes; 323public IntPtr pLatticeElements; 341public IntPtr pLatticeColumns; 343public IntPtr pGuidProperties; 345public IntPtr pulBestResultColumns; 346public IntPtr pulBestResultIndexes;
src\Microsoft.DotNet.Wpf\src\Common\Graphics\exports.cs (54)
114Debug.Assert((cbData == 0) || ((Int64)(IntPtr)pbFrom) % 4 == 0); 115Debug.Assert((cbData == 0) || ((Int64)(IntPtr)pbTo) % 4 == 0); 132IntPtr pChannel, 139IntPtr pSourceChannel, 141IntPtr pTargetChannel, 147IntPtr pTransport, 148IntPtr hChannel, 149out IntPtr channelHandle); 153IntPtr channelHandle); 157IntPtr channelHandle); 161IntPtr channelHandle); 165IntPtr pConnection); 168internal static extern int MilChannel_GetMarshalType(IntPtr channelHandle, out ChannelMarshalType marshalType); 175IntPtr pChannel); 179IntPtr pChannel, 187IntPtr pChannel, 194IntPtr pChannel); 200IntPtr pChannel, 208IntPtr pChannel); 212IntPtr pChannel, 219IntPtr pChannel, 220IntPtr hwnd, 226IntPtr pChannel, 228IntPtr[] handles, 236IntPtr pChannel, 238/* size_t */ IntPtr messageSize, 244IntPtr pChannel, 343IntPtr _hChannel; 349IntPtr _pConnection; 356public Channel(Channel referenceChannel, bool isOutOfBandChannel, IntPtr pConnection, bool isSynchronous) 358IntPtr referenceChannelHandle = IntPtr.Zero; 382if (_hChannel == IntPtr.Zero) 403if (_hChannel == IntPtr.Zero) 425if (_hChannel == IntPtr.Zero) 445if (_hChannel != IntPtr.Zero) 453if (_hChannel != IntPtr.Zero) 457_hChannel = IntPtr.Zero; 481Invariant.Assert(_hChannel != IntPtr.Zero); 540Invariant.Assert(_hChannel != IntPtr.Zero); 570Invariant.Assert(_hChannel != IntPtr.Zero); 603Invariant.Assert(_hChannel != IntPtr.Zero); 664if (_hChannel == IntPtr.Zero) 700if (_hChannel == IntPtr.Zero) 736if (_hChannel == IntPtr.Zero) 763if (_hChannel == IntPtr.Zero) 787Invariant.Assert(_hChannel != IntPtr.Zero); 806Invariant.Assert(_hChannel != IntPtr.Zero); 828internal void SetNotificationWindow(IntPtr hwnd, WindowMessage message) 830Invariant.Assert(_hChannel != IntPtr.Zero); 873Invariant.Assert(_hChannel != IntPtr.Zero); 884(IntPtr)sizeof(MilMessage.Message), 2189IntPtr hWnd, 2306IntPtr pRenderTarget,
src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_exports.cs (1)
151IntPtr /* IMILMedia */ THIS_PTR
src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_render.cs (6)
671IntPtr Pattern; 672IntPtr Mask; 679IntPtr Desc; 681IntPtr Data; 735internal IntPtr m_pMedia; 784Exception exceptionForHR = Marshal.GetExceptionForHR(hr, (IntPtr)(-1));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\CharacterBuffer.cs (4)
46public abstract IntPtr PinAndGetCharacterPointer(int offset, out GCHandle gcHandle); 225public unsafe override IntPtr PinAndGetCharacterPointer(int offset, out GCHandle gcHandle) 324public unsafe override IntPtr PinAndGetCharacterPointer(int offset, out GCHandle gcHandle) 433public override IntPtr PinAndGetCharacterPointer(int offset, out GCHandle gcHandle)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\MimeTypeMapper.cs (1)
92IntPtr.Zero,
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
56int retval = MS.Internal.WindowsBase.NativeMethodsSetLastError.MapWindowPoints(hwnd , new HandleRef(null, IntPtr.Zero), ref rcWindowCoords, 2);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\LoadLibraryHelper.cs (6)
33var hModule = IntPtr.Zero; 38hModule != IntPtr.Zero) 43UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, hModule), AddDllDirectoryName) != IntPtr.Zero; 74internal static IntPtr SecureLoadLibraryEx(string lpFileName, IntPtr hFile, UnsafeNativeMethods.LoadLibraryFlags dwFlags)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCompiler.cs (3)
34public static extern int SHGetFolderPath(IntPtr hwndOwner, int nFolder, IntPtr hToken, int dwFlags, StringBuilder lpszPath); 41IntPtr Buffer, // buffer with data to sniff -
System\Windows\Automation\Peers\AutomationPeer.cs (10)
226public HostedWindowWrapper(IntPtr hwnd) 233_hwnd = IntPtr.Zero; 236internal static HostedWindowWrapper CreateInternal(IntPtr hwnd) 243internal IntPtr Handle 251private IntPtr _hwnd; 475if (_parent != null && _hwnd != IntPtr.Zero) return this; 477if((connectedPeer._hwnd) != IntPtr.Zero) 521if(peer._hwnd == IntPtr.Zero) 2169internal IntPtr Hwnd 2525private IntPtr _hwnd;
System\Windows\Automation\Peers\GenericRootAutomationPeer.cs (4)
49IntPtr hwnd = this.Hwnd; 50if(hwnd != IntPtr.Zero) 80IntPtr hwnd = this.Hwnd; 81if(hwnd != IntPtr.Zero)
System\Windows\Automation\Peers\UIElementAutomationPeer.cs (1)
85internal static AutomationPeer GetRootAutomationPeer(Visual rootVisual, IntPtr hwnd)
System\Windows\clipboard.cs (7)
560IntPtr hModule = IntPtr.Zero; 563hModule = LoadLibraryHelper.SecureLoadLibraryEx(ExternDll.Wldp, IntPtr.Zero, UnsafeNativeMethods.LoadLibraryFlags.LOAD_LIBRARY_SEARCH_SYSTEM32); 564if (hModule != IntPtr.Zero) 566IntPtr entryPoint = UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, hModule), "WldpIsDynamicCodePolicyEnabled"); 567if (entryPoint != IntPtr.Zero) 583if (hModule != IntPtr.Zero)
System\Windows\dataobject.cs (112)
619pformatetcOut.ptd = IntPtr.Zero; 660(IntPtr)1); 674hr = Win32CreateStreamOnHGlobal(IntPtr.Zero, true /*deleteOnRelease*/, ref istream); 698medium.unionmember = IntPtr.Zero; 980internal static IntPtr Win32GlobalAlloc(int flags, IntPtr bytes) 982IntPtr win32Pointer = UnsafeNativeMethods.GlobalAlloc(flags, bytes); 984if (win32Pointer == IntPtr.Zero) 995private static int Win32CreateStreamOnHGlobal(IntPtr hGlobal, bool fDeleteOnRelease, ref IStream istream) 1011IntPtr win32Pointer = UnsafeNativeMethods.GlobalFree(handle); 1013if (win32Pointer != IntPtr.Zero) 1022internal static IntPtr Win32GlobalReAlloc(HandleRef handle, IntPtr bytes, int flags) 1024IntPtr win32Pointer = UnsafeNativeMethods.GlobalReAlloc(handle, bytes, flags); 1026if (win32Pointer == IntPtr.Zero) 1037internal static IntPtr Win32GlobalLock(HandleRef handle) 1039IntPtr win32Pointer = UnsafeNativeMethods.GlobalLock(handle); 1041if (win32Pointer == IntPtr.Zero) 1065internal static IntPtr Win32GlobalSize(HandleRef handle) 1067IntPtr win32Pointer = UnsafeNativeMethods.GlobalSize(handle); 1070if (win32Pointer == IntPtr.Zero) 1081internal static IntPtr Win32SelectObject(HandleRef handleDC, IntPtr handleObject) 1083IntPtr handleOldObject = UnsafeNativeMethods.SelectObject(handleDC, handleObject); 1084if (handleOldObject == IntPtr.Zero) 1103internal static IntPtr Win32GetDC(HandleRef handleDC) 1105IntPtr newDC = UnsafeNativeMethods.GetDC(handleDC); 1112internal static IntPtr Win32CreateCompatibleDC(HandleRef handleDC) 1114IntPtr newDC = UnsafeNativeMethods.CreateCompatibleDC(handleDC); 1122internal static IntPtr Win32CreateCompatibleBitmap(HandleRef handleDC, int width, int height) 1124IntPtr bitmap = UnsafeNativeMethods.CreateCompatibleBitmap(handleDC, width, height); 1161int win32Return = UnsafeNativeMethods.WideCharToMultiByte(0 /*CP_ACP*/, 0 /*flags*/, wideString, wideChars, bytes, byteCount, IntPtr.Zero, IntPtr.Zero); 1304private IntPtr GetCompatibleBitmap(object data) 1307IntPtr hBitmap; 1308IntPtr hBitmapNew; 1309IntPtr hDC; 1310IntPtr sourceDC; 1311IntPtr sourceObject; 1312IntPtr destinationDC; 1313IntPtr destinationObject; 1318if (hBitmap == IntPtr.Zero) 1320return IntPtr.Zero; 1326hDC = Win32GetDC(new HandleRef(this, IntPtr.Zero)); 1360Win32ReleaseDC(new HandleRef(this, IntPtr.Zero), new HandleRef(this, hDC)); 1375private IntPtr GetEnhancedMetafileHandle(String format, object data) 1377IntPtr hEnhancedMetafile; 1379hEnhancedMetafile = IntPtr.Zero; 1403if (hEnhancedMetafile == IntPtr.Zero) 1585IntPtr size = (IntPtr)inkStream.Length; 1591istream.Write(buffer, NativeMethods.IntPtrToInt32(size), IntPtr.Zero); 1622IntPtr hBitmap; 1626if (hBitmap != IntPtr.Zero) 1648IntPtr hMetafile; 1659if (hMetafile != IntPtr.Zero) 1676private int SaveObjectToHandle(IntPtr handle, Object data, bool doNotReallocate) 1702private int SaveStreamToHandle(IntPtr handle, Stream stream, bool doNotReallocate) 1704IntPtr size; 1705IntPtr ptr; 1707if (handle == IntPtr.Zero) 1712size = (IntPtr)stream.Length; 1742private int SaveSystemBitmapSourceToHandle(IntPtr handle, Object data, bool doNotReallocate) 1757IntPtr hbitmap = SystemDrawingHelper.GetHBitmapFromBitmap(data); 1760IntPtr.Zero, 1780private int SaveSystemDrawingBitmapToHandle(IntPtr handle, Object data, bool doNotReallocate) 1792private int SaveFileListToHandle(IntPtr handle, string[] files, bool doNotReallocate) 1794IntPtr currentPtr; 1797IntPtr basePtr; 1805if (handle == IntPtr.Zero) 1816currentPtr = IntPtr.Zero; 1848currentPtr = (IntPtr)((long)currentPtr + baseStructSize); 1859currentPtr = (IntPtr)((long)currentPtr + (files[i].Length * 2)); 1868currentPtr = (IntPtr)((long)currentPtr + 2); 1891private int SaveStringToHandle(IntPtr handle, string str, bool unicode, bool doNotReallocate) 1893if (handle == IntPtr.Zero) 1901IntPtr ptr; 1931*(char*)(IntPtr)((ulong)ptr + (ulong)chars.Length * 2) = '\0'; 1943IntPtr ptr; 1982Marshal.Copy(new byte[] { 0 }, 0, (IntPtr)((long)ptr + pinvokeSize), 1); 1997private int SaveStringToHandleAsUtf8(IntPtr handle, string str, bool doNotReallocate) 1999IntPtr pointerUtf8; 2004if (handle == IntPtr.Zero) 2038Marshal.Copy(new byte[] { 0 }, 0, (IntPtr)((long)pointerUtf8 + utf8ByteCount), 1); 2117private int EnsureMemoryCapacity(ref IntPtr handle, Int32 minimumByteCount, bool doNotReallocate) 2126handle = IntPtr.Zero; 2133(IntPtr)minimumByteCount, 2138if (handle == IntPtr.Zero) 2178IntPtr hbitmap = SystemDrawingHelper.GetHBitmapFromBitmap(data); 2181IntPtr.Zero, 2281temp.ptd = IntPtr.Zero; 2519if (formatetc[formatetcIndex].ptd != IntPtr.Zero) 2700if (medium.unionmember != IntPtr.Zero && medium.tymed == TYMED.TYMED_ISTREAM) 2710IntPtr hglobal = Win32GlobalAlloc(NativeMethods.GMEM_MOVEABLE 2713(IntPtr)(size)); 2716IntPtr ptr = Win32GlobalLock(new HandleRef(this, hglobal)); 2750private object GetDataFromHGLOBAL(string format, IntPtr hglobal) 2756if (hglobal != IntPtr.Zero) 2872if (medium.unionmember != IntPtr.Zero && medium.tymed == TYMED.TYMED_HGLOBAL) 2928if (medium.unionmember != IntPtr.Zero) 2978private Stream ReadByteStreamFromHandle(IntPtr handle, out bool isSerializedObject) 2980IntPtr ptr; 3037private Object ReadObjectFromHandle(IntPtr handle, bool restrictDeserialization) 3079private BitmapSource ReadBitmapSourceFromHandle(IntPtr handle) 3103private string[] ReadFileListFromHandle(IntPtr hdrop) 3134private unsafe string ReadStringFromHandle(IntPtr handle, bool unicode) 3137IntPtr ptr; 3164private unsafe string ReadStringFromHandleUtf8(IntPtr handle) 3170IntPtr pointerUtf8 = Win32GlobalLock(new HandleRef(this, handle)); 3181byte endByte = Marshal.ReadByte((IntPtr)((long)pointerUtf8 + utf8ByteCount)); 3254private Object GetBitmapSourceFromHbitmap(IntPtr hbitmap) 3258IntPtr.Zero,
System\Windows\DpiChangedEventArgs.cs (1)
48internal HwndDpiChangedEventArgs(double oldDpiX, double oldDpiY, double newDpiX, double newDpiY, IntPtr lParam) : base(false)
System\Windows\DragDrop.cs (7)
454internal static void RegisterDropTarget(IntPtr windowHandle) 456if (windowHandle != IntPtr.Zero) 475internal static void RevokeDropTarget(IntPtr windowHandle) 477if (windowHandle != IntPtr.Zero) 897public OleDropTarget(IntPtr handle) 899if (handle == IntPtr.Zero) 1442private IntPtr _windowHandle;
System\Windows\Input\AccessKeyManager.cs (4)
477IntPtr hwnd = MS.Win32.UnsafeNativeMethods.GetActiveWindow(); 478if (hwnd != IntPtr.Zero) 486IntPtr hwnd = MS.Win32.UnsafeNativeMethods.GetActiveWindow(); 487if (hwnd != IntPtr.Zero)
System\Windows\Input\Cursor.cs (5)
178_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 255_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 301_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 324_cursorHandle = SafeNativeMethods.LoadCursor(new HandleRef(this,IntPtr.Zero), (IntPtr)(CursorTypes[(int)cursorType]));
System\Windows\Input\DefaultTextStore.cs (2)
87public void GetWnd(out IntPtr hwnd) 89hwnd = IntPtr.Zero;
System\Windows\Input\InputElement.cs (2)
279if(sourceFrom != null && sourceFrom.CriticalHandle != IntPtr.Zero && sourceFrom.CompositionTarget != null && 280sourceTo != null && sourceTo.CriticalHandle != IntPtr.Zero && sourceTo.CompositionTarget != null)
System\Windows\Input\InputLanguageManager.cs (2)
261IntPtr hkl = SafeNativeMethods.GetKeyboardLayout(0); 262if (hkl == IntPtr.Zero)
System\Windows\Input\InputMethod.cs (41)
550IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 551if (hwnd != IntPtr.Zero) 553IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 586IntPtr hwnd = IntPtr.Zero; 589if (hwnd != IntPtr.Zero) 591IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 783IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 784if (hwnd != IntPtr.Zero) 788IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 831IntPtr hwnd = IntPtr.Zero; 924if (hwnd != IntPtr.Zero) 928IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1041IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 1042if (hwnd != IntPtr.Zero) 1047IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1115IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 1116if (hwnd != IntPtr.Zero) 1120IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1283IntPtr hkl = SafeNativeMethods.GetKeyboardLayout(0); 1291internal static bool IsImm32Ime(IntPtr hkl) 1293if (hkl == IntPtr.Zero) 1340IntPtr hwnd; 1348if (DefaultImc != IntPtr.Zero) 1358UnsafeNativeMethods.ImmAssociateContext(new HandleRef(this, hwnd), new HandleRef(this, IntPtr.Zero)); 1414private UnsafeNativeMethods.ConversionModeFlags Imm32ConversionModeToTSFConversionMode(IntPtr hwnd) 1417if (hwnd != IntPtr.Zero) 1421IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1500IntPtr hkl = SafeNativeMethods.GetKeyboardLayout(0); 1538UnsafeNativeMethods.ImmConfigureIME(new HandleRef(this, hkl), new HandleRef(this, HwndFromInputElement(element)), NativeMethods.IME_CONFIG_GENERAL, IntPtr.Zero); 1553IntPtr hkl = SafeNativeMethods.GetKeyboardLayout(0); 1603private static IntPtr HwndFromInputElement(IInputElement element) 1605IntPtr hwnd = (IntPtr)0; 1747private IntPtr DefaultImc 1756IntPtr hwnd = UnsafeNativeMethods.ImmGetDefaultIMEWnd(new HandleRef(this, IntPtr.Zero)); 1757IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1760_defaultImc = new SecurityCriticalDataClass<IntPtr>(himc); 1798private static SecurityCriticalDataClass<IntPtr> _defaultImc;
System\Windows\Input\InputProcessorProfiles.cs (4)
117IntPtr[] hklList = null; 122hklList = new IntPtr[count]; 150IntPtr langids; 163short langid = Marshal.PtrToStructure<short>((IntPtr)((Int64)langids + sizeOfShort * i));
System\Windows\Input\MouseDevice.cs (8)
929IntPtr.Zero); 1309IntPtr.Zero); 1383IntPtr extraInformation = clearExtraInformation ? IntPtr.Zero : rawMouseInputReport.ExtraInformation; 2105IntPtr hwndHit = IntPtr.Zero ; 2114hwndHit = IntPtr.Zero; 2117if (hwndHit != IntPtr.Zero)
System\Windows\Input\RawKeyboardInputReport.cs (4)
63IntPtr extraInformation) : base(inputSource, InputType.Keyboard, mode, timestamp) 73_extraInformation = new SecurityCriticalData<IntPtr>(extraInformation); 105public IntPtr ExtraInformation 133private SecurityCriticalData<IntPtr> _extraInformation;
System\Windows\Input\RawMouseInputReport.cs (4)
61IntPtr extraInformation) : base(inputSource, InputType.Mouse, mode, timestamp) 71_extraInformation = new SecurityCriticalData<IntPtr>(extraInformation); 98public IntPtr ExtraInformation 143private SecurityCriticalData<IntPtr> _extraInformation;
System\Windows\Input\Stylus\Common\StylusLogic.cs (2)
499internal abstract void HandleMessage(WindowMessage msg, IntPtr wParam, IntPtr lParam);
System\Windows\Input\Stylus\Pointer\PointerInteractionEngine.cs (10)
102private SecurityCriticalDataForSet<IntPtr> _interactionContext = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 178IntPtr interactionContext = IntPtr.Zero; 180_interactionContext = new SecurityCriticalDataForSet<IntPtr>(interactionContext); 187if (_interactionContext.Value != IntPtr.Zero) 225if (_interactionContext.Value != IntPtr.Zero) 228_interactionContext.Value = IntPtr.Zero; 286private void Callback(IntPtr clientData, ref UnsafeNativeMethods.INTERACTION_CONTEXT_OUTPUT output)
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (3)
281IntPtr.Zero); 927internal override void HandleMessage(WindowMessage msg, IntPtr wParam, IntPtr lParam)
System\Windows\Input\Stylus\Pointer\PointerTabletDevice.cs (1)
48internal IntPtr Device { get { return _deviceInfo.Device; } }
System\Windows\Input\Stylus\Pointer\PointerTabletDeviceCollection.cs (5)
27private Dictionary<IntPtr, PointerTabletDevice> _tabletDeviceMap = new Dictionary<IntPtr, PointerTabletDevice>(); 44internal PointerTabletDevice GetByDeviceId(IntPtr deviceId) 81Dictionary<IntPtr, PointerTabletDevice> oldTablets = _tabletDeviceMap; 83_tabletDeviceMap = new Dictionary<IntPtr, PointerTabletDevice>();
System\Windows\Input\Stylus\Pointer\PointerTabletDeviceInfo.cs (1)
50internal IntPtr Device { get { return _deviceInfo.device; } }
System\Windows\Input\Stylus\Wisp\PenContext.cs (7)
26internal PenContext(IPimcContext3 pimcContext, IntPtr hwnd, 28int id, IntPtr commHandle, int tabletDeviceId, UInt32 wispContextKey) 34_commHandle = new SecurityCriticalData<IntPtr>(commHandle); 35_hwnd = new SecurityCriticalData<IntPtr>(hwnd); 69internal IntPtr CommHandle 532SecurityCriticalData<IntPtr> _hwnd; 534SecurityCriticalData<IntPtr> _commHandle;
System\Windows\Input\Stylus\Wisp\PenContextInfo.cs (1)
20public SecurityCriticalDataClass<IntPtr> CommHandle;
System\Windows\Input\Stylus\Wisp\PenContexts.cs (2)
39if(hwndSource == null || IntPtr.Zero == (hwndSource).CriticalHandle) 227if (_contexts != null && index <= _contexts.Length && _inputSource.Value.CriticalHandle != IntPtr.Zero)
System\Windows\Input\Stylus\Wisp\PenImcRcw.cs (1)
45void CreateContext(IntPtr handle, [MarshalAs(UnmanagedType.Bool)] bool fEnable, uint timeout,
System\Windows\Input\Stylus\Wisp\PenThread.cs (1)
82internal PenContextInfo WorkerCreateContext(IntPtr hwnd, IPimcTablet3 pimcTablet)
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (16)
42IntPtr [] _handles = Array.Empty<IntPtr>(); 53private SecurityCriticalData<IntPtr> _pimcResetHandle; 174internal WorkerOperationCreateContext(IntPtr hwnd, IPimcTablet3 pimcTablet) 211result.CommHandle = new SecurityCriticalDataClass<IntPtr>((IntPtr.Size == 4 ? new IntPtr((int)commHandle) : new IntPtr(commHandle))); 224IntPtr _hwnd; 483IntPtr resetHandle; 486_pimcResetHandle = new SecurityCriticalData<IntPtr>(resetHandle); 594internal PenContextInfo WorkerCreateContext(IntPtr hwnd, IPimcTablet3 pimcTablet) 783internal void FireEvent(PenContext penContext, int evt, int stylusPointerId, int cPackets, int cbPacket, IntPtr pPackets) 1038_handles = new IntPtr[penContextRefs.Count]; 1045Debug.Assert(pc != null && pc.CommHandle != IntPtr.Zero); 1092_handles = new IntPtr[penContextRefs.Count]; 1099Debug.Assert(pc != null && pc.CommHandle != IntPtr.Zero); 1204IntPtr pPackets;
System\Windows\Input\Stylus\Wisp\WispLogic.cs (14)
575IntPtr.Zero); 648IntPtr hwnd = hwndSource != null ? hwndSource.CriticalHandle : IntPtr.Zero; 653if (hwnd != IntPtr.Zero && 655UnsafeNativeMethods.GetParent(new HandleRef(this, hwnd)) == IntPtr.Zero && 1299IntPtr.Zero); 1767actions, (int)pt.X, (int)pt.Y, 0, IntPtr.Zero); 2593internal override void HandleMessage(WindowMessage msg, IntPtr wParam, IntPtr lParam) 2852IntPtr.Zero); 2932IntPtr hwndHit = IntPtr.Zero; 2940if (hwndHit != IntPtr.Zero) 3517internal void OnWindowEnableChanged(IntPtr hwnd, bool disabled)
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (3)
1573IntPtr hwndHit = UnsafeNativeMethods.WindowFromPoint((int)ptScreen.X, (int)ptScreen.Y); 1574if (hwndHit != IntPtr.Zero) 1724(int)pt.X, (int)pt.Y, 0, IntPtr.Zero);
System\Windows\Input\Stylus\Wisp\WispTabletDevice.cs (2)
194internal PenContext CreateContext(IntPtr hwnd, PenContexts contexts) 206result.CommHandle != null ? result.CommHandle.Value : IntPtr.Zero,
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (1)
661internal PenContext[] CreateContexts(IntPtr hwnd, PenContexts contexts)
System\Windows\InterOp\D3DImage.cs (8)
98public void SetBackBuffer(D3DResourceType backBufferType, IntPtr backBuffer) 135public void SetBackBuffer(D3DResourceType backBufferType, IntPtr backBuffer, bool enableSoftwareFallback) 155if (backBuffer != IntPtr.Zero && backBuffer == _pUserSurfaceUnsafe) 166if (backBuffer != IntPtr.Zero) 656img._pUserSurfaceUnsafe = IntPtr.Zero; 702IntPtr hDuplicate; 703IntPtr hCurrentProc = MS.Win32.UnsafeNativeMethods.GetCurrentProcess(); 922private IntPtr _pUserSurfaceUnsafe;
System\Windows\InterOp\HwndAppCommandInputProvider.cs (8)
45internal IntPtr FilterMessage( IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled ) 50return IntPtr.Zero; 69return handled ? new IntPtr(1) : IntPtr.Zero ; 77private static int GetAppCommand( IntPtr lParam ) 89private static InputType GetDevice(IntPtr lParam)
System\Windows\InterOp\HwndKeyboardInputProvider.cs (38)
74_restoreFocusWindow = IntPtr.Zero; 79IntPtr focus = UnsafeNativeMethods.GetFocus(); 119result = focus != IntPtr.Zero; 168internal IntPtr FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, ref bool handled) 170IntPtr result = IntPtr.Zero ; 350_restoreFocusWindow = GetImmediateChildFor((IntPtr)wParam, _source.Value.CriticalHandle); 358if (_restoreFocusWindow == IntPtr.Zero) 372PossiblyDeactivate((IntPtr)wParam); 413private void OnSetFocus(IntPtr hwnd) 473if (_restoreFocusWindow != IntPtr.Zero) 475IntPtr hwndRestoreFocus = _restoreFocusWindow; 476_restoreFocusWindow = IntPtr.Zero; 506IntPtr focus = UnsafeNativeMethods.GetFocus(); 555internal void ProcessTextInputAction(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled) 588internal static int GetVirtualKey(IntPtr wParam, IntPtr lParam) 647internal static int GetScanCode(IntPtr wParam, IntPtr lParam) 668internal static bool IsExtendedKey(IntPtr lParam) 715private void PossiblyDeactivate(IntPtr hwndFocus) 746private bool IsOurWindow(IntPtr hwnd) 752if(hwnd != IntPtr.Zero) 786private IntPtr GetImmediateChildFor(IntPtr hwnd, IntPtr hwndRoot) 788while (hwnd != IntPtr.Zero) 799IntPtr hwndParent = UnsafeNativeMethods.GetParent(new HandleRef(this, hwnd)); 809return IntPtr.Zero; 813IntPtr hwnd, 848IntPtr extraInformation = IntPtr.Zero; 878private IntPtr _restoreFocusWindow;
System\Windows\InterOp\HwndMouseInputProvider.cs (29)
63IntPtr hwndCapture = SafeNativeMethods.GetCapture(); 134IntPtr capture = SafeNativeMethods.GetCapture(); 327internal IntPtr FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled) 329IntPtr result = IntPtr.Zero ; 681IntPtr hwndCapture = SafeNativeMethods.GetCapture(); 682IntPtr hwndCurrent = _source.Value.CriticalHandle; 757if(lParam != IntPtr.Zero || // someone else took capture 896private void PossiblyDeactivate(IntPtr hwndCapture, bool stillActiveIfOverSelf) 920IntPtr hwndToCheck = hwndCapture; 921if(hwndToCheck == IntPtr.Zero) 949hwndToCheck = IntPtr.Zero; 952if(hwndToCheck != IntPtr.Zero) 969hwndToCheck = IntPtr.Zero; 1029private NativeMethods.RECT GetEffectiveClientRect(IntPtr hwnd) 1142private void StartTracking(IntPtr hwnd) 1160private void StopTracking(IntPtr hwnd) 1178private IntPtr MakeLPARAM(int high, int low) 1180return ((IntPtr)((high << 16) | (low & 0xffff))); 1183private bool IsOurWindow(IntPtr hwnd) 1189private bool IsOurWindowImpl(IntPtr hwnd, out HwndSource hwndSource) 1196if(hwnd != IntPtr.Zero) 1230IntPtr hwnd, 1301IntPtr hwndToCheck = SafeNativeMethods.GetCapture(); 1417IntPtr extraInformation = IntPtr.Zero;
System\Windows\InterOp\HwndPanningFeedback.cs (2)
52IntPtr handle = _hwndSource.CriticalHandle; 53if (handle != IntPtr.Zero)
System\Windows\InterOp\HwndPointerInputProvider.cs (8)
130private uint GetPointerId(IntPtr wParam) 231IntPtr deviceId = data.Info.sourceDevice; 347private bool UpdateCurrentTabletAndStylus(IntPtr deviceId, uint cursorId) 401IntPtr IStylusInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled) 449return IntPtr.Zero;
System\Windows\InterOp\HwndSource.cs (59)
77IntPtr parent) 135IntPtr parent, 192IntPtr parent) 338if (_hwndWrapper.Handle != IntPtr.Zero) 675public static HwndSource FromHwnd(IntPtr hwnd) 680internal static HwndSource CriticalFromHwnd(IntPtr hwnd) 682if (hwnd == IntPtr.Zero) 755UnsafeNativeMethods.HideCaret(new HandleRef(this, IntPtr.Zero)); 781UnsafeNativeMethods.ShowCaret(new HandleRef(this, IntPtr.Zero)); 844UnsafeNativeMethods.SetWindowPos(new HandleRef(this,_hwndWrapper.Handle), new HandleRef(null,IntPtr.Zero), 867IntPtr hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(this, CriticalHandle), NativeMethods.GA_ROOT); 902int style = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(new HandleRef(this, _hwndWrapper.Handle), false)); 903int styleEx = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(new HandleRef(this, _hwndWrapper.Handle), true)); 931public IntPtr Handle 939internal IntPtr CriticalHandle 946return IntPtr.Zero; 960IntPtr capture = SafeNativeMethods.GetCapture(); 970return _hwndWrapper.Handle == IntPtr.Zero ; 1178private IntPtr HwndTargetFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1180IntPtr result = IntPtr.Zero ; 1188if (result != IntPtr.Zero) 1198private IntPtr LayoutFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1200IntPtr result = IntPtr.Zero ; 1280if(wParam == IntPtr.Zero) 1293result = IntPtr.Zero; 1338result = IntPtr.Zero; 1350private void Process_WM_WINDOWPOSCHANGING(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam) 1424private void Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam) 1512private void DisableSizeToContent(UIElement rootUIElement, IntPtr hwnd) 1548IntPtr hwndRoot = IntPtr.Zero; 1562private IntPtr InputFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1564IntPtr result = IntPtr.Zero ; 1642private IntPtr PublicHooksFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1645IntPtr result = IntPtr.Zero ; 2458internal bool IsRepeatedKeyboardMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 2593if (_hwndWrapper.Handle != IntPtr.Zero && _registeredDropTargetCount > 0)
System\Windows\InterOp\HwndSourceHook.cs (4)
13public delegate IntPtr HwndSourceHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled);
System\Windows\InterOp\HwndSourceParameters.cs (2)
182public IntPtr ParentWindow 392private IntPtr _parent;
System\Windows\InterOp\HwndStylusInputProvider.cs (7)
41IntPtr sourceHandle; 80IntPtr IStylusInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled) 82IntPtr result = IntPtr.Zero ;
System\Windows\InterOp\HwndTarget.cs (68)
103/// This is returned by <see cref="HandleMessage(WindowMessage, IntPtr, IntPtr)"/> 106private static readonly IntPtr Handled = new IntPtr(0x1); 109/// This is returned by <see cref="HandleMessage(WindowMessage, IntPtr, IntPtr)"/> 111/// given Window message - i.e., <see cref="HandleMessage(WindowMessage, IntPtr, IntPtr)"/> 114private static readonly IntPtr Unhandled = IntPtr.Zero; 240public HwndTarget(IntPtr hwnd) 364IntPtr hWnd, 411private static DpiScale2 GetDpiScaleForWindow(IntPtr hWnd) 480Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero); 488int style = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(hWnd, false)); 491IntPtr hwndParent = IntPtr.Zero; 507if (hwndParent != IntPtr.Zero) 511} while (hwndParent != IntPtr.Zero); 514Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero); 521private void AttachToHwnd(IntPtr hwnd) 574IntPtr hwnd 580IntPtr hwnd 868private bool HandleDpiChangedMessage(IntPtr wParam, IntPtr lParam) 943internal IntPtr HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam) 945IntPtr result = Unhandled; 963UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true); 1010UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1110UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1127bool enableRenderTarget = (wparam != IntPtr.Zero); 1251UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1288UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1322UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true); 1344UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true); 1380&& !UnsafeNativeMethods.GetLayeredWindowAttributes(_hWnd.MakeHandleRef(this), IntPtr.Zero, IntPtr.Zero, IntPtr.Zero) 1409internal static AutomationPeer EnsureAutomationPeer(Visual root, IntPtr handle) 1442private static IntPtr CriticalHandleWMGetobject(IntPtr wparam, IntPtr lparam, Visual root, IntPtr handle) 1450return IntPtr.Zero; 1456return IntPtr.Zero; 1766new HandleRef(null, IntPtr.Zero), // HWND_TOP 1788new HandleRef(null, IntPtr.Zero), // HWND_TOP 1793UnsafeNativeMethods.InvalidateRect(new HandleRef(this, _hWnd), IntPtr.Zero, true); 1829private void OnWindowPosChanging(IntPtr lParam) 1836private void OnWindowPosChanged(IntPtr lParam) 1843private void UpdateWindowPos(IntPtr lParam) 1907IntPtr hwndParent = UnsafeNativeMethods.GetParent(new HandleRef(null, windowPos.hwnd)); 1908if(hwndParent != IntPtr.Zero) 2211UnsafeNativeMethods.UpdateLayeredWindow(_hWnd.h, IntPtr.Zero, null, null, IntPtr.Zero, null, 0, ref blend, NativeMethods.ULW_ALPHA); 2290UnsafeNativeMethods.PostMessage(new HandleRef(this, _hWnd), s_updateWindowSettings, IntPtr.Zero, IntPtr.Zero); 2541private IntPtr _hPowerNotify; 2572IntPtr.Zero, 2589if (_hPowerNotify != IntPtr.Zero) 2592_hPowerNotify = IntPtr.Zero; 2643private IntPtr NotificationFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 2645IntPtr retInt = IntPtr.Zero;
System\Windows\InterOp\Imaging.cs (9)
36IntPtr bitmap, 37IntPtr palette, 54IntPtr bitmap, 55IntPtr palette, 60if (bitmap == IntPtr.Zero) 78IntPtr icon, 83if (icon == IntPtr.Zero) 104IntPtr section, 112if (section == IntPtr.Zero)
System\Windows\InterOp\IStylusInputProvider.cs (4)
32IntPtr FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled);
System\Windows\InterOp\IWin32Window.cs (1)
24IntPtr Handle
System\Windows\Media\ByteStreamGeometryContext.cs (2)
509Marshal.Copy(_chunkList[currentChunk], bufferOffset, (IntPtr)pbData, cbDataForThisChunk); 513Marshal.Copy((IntPtr)pbData, _chunkList[currentChunk], bufferOffset, cbDataForThisChunk);
System\Windows\Media\ChannelManager.cs (4)
129if (_pSyncConnection != IntPtr.Zero) 132_pSyncConnection = IntPtr.Zero; 143if (_pSyncConnection == IntPtr.Zero) 271private IntPtr _pSyncConnection;
System\Windows\Media\ColorContext.cs (5)
356internal delegate int GetColorContextsDelegate(ref uint numContexts, IntPtr[] colorContextPtrs); 388IntPtr[] colorContextPtrs = new IntPtr[numContexts]; 570HRESULT.Check(UnsafeNativeMethodsMilCoreApi.Mscms.GetStandardColorSpaceProfile(IntPtr.Zero, dwProfileID, buffer, out bufferSize)); 588HRESULT.Check(UnsafeNativeMethodsMilCoreApi.Mscms.GetColorDirectory(IntPtr.Zero, buffer, out bufferSize));
System\Windows\Media\ColorContextHelper.cs (1)
42internal SafeProfileHandle(IntPtr profile)
System\Windows\Media\ColorTransform.cs (8)
112IntPtr[] pProfiles = new IntPtr[2]; 114IntPtr paInputColors = IntPtr.Zero; 115IntPtr paOutputColors = IntPtr.Zero; 132(IntPtr)paInputColors, 135(IntPtr)paOutputColors,
System\Windows\Media\ColorTransformHelper.cs (5)
42internal ColorTransformHandle(IntPtr profile) 82IntPtr[] handles = new IntPtr[2]; 121internal void TranslateColors(IntPtr paInputColors, UInt32 numColors, UInt32 inputColorType, IntPtr paOutputColors, UInt32 outputColorType)
System\Windows\Media\Composition.cs (1)
212IntPtr pChannel
System\Windows\Media\EventProxy.cs (4)
40Debug.Assert(((IntPtr)pEPD.m_handle) != IntPtr.Zero, "If this asserts fires: Why is it firing? It might be legal in future."); 117Debug.Assert(((IntPtr)epd.m_handle) != IntPtr.Zero, "Stream is disposed.");
System\Windows\Media\FactoryMaker.cs (11)
33if (s_pFactory == IntPtr.Zero) 81if (s_pImagingFactory != IntPtr.Zero) 86s_pFactory = IntPtr.Zero; 87s_pImagingFactory = IntPtr.Zero; 104internal IntPtr FactoryPtr 108Debug.Assert(s_pFactory != IntPtr.Zero); 113internal IntPtr ImagingFactoryPtr 117if (s_pImagingFactory == IntPtr.Zero) 124Debug.Assert(s_pImagingFactory != IntPtr.Zero); 129private static IntPtr s_pFactory; 130private static IntPtr s_pImagingFactory;
System\Windows\Media\GlyphTypeface.cs (1)
1619unsafe internal IntPtr GetDWriteFontAddRef
System\Windows\Media\ImageSourceConverter.cs (4)
241IntPtr addr = (IntPtr)pByte; 243if (addr == IntPtr.Zero) 313public IntPtr pInfo;
System\Windows\Media\Imaging\BitmapDecoder.cs (26)
590IntPtr /* IWICBitmapSource */ thumbnail = IntPtr.Zero; 605if (thumbnail != IntPtr.Zero) 651IntPtr /* IWICMetadataQueryReader */ metadata = IntPtr.Zero; 665if (metadata != IntPtr.Zero) 744IntPtr /* IWICBitmapSource */ preview = IntPtr.Zero; 759if (preview != IntPtr.Zero) 959private int GetColorContexts(ref uint numContexts, IntPtr[] colorContextPtrs) 1023IntPtr decoder = IntPtr.Zero; 1123IntPtr comStream = IntPtr.Zero; 1188Debug.Assert(decoder != IntPtr.Zero); 1523private static IntPtr GetIStreamFromStream(ref System.IO.Stream bitmapStream) 1525IntPtr comStream = IntPtr.Zero; 1533IntPtr bufferPtr = IntPtr.Zero; 1538bufferPtr = (IntPtr) memoryStream.PositionPointer; 1542if (bufferPtr != IntPtr.Zero) 1551if (comStream == IntPtr.Zero) 1561IntPtr memoryStream = StreamAsIStream.IStreamMemoryFrom(comStream); 1563if (memoryStream != IntPtr.Zero) 1578if (comStream == IntPtr.Zero)
System\Windows\Media\Imaging\BitmapDownload.cs (1)
151IntPtr.Zero /* hTemplateFile */
System\Windows\Media\Imaging\BitmapEncoder.cs (9)
39internal IntPtr dwHint; 41internal IntPtr pstrName; //this is string array 53pstrName = IntPtr.Zero; 360IntPtr comStream = IntPtr.Zero; 657IntPtr[] colorContextPtrs = new IntPtr[1] { colorContext.ColorContextHandle.DangerousGetHandle() }; 682IntPtr[] colorContextPtrs = new IntPtr[count];
System\Windows\Media\Imaging\BitmapFrameDecode.cs (9)
233private int GetColorContexts(ref uint numContexts, IntPtr[] colorContextPtrs) 589IntPtr /* IWICBitmapSource */ thumbnail = IntPtr.Zero; 607if (thumbnail != IntPtr.Zero) 650IntPtr /* IWICMetadataQueryReader */ metadata = IntPtr.Zero; 666if (metadata != IntPtr.Zero) 714IntPtr frameDecode = IntPtr.Zero;
System\Windows\Media\Imaging\BitmapMetadata.cs (55)
64out IntPtr /* IWICMetadataReader */ ppIMetadataReader 69out IntPtr /* IEnumUnknown */ pIEnumMetadata 98out IntPtr /* IWICMetadataReader */ ppIMetadataReader 103out IntPtr /* IEnumUnknown */ pIEnumMetadata 108IntPtr /* IWICMetadataBlockReader */ pIBlockReader 114out IntPtr /* IWICMetadataWriter */ ppIMetadataWriter 119IntPtr /* IWICMetadataWriter */ pIMetadataWriter 125IntPtr /* IWICMetadataWriter */ pIMetadataWriter 168IntPtr pIMetadataWriter = IntPtr.Zero; 180pIMetadataWriter = IntPtr.Zero; 186if (pIMetadataWriter != IntPtr.Zero) 221out IntPtr /* IWICMetadataReader */ pIMetadataReader 226pIMetadataReader = IntPtr.Zero; 244out IntPtr /* IEnumUnknown */ pIEnumMetadata 263IntPtr /* IWICMetadataBlockReader */ pIBlockReader 266Invariant.Assert(pIBlockReader != IntPtr.Zero); 288IntPtr pIMetadataWriter = IntPtr.Zero; 317pIMetadataWriter = IntPtr.Zero; 327if (pIMetadataWriter != IntPtr.Zero) 348out IntPtr /* IWICMetadataWriter */ pIMetadataWriter 353pIMetadataWriter = IntPtr.Zero; 371IntPtr /* IWICMetadataWriter */ pIMetadataWriter 374if (pIMetadataWriter == IntPtr.Zero) 399IntPtr /* IWICMetadataWriter */ pIMetadataWriter 407if (pIMetadataWriter == IntPtr.Zero) 473out IntPtr /* IUnknown ** */ rgelt, 487ref IntPtr /* IEnumString ** */ ppEnum 517out IntPtr /* IUnknown ** */ rgelt, 524rgelt = IntPtr.Zero; 531rgelt = IntPtr.Zero; 584ref IntPtr /* IEnumUnknown ** */ ppEnum 587ppEnum = IntPtr.Zero; 659IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 694IntPtr /* IWICMetadataBlockWriter */ blockWriter = IntPtr.Zero; 695IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 718queryWriter = IntPtr.Zero; 724if (blockWriter != IntPtr.Zero) 729if (queryWriter != IntPtr.Zero) 743IntPtr /* IWICMetadataBlockWriter */ blockWriter = IntPtr.Zero; 744IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 767queryWriter = IntPtr.Zero; 773if (blockWriter != IntPtr.Zero) 778if (queryWriter != IntPtr.Zero) 793IntPtr queryWriter = IntPtr.Zero; 819queryWriter = IntPtr.Zero; 830if (queryWriter != IntPtr.Zero) 1216IntPtr.Zero
System\Windows\Media\Imaging\BitmapMetadataEnumerator.cs (4)
69IntPtr ppStr = IntPtr.Zero; 100if (ppStr != IntPtr.Zero) 103ppStr = IntPtr.Zero;
System\Windows\Media\Imaging\BitmapPalette.cs (2)
302(IntPtr)paletteColorArrayPinned, 335(IntPtr)paletteColorArrayPinned,
System\Windows\Media\Imaging\BitmapSource.cs (24)
93IntPtr buffer, 398public virtual void CopyPixels(Int32Rect sourceRect, IntPtr buffer, int bufferSize, int stride) 598IntPtr wicSource = IntPtr.Zero; 687CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 692CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 697CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 702CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 707CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 712CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 717CriticalCopyPixels(sourceRect, (IntPtr)pixelArray, destBufferSize, stride); 728internal void CriticalCopyPixels(Int32Rect sourceRect, IntPtr buffer, int bufferSize, int stride) 730if (buffer == IntPtr.Zero) 839(IntPtr)pixelArray 881new SafeMILHandle(IntPtr.Zero), 1101IntPtr wicFactory = factoryMaker.ImagingFactoryPtr; 1691IntPtr /* IWICPalette */ pIPalette 1698IntPtr prc, 1701IntPtr pvPixels 1796int IWICBitmapSource.GetPalette(IntPtr /* IWICPalette */ pIPalette) 1816int IWICBitmapSource.CopyPixels(IntPtr prc, int cbStride, int cbPixels, IntPtr pvPixels) 1823if (pvPixels == IntPtr.Zero) 1833if (prc == IntPtr.Zero)
System\Windows\Media\Imaging\BitmapSourceSafeMILHandle.cs (6)
43internal BitmapSourceSafeMILHandle(IntPtr handle) : base() 53internal BitmapSourceSafeMILHandle(IntPtr handle, SafeMILHandle copyMemoryPressureFrom) 70private static long ComputeEstimatedSize(IntPtr bitmapObject) 74if (bitmapObject != IntPtr.Zero) 76IntPtr wicBitmap; 91Debug.Assert(wicBitmap != IntPtr.Zero);
System\Windows\Media\Imaging\BitmapVisualManager.cs (2)
109IntPtr pIRenderTargetBitmap = IntPtr.Zero;
System\Windows\Media\Imaging\CachedBitmap.cs (9)
68IntPtr buffer, 160(IntPtr)pixelArray, destBufferSize, stride); 167(IntPtr)pixelArray, destBufferSize, stride); 174(IntPtr)pixelArray, destBufferSize, stride); 181(IntPtr)pixelArray, destBufferSize, stride); 188(IntPtr)pixelArray, destBufferSize, stride); 195(IntPtr)pixelArray, destBufferSize, stride); 202(IntPtr)pixelArray, destBufferSize, stride); 406IntPtr buffer,
System\Windows\Media\Imaging\CroppedBitmap.cs (1)
116IntPtr wicFactory = factoryMaker.ImagingFactoryPtr;
System\Windows\Media\Imaging\FormatConvertedBitmap.cs (1)
116IntPtr wicFactory = factoryMaker.ImagingFactoryPtr;
System\Windows\Media\Imaging\InteropBitmapSource.cs (5)
52internal InteropBitmap(IntPtr hbitmap, IntPtr hpalette, Int32Rect sourceRect, BitmapSizeOptions sizeOptions, WICBitmapAlphaChannelOption alphaOptions) 84internal InteropBitmap(IntPtr hicon, Int32Rect sourceRect, BitmapSizeOptions sizeOptions) 119IntPtr section, 366IntPtr wicFactory = factoryMaker.ImagingFactoryPtr;
System\Windows\Media\Imaging\PropVariant.cs (35)
81internal IntPtr pElems; 103[FieldOffset(8)] internal IntPtr pclsidVal; //this is for GUID ID pointer 104[FieldOffset(8)] internal IntPtr pszVal; //this is for ansi string pointer 105[FieldOffset(8)] internal IntPtr pwszVal; //this is for Unicode string pointer 106[FieldOffset(8)] internal IntPtr punkVal; //this is for punkVal (interface pointer) 148ca.pElems = IntPtr.Zero; 156IntPtr destPtr =IntPtr.Zero; 171destPtr = IntPtr.Zero; 180if (destPtr != IntPtr.Zero) 193ca.pElems = IntPtr.Zero; 199IntPtr destPtr = IntPtr.Zero; 203sizeIntPtr = sizeof(IntPtr); 210IntPtr pString = IntPtr.Zero; 229destPtr = IntPtr.Zero; 233if (destPtr != IntPtr.Zero) 237IntPtr pString = Marshal.ReadIntPtr(destPtr, i*sizeIntPtr); 427IntPtr punkTemp = IntPtr.Zero; 459if (ca.pElems != IntPtr.Zero) 465IntPtr punkPtr = ca.pElems; 469sizeIntPtr = sizeof(IntPtr); 480IntPtr strPtr = ca.pElems; 484sizeIntPtr = sizeof(IntPtr); 622sizeIntPtr = sizeof(IntPtr); 627IntPtr ptr = Marshal.ReadIntPtr(ca.pElems, i*sizeIntPtr); 639sizeIntPtr = sizeof(IntPtr); 644IntPtr ptr = Marshal.ReadIntPtr(ca.pElems, i*sizeIntPtr); 718IntPtr queryHandle = IntPtr.Zero; 732queryHandle = IntPtr.Zero; 746queryHandle = IntPtr.Zero; 756if (queryHandle != IntPtr.Zero)
System\Windows\Media\Imaging\TransformedBitmap.cs (1)
189IntPtr wicFactory = factoryMaker.ImagingFactoryPtr;
System\Windows\Media\Imaging\UnknownBitmapDecoder.cs (1)
39MS.Win32.PresentationCore.UnsafeNativeMethods.WICCodec.CoInitialize(IntPtr.Zero);
System\Windows\Media\Imaging\WriteableBitmap.cs (13)
284if (_backBuffer == IntPtr.Zero) 286IntPtr tempBackBufferPointer = IntPtr.Zero; 362IntPtr sourceBuffer, 422IntPtr buffer = arrayHandle.AddrOfPinnedObject(); 447IntPtr buffer, 555IntPtr buffer = arrayHandle.AddrOfPinnedObject(); 823IntPtr sourceBuffer, 861if (sourceBuffer == IntPtr.Zero) 1324IntPtr hDuplicate; 1325IntPtr hCurrentProc = MS.Win32.UnsafeNativeMethods.GetCurrentProcess(); 1378public IntPtr BackBuffer 1393private IntPtr _backBuffer;
System\Windows\Media\MediaContextNotificationWindow.cs (11)
70hwndNotification = new HwndWrapper(0, NativeMethods.WS_POPUP, 0, 0, 0, 0, 0, "MediaContextNotificationWindow", IntPtr.Zero, null); 145private IntPtr MessageFilter(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 172return IntPtr.Zero; 177IntPtr hwnd 182IntPtr hwnd 193IntPtr user32Module = UnsafeNativeMethods.GetModuleHandle("user32.dll"); 198IntPtr functionAddress = UnsafeNativeMethods.GetProcAddressNoThrow( 202if (functionAddress != IntPtr.Zero)
System\Windows\Media\MediaSystem.cs (3)
247s_pConnection = IntPtr.Zero; 333internal static IntPtr Connection 363private static IntPtr s_pConnection;
System\Windows\Media\PixelFormat.cs (12)
513IntPtr pixelFormatInfo = CreatePixelFormatInfo(); 514Debug.Assert(pixelFormatInfo != IntPtr.Zero); 556if (pixelFormatInfo != IntPtr.Zero) 566internal IntPtr CreatePixelFormatInfo() 568IntPtr componentInfo = IntPtr.Zero; 569IntPtr pixelFormatInfo = IntPtr.Zero; 596if (componentInfo != IntPtr.Zero) 614IntPtr pixelFormatInfo = CreatePixelFormatInfo(); 615Debug.Assert(pixelFormatInfo != IntPtr.Zero); 626if (pixelFormatInfo != IntPtr.Zero)
System\Windows\Media\RenderData.cs (2)
120Marshal.Copy((IntPtr)(&header), this._buffer, _curOffset, sizeof(RecordHeader)); 121Marshal.Copy((IntPtr)pbRecord, this._buffer, _curOffset + sizeof(RecordHeader), cbRecordSize);
System\Windows\Media\Renderer.cs (2)
31IntPtr pRenderTarget, 48IntPtr pRenderTarget,
System\Windows\Media\safemediahandle.cs (1)
35internal SafeMediaHandle(IntPtr handle)
System\Windows\Media\SafeMILHandle.cs (1)
34internal SafeMILHandle(IntPtr handle) : base(true)
System\Windows\Media\SafeReversePInvokeHandle.cs (3)
43internal SafeReversePInvokeWrapper(IntPtr delegatePtr) : base(true) 46IntPtr reversePInvokeWrapper; 54if (handle != IntPtr.Zero)
System\Windows\Media\StreamAsIStream.cs (29)
31internal delegate int Read(ref StreamDescriptor pSD, IntPtr buffer, uint cb, out uint cbRead); 37internal delegate int CopyTo(ref StreamDescriptor pSD, IntPtr pstm, long cb, out long cbRead, out long cbWritten); 43internal delegate int Clone(ref StreamDescriptor pSD, out IntPtr stream); 67Debug.Assert(((IntPtr)pSD.m_handle) != IntPtr.Zero, "If this asserts fires: why is it firing. It might be legal in future."); 167public int Clone(out IntPtr stream) 169stream = IntPtr.Zero; 212public int CopyTo(IntPtr /* IStream */ pstm, long cb, out long cbRead, out long cbWritten) 575Debug.Assert(((IntPtr)sd.m_handle) != IntPtr.Zero, "Stream is disposed."); 580internal static int Clone(ref StreamDescriptor pSD, out IntPtr stream) 590internal static int CopyTo(ref StreamDescriptor pSD, IntPtr pstm, long cb, out long cbRead, out long cbWritten) 600internal static unsafe int Read(ref StreamDescriptor pSD, IntPtr buffer, uint cb, out uint cbRead) 649internal static IntPtr IStreamMemoryFrom(IntPtr comStream) 651IntPtr pIStream = IntPtr.Zero; 657return IntPtr.Zero; 664return IntPtr.Zero; 671internal static IntPtr IStreamFrom(IntPtr memoryBuffer, int bufferSize) 673IntPtr pIStream = IntPtr.Zero; 679return IntPtr.Zero; 686return IntPtr.Zero; 694internal static IntPtr IStreamFrom(System.IO.Stream stream) 698IntPtr pStream = IntPtr.Zero; 731private extern static int /* HRESULT */ MILIStreamWrite(IntPtr pStream, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)]byte[] buffer, uint cb, out uint cbWritten);
System\Windows\Media\textformatting\TextBreakpoint.cs (1)
75internal abstract SecurityCriticalDataForSet<IntPtr> GetTextPenaltyResource();
System\Windows\Media\textformatting\TextFormatterContext.cs (26)
50private SecurityCriticalDataForSet<IntPtr> _ploc; // Line Services context 59_ploc = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 66if(_ploc.Value == System.IntPtr.Zero) 79contextInfo.pols = IntPtr.Zero; // This will be filled in the un-managed code 137IntPtr ploc = IntPtr.Zero; 138IntPtr ppenaltyModule = IntPtr.Zero; 192Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 268if(_ploc.Value != System.IntPtr.Zero) 271_ploc.Value = IntPtr.Zero; 283Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 306IntPtr previousLineBreakRecord, 307out IntPtr ploline, 313Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 332IntPtr previousLineBreakRecord, 333IntPtr ploparabreak, 334IntPtr ptslinevariantRestriction, 339Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 356IntPtr previousLineBreakRecord, 357ref IntPtr ploparabreak, 361Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 380Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 400Invariant.Assert(_ploc.Value != System.IntPtr.Zero); 508internal SecurityCriticalDataForSet<IntPtr> Ploc
System\Windows\Media\textformatting\TextLineBreak.cs (10)
37private SecurityCriticalDataForSet<IntPtr> _breakRecord; 46SecurityCriticalDataForSet<IntPtr> breakRecord 52if (breakRecord.Value == IntPtr.Zero) 87IntPtr pbreakrec = IntPtr.Zero; 89if (_breakRecord.Value != IntPtr.Zero) 99return new TextLineBreak(_currentScope, new SecurityCriticalDataForSet<IntPtr>(pbreakrec)); 110if (_breakRecord.Value != IntPtr.Zero) 114_breakRecord.Value = IntPtr.Zero; 132internal SecurityCriticalDataForSet<IntPtr> BreakRecord
System\Windows\Media\textformatting\TextParagraphCache.cs (9)
45private SecurityCriticalDataForSet<IntPtr> _ploparabreak; // unmanaged LS resource for parabreak session 66TextFormatterContext context = settings.Formatter.AcquireContext(_fullText, IntPtr.Zero); 70IntPtr ploparabreakValue = IntPtr.Zero; 77IntPtr.Zero, 143IntPtr breakpointRestrictionHandle, 166if(_ploparabreak.Value != IntPtr.Zero) 170_ploparabreak.Value = IntPtr.Zero; 206internal SecurityCriticalDataForSet<IntPtr> Ploparabreak
System\Windows\Media\UnsafeNativeMethodsMilCoreApi.cs (95)
63 out IntPtr ppConnection); 66internal static extern int WgxConnection_Disconnect(IntPtr pTranspManager); 69internal extern static int /* HRESULT */ MILCreateStreamFromStreamDescriptor(ref System.Windows.Media.StreamDescriptor pSD, out IntPtr ppStream); 156IntPtr pMilSlaveGlyphCacheTarget, 164IntPtr pMilSlaveGlyphCacheTarget, 171IntPtr pMilSlaveGlyphCacheTarget 176IntPtr pMilGlyphRunTarget, 183IntPtr pFontFace, 199IntPtr pFcn, 200out IntPtr reversePInvokeWrapper); 204IntPtr reversePInvokeWrapper); 342IntPtr propVar 388ref IntPtr rgElt, 439IntPtr /* BYTE* */ pvPixels); 457out IntPtr /* IWICBitmapSource */ ppIBitmapSource 464IntPtr[] /* IWICColorContext */ ppIColorContext, 471out IntPtr /* IWICBitmapSource */ ppIThumbnail 477out IntPtr /* IWICMetadataQueryReader */ ppIQueryReader 490out IntPtr /* IWICBitmapFrameDecode */ ppIFrameDecode 499out IntPtr /* IWICBitmap */ ppIThumbnail 505out IntPtr /* IWICMetadataQueryReader */ ppIQueryReader 512IntPtr[] /* IWICColorContext */ ppIColorContext, 527internal static extern int Release(IntPtr pIUnkown); 529internal static void ReleaseInterface(ref IntPtr ptr) 531if (ptr != IntPtr.Zero) 535ptr = IntPtr.Zero; 541IntPtr pIUnknown, 543out IntPtr ppvObject); 549out IntPtr ppvObject); 556IntPtr pIWICStream, 557IntPtr pIStream); 561IntPtr pIWICStream, 562IntPtr pbBuffer, 573IntPtr hSection, 616IntPtr[] /* IWICColorContext */ ppIColorContext 624IntPtr /* IStream */ pStream, 665IntPtr /* MILColor* */ pColors, 675internal static extern int /* HRESULT */ InitializeFromPalette(IntPtr /* IWICPalette */ THIS_PTR, 689IntPtr /* MILColor* */ pColors, 701IntPtr pICodecFactory, 702IntPtr /* IStream */ pIStream, 705out IntPtr /* IWICBitmapDecoder */ ppIDecode); 709IntPtr pICodecFactory, 713out IntPtr /* IWICBitmapDecoder */ ppIDecode); 717IntPtr pICodecFactory, 719out IntPtr /* IWICComponentInfo */ ppIComponentInfo); 723IntPtr pICodecFactory, 728IntPtr pICodecFactory, 733IntPtr pICodecFactory, 738IntPtr pICodecFactory, 743IntPtr pICodecFactory, 748IntPtr pICodecFactory, 749out IntPtr /* IWICBitmapStream */ ppIStream); 753IntPtr pICodecFactory, 760IntPtr THIS_PTR, 767IntPtr THIS_PTR, 773IntPtr /* BYTE* */ pvPixels, 778IntPtr THIS_PTR, 787IntPtr THIS_PTR, 788IntPtr hBitmap, 789IntPtr hPalette, 795IntPtr THIS_PTR, 796IntPtr hIcon, 801IntPtr THIS_PTR, 807IntPtr THIS_PTR, 813IntPtr THIS_PTR, 816out IntPtr /* IWICMetadataQueryWriter */ queryWriter 821IntPtr THIS_PTR, 824out IntPtr /* IWICMetadataQueryWriter */ queryWriter 832IntPtr pICodecFactory, 835out IntPtr metadataWriter 840IntPtr pICodecFactory, 841IntPtr pIBlockWriter, 842ref IntPtr ppIQueryWriter 850IntPtr pIBlockReader, 856IntPtr pIBlockReader, 866IntPtr /* IWICPixelFormatInfo */ pIPixelFormatInfo, 872IntPtr /* IWICPixelFormatInfo */ pIPixelFormatInfo, 878IntPtr /* IWICPixelFormatInfo */ pIPixelFormatInfo, 1012ref IntPtr ppbData 1025out IntPtr ppICodecFactory 1059IntPtr pICodecFactory, 1064IntPtr reserved); 1073internal static extern ColorTransformHandle /* HTRANSFORM */ CreateMultiProfileTransform(IntPtr[] /* PHPROFILE */ pahProfiles, UInt32 nProfiles, UInt32[] padwIntent, UInt32 nIntents, UInt32 dwFlags, UInt32 indexPreferredCMM); 1076internal static extern bool DeleteColorTransform(IntPtr /* HTRANSFORM */ hColorTransform); 1079internal static extern int /* HRESULT */ TranslateColors(ColorTransformHandle /* HTRANSFORM */ hColorTransform, IntPtr paInputColors, UInt32 nColors, UInt32 ctInput, IntPtr paOutputColors, UInt32 ctOutput); 1085internal static extern bool CloseColorProfile(IntPtr /* HANDLE */ phProfile); 1091internal static extern int /* HRESULT */ GetColorDirectory(IntPtr pMachineName, StringBuilder pBuffer, out uint pdwSize); 1094internal static extern int /* HRESULT */ GetStandardColorSpaceProfile(IntPtr pMachineName, uint dwProfileID, StringBuilder pProfileName, out uint pdwSize); 1104out IntPtr ppIFactory, 1110IntPtr THIS_PTR, 1117IntPtr THIS_PTR, 1128IntPtr THIS_PTR, 1139IntPtr d3dResource,
System\Windows\UIElement.cs (3)
1144HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 1148IntPtr dc = UnsafeNativeMethods.GetDC(desktopWnd); 1152if (dc == IntPtr.Zero)
PresentationFramework (3428)
Microsoft\Win32\CommonDialog.cs (17)
83IntPtr hwndOwner = UnsafeNativeMethods.GetActiveWindow(); 85if (hwndOwner == IntPtr.Zero) 101if (hwndOwner == IntPtr.Zero) 103tempParentHwnd = new HwndWrapper(0, 0, 0, 0, 0, 0, 0, "", IntPtr.Zero, null); 158IntPtr hwndOwner = (new WindowInteropHelper(owner)).CriticalHandle; 161if (hwndOwner == IntPtr.Zero) 229protected virtual IntPtr HookProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 247return IntPtr.Zero; 253protected abstract bool RunDialog(IntPtr hwndOwner); 286IntPtr hMonitor = IntPtr.Zero; 289if (_hwndOwnerWindow != IntPtr.Zero) 303if (hMonitor != IntPtr.Zero) 389private IntPtr _hwndOwnerWindow;
Microsoft\Win32\CommonItemDialog.cs (3)
286protected override bool RunDialog(IntPtr hwndOwner) 356IntPtr focusHandle = UnsafeNativeMethods.GetFocus(); 787private IntPtr _hwndFileDialog;
MS\Internal\AppModel\AppSecurityManager.cs (1)
111UnsafeNativeMethods.ShellExecute(new HandleRef(null, IntPtr.Zero), /*hwnd*/
MS\Internal\AppModel\IconHelper.cs (4)
224IntPtr bits = IntPtr.Zero; 226new HandleRef(null, IntPtr.Zero), // A device context. Pass null in if no DIB_PAL_COLORS is used. 234if (colorBitmap.IsInvalid || bits == IntPtr.Zero)
MS\Internal\AppModel\SecurityMgrSite.cs (2)
26public void GetWindow( /* [out] */ ref IntPtr phwnd) 28phwnd = IntPtr.Zero;
MS\Internal\AppModel\ShellProvider.cs (90)
75public IntPtr hIcon; 93HRESULT Next(uint celt, out IntPtr rgelt, out int pceltFetched); 158IntPtr hwnd, 162out IntPtr ppidl, 166IntPtr hwnd, 173IntPtr pidl, 179object BindToStorage(IntPtr pidl, IBindCtx pbc, [In] ref Guid riid); 189HRESULT CompareIDs(IntPtr lParam, IntPtr pidl1, IntPtr pidl2); 201object CreateViewObject(IntPtr hwndOwner, [In] ref Guid riid); 210IntPtr apidl, 219IntPtr hwndOwner, 221[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.SysInt, SizeParamIndex = 1)] IntPtr apidl, 232void GetDisplayNameOf(IntPtr pidl, SHGDN uFlags, out IntPtr pName); 237void SetNameOf(IntPtr hwnd, 238IntPtr pidl, 241out IntPtr ppidlOut); 297IntPtr rgKeys, 304IntPtr keyType, 310void GetProperty(IntPtr key, [In, Out] PROPVARIANT pv); 312Guid GetCLSID(IntPtr key); 314FILETIME GetFileTime(IntPtr key); 316int GetInt32(IntPtr key); 319string GetString(IntPtr key); 321uint GetUInt32(IntPtr key); 323ulong GetUInt64(IntPtr key); 326bool GetBool(IntPtr key); 363IntPtr GetIDList(); 364void SetIDList(IntPtr pidl); 378void Resolve(IntPtr hwnd, uint fFlags); 419HRESULT Show(IntPtr parent); 431new HRESULT Show(IntPtr parent); 492new HRESULT Show(IntPtr parent); 559new HRESULT Show(IntPtr parent); 605new HRESULT Show(IntPtr parent); 644void ApplyProperties(IShellItem psi, [MarshalAs(UnmanagedType.Interface)] object pStore, [In] ref IntPtr hwnd, [MarshalAs(UnmanagedType.Interface)] object pSink); 773void AddTab(IntPtr hwnd); 779void DeleteTab(IntPtr hwnd); 785void ActivateTab(IntPtr hwnd); 791void SetActiveAlt(IntPtr hwnd); 803new void AddTab(IntPtr hwnd); 804new void DeleteTab(IntPtr hwnd); 805new void ActivateTab(IntPtr hwnd); 806new void SetActiveAlt(IntPtr hwnd); 821void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 841new void AddTab(IntPtr hwnd); 842new void DeleteTab(IntPtr hwnd); 843new void ActivateTab(IntPtr hwnd); 844new void SetActiveAlt(IntPtr hwnd); 847new void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 852HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 855HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 858HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 861HRESULT UnregisterTab(IntPtr hwndTab); 864HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 867HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 870HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 873HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 876HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 879HRESULT SetOverlayIcon(IntPtr hwnd, NativeMethods.IconHandle hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 882HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 886HRESULT SetThumbnailClip(IntPtr hwnd, NativeMethods.RefRECT prcClip); 902new void AddTab(IntPtr hwnd); 903new void DeleteTab(IntPtr hwnd); 904new void ActivateTab(IntPtr hwnd); 905new void SetActiveAlt(IntPtr hwnd); 908new void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 912[PreserveSig] new HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 913[PreserveSig] new HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 914[PreserveSig] new HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 915[PreserveSig] new HRESULT UnregisterTab(IntPtr hwndTab); 916[PreserveSig] new HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 917[PreserveSig] new HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 918[PreserveSig] new HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 919[PreserveSig] new HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 920[PreserveSig] new HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 921[PreserveSig] new HRESULT SetOverlayIcon(IntPtr hwnd, NativeMethods.IconHandle hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 922[PreserveSig] new HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 923[PreserveSig] new HRESULT SetThumbnailClip(IntPtr hwnd, NativeMethods.RefRECT prcClip); 928HRESULT SetTabProperties(IntPtr hwndTab, STPF stpFlags); 951HRESULT hr = NativeMethods2.SHGetFolderPathEx(ref knownFolder, 0, IntPtr.Zero, pathBuilder, (uint)pathBuilder.Capacity); 1011internal static extern HRESULT SHGetFolderPathEx([In] ref Guid rfid, KF_FLAG dwFlags, [In, Optional] IntPtr hToken, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszPath, uint cchPath);
MS\Internal\Controls\ActiveXContainer.cs (6)
103IntPtr UnsafeNativeMethods.IOleInPlaceFrame.GetWindow() 165int UnsafeNativeMethods.IOleInPlaceFrame.InsertMenus(IntPtr hmenuShared, NativeMethods.tagOleMenuGroupWidths lpMenuWidths) 170int UnsafeNativeMethods.IOleInPlaceFrame.SetMenu(IntPtr hmenuShared, IntPtr holemenu, IntPtr hwndActiveObject) 175int UnsafeNativeMethods.IOleInPlaceFrame.RemoveMenus(IntPtr hmenuShared)
MS\Internal\Controls\ActiveXHelper.cs (4)
90IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 91if (hDC != IntPtr.Zero) 109IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 110if (hDC != IntPtr.Zero)
MS\Internal\Controls\ActiveXSite.cs (4)
177IntPtr hwnd; 182if (hwnd != IntPtr.Zero) 214IntPtr UnsafeNativeMethods.IOleInPlaceSite.GetWindow() 270lpFrameInfo.hAccel = IntPtr.Zero;
MS\Internal\Controls\EnumUnknown.cs (6)
43unsafe int UnsafeNativeMethods.IEnumUnknown.Next(int celt, IntPtr rgelt, IntPtr pceltFetched) 45if (pceltFetched != IntPtr.Zero) 65rgelt = (IntPtr)((long)rgelt + (long)sizeof(IntPtr)); 71if (pceltFetched != IntPtr.Zero)
MS\Internal\Documents\ColumnResult.cs (1)
281private readonly IntPtr _columnHandle;
MS\Internal\Documents\DocumentViewerHelper.cs (2)
286IntPtr hwnd = (hwndSource != null) ? hwndSource.CriticalHandle : IntPtr.Zero;
MS\Internal\Interop\IndexingFilter.cs (10)
552void GetText([In, Out] ref uint pcwcBuffer, [In] IntPtr pBuffer); 558IntPtr GetValue(); 566IntPtr BindRegion([In] FILTERREGION origPos, [In] ref Guid riid); 669void Read(IntPtr bufferBase, int sizeInBytes, IntPtr refToNumBytesRead); 675void Write(IntPtr bufferBase, int sizeInBytes, IntPtr refToNumBytesWritten); 682void Seek(long offset, int origin, IntPtr refToNewOffsetNullAllowed); 695IntPtr refToNumBytesRead, 696IntPtr refToNumBytesWritten);
MS\Internal\IO\Packaging\EncryptedPackageFilter.cs (3)
82public void GetText(ref uint bufCharacterCount, IntPtr pBuffer) 92public IntPtr GetValue() 103public IntPtr BindRegion([In] FILTERREGION origPos, [In] ref Guid riid)
MS\Internal\IO\Packaging\indexingfiltermarshaler.cs (12)
97internal static void MarshalStringToPtr(string s, ref uint bufCharacterCount, IntPtr p) 182internal static IntPtr MarshalPropVariant(Object obj) 184IntPtr pszVal = IntPtr.Zero; 185IntPtr pNative = IntPtr.Zero; 217Invariant.Assert(pNative != IntPtr.Zero); 224if (pszVal != IntPtr.Zero) 229if (pNative != IntPtr.Zero) 295public void GetText(ref uint bufCharacterCount, IntPtr pBuffer) 310public IntPtr GetValue() 323public IntPtr BindRegion(FILTERREGION origPos, ref Guid riid)
MS\Internal\IO\Packaging\ManagedIStream.cs (8)
46void IStream.Read(Byte[] buffer, Int32 bufferSize, IntPtr bytesReadPtr) 49if (bytesReadPtr != IntPtr.Zero) 64void IStream.Seek(Int64 offset, Int32 origin, IntPtr newPositionPtr) 88if (newPositionPtr != IntPtr.Zero) 146void IStream.Write(Byte[] buffer, Int32 bufferSize, IntPtr bytesWrittenPtr) 149if (bytesWrittenPtr != IntPtr.Zero) 176void IStream.CopyTo(IStream targetStream, Int64 bufferSize, IntPtr buffer, IntPtr bytesWrittenPtr)
MS\Internal\IO\Packaging\PackageFilter.cs (3)
227public void GetText(ref uint bufferCharacterCount, IntPtr pBuffer) 242public IntPtr GetValue() 261public IntPtr BindRegion(FILTERREGION origPos, ref Guid riid)
MS\Internal\IO\Packaging\UnsafeIndexingFilterStream.cs (2)
97IntPtr pBytesRead = new IntPtr(&bytesRead); 138IntPtr positionAddress = new IntPtr(&position);
MS\Internal\IO\Packaging\XpsFilter.cs (4)
107void IFilter.GetText(ref uint bufCharacterCount, IntPtr pBuffer) 116if (pBuffer == IntPtr.Zero) 278IntPtr IFilter.GetValue() 295IntPtr IFilter.BindRegion([In] FILTERREGION origPos, [In] ref Guid riid)
MS\Internal\Printing\NativeMethods.cs (36)
32public IntPtr hwndOwner = IntPtr.Zero; 33public IntPtr hDevMode = IntPtr.Zero; 34public IntPtr hDevNames = IntPtr.Zero; 35public IntPtr hDC = IntPtr.Zero; 41public IntPtr lpPageRanges = IntPtr.Zero; 45public IntPtr hInstance = IntPtr.Zero; 46public IntPtr lpPrintTemplateName = IntPtr.Zero; 47public IntPtr lpCallback = IntPtr.Zero; 49public IntPtr lphPropertyPages = IntPtr.Zero; 58public IntPtr hwndOwner = IntPtr.Zero; 59public IntPtr hDevMode = IntPtr.Zero; 60public IntPtr hDevNames = IntPtr.Zero; 61public IntPtr hDC = IntPtr.Zero; 67public IntPtr lpPageRanges = IntPtr.Zero; 71public IntPtr hInstance = IntPtr.Zero; 72public IntPtr lpPrintTemplateName = IntPtr.Zero; 73public IntPtr lpCallback = IntPtr.Zero; 75public IntPtr lphPropertyPages = IntPtr.Zero;
MS\Internal\Printing\PrintDlgExMarshaler.cs (56)
42IntPtr owner, 48_unmanagedPrintDlgEx = IntPtr.Zero; 68internal IntPtr UnmanagedPrintDlgEx 90if (_unmanagedPrintDlgEx == IntPtr.Zero) 100IntPtr devModeHandle; 153if (_unmanagedPrintDlgEx != IntPtr.Zero) 161if (_ownerHandle == IntPtr.Zero) 190if (_unmanagedPrintDlgEx != IntPtr.Zero) 193_unmanagedPrintDlgEx = IntPtr.Zero; 223IntPtr unmanagedBuffer, 227out IntPtr devModeHandle 230IntPtr devNamesHandle = IntPtr.Zero; 231IntPtr pageRangePtr = IntPtr.Zero; 258(pageRangePtr != IntPtr.Zero)) 272if (devNamesHandle != IntPtr.Zero) 274IntPtr pDevNames = IntPtr.Zero; 285if (pDevNames != IntPtr.Zero) 360IntPtr devModeHandle, 370IntPtr pDevMode = IntPtr.Zero; 381if (pDevMode != IntPtr.Zero) 411IntPtr unmanagedBuffer 444IntPtr 447IntPtr unmanagedBuffer = IntPtr.Zero; 510pdex.lpPageRanges = IntPtr.Zero; 587pdex.lpPageRanges = IntPtr.Zero; 617if (unmanagedBuffer != IntPtr.Zero) 620unmanagedBuffer = IntPtr.Zero; 640IntPtr unmanagedBuffer 643if (unmanagedBuffer == IntPtr.Zero) 648IntPtr devModeHandle = IntPtr.Zero; 649IntPtr devNamesHandle = IntPtr.Zero; 650IntPtr pageRangePtr = IntPtr.Zero; 670if (devModeHandle != IntPtr.Zero) 675if (devNamesHandle != IntPtr.Zero) 680if (pageRangePtr != IntPtr.Zero) 696IntPtr temp = IntPtr.Zero; 712IntPtr 717IntPtr hDevNames = IntPtr.Zero; 750IntPtr offsetName = 751checked((IntPtr)((long)hDevNames + (long)baseOffset)); 752IntPtr offsetNull = 753checked((IntPtr)((long)offsetName + (printer.Length * Marshal.SystemDefaultCharSize))); 795IntPtr 818IntPtr hDevMode = Marshal.AllocHGlobal(devModeData.Length); 832IntPtr _unmanagedPrintDlgEx; 835IntPtr _ownerHandle;
MS\Internal\Printing\UnsafeNativeMethods.cs (6)
21IntPtr pdex 28IntPtr 30IntPtr hMem 37IntPtr 39IntPtr hMem 48IntPtr hMem
MS\Internal\Printing\Win32PrintDialog.cs (3)
60IntPtr owner = IntPtr.Zero; 121if (owner == IntPtr.Zero)
MS\Internal\PtsHost\BaseParaClient.cs (5)
47_paraHandle = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 70internal void Arrange(IntPtr pfspara, PTS.FSRECT rcPara, int dvrTopSpace, uint fswdirParent) 73Debug.Assert(_paraHandle.Value == IntPtr.Zero || _paraHandle.Value == pfspara); 261protected SecurityCriticalDataForSet<IntPtr> _paraHandle;
MS\Internal\PtsHost\BaseParagraph.cs (1)
134out IntPtr pfsparaclient);
MS\Internal\PtsHost\CellParaClient.cs (17)
123if(_paraHandle.Value != IntPtr.Zero) 149internal void FormatCellFinite(Size subpageSize, IntPtr breakRecordIn, bool isEmptyOk, uint fswdir, 151out PTS.FSFMTR fsfmtr, out int dvrUsed, out IntPtr breakRecordOut) 153IntPtr pfspara; 155IntPtr pmcsclientOut; 160if(CellParagraph.StructuralCache.DtrList != null && breakRecordIn != IntPtr.Zero) 179bool suppressTopSpace = (breakRecordIn != IntPtr.Zero) ? true : false; 183IntPtr.Zero, 200if (pmcsclientOut != IntPtr.Zero) 206pmcsclientOut = IntPtr.Zero; 220IntPtr pfspara; 222IntPtr pmcsclientOut; 250if (pmcsclientOut != IntPtr.Zero) 256pmcsclientOut = IntPtr.Zero; 272IntPtr pmcsclientOut; 297if (pmcsclientOut != IntPtr.Zero) 303pmcsclientOut = IntPtr.Zero;
MS\Internal\PtsHost\CellParagraph.cs (10)
58IntPtr pfsbrkcellIn, // IN: not NULL if cell broken from previous page/column 59IntPtr pfsFtnRejector, // IN: 64out IntPtr ppfscell, // OUT: cell object 65out IntPtr pfsbrkcellOut, // OUT: break if cell does not fit in dvrAvailable 99ppfscell = IntPtr.Zero; 108if (pfsbrkcellOut != IntPtr.Zero) 111pfsbrkcellOut = IntPtr.Zero; 114ppfscell = IntPtr.Zero; 137out IntPtr ppfscell, // OUT: cell object 190IntPtr subpageBreakRecord, // not NULL if cell broken from previous page/column
MS\Internal\PtsHost\ContainerParagraph.cs (39)
93out IntPtr firstParaName) // OUT: name of the first paragraph in segment 178firstParaName = (_firstChild != null) ? _firstChild.Handle : IntPtr.Zero; 199out IntPtr nextParaName) // OUT: name of the next paragraph in section 274nextParaName = IntPtr.Zero; 300out IntPtr nmpBeforeChange) // OUT: name of paragraph before the change if !fChangeFirst 333nmpBeforeChange = IntPtr.Zero; 447out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 464IntPtr pbrkrecIn, // IN: break record---use if !IntPtr.Zero 467IntPtr footnoteRejector, // IN: 468IntPtr geometry, // IN: pointer to geometry 478out IntPtr pfspara, // OUT: pointer to the para data 479out IntPtr pbrkrecOut, // OUT: pointer to the para break record 482out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 498if (mcs != null && pbrkrecIn != IntPtr.Zero) 531if (pbrkrecIn == IntPtr.Zero) 552(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, 584if (pmcsclientOut != IntPtr.Zero) 588pmcsclientOut = IntPtr.Zero; 599pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 625paraClient.SetChunkInfo(pbrkrecIn == IntPtr.Zero, pbrkrecOut == IntPtr.Zero); 634IntPtr geometry, // IN: pointer to geometry 644out IntPtr pfspara, // OUT: pointer to the para data 647out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 695(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, fInterruptable, 714if (pmcsclientOut != IntPtr.Zero) 718pmcsclientOut = IntPtr.Zero; 723pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 739Debug.Assert(pmcsclientOut == IntPtr.Zero); 740pfspara = IntPtr.Zero; 762IntPtr pfspara, // IN: pointer to the para data 765IntPtr pfsgeom, // IN: pointer to geometry 777out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 825(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, fInterruptable, 844if (pmcsclientOut != IntPtr.Zero) 848pmcsclientOut = IntPtr.Zero; 853pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 869Debug.Assert(pmcsclientOut == IntPtr.Zero); 870pfspara = IntPtr.Zero;
MS\Internal\PtsHost\FigureParaClient.cs (5)
47if (SubpageHandle != IntPtr.Zero) 50SubpageHandle = IntPtr.Zero; 719internal ReadOnlyCollection<ParagraphResult> GetParagraphResultsFromColumn(IntPtr pfstrack, Vector parentOffset, out bool hasTextContent) 731internal TextContentRange GetTextContentRangeFromColumn(IntPtr pfstrack) 764internal IntPtr SubpageHandle
MS\Internal\PtsHost\FigureParagraph.cs (22)
93out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 133IntPtr pfsFigureContent; 138IntPtr pmcsclientOut; 181IntPtr brParaOut; 184CreateSubpageFiniteHelper(PtsContext, IntPtr.Zero, PTS.False, _mainTextSegment.Handle, IntPtr.Zero, PTS.False, PTS.True, 190if(brParaOut != IntPtr.Zero) 207if (pfsFigureContent != IntPtr.Zero) 211if (pmcsclientOut != IntPtr.Zero) 216pmcsclientOut = IntPtr.Zero; 224IntPtr brParaOut; 227CreateSubpageFiniteHelper(PtsContext, IntPtr.Zero, PTS.False, _mainTextSegment.Handle, IntPtr.Zero, PTS.False, PTS.True, 233if(brParaOut != IntPtr.Zero) 251if (pmcsclientOut != IntPtr.Zero) 256pmcsclientOut = IntPtr.Zero; 491IntPtr brParaIn, // IN: break record---use if !NULL 493IntPtr nSeg, // IN: name of the segment to start from-if pointer to break rec is NULL 494IntPtr pFtnRej, // IN: pftnrej 505out IntPtr pSubPage, // OUT: ptr to the subpage 506out IntPtr brParaOut, // OUT: break record of the subpage 509out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom
MS\Internal\PtsHost\FloaterBaseParagraph.cs (8)
92out IntPtr paraClientHandle); // OUT: opaque to PTS paragraph client 135IntPtr pbrkrecIn, // IN: break record---use if !IntPtr.Zero 137IntPtr footnoteRejector, // IN: 147out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 148out IntPtr pbrkrecOut, // OUT: pointer to the floater content break record 166out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 183IntPtr pfsFloatContent, // IN: floater content 197out IntPtr pmcsclientOut); // OUT: MCSCLIENT that floater will return to track
MS\Internal\PtsHost\FloaterParaClient.cs (3)
727internal ReadOnlyCollection<ParagraphResult> GetParagraphResultsFromColumn(IntPtr pfstrack, Vector parentOffset, out bool hasTextContent) 739internal TextContentRange GetTextContentRangeFromColumn(IntPtr pfstrack) 772internal IntPtr SubpageHandle
MS\Internal\PtsHost\FloaterParagraph.cs (46)
90out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 158IntPtr pbrkrecIn, // IN: break record---use if !IntPtr.Zero 160IntPtr footnoteRejector, // IN: 170out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 171out IntPtr pbrkrecOut, // OUT: pointer to the floater content break record 185IntPtr pmcsclientOut; 203pbrkrecOut = IntPtr.Zero; 204pfsFloatContent = IntPtr.Zero; 256Debug.Assert(pmcsclientOut == IntPtr.Zero); 275if (pfsFloatContent != IntPtr.Zero) 278pfsFloatContent = IntPtr.Zero; 280if (pbrkrecOut != IntPtr.Zero) 283pbrkrecOut = IntPtr.Zero; 285if (pmcsclientOut != IntPtr.Zero) 290pmcsclientOut = IntPtr.Zero; 310if (pmcsclientOut != IntPtr.Zero) 315pmcsclientOut = IntPtr.Zero; 343if (pfsFloatContent != IntPtr.Zero) 346pfsFloatContent = IntPtr.Zero; 348if (pbrkrecOut != IntPtr.Zero) 351pbrkrecOut = IntPtr.Zero; 379out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 394IntPtr pmcsclientOut; 409pfsFloatContent = IntPtr.Zero; 451if (pfsFloatContent != IntPtr.Zero) 455if (pmcsclientOut != IntPtr.Zero) 460pmcsclientOut = IntPtr.Zero; 478if (pmcsclientOut != IntPtr.Zero) 483pmcsclientOut = IntPtr.Zero; 499if (pfsFloatContent != IntPtr.Zero) 504Debug.Assert(pmcsclientOut == IntPtr.Zero); 506pfsFloatContent = IntPtr.Zero; 523Debug.Assert(pmcsclientOut == IntPtr.Zero); 526pfsFloatContent = IntPtr.Zero; 544IntPtr pfsFloatContent, // IN: floater content (in UIElementParagraph, this is an alias to the paraClient) 565out IntPtr pmcsclientOut) // OUT: MCSCLIENT that floater will return to track 574pmcsclientOut = IntPtr.Zero; 690IntPtr brParaIn, // IN: break record---use if !NULL 692IntPtr nSeg, // IN: name of the segment to start from-if pointer to break rec is NULL 693IntPtr pFtnRej, // IN: pftnrej 706out IntPtr pSubPage, // OUT: ptr to the subpage 707out IntPtr brParaOut, // OUT: break record of the subpage 710out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom 739IntPtr nSeg, // IN: name of the segment to start from 749out IntPtr ppSubPage, // OUT: ptr to the subpage 752out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom
MS\Internal\PtsHost\FlowDocumentPage.cs (4)
431if (_ptsPage.PageHandle == IntPtr.Zero) 500if (columnDesc.pfstrack != IntPtr.Zero) 538internal TextContentRange GetTextContentRangeFromColumn(IntPtr pfstrack) 573internal ReadOnlyCollection<ParagraphResult> GetParagraphResultsFromColumn(IntPtr pfstrack, Vector parentOffset, out bool hasTextContent)
MS\Internal\PtsHost\ListParagraph.cs (1)
46out IntPtr paraClientHandle)
MS\Internal\PtsHost\PageBreakRecord.cs (5)
36internal PageBreakRecord(PtsContext ptsContext, SecurityCriticalDataForSet<IntPtr> br, int pageNumber) 39Invariant.Assert(br.Value != IntPtr.Zero, "Invalid break record object."); 95internal IntPtr BreakRecord 154_br.Value = IntPtr.Zero; 172private SecurityCriticalDataForSet<IntPtr> _br;
MS\Internal\PtsHost\Pts.cs (637)
658internal IntPtr pfnNewPtr; 659internal IntPtr pfnDisposePtr; 660internal IntPtr pfnReallocPtr; 711internal IntPtr pfsbreakreclineclient; 712internal IntPtr pfslineclient; 719internal IntPtr ptsLinePenaltyInfo; 749internal IntPtr nmp; 752IntPtr pbrLineIn; 781internal IntPtr pfnGetSectionHorizMargins; 782internal IntPtr pfnFPerformColumnBalancing; 783internal IntPtr pfnCalculateColumnBalancingApproximateHeight; 784internal IntPtr pfnCalculateColumnBalancingStep; 785internal IntPtr pfnGetColumnSectionBreak; 786internal IntPtr pfnFSuppressKeepWithNextAtTopOfPage; 787internal IntPtr pfnFSuppressKeepTogetherAtTopOfPage; 788internal IntPtr pfnFAllowSpaceAfterOverhang; 789internal IntPtr pfnFormatLineWord; 790internal IntPtr pfnGetSuppressedTopSpace; 791internal IntPtr pfnChangeSplatLineHeight; 792internal IntPtr pfnGetDvrAdvanceWord; 793internal IntPtr pfnGetMinDvrAdvance; 794internal IntPtr pfnGetDurTooNarrowForFigure; 795internal IntPtr pfnResolveOverlap; 796internal IntPtr pfnGetOffsetForFlowAroundAndBBox; 797internal IntPtr pfnGetClientGeometryHandle; 798internal IntPtr pfnDuplicateClientGeometryHandle; 799internal IntPtr pfnDestroyClientGeometryHandle; 800internal IntPtr pfnObstacleAddNotification; 801internal IntPtr pfnGetFigureObstaclesForRestart; 802internal IntPtr pfnRepositionFigure; 803internal IntPtr pfnFStopBeforeLr; 804internal IntPtr pfnFStopBeforeLine; 805internal IntPtr pfnFIgnoreCollision; 806internal IntPtr pfnGetNumberOfLinesForColumnBalancing; 807internal IntPtr pfnFCancelPageBreakBefore; 808internal IntPtr pfnChangeVrTopLineForFigure; 809internal IntPtr pfnFApplyWidowOrphanControlInFootnoteResolution; 845internal IntPtr pInstalledObjects; // array of installed objects 846internal IntPtr pfsclient; // client data for this context 847internal IntPtr ptsPenaltyModule; // Penalty module 1006internal IntPtr nmpFigure; 1022internal IntPtr nmpFigure; 1091internal IntPtr fsnmFloater; 1093internal IntPtr pfsFloaterContent; 1165internal IntPtr nmftn; // name of footnote 1226internal IntPtr pfnGetFootnoteInfoWord; 1367internal IntPtr pfslineclient; 1369internal IntPtr pfsbreakreclineclient; // break record needed to format this element 1390internal IntPtr pline; // to be used for QueryLineElements 1404internal IntPtr pfslineclient; 1405internal IntPtr pfsbreakreclineclient; // break record needed to format this line 1425internal IntPtr pfspara; 1426internal IntPtr pfsparaclient; 1427internal IntPtr nmp; 1439internal IntPtr pdcclient; // ptr to drop cap created by client 1509internal IntPtr pfspara; 1510internal IntPtr pfsparaclient; 1511internal IntPtr nmp; 1526internal IntPtr nms; 1530internal IntPtr pfstrack; 1536internal IntPtr nms; 1543internal IntPtr nms; 1599internal IntPtr pfscompcol; 1607internal IntPtr pfsendnotecol; 1649internal IntPtr nms; 1655internal IntPtr pfssection; 1670internal IntPtr pfsfootnotecol; 1754internal IntPtr pfnGetCellFootnoteInfo; 1755internal IntPtr pfnGetCellFootnoteInfoWord; 1840internal IntPtr pfnGetDvrUsedForFloatTable; 1845internal IntPtr pfnGetTablePropertiesWord; 1846internal IntPtr pfnGetRowPropertiesWord; 1847internal IntPtr pfnGetRowWidthWord; 1848internal IntPtr pfnGetNumberFiguresForTableRow; 1849internal IntPtr pfnGetFiguresForTableRow; 1850internal IntPtr pfnFStopBeforeTableRowLr; 1851internal IntPtr pfnFIgnoreCollisionForTableRow; 1852internal IntPtr pfnChangeRowHeightRestriction; 1853internal IntPtr pfnNotifyRowPosition; 1854internal IntPtr pfnNotifyRowBorderAbove; 1855internal IntPtr pfnNotifyTableBreakRec; 1871internal IntPtr fsnmTable; 1879internal IntPtr pfstableProper; 1894internal IntPtr fsnmRow; 1895internal IntPtr pfstablerow; 1930internal IntPtr pfscontext; 1931internal IntPtr pfsclient; 1977IntPtr pfsclient, // IN: client opaque data 1978IntPtr pfsparaclientFigure, // IN: 1979IntPtr nmpFigure, // IN: figure's name 1993IntPtr pfsclient, // IN: client opaque data 1994IntPtr pfsparaclientFigure, // IN: 1995IntPtr nmpFigure, // IN: figure's name 2005IntPtr pfsclient, // IN: client opaque data 2006IntPtr pfsparaclientFigure, // IN: 2007IntPtr nmpFigure, // IN: figure's name 2024IntPtr pfsclient, // IN: client opaque data 2025IntPtr nms, // IN: name of first section on the page 2028IntPtr pfsclient, // IN: client opaque data 2029IntPtr nms, // IN: name of section on page 2036IntPtr pfsclient, // IN: client opaque data 2037IntPtr nmsCur, // IN: name of current section 2039out IntPtr nmsNext); // OUT: name of the next section 2041IntPtr pfsclient, // IN: client opaque data 2042IntPtr nms, // IN: name of section 2050IntPtr pfsclient, // IN: client opaque data 2051IntPtr* rgnms, // IN: array of the section names on the page 2058IntPtr pfsclient, // IN: client opaque data 2059IntPtr nmsSection, // IN: name of section 2060out IntPtr nmSegment); // OUT: name of the main text segment for this section 2062IntPtr pfsclient, // IN: client opaque data 2063IntPtr nms, // IN: name of section 2064IntPtr pfsbrpagePrelim, // IN: ptr to page break record of main page 2071out IntPtr nmsHeader); // OUT: name of header segment 2073IntPtr pfsclient, // IN: client opaque data 2074IntPtr nms, // IN: name of section 2075IntPtr pfsbrpagePrelim, // IN: ptr to page break record of main page 2082out IntPtr nmsFooter); // OUT: name of footer segment 2084IntPtr pfsclient, // IN: client opaque data 2085IntPtr nms, // IN: name of the segment 2088IntPtr pfsclient, // IN: client opaque data 2089IntPtr nms, // IN: name of section 2095IntPtr pfsclient, // IN: client opaque data 2096IntPtr nms, // IN: name of section 2098IntPtr* rgnmSeg, // OUT: array of segment names for segment-defined areas 2102IntPtr pfsclient, // IN: client opaque data 2103IntPtr nms, // IN: name of section 2109IntPtr pfsclient, // IN: client opaque data 2110IntPtr nms, // IN: name of segment 2112out IntPtr nmp); // OUT: name of the first paragraph in segment 2114IntPtr pfsclient, // IN: client opaque data 2115IntPtr nms, // IN: name of segment 2116IntPtr nmpCur, // IN: name of current para 2118out IntPtr nmpNext); // OUT: name of the next paragraph in section 2120IntPtr pfsclient, // IN: client opaque data 2121IntPtr nms, // IN: name of segment 2124out IntPtr nmpBeforeChange); // OUT: name of paragraph before the change if !fChangeFirst 2126IntPtr pfsclient, // IN: client opaque data 2127IntPtr nmp, // IN: name of the paragraph 2131IntPtr pfsclient, // IN: client opaque data 2132IntPtr nmp, // IN: name of paragraph 2135IntPtr pfsclient, // IN: client opaque data 2136IntPtr nmp, // IN: name of paragraph 2137out IntPtr pfsparaclient); // OUT: opaque to PTS paragraph client 2139IntPtr pfsclient, // IN: client opaque data 2140IntPtr pfsparaclientOld, // IN: opaque to PTS old paragraph client 2141IntPtr pfsparaclientNew); // IN: opaque to PTS new paragraph client 2143IntPtr pfsclient, // IN: client opaque data 2144IntPtr pfsparaclient); // IN: opaque to PTS paragraph client 2146IntPtr pfsclient, // IN: client opaque data 2147IntPtr pfsparaclient, // IN: opaque to PTS paragraph client 2148IntPtr nmp, // IN: name of paragraph 2152IntPtr pfsclient, // IN: client opaque data 2153IntPtr nmsSection, // IN: name of section 2154out IntPtr nmsEndnoteSeparator, // OUT: name of the endnote separator segment 2155out IntPtr nmEndnoteContSeparator, // OUT: name of endnote cont separator segment 2156out IntPtr nmsEndnoteContNotice); // OUT: name of the endnote cont notice segment 2158IntPtr pfsclient, // IN: client opaque data 2159IntPtr nmsSection, // IN: name of section 2161out IntPtr nmsEndnotes); // OUT: name of endnote segment 2163IntPtr pfsclient, // IN: client opaque data 2164IntPtr nms, // IN: name of section 2167IntPtr pfsclient, // IN: client opaque data 2168IntPtr nms, // IN: name of section 2174IntPtr pfsclient, // IN: client opaque data 2175IntPtr nmsSection, // IN: name of section 2176out IntPtr nmsFtnSeparator, // OUT: name of the footnote separator segment 2177out IntPtr nmsFtnContSeparator, // OUT: name of the ftn cont separator segment 2178out IntPtr nmsFtnContNotice); // OUT: name of the footnote cont notice segment 2180IntPtr pfsclient, // IN: client opaque data 2181IntPtr nms, // IN: name of section 2184IntPtr pfsclient, // IN: client opaque data 2185IntPtr nms, // IN: name of section 2188IntPtr pfsclient, // IN: client opaque data 2189IntPtr nms, // IN: name of section 2195IntPtr pfsclient, // IN: client opaque data 2196IntPtr nmftn, // IN: name of footnote 2197out IntPtr nmsFootnote); // OUT: name of footnote segment 2199IntPtr pfsclient, // IN: client opaque data 2201IntPtr* rgProposedPresentationOrder, // IN: footnotes in proposed pres order 2202IntPtr* rgProposedRejectionOrder, // IN: footnotes in proposed reject order 2204IntPtr* rgFinalPresentationOrder, // OUT: footnotes in final pres order 2206IntPtr* rgFinalRejectionOrder); // OUT: footnotes in final reject order 2208IntPtr pfsclient, // IN: client opaque data 2209IntPtr nmftn, // IN: name of footnote 2218IntPtr pfsclient, // IN: client opaque data 2219IntPtr pmcsclientIn, // IN: margin collapsing state 2220out IntPtr pmcsclientNew); // OUT: duplicated margin collapsing state 2222IntPtr pfsclient, // IN: client opaque data 2223IntPtr pmcsclient); // IN: margin collapsing state to destroy 2225IntPtr pfsclient, // IN: client opaque data 2226IntPtr pmcsclient1, // IN: first margin collapsing state to compare 2227IntPtr pmcsclient2, // IN: second margin collapsing state to compare 2230IntPtr pfsclient, // IN: client opaque data 2231IntPtr pfsparaclient, // IN: 2232IntPtr nmp, // IN: name of paragraph 2234IntPtr pmcsclient, // IN: pointer to the input margin collapsing state 2238IntPtr pfsclient, // IN: client opaque data 2240IntPtr pobjectinfo); // OUT: initialization information for the specified object 2245IntPtr pfsclient, // IN: client opaque data 2246IntPtr pfsparaclient, // IN: opaque to PTS paragraph client 2247IntPtr nmp, // IN: name of paragraph 2250IntPtr pfsbreakreclineclient, // IN: break record for the first line 2255out IntPtr ppfsparabreakingsession, // OUT: paragraph breaking session 2258IntPtr pfsclient, // IN: client opaque data 2259IntPtr pfsparabreakingsession); // IN: session to destroy 2261IntPtr pfsclient, // IN: client opaque data 2262IntPtr nmp, // IN: name of paragraph 2266IntPtr pfsclient, // IN: client opaque data 2267IntPtr nmp, // IN: name of paragraph 2272IntPtr pfsclient, // IN: client opaque data 2273IntPtr nmp, // IN: name of paragraph 2277IntPtr* rgnmftn, // OUT: array of footnote names in the range 2281IntPtr pfsclient, // IN: client opaque data 2282IntPtr pfsparaclient, // IN: 2283IntPtr nmp, // IN: name of paragraph 2287out IntPtr pfsdropc, // OUT: pointer to drop cap created by client 2295IntPtr pfsclient, // IN: client opaque data 2296IntPtr pfsdropc, // IN: pointer to drop cap 2297IntPtr nmp, // IN: para name 2307IntPtr pfsclient, // IN: client opaque data 2308IntPtr pfsdropc); // IN: pointer to drop cap created by client 2310IntPtr pfsclient, // IN: client opaque data 2311IntPtr pfsparaclient, // IN: 2312IntPtr nmp, // IN: name of paragraph 2315IntPtr pfslineLast, // IN: last formatted line 2317out IntPtr pmcsclientOut); // OUT: margin collapsing state at bottom of text 2319IntPtr pfsclient, // IN: client opaque data 2320IntPtr pfsparaclient, // IN: 2321IntPtr nmp, // IN: name of paragraph 2324IntPtr pbrlineIn, // IN: client's line break record 2337out IntPtr pfsline, // OUT: pointer to line created by client 2339out IntPtr ppbrlineOut, // OUT: client's line break record 2349IntPtr pfsclient, // IN: client opaque data 2350IntPtr pfsparaclient, // IN: 2351IntPtr nmp, // IN: name of paragraph 2354IntPtr pbrlineIn, // IN: client's line break record 2367out IntPtr pfsline, // OUT: pointer to line created by client 2369out IntPtr ppbrlineOut, // OUT: client's line break record 2377IntPtr pfsclient, // IN: client opaque data 2378IntPtr pfsparabreakingsession, // IN: current session 2380IntPtr pbrlineIn, // IN: client's line break record 2390IntPtr lineVariantRestriction, // IN: line variant restriction 2397IntPtr pfsclient, // IN: client opaque data 2398IntPtr pfsparaclient, // IN: 2399IntPtr nmp, // IN: name of paragraph 2402IntPtr pbrlineIn, // IN: client's line break record to start formatting 2416out IntPtr pfsline, // OUT: pointer to line created by client 2417out IntPtr ppbrlineOut, // OUT: client's line break record 2427IntPtr pfsclient, // IN: client opaque data 2428IntPtr pfsline); // IN: pointer to line created by client 2430IntPtr pfsclient, // IN: client opaque data 2431IntPtr pbrlineIn, // IN: client's forced break record to duplicate 2432out IntPtr pbrlineDup); // OUT: duplicated client's forced break record 2434IntPtr pfsclient, // IN: client opaque data 2435IntPtr pbrlineIn); // IN: client's forced break record to duplicate 2437IntPtr pfsclient, // IN: client opaque data 2443IntPtr pfsclient, // IN: client opaque data 2444IntPtr pfsparaclient, // IN: 2445IntPtr pfsline, // IN: pointer to line created by client 2449IntPtr pfsclient, // IN: client opaque data 2450IntPtr pfsparaclient, // IN: 2451IntPtr nmp, // IN: name of paragraph 2456IntPtr pfsclient, // IN: client opaque data 2457IntPtr nmp, // IN: name of paragraph 2462IntPtr pfsclient, // IN: client opaque data 2463IntPtr nmp, // IN: name of paragraph 2466IntPtr pfsclient, // IN: client opaque data 2467IntPtr pfsparaclient, // IN: 2468IntPtr nmp, // IN: name of paragraph 2473IntPtr pfsclient, // IN: client opaque data 2474IntPtr pfsparaclient, // IN: 2475IntPtr nmp, // IN: name of paragraph 2492out IntPtr pmcsclientAfterPara, // OUT: margin collapsing state after parag. 2498IntPtr pfsclient, // IN: client opaque data 2499IntPtr pfsparaclient, // IN: 2500IntPtr nmp, // IN: name of paragraph 2516IntPtr pmcsclientAfterPara, // IN: margin collapsing state after paragraph 2522IntPtr pfsclient, // IN: client opaque data 2526IntPtr pfsclient, // IN: client opaque data 2527IntPtr nmp, // IN: name of paragraph 2531IntPtr pfsclient, // IN: client opaque data 2532IntPtr nmp, // IN: name of paragraph 2535IntPtr* rgnmpObjects, // OUT: array of object names 2542IntPtr pfsclient, // IN: client opaque data 2543IntPtr pfsline, // IN: pointer to line created by client 2544IntPtr nmp, // IN: name of paragraph 2551IntPtr pfsclient, // IN: client opaque data 2552IntPtr pfsline, // IN: pointer to line created by client 2553IntPtr nmp, // IN: name of paragraph 2559IntPtr* rgnmpObjects, // OUT: array of floater names 2565IntPtr pfsclient, // IN: client opaque data 2566IntPtr nmp, // IN: name of text paragraph 2567IntPtr nmpAttachedObject, // IN: name of object 2571IntPtr pfsclient, // IN: client opaque data 2572IntPtr pfsparaclient, // IN: 2573IntPtr pfsparaclientFigure, // IN: 2574IntPtr pfsline, // IN: pointer to line created by client 2575IntPtr nmpFigure, // IN: figure's name 2577IntPtr pfsFmtLineIn, // IN: data needed to reformat the line 2583IntPtr pfsclient, // IN: client opaque data 2584IntPtr nmFloater, // IN: name of the floater 2588IntPtr pfsclient, // IN: client opaque data 2589IntPtr pfsparaclient, // IN: 2590IntPtr pfsbrkFloaterContentIn, // IN: break record---use if !NULL 2592IntPtr nmFloater, // IN: name of floater 2593IntPtr pftnrej, // IN: 2603out IntPtr pfsbrkFloatContentOut, // OUT: opaque for PTS pointer pointer to formatted content 2604out IntPtr pbrkrecpara, // OUT: pointer to the floater content break record 2611IntPtr pfsclient, // IN: client opaque data 2612IntPtr pfsparaclient, // IN: 2613IntPtr nmFloater, // IN: name of floater 2620out IntPtr pfsbrkFloatContentOut, // OUT: opaque for PTS pointer pointer to formatted content 2627IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2628IntPtr pfsparaclient, // IN: 2629IntPtr nmFloater, // IN: name of floater 2642IntPtr pfsparaclient, // IN: 2643IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2644IntPtr nmFloater, // IN: name of floater 2654IntPtr pfsFloaterContent); // IN: opaque for PTS pointer to floater content 2656IntPtr pfsFloaterContentOld, // IN: 2657IntPtr pfsFloaterContentNew, // IN: 2660IntPtr pfsFloaterContent); // IN: opaque for PTS pointer to floater content 2662IntPtr pfsclient, // IN: client context 2663IntPtr pfsbrkFloaterContent, // IN: pointer to break record 2664out IntPtr pfsbrkFloaterContentDup);// OUT pointer to duplicate break record 2666IntPtr pfsclient, // IN: client context 2667IntPtr pfsbrkFloaterContent); // IN: pointer to break record 2669IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2675IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2678IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2685IntPtr pfsFloaterContentOld, // IN: 2686IntPtr pfsFloaterContentNew); // IN: 2688IntPtr pfsclient, // IN: client context 2689IntPtr pfsparaclient, // IN: 2690IntPtr nmFloater, // IN: name of floater 2692IntPtr pmcsclientIn, // IN: input opaque to PTS MCSCLIENT 2693out IntPtr pmcsclientOut); // OUT: MCSCLIENT that floater will return to track 2695IntPtr pfsclient, // IN: client context 2696IntPtr pfsparaclient, // IN: 2697IntPtr nmFloater, // IN: name of floater 2699IntPtr pmcsclientIn, // IN: input opaque to PTS MCSCLIENT 2706IntPtr pfsclient, // IN: client opaque data 2707IntPtr pfsc, // IN: FS context 2708IntPtr pfscbkobj, // IN: callbacks (FSCBKOBJ) 2711out IntPtr pfssobjc); // OUT: object context 2713IntPtr pfssobjc); // IN: object context 2715IntPtr pfssobjc, // IN: object context 2716IntPtr pfsparaclient, // IN: 2717IntPtr pfsobjbrk, // IN: break record---use if !NULL 2719IntPtr nmp, // IN: name of paragraph---use if break record is NULL 2721IntPtr pftnrej, // IN: 2722IntPtr pfsgeom, // IN: pointer to geometry 2727IntPtr pmcsclientIn, // IN: input margin collapsing state 2734out IntPtr pfspara, // OUT: pointer to the para data 2735out IntPtr pbrkrecpara, // OUT: pointer to the para break record 2738out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2743IntPtr pfssobjc, // IN: object context 2744IntPtr pfsparaclient, // IN: 2745IntPtr nmp, // IN: name of paragraph 2747IntPtr pfsgeom, // IN: pointer to geometry 2753IntPtr pmcsclientIn, // IN: input margin collapsing state 2757out IntPtr pfspara, // OUT: pointer to the para data 2760out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2765IntPtr pfspara, // IN: pointer to the para data 2766IntPtr pfsparaclient, // IN: 2767IntPtr nmp, // IN: name of paragraph 2769IntPtr pfsgeom, // IN: pointer to geometry 2775IntPtr pmcsclientIn, // IN: input margin collapsing state 2781out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2786IntPtr pfspara, // IN: pointer to the para data 2787IntPtr pfsparaclient, // IN: 2788IntPtr pfsgeom, // IN: pointer to geometry 2792IntPtr pfsparaclientOld, // IN: 2793IntPtr pfsparaOld, // IN: pointer to the old para data 2794IntPtr pfsparaclientNew, // IN: 2795IntPtr pfsparaNew, // IN: pointer to the new para data 2800IntPtr pfspara); // IN: pointer to the para data 2802IntPtr pfspara); // IN: pointer to the para data 2804IntPtr pfssobjc, // IN: object context 2805IntPtr pfsbrkrecparaOrig, // IN: pointer to the para break record 2806out IntPtr pfsbrkrecparaDup); // OUT: pointer to the duplicate break record 2808IntPtr pfssobjc, // IN: object context 2809IntPtr pfsobjbrk); // OUT: pointer to the para break record 2811IntPtr pfspara, // IN: pointer to the para data 2817IntPtr pfspara, // IN: pointer to the para data 2820IntPtr pfspara, // IN: pointer to the para data 2834IntPtr pfspara, // IN: pointer to the para data 2835IntPtr pfsparaclient, // IN: 2836IntPtr pfsshift, // IN: pointer to the shift data 2840IntPtr pfsparaOld, // IN: pointer to the old para data 2841IntPtr pfsparaNew); // IN: pointer to the new para data 2846IntPtr pfsclient, // IN: 2847IntPtr nmTable, // IN: 2851IntPtr pfsclient, // IN: 2852IntPtr pfsparaclientTable, // IN: 2853IntPtr nmTable, // IN: 2858IntPtr pfsclient, // IN: 2859IntPtr pfsparaclientTable, // IN: 2860IntPtr nmTable, // IN: 2868IntPtr pfsclient, // IN: 2869IntPtr pfsparaclientTable, // IN: 2870IntPtr nmTable, // IN: 2872IntPtr pmcsclientIn, // IN: 2873out IntPtr ppmcsclientOut); // OUT: 2888IntPtr pfsclient, // IN: 2889IntPtr nmTable, // IN: 2892out IntPtr pnmFirstHeaderRow); // OUT: 2894IntPtr pfsclient, // IN: 2895IntPtr nmTable, // IN: 2896IntPtr nmHeaderRow, // IN: 2899out IntPtr pnmNextHeaderRow); // OUT: 2901IntPtr pfsclient, // IN: 2902IntPtr nmTable, // IN: 2905out IntPtr pnmFirstFooterRow); // OUT: 2907IntPtr pfsclient, // IN: 2908IntPtr nmTable, // IN: 2909IntPtr nmFooterRow, // IN: 2912out IntPtr pnmNextFooterRow); // OUT: 2914IntPtr pfsclient, // IN: 2915IntPtr nmTable, // IN: 2917out IntPtr pnmFirstRow); // OUT: 2919IntPtr pfsclient, // IN: 2920IntPtr nmTable, // IN: 2921IntPtr nmRow, // IN: 2923out IntPtr pnmNextRow); // OUT: 2925IntPtr pfsclient, // IN: 2926IntPtr nmTable, // IN: 2932IntPtr pfsclient, // IN: 2933IntPtr nmTable, // IN: 2936out IntPtr pnmRowBeforeChange); // OUT: 2938IntPtr pfsclient, // IN: 2939IntPtr nmTable, // IN: 2940IntPtr nmRow, // IN: 2944IntPtr pfsclient, // IN: 2945IntPtr nmRow, // IN: 2946IntPtr nmCell, // IN: 2950IntPtr pfsclient, // IN: 2951IntPtr nmTable, // IN: 2955IntPtr pfsclient, // IN: 2956IntPtr nmRow, // IN: 2960IntPtr pfsclient, // IN: 2961IntPtr nmRow, // IN: 2963IntPtr* rgnmCell, // IN/OUT: 2966IntPtr pfsclient, // IN: 2967IntPtr pfsparaclient, // IN: 2968IntPtr nmRow, // IN: 2972IntPtr pfsclient, // IN: 2973IntPtr nmRow, // IN: 2975IntPtr* rgnmCell, // IN: 2976IntPtr* rgpfscell, // IN: 2981IntPtr pfsclient, // IN: 2982IntPtr pfsparaclientTable, // IN: table's para client 2983IntPtr pfsbrkcell, // IN: not NULL if cell broken from previous page/column 2984IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 2985IntPtr pfsFtnRejector, // IN: 2991out IntPtr ppfscell, // OUT: cell object 2992out IntPtr pfsbrkcellOut, // OUT: break if cell does not fit in dvrAvailable 2995IntPtr pfsclient, // IN: 2996IntPtr pfsparaclientTable, // IN: table's para client 2997IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 3000out IntPtr ppfscell, // OUT: cell object 3004IntPtr pfscell, // IN/OUT: cell object 3005IntPtr pfsparaclientTable, // IN: table's para client 3006IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 3012IntPtr pfscellOld, 3013IntPtr pfscellNew, 3017IntPtr pfscell); // IN/OUT: cell object 3019IntPtr pfscell, // IN/OUT: cell object 3020IntPtr pfsparaclientTable, // IN: table's para client 3021IntPtr pfsbrkcell, // IN: not NULL if cell broken from previous page/column 3022IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 3027IntPtr pfsCell); // IN: 3029IntPtr pfsclient, // IN: 3030IntPtr pfsbrkcell, // IN: 3031out IntPtr ppfsbrkcellDup); // OUT: 3033IntPtr pfsclient, // IN: 3034IntPtr pfsbrkcell); // IN: 3036IntPtr pfscell, // IN: 3047IntPtr pfscell, // IN: 3052IntPtr pfscellOld, 3053IntPtr pfscellNew); 3074IntPtr pFloaterObjectInfo); // IN: pointer to floater object info 3080IntPtr pTableObjectInfo); // IN: pointer to floater object info 3087out IntPtr pInstalledObjects, // OUT: pointer to installed objects array 3092IntPtr pInstalledObjects); // IN: pointer to installed objects array 3100out IntPtr pfscontext); // OUT: pointer to the FS context 3104IntPtr pfscontext); // IN: pointer to the FS context 3117IntPtr pfscontext, // IN: ptr to FS context 3118IntPtr pfsBRPageStart, // IN: ptr to brk record of prev. page 3119IntPtr fsnmSectStart, // IN: name of the section to start from, if pointer to break rec is NULL 3121out IntPtr ppfsPageOut, // OUT: ptr to page, opaque to client 3122out IntPtr ppfsBRPageOut); // OUT: break record of the page 3126IntPtr pfscontext, // IN: ptr to FS context 3127IntPtr pfspage, // IN: ptr to page to update 3128IntPtr pfsBRPageStart, // IN: ptr to brk record of prev. page 3129IntPtr fsnmSectStart, // IN: name of the section to start from, if pointer to break rec is NULL 3131out IntPtr ppfsBRPageOut); // OUT: break record of the page 3135IntPtr pfscontext, // IN: ptr to FS context 3136IntPtr fsnmsect, // IN: name of the section to start from 3138out IntPtr ppfspage); // OUT: ptr to page, opaque to client 3142IntPtr pfscontext, // IN: ptr to FS context 3143IntPtr pfspage, // IN: ptr to page to update 3144IntPtr fsnmsect, // IN: name of the section to start from 3149IntPtr pfscontext, // IN: ptr to FS context 3150IntPtr pfspage); // IN: ptr to page to clear 3154IntPtr pfscontext, // IN: ptr to FS context 3155IntPtr pfspage); // IN: ptr to page 3167IntPtr pfscontext, // IN: ptr to FS context 3168IntPtr pfsbreakrec); // IN: ptr to page break record 3176IntPtr pfsContext, // IN: ptr to FS context 3177IntPtr pBRSubPageStart, // IN: ptr to brk record of subpage 3179IntPtr nSeg, // IN: name of the segment to start from-if pointer to break rec is NULL 3180IntPtr pFtnRej, // IN: pftnrej 3191IntPtr* rgnSegmentForArea, // IN: array of segment names for colspan areas 3200out IntPtr pSubPage, // OUT: ptr to the subpage 3201out IntPtr pBRSubPageOut, // OUT: break record of the subpage 3204out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom 3209IntPtr pfsContext, // IN: ptr to FS context 3210IntPtr nSeg, // IN: name of the segment to start from 3220IntPtr* rgnSegmentForArea, // IN: array of segment names for colspan areas 3227out IntPtr ppSubPage, // OUT: ptr to the subpage 3230out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom 3236IntPtr pfsContext, // IN: ptr to FS context 3237IntPtr pfsSubpage, // IN: ptr to the subpage 3238IntPtr nmSeg, // IN: name of the segment to start from 3248IntPtr* rgnSegmentForArea, // IN: array of segment names for colspan areas 3257out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom 3263IntPtr pfsContext, // IN: ptr to FS context 3264IntPtr pfsSubpageOld, // IN: ptr to the old subpage 3265IntPtr pfsSubpageNew, // IN: ptr to the new subpage 3270IntPtr pfscontext, // IN: ptr to FS context 3271IntPtr pSubpage); // IN: ptr to subpage 3275IntPtr pfsContext, // IN: ptr to FS context 3276IntPtr pSubpage); // IN: ptr to subpage 3280IntPtr pfsContext, // IN: ptr to FS context 3281IntPtr pBreakRecSubPageIn, // IN: ptr to subpage break record 3282out IntPtr ppBreakRecSubPageOut); // OUT: ptr to duplicate break record 3286IntPtr pfscontext, // IN: ptr to FS context 3287IntPtr pfsbreakrec); // IN: ptr to subpage break record 3291IntPtr pfsContext, // IN: ptr to FS context 3292IntPtr pSubpage, // IN: ptr to the subpage 3300IntPtr pfsContext, // IN: ptr to FS context 3301IntPtr pSubpage, // IN: ptr to the subpage 3306IntPtr pfsContext, // IN: ptr to FS context 3307IntPtr pSubpage, // IN: ptr to the subpage 3316IntPtr pfsContext, // IN: ptr to FS context 3317IntPtr pSubpageOld, // IN: ptr to the old subpage 3318IntPtr pfsSubpageNew); // IN: ptr to the new subpage 3325IntPtr pfsContext, // IN: ptr to FS context 3326IntPtr pfsBRSubtackIn, // IN: ptr to brk record of subtrack 3328IntPtr fsnmSegment, // IN: name of the segment to start from - if pointer to break rec is NULL 3330IntPtr pfsFtnRej, // IN: 3331IntPtr pfsGeom, // IN: geometry 3336IntPtr pfsMcsClientIn, // IN: input margin collapsing state 3341out IntPtr ppfsSubtrack, // OUT: ptr to the subtrack 3342out IntPtr pfsBRSubtrackOut, // OUT: break record of the subtrack 3345out IntPtr ppfsMcsClientOut, // OUT: margin collapsing state at the bottom 3351IntPtr pfsContext, // IN: ptr to FS context 3352IntPtr fsnmSegment, // IN: name of the segment to start from 3354IntPtr pfsGeom, // IN: parent geometry 3360IntPtr pfsMcsClientIn, // IN: input margin collapsing state 3364out IntPtr ppfsSubtrack, // OUT: ptr to subtrack 3367out IntPtr ppfsMcsClientOut, // OUT: margin collapsing state at the bottom 3374IntPtr pfsContext, // IN: ptr to FS context 3375IntPtr pfsSubtrack, // IN: ptr to subtrack 3376IntPtr fsnmSegment, // IN: name of the segment to start from 3378IntPtr pfsGeom, // IN: parent geometry 3384IntPtr pfsMcsClientIn, // IN: input margin collapsing state 3390out IntPtr ppfsMcsClientOut, // OUT: margin collapsing state at the bottom 3397IntPtr pfsContext, // IN: ptr to FS context 3398IntPtr pfsSubtrack, // IN: ptr to subtrack 3399IntPtr pfsGeom, // IN: geometry 3405IntPtr pfsContext, // IN: ptr to FS context 3406IntPtr pfsSubtrackOld, // IN: ptr to old subtrack 3407IntPtr pfsSubtrackNew, // IN: ptr to new subtrack 3414IntPtr pfsContext, // IN: ptr to FS context 3415IntPtr pfsSubtrack); // IN: ptr to subtrack 3419IntPtr pfsContext, // IN: ptr to FS context 3420IntPtr pfsSubtrack); // IN: ptr to subtrack 3424IntPtr pfsContext, // IN: ptr to FS context 3425IntPtr pfsBRSubtrackIn, // IN: ptr to brk record of subtrack 3426out IntPtr ppfsBRSubtrackOut); // OUT: ptr to duplicate break record 3430IntPtr pfscontext, // IN: ptr to FS context 3431IntPtr pfsbreakrec); // IN: ptr to subtrack break record 3435IntPtr pfscontext, // IN: ptr to FS context 3436IntPtr pfsSubtrack, // IN: ptr to subtrack 3444IntPtr pfscontext, // IN: ptr to FS context 3445IntPtr pfsSubtrack, // IN: ptr to subtrack 3476IntPtr pfscontext, // IN: ptr to FS context 3477IntPtr pfsSubtrackOld, // IN: ptr to old subtrack 3478IntPtr pfsSubtrackNew); // IN: ptr to new subtrack 3488IntPtr pfsContext, // IN: ptr to FS context 3489IntPtr pfsfloater, // IN: 3600IntPtr pfsContext, // IN: ptr to FS context 3601IntPtr pPage, // IN: ptr to page 3627IntPtr pfsContext, // IN: ptr to FS context 3628IntPtr pPage, // IN: ptr to page 3635IntPtr pfsContext, // IN: ptr to FS context 3636IntPtr pSection, // IN: ptr to section 3641IntPtr pfsContext, // IN: ptr to FS context 3642IntPtr pSection, // IN: ptr to section 3697IntPtr pfsContext, // IN: ptr to FS context 3698IntPtr pTrack, // IN: ptr to track 3703IntPtr pfsContext, // IN: ptr to FS context 3704IntPtr pTrack, // IN: ptr to track 3711IntPtr pfsContext, // IN: ptr to FS context 3712IntPtr pSubPage, // IN: ptr to subpage 3717IntPtr pfsContext, // IN: ptr to FS context 3718IntPtr pSubPage, // IN: ptr to subpage 3743IntPtr pfsContext, // IN: ptr to FS context 3744IntPtr pSubTrack, // IN: ptr to subtrack 3749IntPtr pfsContext, // IN: ptr to FS context 3750IntPtr pSubTrack, // IN: ptr to subtrack 3757IntPtr pfsContext, // IN: ptr to FS context 3758IntPtr pPara, // IN: ptr to text para 3763IntPtr pfsContext, // IN: ptr to FS context 3764IntPtr pPara, // IN: ptr to text para 3771IntPtr pfsContext, // IN: ptr to FS context 3772IntPtr pPara, // IN: ptr to text para 3779IntPtr pfsContext, // IN: ptr to FS context 3780IntPtr pLine, // IN: ptr to line 3796IntPtr pfsContext, // IN: ptr to FS context 3797IntPtr pPara, // IN: ptr to text para 3804 IntPtr pfsContext, /* IN: ptr to FS context */ 3805 IntPtr pPara, /* IN: ptr to figure para */ 3822IntPtr pfscontext, // IN: 3823IntPtr pfstableobj, // IN: 3830IntPtr pfscontext, // IN: 3831IntPtr pfstableProper, // IN: 3836IntPtr pfscontext, // IN: 3837IntPtr pfstableProper, // IN: 3844IntPtr pfscontext, // IN: 3845IntPtr pfstablerow, // IN: 3850IntPtr pfscontext, // IN: 3851IntPtr pfstablerow, // IN: 3854IntPtr* rgpfscell, // OUT:
MS\Internal\PtsHost\PtsCache.cs (21)
93internal static void GetFloaterHandlerInfo(PtsHost ptsHost, IntPtr pobjectinfo) 105internal static void GetTableObjHandlerInfo(PtsHost ptsHost, IntPtr pobjectinfo) 250private void GetFloaterHandlerInfoCore(PtsHost ptsHost, IntPtr pobjectinfo) 269private void GetTableObjHandlerInfoCore(PtsHost ptsHost, IntPtr pobjectinfo) 331Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid."); 333Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid."); 406Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid."); 408Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid."); 429private IntPtr CreatePTSContext(int index, TextFormattingMode textFormattingMode) 432IntPtr installedObjects; 435IntPtr context; 445InitGenericInfo(ptsHost, (IntPtr)(index + 1), installedObjects, installedObjectsCount, ref _contextPool[index].ContextInfo); 456IntPtr ptsPenaltyModule = penaltyModule.DangerousGetHandle(); 483private unsafe void InitGenericInfo(PtsHost ptsHost, IntPtr clientData, IntPtr installedObjects, int installedObjectsCount, ref PTS.FSCONTEXTINFO contextInfo) 608private unsafe void InitInstalledObjectsInfo(PtsHost ptsHost, ref PTS.FSIMETHODS subtrackParaInfo, ref PTS.FSIMETHODS subpageParaInfo, out IntPtr installedObjects, out int installedObjectsCount) 625subtrackParaInfo.pfnGetFootnoteInfoWord = IntPtr.Zero; 688tableobjInit.tableobjcbk.pfnGetDvrUsedForFloatTable = IntPtr.Zero; 718tableobjInit.tablecbkcell.pfnGetCellFootnoteInfo = IntPtr.Zero; 719tableobjInit.tablecbkcell.pfnGetCellFootnoteInfoWord = IntPtr.Zero; 801internal IntPtr InstalledObjects;
MS\Internal\PtsHost\PtsContext.cs (27)
88Invariant.Assert(((IntPtr)_pageBreakRecords[index]) != IntPtr.Zero, "Invalid break record object"); 89PTS.Validate(PTS.FsDestroyPageBreakRecord(_ptsHost.Context, (IntPtr)_pageBreakRecords[index])); 106Invariant.Assert(((IntPtr)_pages[index]) != IntPtr.Zero, "Invalid break record object"); 107PTS.Validate(PTS.FsDestroyPage(_ptsHost.Context, (IntPtr)_pages[index])); 179internal IntPtr CreateHandle(object obj) 199return (IntPtr)handle; 210internal void ReleaseHandle(IntPtr handle) 228internal bool IsValidHandle(IntPtr handle) 247internal object HandleToObject(IntPtr handle) 285internal void OnPageCreated(SecurityCriticalDataForSet<IntPtr> ptsPage) 287Invariant.Assert(ptsPage.Value != IntPtr.Zero, "Invalid page object."); 300internal void OnPageDisposed(SecurityCriticalDataForSet<IntPtr> ptsPage, bool disposing, bool enterContext) 302Invariant.Assert(ptsPage.Value != IntPtr.Zero, "Invalid page object."); 326internal void OnPageBreakRecordCreated(SecurityCriticalDataForSet<IntPtr> br) 328Invariant.Assert(br.Value != IntPtr.Zero, "Invalid break record object."); 340internal void OnPageBreakRecordDisposed(SecurityCriticalDataForSet<IntPtr> br, bool disposing) 342Invariant.Assert(br.Value != IntPtr.Zero, "Invalid break record object."); 382internal IntPtr Context 465SecurityCriticalDataForSet<IntPtr> ptsPage = (SecurityCriticalDataForSet<IntPtr>)args; 475private void OnDestroyPage(SecurityCriticalDataForSet<IntPtr> ptsPage, bool enterContext) 477Invariant.Assert(ptsPage.Value != IntPtr.Zero, "Invalid page object."); 513SecurityCriticalDataForSet<IntPtr> br = (SecurityCriticalDataForSet<IntPtr>)args; 514Invariant.Assert(br.Value != IntPtr.Zero, "Invalid break record object.");
MS\Internal\PtsHost\PtsHelper.cs (14)
129if (trackDesc.pfstrack != IntPtr.Zero) 219bool emptyTrack = (trackDesc.pfstrack == IntPtr.Zero); 322if (trackDesc.pfstrack != IntPtr.Zero) 379if (trackDesc.pfstrack == IntPtr.Zero) { return null; } 454if (trackDesc.pfstrack == IntPtr.Zero) 550IntPtr page, 569IntPtr subpage, 588IntPtr section, 612IntPtr track, 631IntPtr subtrack, 650IntPtr para, 669IntPtr para, 706IntPtr para, 734IntPtr pfstrack)
MS\Internal\PtsHost\PtsHost.cs (547)
51_context = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 76internal IntPtr Context 78get { Invariant.Assert(_context.Value != IntPtr.Zero); return _context.Value; } 79set { Invariant.Assert(_context.Value == IntPtr.Zero); _context.Value = value; } 81private SecurityCriticalDataForSet<IntPtr> _context; 142IntPtr pfsclient, // IN: client opaque data 143IntPtr pfsparaclientFigure, // IN: 144IntPtr nmpFigure, // IN: figure's name 187IntPtr pfsclient, // IN: client opaque data 188IntPtr pfsparaclientFigure, // IN: 189IntPtr nmpFigure, // IN: figure's name 225IntPtr pfsclient, // IN: client opaque data 226IntPtr pfsparaclientFigure, // IN: 227IntPtr nmpFigure, // IN: figure's name 271IntPtr pfsclient, // IN: client opaque data 272IntPtr nms, // IN: name of first section on the page 297IntPtr pfsclient, // IN: client opaque data 298IntPtr nms, // IN: name of section on page 328IntPtr pfsclient, // IN: client opaque data 329IntPtr nmsCur, // IN: name of current section 331out IntPtr nmsNext) // OUT: name of the next section 342fSuccess = 0; nmsNext = IntPtr.Zero; 348fSuccess = 0; nmsNext = IntPtr.Zero; 355IntPtr pfsclient, // IN: client opaque data 356IntPtr nms, // IN: name of section 390IntPtr pfsclient, // IN: client opaque data 391IntPtr* rgnms, // IN: array of the section names on the page 424IntPtr pfsclient, // IN: client opaque data 425IntPtr nmsSection, // IN: name of section 426out IntPtr nmSegment) // OUT: name of the main text segment for this section 437nmSegment = IntPtr.Zero; 443nmSegment = IntPtr.Zero; 451IntPtr pfsclient, // IN: client opaque data 452IntPtr nms, // IN: name of section 453IntPtr pfsbrpagePrelim, // IN: ptr to page break record of main page 460out IntPtr nmsHeader) // OUT: name of header segment 472fHeaderPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirHeader = 0; nmsHeader = IntPtr.Zero; 478fHeaderPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirHeader = 0; nmsHeader = IntPtr.Zero; 486IntPtr pfsclient, // IN: client opaque data 487IntPtr nms, // IN: name of section 488IntPtr pfsbrpagePrelim, // IN: ptr to page break record of main page 495out IntPtr nmsFooter) // OUT: name of footer segment 507fFooterPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirFooter = 0; nmsFooter = IntPtr.Zero; 513fFooterPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirFooter = 0; nmsFooter = IntPtr.Zero; 520IntPtr pfsclient, // IN: client opaque data 521IntPtr nms, // IN: name of the segment 547IntPtr pfsclient, // IN: client opaque data 548IntPtr nms, // IN: name of section 577IntPtr pfsclient, // IN: client opaque data 578IntPtr nms, // IN: name of section 580IntPtr* rgnmSeg, // OUT: array of segment names for segment-defined areas 589IntPtr pfsclient, // IN: client opaque data 590IntPtr nms, // IN: name of section 602IntPtr pfsclient, // IN: client opaque data 603IntPtr nms, // IN: name of segment 605out IntPtr nmp) // OUT: name of the first paragraph in segment 616fSuccessful = 0; nmp = IntPtr.Zero; 622fSuccessful = 0; nmp = IntPtr.Zero; 629IntPtr pfsclient, // IN: client opaque data 630IntPtr nms, // IN: name of segment 631IntPtr nmpCur, // IN: name of current para 633out IntPtr nmpNext) // OUT: name of the next paragraph in section 646fFound = 0; nmpNext = IntPtr.Zero; 652fFound = 0; nmpNext = IntPtr.Zero; 659IntPtr pfsclient, // IN: client opaque data 660IntPtr nms, // IN: name of segment 663out IntPtr nmpBeforeChange) // OUT: name of paragraph before the change if !fChangeFirst 674fFound = fChangeFirst = 0; nmpBeforeChange = IntPtr.Zero; 680fFound = fChangeFirst = 0; nmpBeforeChange = IntPtr.Zero; 687IntPtr pfsclient, // IN: client opaque data 688IntPtr nmp, // IN: name of the paragraph 716IntPtr pfsclient, // IN: client opaque data 717IntPtr nmp, // IN: name of paragraph 740IntPtr pfsclient, // IN: client opaque data 741IntPtr nmp, // IN: name of paragraph 742out IntPtr pfsparaclient) // OUT: opaque to PTS paragraph client 753pfsparaclient = IntPtr.Zero; 759pfsparaclient = IntPtr.Zero; 766IntPtr pfsclient, // IN: client opaque data 767IntPtr pfsparaclientOld, // IN: opaque to PTS old paragraph client 768IntPtr pfsparaclientNew) // IN: opaque to PTS new paragraph client 792IntPtr pfsclient, // IN: client opaque data 793IntPtr pfsparaclient) // IN: 815IntPtr pfsclient, // IN: client opaque data 816IntPtr pfsparaclient, // IN: opaque to PTS paragraph client 817IntPtr nmp, // IN: name of paragraph 825IntPtr pfsclient, // IN: client opaque data 826IntPtr nmsSection, // IN: name of section 827out IntPtr nmsEndnoteSeparator, // OUT: name of the endnote separator segment 828out IntPtr nmsEndnoteContSeparator, // OUT: name of endnote cont separator segment 829out IntPtr nmsEndnoteContNotice) // OUT: name of the endnote cont notice segment 840nmsEndnoteSeparator = nmsEndnoteContSeparator = nmsEndnoteContNotice = IntPtr.Zero; 846nmsEndnoteSeparator = nmsEndnoteContSeparator = nmsEndnoteContNotice = IntPtr.Zero; 853IntPtr pfsclient, // IN: client opaque data 854IntPtr nmsSection, // IN: name of section 856out IntPtr nmsEndnotes) // OUT: name of endnote segment 867fEndnotesPresent = 0; nmsEndnotes = IntPtr.Zero; 873fEndnotesPresent = 0; nmsEndnotes = IntPtr.Zero; 880IntPtr pfsclient, // IN: client opaque data 881IntPtr nms, // IN: name of section 889IntPtr pfsclient, // IN: client opaque data 890IntPtr nms, // IN: name of section 901IntPtr pfsclient, // IN: client opaque data 902IntPtr nmsSection, // IN: name of section 903out IntPtr nmsFtnSeparator, // OUT: name of the footnote separator segment 904out IntPtr nmsFtnContSeparator, // OUT: name of the ftn cont separator segment 905out IntPtr nmsFtnContNotice) // OUT: name of the footnote cont notice segment 908nmsFtnSeparator = nmsFtnContSeparator = nmsFtnContNotice = IntPtr.Zero; 912IntPtr pfsclient, // IN: client opaque data 913IntPtr nms, // IN: name of section 921IntPtr pfsclient, // IN: client opaque data 922IntPtr nms, // IN: name of section 930IntPtr pfsclient, // IN: client opaque data 931IntPtr nms, // IN: name of section 942IntPtr pfsclient, // IN: client opaque data 943IntPtr nmftn, // IN: name of footnote 944out IntPtr nmsFootnote) // OUT: name of footnote segment 947nmsFootnote = IntPtr.Zero; 951IntPtr pfsclient, // IN: client opaque data 953IntPtr* rgProposedPresentationOrder, // IN: footnotes in proposed pres order 954IntPtr* rgProposedRejectionOrder, // IN: footnotes in proposed reject order 956IntPtr* rgFinalPresentationOrder, // OUT: footnotes in final pres order 958IntPtr* rgFinalRejectionOrder) // OUT: footnotes in final reject order 965IntPtr pfsclient, // IN: client opaque data 966IntPtr nmftn, // IN: name of footnote 977IntPtr pfsclient, // IN: client opaque data 978IntPtr pmcsclientIn, // IN: margin collapsing state 979out IntPtr pmcsclientNew) // OUT: duplicated margin collapsing state 990pmcsclientNew = IntPtr.Zero; 996pmcsclientNew = IntPtr.Zero; 1003IntPtr pfsclient, // IN: client opaque data 1004IntPtr pmcsclient) // IN: margin collapsing state to destroy 1026IntPtr pfsclient, // IN: client opaque data 1027IntPtr pmcsclient1, // IN: first margin collapsing state to compare 1028IntPtr pmcsclient2, // IN: second margin collapsing state to compare 1032if (pmcsclient1 == IntPtr.Zero || pmcsclient2 == IntPtr.Zero) 1062IntPtr pfsclient, // IN: client opaque data 1063IntPtr pfsparaclient, // IN: 1064IntPtr nmp, // IN: name of paragraph 1066IntPtr pmcsclient, // IN: pointer to the input margin collapsing state 1078if (pmcsclient != IntPtr.Zero) 1100IntPtr pfsclient, // IN: client opaque data 1102IntPtr pObjectInfo) // OUT: initialization information for the specified object 1117pObjectInfo = IntPtr.Zero; 1136IntPtr pfsclient, // IN: client opaque data 1137IntPtr pfsparaclient, // IN: opaque to PTS paragraph client 1138IntPtr nmp, // IN: name of paragraph 1141IntPtr pfsbreakreclineclient, // IN: break record for the first line 1146out IntPtr ppfsparabreakingsession, // OUT: paragraph breaking session 1159if(pfsbreakreclineclient != IntPtr.Zero) 1175ppfsparabreakingsession = IntPtr.Zero; 1183ppfsparabreakingsession = IntPtr.Zero; 1192IntPtr pfsclient, // IN: client opaque data 1193IntPtr pfsparabreakingsession) // IN: session to destroy 1205IntPtr pfsclient, // IN: client opaque data 1206IntPtr nmp, // IN: name of paragraph 1230IntPtr pfsclient, // IN: client opaque data 1231IntPtr nmp, // IN: name of paragraph 1258IntPtr pfsclient, // IN: client opaque data 1259IntPtr nmp, // IN: name of paragraph 1263IntPtr* rgnmftn, // OUT: array of footnote names in the range 1272IntPtr pfsclient, // IN: client opaque data 1273IntPtr pfsparaclient, // IN: 1274IntPtr nmp, // IN: name of paragraph 1278out IntPtr pfsdropc, // OUT: pointer to drop cap created by client 1287pfsdropc = IntPtr.Zero; 1292IntPtr pfsclient, // IN: client opaque data 1293IntPtr pfsdropc, // IN: pointer to drop cap 1294IntPtr nmp, // IN: para name 1309IntPtr pfsclient, // IN: client opaque data 1310IntPtr pfsdropc) // IN: pointer to drop cap created by client 1315internal int FormatBottomText(IntPtr pfsclient, // IN: client opaque data 1316IntPtr pfsparaclient, // IN: 1317IntPtr nmp, // IN: name of paragraph 1320IntPtr pfslineLast, // IN: last formatted line 1322out IntPtr pmcsclientOut) // OUT: margin collapsing state at bottom of text 1339pmcsclientOut = IntPtr.Zero; 1344pmcsclientOut = IntPtr.Zero; 1350pmcsclientOut = IntPtr.Zero; 1357IntPtr pfsclient, // IN: client opaque data 1358IntPtr pfsparaclient, // IN: 1359IntPtr nmp, // IN: name of paragraph 1362IntPtr pbrlineIn, // IN: client's line break record 1375out IntPtr pfsline, // OUT: pointer to line created by client 1377out IntPtr ppbrlineOut, // OUT: client's line break record 1402pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1409pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1417IntPtr pfsclient, // IN: client opaque data 1418IntPtr pfsparaclient, // IN: 1419IntPtr nmp, // IN: name of paragraph 1422IntPtr pbrlineIn, // IN: client's line break record 1435out IntPtr pfsline, // OUT: pointer to line created by client 1437out IntPtr ppbrlineOut, // OUT: client's line break record 1461pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = 0; 1468pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = 0; 1476IntPtr pfsclient, // IN: client opaque data 1477IntPtr pfsparabreakingsession, // IN: current session 1479IntPtr pbrlineIn, // IN: client's line break record 1489IntPtr lineVariantRestriction, // IN: line variant restriction pointer 1504if(pbrlineIn != IntPtr.Zero) 1560rgfslinevariant[breakIndex].pfsbreakreclineclient = IntPtr.Zero; 1600IntPtr pfsclient, // IN: client opaque data 1601IntPtr pfsparaclient, // IN: 1602IntPtr nmp, // IN: name of paragraph 1605IntPtr pbrlineIn, // IN: client's line break record to start formatting 1619out IntPtr pfsline, // OUT: pointer to line created by client 1620out IntPtr ppbrlineOut, // OUT: client's line break record 1645pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1652pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1660IntPtr pfsclient, // IN: client opaque data 1661IntPtr pfsline) // IN: pointer to line created by client 1669IntPtr pfsclient, // IN: client opaque data 1670IntPtr pbrlineIn, // IN: client's forced break record to duplicate 1671out IntPtr pbrlineDup) // OUT: duplicated client's forced break record 1682pbrlineDup = IntPtr.Zero; 1688pbrlineDup = IntPtr.Zero; 1695IntPtr pfsclient, // IN: client opaque data 1696IntPtr pbrlineIn) // IN: client's forced break record to duplicate 1718IntPtr pfsclient, // IN: client opaque data 1728internal int GetDvrSuppressibleBottomSpace(IntPtr pfsclient, // IN: client opaque data 1729IntPtr pfsparaclient, // IN: 1730IntPtr pfsline, // IN: pointer to line created by client 1764IntPtr pfsclient, // IN: client opaque data 1765IntPtr pfsparaclient, // IN: 1766IntPtr nmp, // IN: name of paragraph 1793IntPtr pfsclient, // IN: client opaque data 1794IntPtr nmp, // IN: name of paragraph 1821IntPtr pfsclient, // IN: client opaque data 1822IntPtr nmp, // IN: name of paragraph 1830IntPtr pfsclient, // IN: client opaque data 1831IntPtr pfsparaclient, // IN: 1832IntPtr nmp, // IN: name of paragraph 1859IntPtr pfsclient, // IN: client opaque data 1860IntPtr pfsparaclient, // IN: 1861IntPtr nmp, // IN: name of paragraph 1878out IntPtr pmcsclientAfterPara, // OUT: margin collapsing state after parag. 1888pmcsclientAfterPara = IntPtr.Zero; 1893IntPtr pfsclient, // IN: client opaque data 1894IntPtr pfsparaclient, // IN: 1895IntPtr nmp, // IN: name of paragraph 1911IntPtr pmcsclientAfterPara, // IN: margin collapsing state after paragraph 1922IntPtr pfsclient, // IN: client opaque data 1931IntPtr pfsclient, // IN: client opaque data 1932IntPtr nmp, // IN: name of paragraph 1964IntPtr pfsclient, // IN: client opaque data 1965IntPtr nmp, // IN: name of paragraph 1968IntPtr* rgnmpAttachedObject, // OUT: array of floater names 2024IntPtr pfsclient, // IN: client opaque data 2025IntPtr pfsline, // IN: pointer to line created by client 2026IntPtr nmp, // IN: name of paragraph 2078IntPtr pfsclient, // IN: client opaque data 2079IntPtr pfsline, // IN: pointer to line created by client 2080IntPtr nmp, // IN: name of paragraph 2086IntPtr* rgnmpAttachedObject, // OUT: array of floater names 2137IntPtr pfsclient, // IN: client opaque data 2138IntPtr nmp, // IN: name of text paragraph 2139IntPtr nmpObject, // IN: name of figure 2165IntPtr pfsclient, // IN: client opaque data 2166IntPtr pfsparaclient, // IN: 2167IntPtr pfsparaclientFigure, // IN: 2168IntPtr pfsline, // IN: pointer to line created by client 2169IntPtr nmpFigure, // IN: figure's name 2171IntPtr pfsfmtlinein, // IN: input parameters needed to reformat the line. 2210IntPtr pfsclient, // IN: client opaque data 2211IntPtr nmFloater, // IN: name of the floater 2238IntPtr pfsclient, // IN: client opaque data 2239IntPtr pfsparaclient, // IN: 2240IntPtr pfsbrkFloaterContentIn, // IN: break record---use if !NULL 2242IntPtr nmFloater, // IN: name of floater 2243IntPtr pftnrej, // IN: 2253out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 2254out IntPtr pbrkrecpara, // OUT: pointer to the floater content break record 2275fsfmtr = new PTS.FSFMTR(); pfsFloatContent = pbrkrecpara = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2281fsfmtr = new PTS.FSFMTR(); pfsFloatContent = pbrkrecpara = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2288IntPtr pfsclient, // IN: client opaque data 2289IntPtr pfsparaclient, // IN: 2290IntPtr nmFloater, // IN: name of floater 2297out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 2318pfsFloatContent = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2325pfsFloatContent = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2332IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2333IntPtr pfsparaclient, // IN: 2334IntPtr nmFloater, // IN: name of floater 2376IntPtr pfsparaclient, // IN: 2377IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2378IntPtr nmFloater, // IN: name of floater 2414IntPtr pfsFloaterContent) // IN: opaque for PTS pointer to floater content 2429IntPtr pfsFloaterContentOld, // IN: 2430IntPtr pfsFloaterContentNew, // IN: 2470IntPtr pfsFloaterContent) // IN: opaque for PTS pointer to floater content 2484IntPtr pfsclient, // IN: client context 2485IntPtr pfsbrkFloaterContent, // IN: pointer to break record 2486out IntPtr pfsbrkFloaterContentDup) // OUT pointer to duplicate break record 2501IntPtr pfsclient, // IN: client context 2502IntPtr pfsbrkFloaterContent) // IN: pointer to break record 2517IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2549IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2564IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2577IntPtr pfsFloaterContentOld, // IN: 2578IntPtr pfsFloaterContentNew) // IN: 2593IntPtr pfsclient, // IN: client context 2594IntPtr pfsparaclient, // IN: 2595IntPtr nmFloater, // IN: name of floater 2597IntPtr pmcsclientIn, // IN: input opaque to PTS MCSCLIENT 2598out IntPtr pmcsclientOut) // OUT: MCSCLIENT that floater will return to track 2606if (pmcsclientIn != IntPtr.Zero) 2615pmcsclientOut = IntPtr.Zero; 2621pmcsclientOut = IntPtr.Zero; 2628IntPtr pfsclient, // IN: client context 2629IntPtr pfsparaclient, // IN: 2630IntPtr nmFloater, // IN: name of floater 2632IntPtr pmcsclientIn, // IN: margin collapsing state 2642if (pmcsclientIn != IntPtr.Zero) 2668IntPtr pfsclient, // IN: client opaque data 2669IntPtr pfsc, // IN: FS context 2670IntPtr pfscbkobj, // IN: callbacks (FSCBKOBJ) 2673out IntPtr pfssobjc) // OUT: object context 2675pfssobjc = (IntPtr)(idobj + _objectContextOffset); 2679IntPtr pfssobjc) // IN: object context 2686IntPtr pfssobjc, // IN: object context 2687IntPtr pfsparaclient, // IN: 2688IntPtr pfsobjbrk, // IN: break record---use if !NULL 2690IntPtr nmp, // IN: name of paragraph---use if break record is NULL 2692IntPtr pftnrej, // IN: 2693IntPtr pfsgeom, // IN: pointer to geometry 2698IntPtr pmcsclientIn, // IN: input margin collapsing state 2705out IntPtr pfspara, // OUT: pointer to the para data 2706out IntPtr pbrkrecpara, // OUT: pointer to the para break record 2709out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2723if (pmcsclientIn != IntPtr.Zero) 2734fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 2741fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 2750IntPtr pfssobjc, // IN: object context 2751IntPtr pfsparaclient, // IN: 2752IntPtr nmp, // IN: name of paragraph 2754IntPtr pfsgeom, // IN: pointer to geometry 2760IntPtr pmcsclientIn, // IN: input margin collapsing state 2764out IntPtr pfspara, // OUT: pointer to the para data 2767out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2780if (pmcsclientIn != IntPtr.Zero) 2791pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2799pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2808IntPtr pfspara, // IN: pointer to the para data 2809IntPtr pfsparaclient, // IN: 2810IntPtr nmp, // IN: name of paragraph 2812IntPtr pfsgeom, // IN: pointer to geometry 2818IntPtr pmcsclientIn, // IN: input margin collapsing state 2824out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2837if (pmcsclientIn != IntPtr.Zero) 2849pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2857pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2866IntPtr pfspara, // IN: pointer to the para data 2867IntPtr pfsparaclient, // IN: 2868IntPtr pfsgeom, // IN: pointer to geometry 2893IntPtr pfsparaclientOld, // IN: 2894IntPtr pfsparaOld, // IN: pointer to the old para data 2895IntPtr pfsparaclientNew, // IN: 2896IntPtr pfsparaNew, // IN: pointer to the new para data 2905IntPtr pfspara) // IN: pointer to the para data 2911IntPtr pfspara) // IN: pointer to the para data 2917IntPtr pfssobjc, // IN: object context 2918IntPtr pfsbrkrecparaOrig, // IN: pointer to the para break record 2919out IntPtr pfsbrkrecparaDup) // OUT: pointer to the duplicate break record 2925IntPtr pfssobjc, // IN: object context 2926IntPtr pfsobjbrk) // IN: pointer to the para break record 2932IntPtr pfspara, // IN: pointer to the para data 2943IntPtr pfspara, // IN: pointer to the para data 2949IntPtr pfspara, // IN: pointer to the para data 2960internal int SubtrackShiftVertical(IntPtr pfspara, // IN: pointer to the para data 2961IntPtr pfsparaclient, // IN: 2962IntPtr pfsshift, // IN: pointer to the shift data 2972IntPtr pfsparaOld, // IN: pointer to the old para data 2973IntPtr pfsparaNew) // IN: pointer to the new para data 2983IntPtr pfsclient, // IN: client opaque data 2984IntPtr pfsc, // IN: FS context 2985IntPtr pfscbkobj, // IN: callbacks (FSCBKOBJ) 2988out IntPtr pfssobjc) // OUT: object context 2990pfssobjc = (IntPtr)(idobj + _objectContextOffset + 1); 2994IntPtr pfssobjc) // IN: object context 3001IntPtr pfssobjc, // IN: object context 3002IntPtr pfsparaclient, // IN: 3003IntPtr pfsobjbrk, // IN: break record---use if !NULL 3005IntPtr nmp, // IN: name of paragraph---use if break record is NULL 3007IntPtr pftnrej, // IN: 3008IntPtr pfsgeom, // IN: pointer to geometry 3013IntPtr pmcsclientIn, // IN: input margin collapsing state 3020out IntPtr pfspara, // OUT: pointer to the para data 3021out IntPtr pbrkrecpara, // OUT: pointer to the para break record 3024out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 3038if (pmcsclientIn != IntPtr.Zero) 3049fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 3056fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 3064IntPtr pfssobjc, // IN: object context 3065IntPtr pfsparaclient, // IN: 3066IntPtr nmp, // IN: name of paragraph 3068IntPtr pfsgeom, // IN: pointer to geometry 3074IntPtr pmcsclientIn, // IN: input margin collapsing state 3078out IntPtr pfspara, // OUT: pointer to the para data 3081out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 3094if (pmcsclientIn != IntPtr.Zero) 3106pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3114pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3123IntPtr pfspara, // IN: pointer to the para data 3124IntPtr pfsparaclient, // IN: 3125IntPtr nmp, // IN: name of paragraph 3127IntPtr pfsgeom, // IN: pointer to geometry 3133IntPtr pmcsclientIn, // IN: input margin collapsing state 3139out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 3152if (pmcsclientIn != IntPtr.Zero) 3164pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3172pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3180IntPtr pfspara, // IN: pointer to the para data 3181IntPtr pfsparaclient, // IN: 3182IntPtr pfsgeom, // IN: pointer to geometry 3191IntPtr pfsparaclientOld, // IN: 3192IntPtr pfsparaOld, // IN: pointer to the old para data 3193IntPtr pfsparaclientNew, // IN: 3194IntPtr pfsparaNew, // IN: pointer to the new para data 3203IntPtr pfspara) // IN: pointer to the para data 3209IntPtr pfspara) // IN: pointer to the para data 3215IntPtr pfssobjc, // IN: object context 3216IntPtr pfsbrkrecparaOrig, // IN: pointer to the para break record 3217out IntPtr pfsbrkrecparaDup) // OUT: pointer to the duplicate break record 3223IntPtr pfssobjc, // IN: object context 3224IntPtr pfsobjbrk) // IN: pointer to the para break record 3230IntPtr pfspara, // IN: pointer to the para data 3241IntPtr pfspara, // IN: pointer to the para data 3248IntPtr pfspara, // IN: pointer to the para data 3259IntPtr pfspara, // IN: pointer to the para data 3260IntPtr pfsparaclient, // IN: 3261IntPtr pfsshift, // IN: pointer to the shift data 3271IntPtr pfsparaOld, // IN: pointer to the old para data 3272IntPtr pfsparaNew) // IN: pointer to the new para data 3281IntPtr pfsclient, // IN: 3282IntPtr nmTable, // IN: 3309IntPtr pfsclient, // IN: 3310IntPtr pfsparaclientTable, // IN: 3311IntPtr nmTable, // IN: 3339IntPtr pfsclient, // IN: 3340IntPtr pfsparaclientTable, // IN: 3341IntPtr nmTable, // IN: 3374IntPtr pfsclient, // IN: 3375IntPtr pfsparaclientTable, // IN: 3376IntPtr nmTable, // IN: 3378IntPtr pmcsclientIn, // IN: 3379out IntPtr ppmcsclientOut) // OUT: 3391ppmcsclientOut = IntPtr.Zero; 3397ppmcsclientOut = IntPtr.Zero; 3404IntPtr pfsclient, // IN: 3405IntPtr nmTable, // IN: 3408out IntPtr pnmFirstHeaderRow) // OUT: 3421pnmFirstHeaderRow = IntPtr.Zero; 3428pnmFirstHeaderRow = IntPtr.Zero; 3435IntPtr pfsclient, // IN: 3436IntPtr nmTable, // IN: 3437IntPtr nmHeaderRow, // IN: 3440out IntPtr pnmNextHeaderRow) // OUT: 3453pnmNextHeaderRow = IntPtr.Zero; 3460pnmNextHeaderRow = IntPtr.Zero; 3467IntPtr pfsclient, // IN: 3468IntPtr nmTable, // IN: 3471out IntPtr pnmFirstFooterRow) // OUT: 3484pnmFirstFooterRow = IntPtr.Zero; 3491pnmFirstFooterRow = IntPtr.Zero; 3498IntPtr pfsclient, // IN: 3499IntPtr nmTable, // IN: 3500IntPtr nmFooterRow, // IN: 3503out IntPtr pnmNextFooterRow) // OUT: 3516pnmNextFooterRow = IntPtr.Zero; 3523pnmNextFooterRow = IntPtr.Zero; 3530IntPtr pfsclient, // IN: 3531IntPtr nmTable, // IN: 3533out IntPtr pnmFirstRow) // OUT: 3546pnmFirstRow = IntPtr.Zero; 3553pnmFirstRow = IntPtr.Zero; 3560IntPtr pfsclient, // IN: 3561IntPtr nmTable, // IN: 3562IntPtr nmRow, // IN: 3564out IntPtr pnmNextRow) // OUT: 3577pnmNextRow = IntPtr.Zero; 3584pnmNextRow = IntPtr.Zero; 3591IntPtr pfsclient, // IN: 3592IntPtr nmTable, // IN: 3631IntPtr pfsclient, // IN: 3632IntPtr nmTable, // IN: 3635out IntPtr pnmRowBeforeChange) // OUT: 3652pnmRowBeforeChange = IntPtr.Zero; 3660pnmRowBeforeChange = IntPtr.Zero; 3667IntPtr pfsclient, // IN: 3668IntPtr nmTable, // IN: 3669IntPtr nmRow, // IN: 3701IntPtr pfsclient, // IN: 3702IntPtr nmRow, // IN: 3703IntPtr nmCell, // IN: 3732IntPtr pfsclient, // IN: 3733IntPtr nmTable, // IN: 3760IntPtr pfsclient, // IN: 3761IntPtr nmRow, // IN: 3789IntPtr pfsclient, // IN: 3790IntPtr nmRow, // IN: 3792IntPtr* rgnmCell, // IN/OUT: 3816IntPtr pfsclient, // IN: 3817IntPtr pfsparaclient, // IN: 3818IntPtr nmRow, // IN: 3846IntPtr pfsclient, // IN: 3847IntPtr nmRow, // IN: 3849IntPtr* rgnmCell, // IN: 3850IntPtr* rgpfscell, // IN: 3886IntPtr pfsclient, // IN: 3887IntPtr pfsparaclientTable, // IN: table's para client 3888IntPtr pfsbrkcell, // IN: not NULL if cell broken from previous page/column 3889IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 3890IntPtr pfsFtnRejector, // IN: 3896out IntPtr ppfscell, // OUT: cell object 3897out IntPtr pfsbrkcellOut, // OUT: break if cell does not fit in dvrAvailable 3916ppfscell = IntPtr.Zero; 3917pfsbrkcellOut = IntPtr.Zero; 3925ppfscell = IntPtr.Zero; 3926pfsbrkcellOut = IntPtr.Zero; 3934IntPtr pfsclient, // IN: 3935IntPtr pfsparaclientTable, // IN: table's para client 3936IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 3939out IntPtr ppfscell, // OUT: cell object 3961ppfscell = IntPtr.Zero; 3969ppfscell = IntPtr.Zero; 3979IntPtr pfscell, // IN/OUT: cell object 3980IntPtr pfsparaclientTable, // IN: table's para client 3981IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 4023IntPtr pfscellOld, 4024IntPtr pfscellNew, 4033IntPtr pfscell) // IN:OUT: cell object 4039IntPtr pfscell, // IN/OUT: cell object 4040IntPtr pfsparaclientTable, // IN: table's para client 4041IntPtr pfsbrkcell, // IN: not NULL if cell broken from previous page/column 4042IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 4081IntPtr pfsclient, // IN: 4082IntPtr pfsbrkcell, // IN: 4083out IntPtr ppfsbrkcellDup) // OUT: 4089IntPtr pfsclient, // IN: 4090IntPtr pfsbrkcell) // IN: 4095IntPtr pfsCell) // IN: 4119IntPtr pfsCell, // IN: 4146IntPtr pfscell, // IN: 4174IntPtr pfscellOld, // IN: opaque to PTS old paragraph client 4175IntPtr pfscellNew) // IN: opaque to PTS new paragraph client
MS\Internal\PtsHost\PtsPage.cs (23)
55_ptsPage = new SecurityCriticalDataForSet<IntPtr>(IntPtr.Zero); 301IntPtr ptsPage; 306_ptsPage.Value = IntPtr.Zero; 398IntPtr brIn = (breakRecord != null) ? breakRecord.BreakRecord : IntPtr.Zero; 402IntPtr brOut; 403IntPtr ptsPage; 408_ptsPage.Value = IntPtr.Zero; 409brOut = IntPtr.Zero; 416if (brOut != IntPtr.Zero) 421_breakRecord = new PageBreakRecord(PtsContext, new SecurityCriticalDataForSet<IntPtr>(brOut), (breakRecord != null) ? breakRecord.PageNumber + 1 : 1); 459IntPtr brIn = (breakRecord != null) ? breakRecord.BreakRecord : IntPtr.Zero; 463IntPtr brOut; 475if (brOut != IntPtr.Zero) 480_breakRecord = new PageBreakRecord(PtsContext, new SecurityCriticalDataForSet<IntPtr>(brOut), (breakRecord != null) ? breakRecord.PageNumber + 1 : 1); 678internal IntPtr PageHandle { get { return _ptsPage.Value; } } 728_ptsPage.Value = IntPtr.Zero; 1443if (_ptsPage.Value != IntPtr.Zero) 1446_ptsPage.Value = IntPtr.Zero; 1464return (_ptsPage.Value == IntPtr.Zero); 1517private SecurityCriticalDataForSet<IntPtr> _ptsPage;
MS\Internal\PtsHost\RowParagraph.cs (6)
85out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 88paraClientHandle = IntPtr.Zero; 191IntPtr* rgnmCell, 192IntPtr* rgpfsCell, 203if(rgpfsCell[index] != IntPtr.Zero) 222IntPtr* rgnmCell,
MS\Internal\PtsHost\Section.cs (18)
152IntPtr* rgnms, 176out IntPtr nmsNext) 179nmsNext = IntPtr.Zero; 238out IntPtr nmSegment) 276IntPtr pfsbrpagePrelim, 283out IntPtr nmsHeader) 289nmsHeader = IntPtr.Zero; 320IntPtr pfsbrpagePrelim, 327out IntPtr nmsFooter) 333nmsFooter = IntPtr.Zero; 380out IntPtr nmsEndnotes) 383nmsEndnotes = IntPtr.Zero; 399out IntPtr nmsEndnoteSeparator, 400out IntPtr nmsEndnoteContSeparator, 401out IntPtr nmsEndnoteContNotice) 403nmsEndnoteSeparator = IntPtr.Zero; 404nmsEndnoteContSeparator = IntPtr.Zero; 405nmsEndnoteContNotice = IntPtr.Zero;
MS\Internal\PtsHost\Segment.cs (3)
31out IntPtr firstParaName); 48out IntPtr nextParaName); 65out IntPtr nmpBeforeChange);
MS\Internal\PtsHost\SubpageParaClient.cs (4)
52if (_paraHandle.Value != IntPtr.Zero) 55_paraHandle.Value = IntPtr.Zero; 612internal ReadOnlyCollection<ParagraphResult> GetParagraphResultsFromColumn(IntPtr pfstrack, Vector parentOffset, out bool hasTextContent) 645internal TextContentRange GetTextContentRangeFromColumn(IntPtr pfstrack)
MS\Internal\PtsHost\SubpageParagraph.cs (29)
95out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 114IntPtr pbrkrecIn, // IN: break record---use if !NULL 116IntPtr footnoteRejector, // IN: 126out IntPtr pfspara, // OUT: pointer to the para data 127out IntPtr pbrkrecOut, // OUT: pointer to the para break record 130out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 153if (mcs != null && pbrkrecIn != IntPtr.Zero) 183if (pbrkrecIn == IntPtr.Zero) 249if (pbrkrecIn == IntPtr.Zero) // if first chunk 256if (pmcsclientOut != IntPtr.Zero) 260pmcsclientOut = IntPtr.Zero; 280pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 282if (pmcsclientOut == IntPtr.Zero) // if last chunk 310paraClient.SetChunkInfo(pbrkrecIn == IntPtr.Zero, pbrkrecOut == IntPtr.Zero); 327out IntPtr pfspara, // OUT: pointer to the para data 330out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 420if (pmcsclientOut != IntPtr.Zero) 424pmcsclientOut = IntPtr.Zero; 427pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 457Debug.Assert(pmcsclientOut == IntPtr.Zero); 458pfspara = IntPtr.Zero; 478IntPtr pfspara, // IN: pointer to the para data 491out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 579if (pmcsclientOut != IntPtr.Zero) 583pmcsclientOut = IntPtr.Zero; 586pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 616Debug.Assert(pmcsclientOut == IntPtr.Zero); 617pfspara = IntPtr.Zero;
MS\Internal\PtsHost\TableParaClient.cs (32)
111IntPtr[] arrayFsCell; 133if (arrayFsCell[iC] == IntPtr.Zero) 336IntPtr[] arrayFsCell; 347if (arrayFsCell[iC] == IntPtr.Zero) 384IntPtr[] arrayFsCell; 395if (arrayFsCell[iC] == IntPtr.Zero) 460IntPtr[] arrayFsCell; 469if (arrayFsCell[iC] == IntPtr.Zero) 550IntPtr[] arrayFsCell; 560if (arrayFsCell[iC] == IntPtr.Zero) 625IntPtr[] arrayFsCell; 636if (arrayFsCell[iC] == IntPtr.Zero) 746IntPtr[] arrayFsCell; 757if(arrayFsCell[iC] != IntPtr.Zero && 842IntPtr[] arrayFsCell; 853if (arrayFsCell[iC] == IntPtr.Zero) 909IntPtr[] arrayFsCell; 920if (arrayFsCell[iC] == IntPtr.Zero) 966IntPtr[] arrayFsCell; 980if (arrayFsCell[iC] == IntPtr.Zero) 1045IntPtr[] arrayFsCell; 1059if (arrayFsCell[iC] == IntPtr.Zero) 1428IntPtr pfstablerow, 1429out IntPtr[] arrayFsCell, 1441arrayFsCell = new IntPtr[tableRowDetails.cCells]; 1448fixed (IntPtr * rgFsCell = arrayFsCell) 1532IntPtr pfstablerow, 1537IntPtr[] arrayFsCell; 1558arrayFsCell[iC] == IntPtr.Zero 1638IntPtr pfstablerow, 1644IntPtr[] arrayFsCell; 1676if (arrayFsCell[iC] == IntPtr.Zero)
MS\Internal\PtsHost\TableParagraph.cs (22)
139out IntPtr pfsparaclient) // OUT: opaque to PTS paragraph client 182IntPtr pmcsclientIn, 183out IntPtr ppmcsclientOut) 185ppmcsclientOut = IntPtr.Zero; 189if (pmcsclientIn != IntPtr.Zero) 208out IntPtr pnmFirstHeaderRow) 211pnmFirstHeaderRow = IntPtr.Zero; 223IntPtr nmHeaderRow, 225out IntPtr pnmNextHeaderRow) 228pnmNextHeaderRow = IntPtr.Zero; 240out IntPtr pnmFirstFooterRow) 243pnmFirstFooterRow = IntPtr.Zero; 255IntPtr nmFooterRow, 257out IntPtr pnmNextFooterRow) 260pnmNextFooterRow = IntPtr.Zero; 270out IntPtr pnmFirstRow) 301pnmFirstRow = IntPtr.Zero; 312IntPtr nmRow, 314out IntPtr pnmNextRow) 376pnmNextRow = IntPtr.Zero; 408out IntPtr pnmRowBeforeChange) // OUT: 413pnmRowBeforeChange = IntPtr.Zero;
MS\Internal\PtsHost\TextParaClient.cs (4)
529IntPtr breakRecLine = IntPtr.Zero; 988IntPtr breakRecLine = IntPtr.Zero;
MS\Internal\PtsHost\TextParagraph.cs (15)
131out IntPtr paraClientHandle) 266out IntPtr mcsClient) 272mcsClient = IntPtr.Zero; 392IntPtr lineVariantRestriction, 502IntPtr pbrlineIn, 516out IntPtr lineHandle, 518out IntPtr ppbrlineOut, 567ppbrlineOut = IntPtr.Zero; 689IntPtr pbrlineIn, 702out IntPtr lineHandle, 704out IntPtr ppbrlineOut, 751ppbrlineOut = IntPtr.Zero; 1303internal void FormatLineCore(Line line, IntPtr pbrLineIn, Line.FormattingContext ctx, int dcp, int width, bool firstLine, int dcpLine) 1336internal void FormatLineCore(Line line, IntPtr pbrLineIn, Line.FormattingContext ctx, int dcp, int width, int trackWidth, bool firstLine, int dcpLine) 1342if(pbrLineIn != IntPtr.Zero)
MS\Internal\PtsHost\UIElementParagraph.cs (14)
98out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 167IntPtr pbrkrecIn, // IN: break record---use if !IntPtr.Zero 169IntPtr footnoteRejector, // IN: 179out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 180out IntPtr pbrkrecOut, // OUT: pointer to the floater content break record 201pbrkrecOut = IntPtr.Zero; 202pfsFloatContent = IntPtr.Zero; 237pfsFloatContent = IntPtr.Zero; 255pbrkrecOut = IntPtr.Zero; 271out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 291pfsFloatContent = IntPtr.Zero; 337IntPtr pfsFloatContent, // IN: floater content (in UIElementParagraph, this is an alias to the paraClient) 357out IntPtr pmcsclientOut) // OUT: MCSCLIENT that floater will return to track 369pmcsclientOut = IntPtr.Zero;
MS\Internal\PtsHost\UnmanagedHandle.cs (3)
46_handle = IntPtr.Zero; 54internal IntPtr Handle 61private IntPtr _handle;
MS\Internal\WindowsRuntime\Generated\Windows.Data.Text.cs (176)
38public IntPtr ThisPtr => _default.ThisPtr; 45public static AlternateWordForm FromAbi(IntPtr thisPtr) 47if (thisPtr == IntPtr.Zero) return null; 57public static bool operator ==(AlternateWordForm x, AlternateWordForm y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 78global::System.Runtime.InteropServices.CustomQueryInterfaceResult global::System.Runtime.InteropServices.ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv) 80ppv = IntPtr.Zero; 256public IntPtr ThisPtr => _default.ThisPtr; 263public static WordSegment FromAbi(IntPtr thisPtr) 265if (thisPtr == IntPtr.Zero) return null; 275public static bool operator ==(WordSegment x, WordSegment y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 296global::System.Runtime.InteropServices.CustomQueryInterfaceResult global::System.Runtime.InteropServices.ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv) 298ppv = IntPtr.Zero; 322public IntPtr ThisPtr => _default.ThisPtr; 335public unsafe new IntPtr CreateWithLanguage(string language) 338IntPtr __retval = default; 354IntPtr ptr = (_IWordsSegmenterFactory.Instance.CreateWithLanguage(language)); 368public static WordsSegmenter FromAbi(IntPtr thisPtr) 370if (thisPtr == IntPtr.Zero) return null; 380public static bool operator ==(WordsSegmenter x, WordsSegmenter y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 403global::System.Runtime.InteropServices.CustomQueryInterfaceResult global::System.Runtime.InteropServices.ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv) 405ppv = IntPtr.Zero; 431public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 432public static global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm FromAbi(IntPtr thisPtr) => global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm.FromAbi(thisPtr); 433public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef(); 435public static (int length, IntPtr data) GetAbiArray(object box) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm>.GetAbiArray(box); 437public static (int length, IntPtr data) FromManagedArray(global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm[] array) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm>.FromManagedArray(array, (o) => FromManaged(o)); 440public static void DisposeAbi(IntPtr abi) => MarshalInspectable.DisposeAbi(abi); 456public static readonly IntPtr AbiToProjectionVftablePtr; 466var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 3); 467Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 468AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 471private static unsafe int Do_Abi_get_AlternateText_1(IntPtr thisPtr, out IntPtr value) 490private static unsafe int Do_Abi_get_NormalizationFormat_2(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateNormalizationFormat value) 509private static unsafe int Do_Abi_get_SourceTextSegment_0(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.TextSegment value) 529public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 534public IntPtr ThisPtr => _obj.ThisPtr; 547IntPtr __retval = default; 583public unsafe delegate int get_SourceTextSegment_0(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.TextSegment value); 584public unsafe delegate int get_NormalizationFormat_2(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateNormalizationFormat value); 614public static readonly IntPtr AbiToProjectionVftablePtr; 638var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 17); 639Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 640AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 643private static unsafe int Do_Abi_GetCodepointFromSurrogatePair_0(IntPtr thisPtr, uint highSurrogate, uint lowSurrogate, out uint codepoint) 662private static unsafe int Do_Abi_GetSurrogatePairFromCodepoint_1(IntPtr thisPtr, uint codepoint, out ushort highSurrogate, out ushort lowSurrogate) 684private static unsafe int Do_Abi_IsHighSurrogate_2(IntPtr thisPtr, uint codepoint, out byte value) 703private static unsafe int Do_Abi_IsLowSurrogate_3(IntPtr thisPtr, uint codepoint, out byte value) 722private static unsafe int Do_Abi_IsSupplementary_4(IntPtr thisPtr, uint codepoint, out byte value) 741private static unsafe int Do_Abi_IsNoncharacter_5(IntPtr thisPtr, uint codepoint, out byte value) 760private static unsafe int Do_Abi_IsWhitespace_6(IntPtr thisPtr, uint codepoint, out byte value) 779private static unsafe int Do_Abi_IsAlphabetic_7(IntPtr thisPtr, uint codepoint, out byte value) 798private static unsafe int Do_Abi_IsCased_8(IntPtr thisPtr, uint codepoint, out byte value) 817private static unsafe int Do_Abi_IsUppercase_9(IntPtr thisPtr, uint codepoint, out byte value) 836private static unsafe int Do_Abi_IsLowercase_10(IntPtr thisPtr, uint codepoint, out byte value) 855private static unsafe int Do_Abi_IsIdStart_11(IntPtr thisPtr, uint codepoint, out byte value) 874private static unsafe int Do_Abi_IsIdContinue_12(IntPtr thisPtr, uint codepoint, out byte value) 893private static unsafe int Do_Abi_IsGraphemeBase_13(IntPtr thisPtr, uint codepoint, out byte value) 912private static unsafe int Do_Abi_IsGraphemeExtend_14(IntPtr thisPtr, uint codepoint, out byte value) 931private static unsafe int Do_Abi_GetNumericType_15(IntPtr thisPtr, uint codepoint, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.UnicodeNumericType value) 950private static unsafe int Do_Abi_GetGeneralCategory_16(IntPtr thisPtr, uint codepoint, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.UnicodeGeneralCategory value) 970public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 975public IntPtr ThisPtr => _obj.ThisPtr; 1108public unsafe delegate int GetCodepointFromSurrogatePair_0(IntPtr thisPtr, uint highSurrogate, uint lowSurrogate, out uint codepoint); 1109public unsafe delegate int GetSurrogatePairFromCodepoint_1(IntPtr thisPtr, uint codepoint, out ushort highSurrogate, out ushort lowSurrogate); 1110public unsafe delegate int IsHighSurrogate_2(IntPtr thisPtr, uint codepoint, out byte value); 1111public unsafe delegate int IsLowSurrogate_3(IntPtr thisPtr, uint codepoint, out byte value); 1112public unsafe delegate int IsSupplementary_4(IntPtr thisPtr, uint codepoint, out byte value); 1113public unsafe delegate int IsNoncharacter_5(IntPtr thisPtr, uint codepoint, out byte value); 1114public unsafe delegate int IsWhitespace_6(IntPtr thisPtr, uint codepoint, out byte value); 1115public unsafe delegate int IsAlphabetic_7(IntPtr thisPtr, uint codepoint, out byte value); 1116public unsafe delegate int IsCased_8(IntPtr thisPtr, uint codepoint, out byte value); 1117public unsafe delegate int IsUppercase_9(IntPtr thisPtr, uint codepoint, out byte value); 1118public unsafe delegate int IsLowercase_10(IntPtr thisPtr, uint codepoint, out byte value); 1119public unsafe delegate int IsIdStart_11(IntPtr thisPtr, uint codepoint, out byte value); 1120public unsafe delegate int IsIdContinue_12(IntPtr thisPtr, uint codepoint, out byte value); 1121public unsafe delegate int IsGraphemeBase_13(IntPtr thisPtr, uint codepoint, out byte value); 1122public unsafe delegate int IsGraphemeExtend_14(IntPtr thisPtr, uint codepoint, out byte value); 1123public unsafe delegate int GetNumericType_15(IntPtr thisPtr, uint codepoint, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.UnicodeNumericType value); 1124public unsafe delegate int GetGeneralCategory_16(IntPtr thisPtr, uint codepoint, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.UnicodeGeneralCategory value); 1140public static readonly IntPtr AbiToProjectionVftablePtr; 1150var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 3); 1151Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 1152AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 1155private static unsafe int Do_Abi_get_AlternateForms_2(IntPtr thisPtr, out IntPtr value) 1174private static unsafe int Do_Abi_get_SourceTextSegment_1(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.TextSegment value) 1193private static unsafe int Do_Abi_get_Text_0(IntPtr thisPtr, out IntPtr value) 1213public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 1218public IntPtr ThisPtr => _obj.ThisPtr; 1231IntPtr __retval = default; 1258IntPtr __retval = default; 1274public unsafe delegate int get_SourceTextSegment_1(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.TextSegment value); 1291public static readonly IntPtr AbiToProjectionVftablePtr; 1302var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4); 1303Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 1304AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 1307private static unsafe int Do_Abi_GetTokenAt_1(IntPtr thisPtr, IntPtr text, uint startIndex, out IntPtr result) 1326private static unsafe int Do_Abi_GetTokens_2(IntPtr thisPtr, IntPtr text, out IntPtr result) 1345private static unsafe int Do_Abi_Tokenize_3(IntPtr thisPtr, IntPtr text, uint startIndex, IntPtr handler) 1361private static unsafe int Do_Abi_get_ResolvedLanguage_0(IntPtr thisPtr, out IntPtr value) 1381public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 1386public IntPtr ThisPtr => _obj.ThisPtr; 1398IntPtr __retval = default; 1415IntPtr __retval = default; 1450IntPtr __retval = default; 1466public unsafe delegate int GetTokenAt_1(IntPtr thisPtr, IntPtr text, uint startIndex, out IntPtr result); 1467public unsafe delegate int GetTokens_2(IntPtr thisPtr, IntPtr text, out IntPtr result); 1468public unsafe delegate int Tokenize_3(IntPtr thisPtr, IntPtr text, uint startIndex, IntPtr handler); 1482public static readonly IntPtr AbiToProjectionVftablePtr; 1490var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); 1491Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 1492AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 1495private static unsafe int Do_Abi_CreateWithLanguage_0(IntPtr thisPtr, IntPtr language, out IntPtr result) 1515public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 1520public IntPtr ThisPtr => _obj.ThisPtr; 1532IntPtr __retval = default; 1549public unsafe delegate int CreateWithLanguage_0(IntPtr thisPtr, IntPtr language, out IntPtr result); 1555public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 1556public static global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment FromAbi(IntPtr thisPtr) => global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment.FromAbi(thisPtr); 1557public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef(); 1559public static (int length, IntPtr data) GetAbiArray(object box) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment>.GetAbiArray(box); 1561public static (int length, IntPtr data) FromManagedArray(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment[] array) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment>.FromManagedArray(array, (o) => FromManaged(o)); 1564public static void DisposeAbi(IntPtr abi) => MarshalInspectable.DisposeAbi(abi); 1571private unsafe delegate int Abi_Invoke(IntPtr thisPtr, IntPtr precedingWords, IntPtr words); 1574public static readonly IntPtr AbiToProjectionVftablePtr; 1584var nativeVftbl = ComWrappersSupport.AllocateVtableMemory(typeof(WordSegmentsTokenizingHandler), Marshal.SizeOf<global::WinRT.Interop.IDelegateVftbl>()); 1594public static IntPtr GetAbi(IObjectReference value) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegmentsTokenizingHandler>.GetAbi(value); 1596public static unsafe global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegmentsTokenizingHandler FromAbi(IntPtr nativeDelegate) 1614IntPtr ThisPtr = _nativeDelegate.ThisPtr; 1633public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegmentsTokenizingHandler managedDelegate) => CreateMarshaler(managedDelegate)?.GetRef() ?? IntPtr.Zero; 1637public static void DisposeAbi(IntPtr abi) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegmentsTokenizingHandler>.DisposeAbi(abi); 1639private static unsafe int Do_Abi_Invoke(IntPtr thisPtr, IntPtr precedingWords, IntPtr words) 1664public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 1665public static global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter FromAbi(IntPtr thisPtr) => global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter.FromAbi(thisPtr); 1666public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef(); 1668public static (int length, IntPtr data) GetAbiArray(object box) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter>.GetAbiArray(box); 1670public static (int length, IntPtr data) FromManagedArray(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter[] array) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter>.FromManagedArray(array, (o) => FromManaged(o)); 1673public static void DisposeAbi(IntPtr abi) => MarshalInspectable.DisposeAbi(abi);
MS\Internal\WindowsRuntime\Generated\Windows.Globalization.cs (99)
74public IntPtr ThisPtr => _default.ThisPtr; 87public unsafe new IntPtr CreateLanguage(string languageTag) 90IntPtr __retval = default; 106IntPtr ptr = (_ILanguageFactory.Instance.CreateLanguage(languageTag)); 140public static Language FromAbi(IntPtr thisPtr) 142if (thisPtr == IntPtr.Zero) return null; 152public static bool operator ==(Language x, Language y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 183global::System.Runtime.InteropServices.CustomQueryInterfaceResult global::System.Runtime.InteropServices.ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv) 185ppv = IntPtr.Zero; 230public static readonly IntPtr AbiToProjectionVftablePtr; 241var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4); 242Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 243AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 246private static unsafe int Do_Abi_get_DisplayName_1(IntPtr thisPtr, out IntPtr value) 265private static unsafe int Do_Abi_get_LanguageTag_0(IntPtr thisPtr, out IntPtr value) 284private static unsafe int Do_Abi_get_NativeName_2(IntPtr thisPtr, out IntPtr value) 303private static unsafe int Do_Abi_get_Script_3(IntPtr thisPtr, out IntPtr value) 323public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 328public IntPtr ThisPtr => _obj.ThisPtr; 341IntPtr __retval = default; 358IntPtr __retval = default; 375IntPtr __retval = default; 392IntPtr __retval = default; 417public static readonly IntPtr AbiToProjectionVftablePtr; 425var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); 426Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 427AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 430private static unsafe int Do_Abi_get_LayoutDirection_0(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Globalization.LanguageLayoutDirection value) 450public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 455public IntPtr ThisPtr => _obj.ThisPtr; 477public unsafe delegate int get_LayoutDirection_0(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Globalization.LanguageLayoutDirection value); 491public static readonly IntPtr AbiToProjectionVftablePtr; 499var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); 500Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 501AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 504private static unsafe int Do_Abi_GetExtensionSubtags_0(IntPtr thisPtr, IntPtr singleton, out IntPtr value) 524public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 529public IntPtr ThisPtr => _obj.ThisPtr; 541IntPtr __retval = default; 558public unsafe delegate int GetExtensionSubtags_0(IntPtr thisPtr, IntPtr singleton, out IntPtr value); 572public static readonly IntPtr AbiToProjectionVftablePtr; 580var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); 581Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 582AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 585private static unsafe int Do_Abi_CreateLanguage_0(IntPtr thisPtr, IntPtr languageTag, out IntPtr result) 605public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 610public IntPtr ThisPtr => _obj.ThisPtr; 622IntPtr __retval = default; 639public unsafe delegate int CreateLanguage_0(IntPtr thisPtr, IntPtr languageTag, out IntPtr result); 654public static readonly IntPtr AbiToProjectionVftablePtr; 663var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 2); 664Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 665AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 668private static unsafe int Do_Abi_IsWellFormed_0(IntPtr thisPtr, IntPtr languageTag, out byte result) 687private static unsafe int Do_Abi_get_CurrentInputMethodLanguageTag_1(IntPtr thisPtr, out IntPtr value) 707public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 712public IntPtr ThisPtr => _obj.ThisPtr; 741IntPtr __retval = default; 757public unsafe delegate int IsWellFormed_0(IntPtr thisPtr, IntPtr languageTag, out byte result); 771public static readonly IntPtr AbiToProjectionVftablePtr; 779var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); 780Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 781AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 784private static unsafe int Do_Abi_TrySetInputMethodLanguageTag_0(IntPtr thisPtr, IntPtr languageTag, out byte result) 804public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 809public IntPtr ThisPtr => _obj.ThisPtr; 837public unsafe delegate int TrySetInputMethodLanguageTag_0(IntPtr thisPtr, IntPtr languageTag, out byte result); 844public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 845public static global::MS.Internal.WindowsRuntime.Windows.Globalization.Language FromAbi(IntPtr thisPtr) => global::MS.Internal.WindowsRuntime.Windows.Globalization.Language.FromAbi(thisPtr); 846public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Globalization.Language obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef(); 848public static (int length, IntPtr data) GetAbiArray(object box) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Globalization.Language>.GetAbiArray(box); 850public static (int length, IntPtr data) FromManagedArray(global::MS.Internal.WindowsRuntime.Windows.Globalization.Language[] array) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Globalization.Language>.FromManagedArray(array, (o) => FromManaged(o)); 853public static void DisposeAbi(IntPtr abi) => MarshalInspectable.DisposeAbi(abi);
MS\Internal\WindowsRuntime\Generated\WinRT.cs (34)
44public static extern int CoDecrementMTAUsage(IntPtr cookie); 47public static extern unsafe int CoIncrementMTAUsage(IntPtr* cookie); 51public static extern bool FreeLibrary(IntPtr moduleHandle); 54public static extern IntPtr GetProcAddress(IntPtr moduleHandle, [MarshalAs(UnmanagedType.LPStr)] string functionName); 56public static T GetProcAddress<T>(IntPtr moduleHandle) 58IntPtr functionPtr = Platform.GetProcAddress(moduleHandle, typeof(T).Name); 59if (functionPtr == IntPtr.Zero) 67public static extern IntPtr LoadLibraryExW([MarshalAs(UnmanagedType.LPWStr)] string fileName, IntPtr fileHandle, uint flags); 70public static extern unsafe int RoGetActivationFactory(IntPtr runtimeClassId, ref Guid iid, IntPtr* factory); 75IntPtr* hstring); 80IntPtr* hstring_header, 81IntPtr* hstring); 84public static extern int WindowsDeleteString(IntPtr hstring); 87public static extern unsafe int WindowsDuplicateString(IntPtr sourceString, 88IntPtr* hstring); 91public static extern unsafe char* WindowsGetStringRawBuffer(IntPtr hstring, uint* length); 96public IntPtr Vftbl; 103IntPtr activatableClassId, 104out IntPtr activationFactory); 110readonly IntPtr _moduleHandle; 138_moduleHandle = Platform.LoadLibraryExW(System.IO.Path.Combine(_currentModuleDirectory, fileName), IntPtr.Zero, /* LOAD_WITH_ALTERED_SEARCH_PATH */ 8); 140if (_moduleHandle == IntPtr.Zero) 150if (_moduleHandle == IntPtr.Zero) 157var canUnloadNow = Platform.GetProcAddress(_moduleHandle, "DllCanUnloadNow"); 158if (canUnloadNow != IntPtr.Zero) 166IntPtr instancePtr; 179if ((_moduleHandle != IntPtr.Zero) && !Platform.FreeLibrary(_moduleHandle)) 209readonly IntPtr _mtaCookie; 215IntPtr mtaCookie; 224IntPtr instancePtr; 270Marshal.ThrowExceptionForHR(_IActivationFactory.Vftbl.ActivateInstance(_IActivationFactory.ThisPtr, out IntPtr instancePtr));
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.cs (6)
41public static TReturn MarshalDelegateInvoke<TDelegate, TReturn>(IntPtr thisPtr, Func<TDelegate, TReturn> invoke) 52public static void MarshalDelegateInvoke<T>(IntPtr thisPtr, Action<T> invoke) 94public static IObjectReference GetObjectReferenceForInterface(IntPtr externalComObject) 123Vtable = (IntPtr)ifaceAbiType.FindVftblType().GetField("AbiToProjectionVftablePtr", BindingFlags.Public | BindingFlags.Static).GetValue(null) 134Vtable = (IntPtr)compatibleIfaceAbiType.FindVftblType().GetField("AbiToProjectionVftablePtr", BindingFlags.Public | BindingFlags.Static).GetValue(null) 144Vtable = (IntPtr)obj.GetType().GetHelperType().GetField("AbiToProjectionVftablePtr", BindingFlags.Public | BindingFlags.Static).GetValue(null)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.net5.cs (13)
22public static unsafe InspectableInfo GetInspectableInfo(IntPtr pThis) 28public static object CreateRcwForComObject(IntPtr ptr) 33public static void RegisterObjectForInterface(object obj, IntPtr thisPtr) => TryRegisterObjectForInterface(obj, thisPtr); 35public static object TryRegisterObjectForInterface(object obj, IntPtr thisPtr) => ComWrappers.GetOrRegisterObjectForComInstance(thisPtr, CreateObjectFlags.TrackerObject, obj); 39IntPtr ccw = ComWrappers.GetOrCreateComInterfaceForObject(obj, CreateComInterfaceFlags.TrackerSupport); 43public static unsafe T FindObject<T>(IntPtr ptr) 46private static T FindDelegate<T>(IntPtr thisPtr) 51public static IntPtr AllocateVtableMemory(Type vtableType, int size) => RuntimeHelpers.AllocateTypeAssociatedMemory(vtableType, size); 66GetIUnknownImpl(out var qi, out var addRef, out var release); 107protected override object CreateObject(IntPtr externalComObject, CreateObjectFlags flags) 155Marshal.FreeCoTaskMem((IntPtr)_data);
MS\Internal\WindowsRuntime\Generated\WinRT\Context.cs (3)
13private static extern int CoGetObjectContext(ref Guid riid, out IntPtr ppv); 15public static IntPtr GetContextCallback() 18Marshal.ThrowExceptionForHR(CoGetObjectContext(ref riid, out IntPtr contextCallbackPtr));
MS\Internal\WindowsRuntime\Generated\WinRT\ExceptionHelpers.cs (19)
28private static extern int SetErrorInfo(uint dwReserved, IntPtr perrinfo); 30internal delegate int GetRestrictedErrorInfo(out IntPtr ppRestrictedErrorInfo); 33internal delegate int SetRestrictedErrorInfo(IntPtr pRestrictedErrorInfo); 36internal delegate int RoOriginateLanguageException(int error, IntPtr message, IntPtr langaugeException); 39internal delegate int RoReportUnhandledError(IntPtr pRestrictedErrorInfo); 44IntPtr winRTErrorModule = Platform.LoadLibraryExW("api-ms-win-core-winrt-error-l1-1-1.dll", IntPtr.Zero, (uint)DllImportSearchPath.System32); 45if (winRTErrorModule != IntPtr.Zero) 54winRTErrorModule = Platform.LoadLibraryExW("api-ms-win-core-winrt-error-l1-1-0.dll", IntPtr.Zero, (uint)DllImportSearchPath.System32); 55if (winRTErrorModule != IntPtr.Zero) 97Marshal.ThrowExceptionForHR(getRestrictedErrorInfo(out IntPtr restrictedErrorInfoPtr)); 99if (restrictedErrorInfoPtr != IntPtr.Zero) 149ex = Marshal.GetExceptionForHR(hr, iErrorInfo?.ThisPtr ?? (IntPtr)(-1)); 186IntPtr hstring; 190hstring = IntPtr.Zero; 209Marshal.ThrowExceptionForHR(getRestrictedErrorInfo(out IntPtr ppRestrictedErrorInfo)); 312Marshal.ThrowExceptionForHR(getRestrictedErrorInfo(out IntPtr restrictedErrorInfoPtr)); 314if (restrictedErrorInfoPtr != IntPtr.Zero)
MS\Internal\WindowsRuntime\Generated\WinRT\FundamentalMarshalers.cs (4)
16public static unsafe void CopyAbi(bool value, IntPtr dest) => *(byte*)dest.ToPointer() = GetAbi(value).value; 18public static unsafe void CopyManaged(bool arg, IntPtr dest) => *(byte*)dest.ToPointer() = FromManaged(arg).value; 29public static unsafe void CopyAbi(char value, IntPtr dest) => *(ushort*)dest.ToPointer() = GetAbi(value).value; 31public static unsafe void CopyManaged(char arg, IntPtr dest) => *(ushort*)dest.ToPointer() = FromManaged(arg).value;
MS\Internal\WindowsRuntime\Generated\WinRT\IInspectable.cs (12)
27internal delegate int _GetIids(IntPtr pThis, out uint iidCount, out Guid[] iids); 28internal delegate int _GetRuntimeClassName(IntPtr pThis, out IntPtr className); 29internal delegate int _GetTrustLevel(IntPtr pThis, out TrustLevel trustLevel); 37public static readonly IntPtr AbiToProjectionVftablePtr; 52private static int Do_Abi_GetIids(IntPtr pThis, out uint iidCount, out Guid[] iids) 68private unsafe static int Do_Abi_GetRuntimeClassName(IntPtr pThis, out IntPtr className) 83private static int Do_Abi_GetTrustLevel(IntPtr pThis, out TrustLevel trustLevel) 90public static IInspectable FromAbi(IntPtr thisPtr) => 94public IntPtr ThisPtr => _obj.ThisPtr; 107IntPtr __retval = default;
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\ExceptionErrorInfo.cs (63)
96internal delegate int _GetGuid(IntPtr thisPtr, out Guid guid); 97internal delegate int _GetBstr(IntPtr thisPtr, out IntPtr bstr); 106public static readonly IntPtr AbiToProjectionVftablePtr; 119var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<Vftbl>()); 120Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 121AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 124private static int Do_Abi_GetGuid_0(IntPtr thisPtr, out Guid guid) 139private static int Do_Abi_GetSource_1(IntPtr thisPtr, out IntPtr source) 141source = IntPtr.Zero; 157private static int Do_Abi_GetDescription_2(IntPtr thisPtr, out IntPtr description) 159description = IntPtr.Zero; 175private static int Do_Abi_GetHelpFile_3(IntPtr thisPtr, out IntPtr helpFile) 177helpFile = IntPtr.Zero; 193private static int Do_Abi_GetHelpFileContent_4(IntPtr thisPtr, out IntPtr helpFileContent) 195helpFileContent = IntPtr.Zero; 212public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 217public IntPtr ThisPtr => _obj.ThisPtr; 235IntPtr __retval = default; 239return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 249IntPtr __retval = default; 253return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 263IntPtr __retval = default; 267return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 277IntPtr __retval = default; 281return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 296internal delegate int _GetLanguageException(IntPtr thisPtr, out IntPtr languageException); 301public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 306public IntPtr ThisPtr => _obj.ThisPtr; 317IntPtr __return_value__ = IntPtr.Zero; 339internal delegate int _InterfaceSupportsErrorInfo(IntPtr thisPtr, ref Guid riid); 344public static readonly IntPtr AbiToProjectionVftablePtr; 353var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<Vftbl>()); 354Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 355AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 358private static int Do_Abi_InterfaceSupportsErrorInfo_0(IntPtr thisPtr, ref Guid guid) 372public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 377public IntPtr ThisPtr => _obj.ThisPtr; 398internal delegate int _GetErrorDetails(IntPtr thisPtr, out IntPtr description, out int error, out IntPtr restrictedDescription, out IntPtr capabilitySid); 399internal delegate int _GetReference(IntPtr thisPtr, out IntPtr reference); 406public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 411public IntPtr ThisPtr => _obj.ThisPtr; 426IntPtr _description = IntPtr.Zero; 427IntPtr _restrictedDescription = IntPtr.Zero; 428IntPtr _capabilitySid = IntPtr.Zero; 432description = _description != IntPtr.Zero ? Marshal.PtrToStringBSTR(_description) : string.Empty; 433restrictedDescription = _restrictedDescription != IntPtr.Zero ? Marshal.PtrToStringBSTR(_restrictedDescription) : string.Empty; 434capabilitySid = _capabilitySid != IntPtr.Zero ? Marshal.PtrToStringBSTR(_capabilitySid) : string.Empty; 446IntPtr __retval = default; 450return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty;
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\IContextCallback.cs (7)
20public IntPtr pUserDefined; 48IntPtr pThis, 53IntPtr pUnk); 57public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 62public IntPtr ThisPtr => _obj.ThisPtr; 73public IntPtr delegateHandle; 79Marshal.ThrowExceptionForHR(_obj.Vftbl.ContextCallback_4(ThisPtr, pfnCallback, pParam, ref riid, iMethod, IntPtr.Zero));
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\IUnknownVftbl.cs (5)
14public unsafe delegate int _QueryInterface(IntPtr pThis, ref Guid iid, out IntPtr vftbl); 15internal delegate uint _AddRef(IntPtr pThis); 16internal delegate uint _Release(IntPtr pThis); 23public static readonly IntPtr AbiToProjectionVftblPtr;
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\StandardDelegates.cs (34)
13internal delegate int _get_PropertyAsBoolean(IntPtr thisPtr, out byte value); 15internal delegate int _put_PropertyAsBoolean(IntPtr thisPtr, byte value); 17internal delegate int _get_PropertyAsChar(IntPtr thisPtr, out ushort value); 19internal delegate int _put_PropertyAsChar(IntPtr thisPtr, ushort value); 21internal delegate int _get_PropertyAsSByte(IntPtr thisPtr, out sbyte value); 23internal delegate int _put_PropertyAsSByte(IntPtr thisPtr, sbyte value); 25internal delegate int _get_PropertyAsByte(IntPtr thisPtr, out byte value); 27internal delegate int _put_PropertyAsByte(IntPtr thisPtr, byte value); 29internal delegate int _get_PropertyAsInt16(IntPtr thisPtr, out short value); 31internal delegate int _put_PropertyAsInt16(IntPtr thisPtr, short value); 33internal delegate int _get_PropertyAsUInt16(IntPtr thisPtr, out ushort value); 35internal delegate int _put_PropertyAsUInt16(IntPtr thisPtr, ushort value); 37internal delegate int _get_PropertyAsInt32(IntPtr thisPtr, out int value); 39internal delegate int _put_PropertyAsInt32(IntPtr thisPtr, int value); 41internal delegate int _get_PropertyAsUInt32(IntPtr thisPtr, out uint value); 43internal delegate int _put_PropertyAsUInt32(IntPtr thisPtr, uint value); 45internal delegate int _get_PropertyAsInt64(IntPtr thisPtr, out long value); 47internal delegate int _put_PropertyAsInt64(IntPtr thisPtr, long value); 49internal delegate int _get_PropertyAsUInt64(IntPtr thisPtr, out ulong value); 51internal delegate int _put_PropertyAsUInt64(IntPtr thisPtr, ulong value); 53internal delegate int _get_PropertyAsFloat(IntPtr thisPtr, out float value); 55internal delegate int _put_PropertyAsFloat(IntPtr thisPtr, float value); 57internal delegate int _get_PropertyAsDouble(IntPtr thisPtr, out double value); 59internal delegate int _put_PropertyAsDouble(IntPtr thisPtr, double value); 61internal delegate int _get_PropertyAsObject(IntPtr thisPtr, out IntPtr value); 63internal delegate int _put_PropertyAsObject(IntPtr thisPtr, IntPtr value); 65internal delegate int _get_PropertyAsGuid(IntPtr thisPtr, out Guid value); 67internal delegate int _put_PropertyAsGuid(IntPtr thisPtr, Guid value); 69internal delegate int _get_PropertyAsString(IntPtr thisPtr, out IntPtr value); 71internal delegate int _put_PropertyAsString(IntPtr thisPtr, IntPtr value);
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (151)
44public IntPtr _handle; 63(char*)chars, value.Length, (IntPtr*)header, (IntPtr*)handle)); 74public static IntPtr GetAbi(MarshalString m) => m is null ? IntPtr.Zero : m._handle; 76public static IntPtr GetAbi(object box) => box is null ? IntPtr.Zero : ((MarshalString)box)._handle; 86public static void DisposeAbi(IntPtr hstring) 88if (hstring != IntPtr.Zero) 95DisposeAbi(((IntPtr)abi)); 98public static unsafe string FromAbi(IntPtr value) 100if (value == IntPtr.Zero) 107public static unsafe IntPtr FromManaged(string value) 111return IntPtr.Zero; 113IntPtr handle; 130if (_array != IntPtr.Zero) 136public IntPtr _array; 151m._array = Marshal.AllocCoTaskMem(length * Marshal.SizeOf<IntPtr>()); 153var elements = (IntPtr*)m._array.ToPointer(); 168public static (int length, IntPtr data) GetAbiArray(object box) 180var abi = ((int length, IntPtr data))box; 182var data = (IntPtr*)abi.data.ToPointer(); 192var abi = ((int length, IntPtr data))box; 193var data = (IntPtr*)abi.data.ToPointer(); 200public static unsafe (int length, IntPtr data) FromManagedArray(string[] array) 204return (0, IntPtr.Zero); 206IntPtr data = IntPtr.Zero; 212data = IntPtr.Zero; 218data = Marshal.AllocCoTaskMem(length * Marshal.SizeOf<IntPtr>()); 219var elements = (IntPtr*)data; 233public static unsafe void CopyManagedArray(string[] array, IntPtr data) 245var elements = (IntPtr*)data; 262public static unsafe void DisposeAbiArrayElements((int length, IntPtr data) abi) 264var elements = (IntPtr*)abi.data; 274var abi = ((int length, IntPtr data))box; 292public static (int length, IntPtr data) GetAbiArray(object box) 304var abi = ((int length, IntPtr data))box; 309public static unsafe (int length, IntPtr data) FromManagedArray(Array array) 313return (0, IntPtr.Zero); 317var data = Marshal.AllocCoTaskMem(byte_length); 322public static unsafe void CopyManagedArray(Array array, IntPtr data) 331var array_data = array_handle.AddrOfPinnedObject(); 345var abi = ((int length, IntPtr data))box; 386public static readonly Action<object, IntPtr> CopyAbi; 387private static Action<object, IntPtr> BindCopyAbi() 391var parms = new[] { Expression.Parameter(typeof(object), "arg"), Expression.Parameter(typeof(IntPtr), "dest") }; 392return Expression.Lambda<Action<object, IntPtr>>( 415public static readonly Action<T, IntPtr> CopyManaged; 416private static Action<T, IntPtr> BindCopyManaged() 420var parms = new[] { Expression.Parameter(typeof(T), "arg"), Expression.Parameter(typeof(IntPtr), "dest") }; 421return Expression.Lambda<Action<T, IntPtr>>( 448if (_array != IntPtr.Zero) 454public IntPtr _array; 477Marshaler<T>.CopyAbi(m._marshalers[i], (IntPtr)element); 489public static (int length, IntPtr data) GetAbiArray(object box) 501var abi = ((int length, IntPtr data))box; 507var abi_element = Marshal.PtrToStructure((IntPtr)data, HelperType); 516var abi = ((int length, IntPtr data))box; 517if (abi.data == IntPtr.Zero) 525var abi_element = Marshal.PtrToStructure((IntPtr)data, HelperType); 531public static unsafe (int length, IntPtr data) FromManagedArray(T[] array) 535return (0, IntPtr.Zero); 537IntPtr data = IntPtr.Zero; 543data = IntPtr.Zero; 555Marshaler<T>.CopyManaged(array[i], (IntPtr)bytes); 567public static unsafe void CopyManagedArray(T[] array, IntPtr data) 584Marshaler<T>.CopyManaged(array[i], (IntPtr)bytes); 595public static unsafe void DisposeAbiArrayElements((int length, IntPtr data) abi) 601var abi_element = Marshal.PtrToStructure((IntPtr)data, HelperType); 610var abi = ((int length, IntPtr data))box; 611if (abi.data == IntPtr.Zero) return; 630if (_array != IntPtr.Zero) 636public IntPtr _array; 651var byte_length = length * IntPtr.Size; 654var element = (IntPtr*)m._array.ToPointer(); 669public static (int length, IntPtr data) GetAbiArray(object box) 675public static unsafe T[] FromAbiArray(object box, Func<IntPtr, T> fromAbi) 681var abi = ((int length, IntPtr data))box; 683var data = (IntPtr*)abi.data.ToPointer(); 691public static unsafe (int length, IntPtr data) FromManagedArray(T[] array, Func<T, IntPtr> fromManaged) 695return (0, IntPtr.Zero); 697IntPtr data = IntPtr.Zero; 703data = IntPtr.Zero; 709var byte_length = length * IntPtr.Size; 711var native = (IntPtr*)data.ToPointer(); 725public static unsafe void CopyManagedArray(T[] array, IntPtr data, Action<T, IntPtr> copyManaged) 737var byte_length = length * IntPtr.Size; 741copyManaged(array[i], (IntPtr)bytes); 742bytes += IntPtr.Size; 752public static unsafe void DisposeAbiArrayElements((int length, IntPtr data) abi) 754var data = (IntPtr*)abi.data.ToPointer(); 764var abi = ((int length, IntPtr data))box; 765if (abi.data == IntPtr.Zero) return; 770public static IntPtr GetAbi(IObjectReference objRef) 772return objRef?.ThisPtr ?? IntPtr.Zero; 780public static void DisposeAbi(IntPtr ptr) 782if (ptr == IntPtr.Zero) return; 792private static Func<IntPtr, T> _FromAbi; 795public static T FromAbi(IntPtr ptr) 797if (ptr == IntPtr.Zero) 845public static IntPtr GetAbi(IObjectReference value) => 846value is null ? IntPtr.Zero : MarshalInterfaceHelper<T>.GetAbi(value); 848public static void DisposeAbi(IntPtr thisPtr) => MarshalInterfaceHelper<T>.DisposeAbi(thisPtr); 852public static IntPtr FromManaged(T value) 856return IntPtr.Zero; 861public static unsafe void CopyManaged(T value, IntPtr dest) 863*(IntPtr*)dest.ToPointer() = 864(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 869public static (int length, IntPtr data) GetAbiArray(object box) => MarshalInterfaceHelper<T>.GetAbiArray(box); 873public static unsafe (int length, IntPtr data) FromManagedArray(T[] array) => MarshalInterfaceHelper<T>.FromManagedArray(array, (o) => FromManaged(o)); 875public static unsafe void CopyManagedArray(T[] array, IntPtr data) => MarshalInterfaceHelper<T>.CopyManagedArray(array, data, (o, dest) => CopyManaged(o, dest)); 881private static Func<IntPtr, T> BindFromAbi() 885var parms = new[] { Expression.Parameter(typeof(IntPtr), "arg") }; 886return Expression.Lambda<Func<IntPtr, T>>( 928public static IntPtr GetAbi(IObjectReference objRef) => 929objRef is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(objRef); 931public static object FromAbi(IntPtr ptr) 933if (ptr == IntPtr.Zero) 960public static void DisposeAbi(IntPtr ptr) => MarshalInterfaceHelper<object>.DisposeAbi(ptr); 961public static IntPtr FromManaged(object o, bool unwrapObject = true) 964return objRef?.GetRef() ?? IntPtr.Zero; 967public static unsafe void CopyManaged(object o, IntPtr dest, bool unwrapObject = true) 970*(IntPtr*)dest.ToPointer() = objRef?.GetRef() ?? IntPtr.Zero; 975public static (int length, IntPtr data) GetAbiArray(object box) => MarshalInterfaceHelper<object>.GetAbiArray(box); 979public static unsafe (int length, IntPtr data) FromManagedArray(object[] array) => MarshalInterfaceHelper<object>.FromManagedArray(array, (o) => FromManaged(o)); 981public static unsafe void CopyManagedArray(object[] array, IntPtr data) => MarshalInterfaceHelper<object>.CopyManagedArray(array, data, (o, dest) => CopyManaged(o, dest)); 1002AbiType = typeof(IntPtr); 1005FromAbi = (object value) => (T)(object)MarshalString.FromAbi((IntPtr)value); 1013CopyManagedArray = (T[] array, IntPtr data) => MarshalString.CopyManagedArray((string[])(object)array, data); 1019AbiType = typeof(IntPtr); 1054CopyManagedArray = (T[] array, IntPtr data) => MarshalBlittable<T>.CopyManagedArray(array, data); 1072CopyManagedArray = (T[] array, IntPtr data) => MarshalNonBlittable<T>.CopyManagedArray(array, data); 1079AbiType = typeof(IntPtr); 1082FromAbi = (object value) => (T)(object)MarshalInterface<T>.FromAbi((IntPtr)value); 1085DisposeAbi = (object box) => MarshalInterface<T>.DisposeAbi((IntPtr)box); 1089AbiType = typeof(IntPtr); 1092FromAbi = (object box) => (T)MarshalInspectable.FromAbi((IntPtr)box); 1094CopyManaged = (T value, IntPtr dest) => MarshalInspectable.CopyManaged(value, dest); 1096DisposeAbi = (object box) => MarshalInspectable.DisposeAbi((IntPtr)box); 1100AbiType = typeof(IntPtr); 1116public static readonly Action<object, IntPtr> CopyAbi; 1119public static readonly Action<T, IntPtr> CopyManaged; 1123public static readonly Func<object, (int, IntPtr)> GetAbiArray; 1125public static readonly Func<T[], (int, IntPtr)> FromManagedArray; 1126public static readonly Action<T[], IntPtr> CopyManagedArray;
MS\Internal\WindowsRuntime\Generated\WinRT\ObjectReference.cs (24)
21private readonly IntPtr _thisPtr; 22public IntPtr ThisPtr 42protected IObjectReference(IntPtr thisPtr) 44if (thisPtr == IntPtr.Zero) 60Marshal.ThrowExceptionForHR(VftblIUnknown.QueryInterface(ThisPtr, ref iid, out IntPtr thatPtr)); 70int hr = VftblIUnknown.QueryInterface(ThisPtr, ref iid, out IntPtr thatPtr); 91public IntPtr GetRef() 158public static ObjectReference<T> Attach(ref IntPtr thisPtr) 160if (thisPtr == IntPtr.Zero) 165thisPtr = IntPtr.Zero; 169ObjectReference(IntPtr thisPtr, IUnknownVftbl vftblIUnknown, T vftblT) : 176private protected ObjectReference(IntPtr thisPtr) : 181ObjectReference(IntPtr thisPtr, (IUnknownVftbl vftblIUnknown, T vftblT) vtables) : 186public static ObjectReference<T> FromAbi(IntPtr thisPtr, IUnknownVftbl vftblIUnknown, T vftblT) 188if (thisPtr == IntPtr.Zero) 197public static ObjectReference<T> FromAbi(IntPtr thisPtr) 199if (thisPtr == IntPtr.Zero) 208private static unsafe (IUnknownVftbl vftblIUnknown, T vftblT) GetVtables(IntPtr thisPtr) 215vftblT = (T)typeof(T).GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.CreateInstance, null, new[] { typeof(IntPtr) }, null).Invoke(new object[] { thisPtr }); 228private readonly IntPtr _contextCallbackPtr; 230public ObjectReferenceWithContext(IntPtr thisPtr, IntPtr contextCallbackPtr) 239IntPtr contextCallbackPtr = _contextCallbackPtr; 254int hr = VftblIUnknown.QueryInterface(ThisPtr, ref iid, out IntPtr thatPtr);
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (49)
46public static IntPtr GetAbi(IObjectReference objRef) => 47objRef?.ThisPtr ?? IntPtr.Zero; 49public static global::System.Collections.Generic.IEnumerable<T> FromAbi(IntPtr thisPtr) => 50thisPtr == IntPtr.Zero ? null : new IEnumerable<T>(ObjRefFromAbi(thisPtr)); 52public static IntPtr FromManaged(global::System.Collections.Generic.IEnumerable<T> value) => 53(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 57public static void DisposeAbi(IntPtr abi) => 106internal unsafe Vftbl(IntPtr thisPtr) 109var vftbl = (IntPtr*)vftblPtr.Vftbl; 115public static readonly IntPtr AbiToProjectionVftablePtr; 123var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); 124Marshal.StructureToPtr(AbiToProjectionVftable.IInspectableVftbl, (IntPtr)nativeVftbl, false); 127AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 130private static unsafe int Do_Abi_First_0(IntPtr thisPtr, out IntPtr __return_value__) 147public static ObjectReference<Vftbl> ObjRefFromAbi(IntPtr thisPtr) 149if (thisPtr == IntPtr.Zero) 163public IntPtr ThisPtr => _obj.ThisPtr; 176IntPtr __retval = default; 193public unsafe delegate int First_0(IntPtr thisPtr, out IntPtr __return_value__); 202public static IntPtr GetAbi(IObjectReference objRef) => 203objRef?.ThisPtr ?? IntPtr.Zero; 205public static global::System.Collections.Generic.IEnumerator<T> FromAbi(IntPtr thisPtr) => 206thisPtr == IntPtr.Zero ? null : new IEnumerator<T>(ObjRefFromAbi(thisPtr)); 208internal static global::MS.Internal.WindowsRuntime.Windows.Foundation.Collections.IIterator<T> FromAbiInternal(IntPtr thisPtr) => 211public static IntPtr FromManaged(global::System.Collections.Generic.IEnumerator<T> value) => 212(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 216public static void DisposeAbi(IntPtr abi) => 431internal unsafe Vftbl(IntPtr thisPtr) 434var vftbl = (IntPtr*)vftblPtr.Vftbl; 443public static readonly IntPtr AbiToProjectionVftablePtr; 454var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4); 455Marshal.StructureToPtr(AbiToProjectionVftable.IInspectableVftbl, (IntPtr)nativeVftbl, false); 461AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 467private static ToAbiHelper FindAdapter(IntPtr thisPtr) 473private static unsafe int Do_Abi_MoveNext_2(IntPtr thisPtr, out byte __return_value__) 492private static unsafe int Do_Abi_GetMany_3(IntPtr thisPtr, int __itemsSize, IntPtr items, out uint __return_value__) 532private static unsafe int Do_Abi_get_HasCurrent_1(IntPtr thisPtr, out byte __return_value__) 551public static ObjectReference<Vftbl> ObjRefFromAbi(IntPtr thisPtr) 553if (thisPtr == IntPtr.Zero) 567public IntPtr ThisPtr => _obj.ThisPtr; 591IntPtr __items_data = default; 642public unsafe delegate int MoveNext_2(IntPtr thisPtr, out byte __return_value__); 643public unsafe delegate int GetMany_3(IntPtr thisPtr, int __itemsSize, IntPtr items, out uint __return_value__);
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (24)
41public static IntPtr GetAbi(IObjectReference objRef) => 42objRef?.ThisPtr ?? IntPtr.Zero; 44public static global::System.Collections.Generic.IReadOnlyList<T> FromAbi(IntPtr thisPtr) => 45thisPtr == IntPtr.Zero ? null : new IReadOnlyList<T>(ObjRefFromAbi(thisPtr)); 47public static IntPtr FromManaged(global::System.Collections.Generic.IReadOnlyList<T> value) => 48(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 52public static void DisposeAbi(IntPtr abi) => 222internal unsafe Vftbl(IntPtr thisPtr) 225var vftbl = (IntPtr*)vftblPtr.Vftbl; 234public static readonly IntPtr AbiToProjectionVftablePtr; 245var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4); 246Marshal.StructureToPtr(AbiToProjectionVftable.IInspectableVftbl, (IntPtr)nativeVftbl, false); 252AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 258private static ToAbiHelper FindAdapter(IntPtr thisPtr) 303private static unsafe int Do_Abi_GetMany_3(IntPtr thisPtr, uint startIndex, int __itemsSize, IntPtr items, out uint __return_value__) 324private static unsafe int Do_Abi_get_Size_1(IntPtr thisPtr, out uint __return_value__) 344public static ObjectReference<Vftbl> ObjRefFromAbi(IntPtr thisPtr) 346if (thisPtr == IntPtr.Zero) 360public IntPtr ThisPtr => _obj.ThisPtr; 407IntPtr __items_data = default; 443public unsafe delegate int GetMany_3(IntPtr thisPtr, uint startIndex, int __itemsSize, IntPtr items, out uint __return_value__);
MS\Internal\WindowsRuntime\Generated\WinRT_Interop.cs (3)
25public unsafe delegate int _ActivateInstance(IntPtr pThis, out IntPtr instance); 35public IntPtr Invoke;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (1)
212IntPtr parentHwnd,
System\Windows\Appearance\WindowBackdropManager.cs (12)
36var handle = new WindowInteropHelper(window).Handle; 37if (handle == IntPtr.Zero) 47private static bool SetBackdropCore(IntPtr hwnd, WindowBackdropType backdropType) 49if (hwnd == IntPtr.Zero) 64private static bool ApplyBackdrop(IntPtr hwnd, WindowBackdropType backdropType) 81private static bool RemoveBackdrop(IntPtr hwnd) 90private static bool RemoveBackground(IntPtr hwnd) 92if (hwnd != IntPtr.Zero) 105private static bool RestoreBackground(IntPtr hwnd) 107if (hwnd != IntPtr.Zero) 110if (windowSource?.Handle != IntPtr.Zero && windowSource.CompositionTarget != null) 119private static bool UpdateGlassFrame(IntPtr hwnd, WindowBackdropType backdropType)
System\Windows\Application.cs (13)
1909internal IntPtr ParkingHwnd 1919return IntPtr.Zero; 2063IntPtr.Zero, 2068private IntPtr AppFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 2070IntPtr retInt = IntPtr.Zero; 2105private bool WmQueryEndSession(IntPtr lParam, ref IntPtr refInt) 2126refInt = IntPtr.Zero; 2280UnsafeNativeMethods.PlaySound(soundFile, IntPtr.Zero, PLAYSOUND_FLAGS);
System\Windows\Automation\Peers\HwndHostAutomationPeer.cs (2)
42IntPtr hwnd = host.CriticalHandle; 44if(hwnd != IntPtr.Zero)
System\Windows\Automation\Peers\WindowAutomationPeer.cs (2)
82IntPtr windowHandle = window.CriticalHandle; 83if(windowHandle != IntPtr.Zero) //it is Zero on a window that was just closed
System\Windows\Controls\ComboBox.cs (1)
1702if (comboBox.IsDropDownOpen && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero)
System\Windows\Controls\PasswordBox.cs (1)
169IntPtr ptr = System.Runtime.InteropServices.Marshal.SecureStringToBSTR(securePassword);
System\Windows\Controls\PopupControlService.cs (1)
108if (MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero)
System\Windows\Controls\Primitives\MenuBase.cs (3)
560if (menu.IsMenuMode && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero) 620IntPtr hwndWithFocus = MS.Win32.UnsafeNativeMethods.GetFocus(); 621HwndSource hwndSourceWithFocus = hwndWithFocus != IntPtr.Zero ? HwndSource.CriticalFromHwnd(hwndWithFocus) : null;
System\Windows\Controls\Primitives\Popup.cs (46)
1225bool reestablishCapture = e.OriginalSource != root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero; 1744private IntPtr PopupFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1755if (wParam == IntPtr.Zero) 1788return IntPtr.Zero; 2667IntPtr monitor = SafeNativeMethods.MonitorFromRect(ref nativeBounds, NativeMethods.MONITOR_DEFAULTTONEAREST); 2669if (monitor != IntPtr.Zero) 2751IntPtr hCursor = SafeNativeMethods.GetCursor(); 2752if (hCursor != IntPtr.Zero) 3091UnsafeNativeMethods.SetWindowPos(new HandleRef(null, Handle), new HandleRef(null, IntPtr.Zero), 3099IntPtr parent = ParentHandle; 3100if (parent != IntPtr.Zero) 3112IntPtr hwnd = Handle; 3113if (hwnd != IntPtr.Zero) 3177IntPtr lastWebOCHwnd = GetLastWebOCHwnd(); 3181lastWebOCHwnd == IntPtr.Zero ? NativeMethods.HWND_TOP : new HandleRef(null, lastWebOCHwnd), 3212private IntPtr GetLastWebOCHwnd() 3215IntPtr lastHwnd = UnsafeNativeMethods.GetWindow(new HandleRef(null, Handle), NativeMethods.GW_HWNDLAST); 3219while (lastHwnd != IntPtr.Zero) 3245IntPtr handle = Handle; 3262UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(null, handle), NativeMethods.GWL_EXSTYLE, (IntPtr)styles); 3323IntPtr parent = IntPtr.Zero; 3353if ( parent != IntPtr.Zero ) 3361if ((parent != IntPtr.Zero) && ConnectedToForegroundWindow(parent)) 3389private static bool ConnectedToForegroundWindow(IntPtr window) 3391IntPtr foregroundWindow = UnsafeNativeMethods.GetForegroundWindow(); 3393while (window != IntPtr.Zero) 3409private static IntPtr GetHandle(HwndSource hwnd) 3412return (hwnd!=null ? hwnd.CriticalHandle : IntPtr.Zero); 3415private static IntPtr GetParentHandle(HwndSource hwnd) 3419IntPtr child = GetHandle(hwnd); 3420if (child != IntPtr.Zero) 3426return IntPtr.Zero; 3429private IntPtr Handle 3437private IntPtr ParentHandle 3457if (Handle != IntPtr.Zero && (UnsafeNativeMethods.IsWinEventHookInstalled(NativeMethods.EVENT_OBJECT_FOCUS) || UnsafeNativeMethods.IsWinEventHookInstalled(NativeMethods.EVENT_OBJECT_STATECHANGE))) 3462if (popupRootAutomationPeer.Hwnd == IntPtr.Zero) 3465IntPtr lResult = AutomationInteropProvider.ReturnRawElementProvider(Handle, IntPtr.Zero, new IntPtr(NativeMethods.OBJID_CLIENT), RootProviderForHwnd); 3466if (lResult != IntPtr.Zero) 3471hr = UnsafeNativeMethods.ObjectFromLresult(lResult, ref iid, IntPtr.Zero, ref acc); 3550return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE; 3592IntPtr hMonitor = SafeNativeMethods.MonitorFromPoint(screenOrigin.Value, NativeMethods.MONITOR_DEFAULTTONEAREST);
System\Windows\Controls\WebBrowser.cs (4)
287dp.rgvarg = IntPtr.Zero; 308dp.rgvarg = (args == null) ? IntPtr.Zero : UnsafeNativeMethods.ArrayToVARIANTHelper.ArrayToVARIANTVector(args); 310dp.rgdispidNamedArgs = IntPtr.Zero; 338if (dp.rgvarg != IntPtr.Zero)
System\windows\Documents\CaretElement.cs (3)
973IntPtr hwnd = IntPtr.Zero; 981if (hwnd != IntPtr.Zero)
System\Windows\Documents\ImmComposition.cs (52)
202IntPtr hwnd = IntPtr.Zero; 206IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 207if (himc != IntPtr.Zero) 338private IntPtr ImmCompositionFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 340IntPtr lret = IntPtr.Zero; 389private void OnWmImeComposition(IntPtr hwnd, IntPtr lParam, ref bool handled) 391IntPtr himc; 419if (himc == IntPtr.Zero) 430size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_RESULTSTR, IntPtr.Zero, 0); 447size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPSTR, IntPtr.Zero, 0); 461cursorPos = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_CURSORPOS, IntPtr.Zero, 0); 469deltaStart = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_DELTASTART, IntPtr.Zero, 0); 477size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPATTR, IntPtr.Zero, 0); 499private void OnWmImeChar(IntPtr wParam, ref bool handled) 580private void OnWmImeNotify(IntPtr hwnd, IntPtr wParam) 582IntPtr himc; 593if (himc != IntPtr.Zero) 728IntPtr hwnd; 774IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 775if (himc != IntPtr.Zero) 1296private IntPtr OnWmImeRequest(IntPtr wParam, IntPtr lParam, ref bool handled) 1298IntPtr lret = IntPtr.Zero; 1324private IntPtr OnWmImeRequest_ReconvertString(IntPtr lParam, ref bool handled, bool fDocFeed) 1333return IntPtr.Zero; 1353IntPtr lret = new IntPtr(requestSize); 1355if (lParam != IntPtr.Zero) 1392private unsafe static void StoreSurroundingText(IntPtr reconv, string surrounding) 1511private IntPtr OnWmImeRequest_ConfirmReconvertString(IntPtr lParam, ref bool handled) 1515return IntPtr.Zero; 1520return IntPtr.Zero; 1529return IntPtr.Zero; 1748IntPtr hwnd = IntPtr.Zero; 1752IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1754IntPtr lret = IntPtr.Zero; 1755if (himc != IntPtr.Zero) 1757IntPtr hwndDefIme = IntPtr.Zero; 1763return (lret != IntPtr.Zero) ? true : false;
System\Windows\Documents\InputScopeAttribute.cs (6)
57public void GetInputScopes(out IntPtr ppinputscopes, out int count) 88public int GetPhrase(out IntPtr ppbstrPhrases, out int count) 93ppbstrPhrases = Marshal.AllocCoTaskMem(Marshal.SizeOf(typeof(IntPtr))*count); 103IntPtr pbstr; 114offset += Marshal.SizeOf(typeof(IntPtr)); 120offset += Marshal.SizeOf(typeof(IntPtr));
System\Windows\Documents\MoveSizeWinEventHandler.cs (3)
62internal override void WinEventProc(int eventId, IntPtr hwnd) 73IntPtr hwndTemp = textstore.CriticalSourceWnd; 74while (hwndTemp != IntPtr.Zero)
System\Windows\Documents\NaturalLanguageHyphenator.cs (6)
30private IntPtr _hyphenatorResource; 76if (!_disposed && _hyphenatorResource != IntPtr.Zero) 118if (_hyphenatorResource == IntPtr.Zero) 214internal static extern IntPtr NlCreateHyphenator(); 217internal static extern void NlDestroyHyphenator(ref IntPtr hyphenator); 221IntPtr hyphenator,
System\Windows\Documents\NLGSpellerInterop.cs (3)
194IntPtr inputArray = Marshal.AllocHGlobal(count * 2); 1044result = variantEnumerator.Next(1, (IntPtr)pVariant, fetched); 1547void SetInputArray([In] IntPtr inputArray, Int32 size);
System\windows\Documents\TextEditorContextMenu.cs (2)
304IntPtr hwnd = IntPtr.Zero;
System\windows\Documents\TextEditorDragDrop.cs (3)
670IntPtr hwnd = IntPtr.Zero; 677if (hwnd != IntPtr.Zero)
System\windows\Documents\TextEditorTyping.cs (3)
1625IntPtr hwnd = IntPtr.Zero; 1628if (hwnd != (IntPtr)0)
System\windows\Documents\TextSelection.cs (2)
1692IntPtr[] keyboardList; 1694keyboardList = new IntPtr[keyboardListCount];
System\Windows\Documents\TextServicesPropertyRanges.cs (2)
183IntPtr p = (IntPtr)pguid;
System\Windows\Documents\TextStore.cs (16)
589public void QueryInsertEmbedded(ref Guid guidService, IntPtr formatEtc, out bool insertable) 1181void UnsafeNativeMethods.ITextStoreACP.GetWnd(int viewCookie, out IntPtr hwnd) 1183hwnd = IntPtr.Zero; 2175internal IntPtr CriticalSourceWnd 2653IntPtr hwnd = IntPtr.Zero; 2831attrval.val.data1.Value = (IntPtr)(int)fontSize; 2847attrval.val.data1.Value = (IntPtr)(int)(fontSize / 96.0 * 72.0); 2852attrval.val.data1.Value = IsReadOnly ? (IntPtr)1 : (IntPtr)0; 2857attrval.val.data1.Value = (IntPtr)0; 2892attrval.val.data1.Value = (IntPtr)((int)angle * 10); 2904attrval.val.data1.Value = (IntPtr)0; 3314private IntPtr GetSourceWnd(bool callerIsTrusted) 3316IntPtr hwnd = IntPtr.Zero;
System\Windows\Documents\WinEventHandler.cs (7)
70internal virtual void WinEventProc(int eventId, IntPtr hwnd) 91_hHook.Value = UnsafeNativeMethods.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc.Value, 93if (_hHook.Value == IntPtr.Zero ) 103if (_hHook.Value != IntPtr.Zero ) 106_hHook.Value = IntPtr.Zero ; 126private void WinEventDefaultProc(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, int eventTime) 166private SecurityCriticalDataForSet<IntPtr> _hHook;
System\Windows\Input\KeyboardNavigation.cs (2)
3291IntPtr activeWindow = MS.Win32.UnsafeNativeMethods.GetActiveWindow(); 3293if (activeWindow != IntPtr.Zero)
System\Windows\Interop\ActiveXHost.cs (6)
161if (ControlHandle.Handle == IntPtr.Zero) 163IntPtr inplaceWindow = IntPtr.Zero; 517IntPtr.Zero, 527internal void AttachWindow(IntPtr hwnd) 538if (this.ParentHandle.Handle != IntPtr.Zero)
System\Windows\Interop\BrowserInteropHelper.cs (5)
205internal static IntPtr PostFilterInput(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 218return IntPtr.Zero;
System\Windows\Interop\DynamicScriptObject.cs (1)
435if (dp.rgvarg != IntPtr.Zero)
System\Windows\Interop\HwndHost.cs (53)
77public IntPtr Handle 311if (Handle != IntPtr.Zero && (hwndFocus.Handle == _hwnd.Handle || UnsafeNativeMethods.IsChild(_hwnd, hwndFocus))) 348if (( CriticalHandle != IntPtr.Zero) && IsVisible) 404IntPtr hwndParent = UnsafeNativeMethods.GetParent(_hwnd); 558protected virtual IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 565_hwnd = new HandleRef(null, IntPtr.Zero); 623return IntPtr.Zero ; 636private IntPtr OnWmGetObject(IntPtr wparam, IntPtr lparam) 638IntPtr result = IntPtr.Zero; 667new HandleRef(null, IntPtr.Zero), 705if(CriticalHandle != IntPtr.Zero) 737if(Handle != IntPtr.Zero) 744HandleRef hdcScreen = new HandleRef(this, UnsafeNativeMethods.GetDC(new HandleRef(this, IntPtr.Zero))); 745if(hdcScreen.Handle != IntPtr.Zero) 747HandleRef hdcBitmap = new HandleRef(this, IntPtr.Zero); 748HandleRef hBitmap = new HandleRef(this, IntPtr.Zero); 753if(hdcBitmap.Handle != IntPtr.Zero) 757if(hBitmap.Handle != IntPtr.Zero) 760IntPtr hOldBitmap = UnsafeNativeMethods.CriticalSelectObject(hdcBitmap, hBitmap.Handle); 765IntPtr hbrWhite = UnsafeNativeMethods.CriticalGetStockObject(NativeMethods.WHITE_BRUSH); 778UnsafeNativeMethods.SendMessage(_hwnd.Handle, WindowMessage.WM_PRINT, hdcBitmap.Handle, (IntPtr) (NativeMethods.PRF_CHILDREN | NativeMethods.PRF_CLIENT | NativeMethods.PRF_ERASEBKGND | NativeMethods.PRF_NONCLIENT)); 789UnsafeNativeMethods.CriticalRedrawWindow(_hwnd, IntPtr.Zero, IntPtr.Zero, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_ALLCHILDREN); 794System.Windows.Media.Imaging.BitmapSource bitmapSource = Imaging.CriticalCreateBitmapSourceFromHBitmap(hBitmap.Handle, IntPtr.Zero, Int32Rect.Empty, null, WICBitmapAlphaChannelOption.WICBitmapIgnoreAlpha); 809UnsafeNativeMethods.ReleaseDC(new HandleRef(this, IntPtr.Zero), hdcScreen); 810hdcScreen = new HandleRef(null, IntPtr.Zero); 812if(hBitmap.Handle != IntPtr.Zero) 815hBitmap = new HandleRef(this, IntPtr.Zero); 818if(hdcBitmap.Handle != IntPtr.Zero) 821hdcBitmap = new HandleRef(this, IntPtr.Zero); 935IntPtr hwndParent = IntPtr.Zero; 961if(hwndParent != IntPtr.Zero) 963if(_hwnd.Handle == IntPtr.Zero) 979else if (Handle != IntPtr.Zero) 1022if(_hwnd.Handle == IntPtr.Zero || !UnsafeNativeMethods.IsWindow(_hwnd)) 1088if( CriticalHandle == IntPtr.Zero) 1104_hwnd = new HandleRef(null, IntPtr.Zero); 1115internal IntPtr CriticalHandle 1119if(_hwnd.Handle != IntPtr.Zero) 1123_hwnd = new HandleRef(null, IntPtr.Zero); 1131private IntPtr SubclassWndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1133IntPtr result = IntPtr.Zero ;
System\Windows\Interop\WindowInteropHelper.cs (5)
61public IntPtr Handle 69internal IntPtr CriticalHandle 84public IntPtr Owner 111public IntPtr EnsureHandle() 114if (CriticalHandle == IntPtr.Zero)
System\Windows\MessageBox.cs (9)
103return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, defaultResult, options); 118return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, defaultResult, 0); 132return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, 0, 0); 145return ShowCore(IntPtr.Zero, messageBoxText, caption, button, MessageBoxImage.None, 0, 0); 155return ShowCore(IntPtr.Zero, messageBoxText, caption, MessageBoxButton.OK, MessageBoxImage.None, 0, 0); 165return ShowCore(IntPtr.Zero, messageBoxText, String.Empty, MessageBoxButton.OK, MessageBoxImage.None, 0, 0); 347IntPtr owner, 380if (owner != IntPtr.Zero) 387if (owner == IntPtr.Zero)
System\Windows\Shell\WindowChromeWorker.cs (79)
42private IntPtr _hwnd; 169if (IntPtr.Zero != _hwnd) 240if (_chromeInfo != null && _hwnd != IntPtr.Zero) 256if (_hwnd == IntPtr.Zero || _hwndSource.IsDisposed) 280NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 522private IntPtr _WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 535return IntPtr.Zero; 538private IntPtr _HandleSetTextOrIcon(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 545IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, uMsg, wParam, lParam); 556private IntPtr _HandleNCActivate(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 563IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1)); 577private IntPtr _HandleNCCalcSize(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 620IntPtr retVal = IntPtr.Zero; 655private IntPtr _HandleNCHitTest(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 690IntPtr lRet; 696if (IntPtr.Zero != lRet) 712private IntPtr _HandleNCRButtonUp(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 721return IntPtr.Zero; 724private IntPtr _HandleSize(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 741return IntPtr.Zero; 744private IntPtr _HandleWindowPosChanged(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 770return IntPtr.Zero; 773private IntPtr _HandleDwmCompositionChanged(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 778return IntPtr.Zero; 781private IntPtr _HandleSettingChange(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 790return IntPtr.Zero; 793private IntPtr _HandleEnterSizeMove(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 817return IntPtr.Zero; 820private IntPtr _HandleExitSizeMove(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 837return IntPtr.Zero; 840private IntPtr _HandleMove(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 851return IntPtr.Zero; 920IntPtr hmenu = NativeMethods.GetSystemMenu(_hwnd, false); 921if (IntPtr.Zero != hmenu) 964if (IntPtr.Zero == _hwnd || _hwndSource.IsDisposed) 986NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 992NativeMethods.SetWindowRgn(_hwnd, IntPtr.Zero, NativeMethods.IsWindowVisible(_hwnd)); 1020IntPtr hMon = NativeMethods.MonitorFromWindow(_hwnd, MONITOR_DEFAULTTONEAREST); 1028IntPtr hrgn = IntPtr.Zero; 1033hrgn = IntPtr.Zero; 1060IntPtr hrgn = IntPtr.Zero; 1110hrgn = IntPtr.Zero; 1120private static IntPtr _CreateRoundRectRgn(Rect region, double radius) 1144private static void _CreateAndCombineRoundRectRgn(IntPtr hrgnSource, Rect region, double radius) 1146IntPtr hrgn = IntPtr.Zero; 1194if (IntPtr.Zero == _hwnd) 1403if (!Utility.IsOSVistaOrNewer || _hwnd == IntPtr.Zero) 1421NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
System\Windows\Standard\MessageWindow.cs (20)
27private static readonly Dictionary<IntPtr, MessageWindow> s_windowLookup = new Dictionary<IntPtr, MessageWindow>(); 34public IntPtr Handle 65IntPtr pinnedThisPtr = (IntPtr)gcHandle; 76IntPtr.Zero, 77IntPtr.Zero, 78IntPtr.Zero, 113IntPtr hwnd = Handle; 118_dispatcher.BeginInvoke(DispatcherPriority.Normal, (DispatcherOperationCallback)_DestroyWindowCallback, new object [] { IntPtr.Zero, className }); 120else if (Handle != IntPtr.Zero) 135Handle = IntPtr.Zero; 141_DestroyWindow((IntPtr)args[0], (string)args[1]); 146private static IntPtr _WndProc(IntPtr hwnd, WM msg, IntPtr wParam, IntPtr lParam) 148IntPtr ret = IntPtr.Zero; 186private static void _DestroyWindow(IntPtr hwnd, string className)
System\Windows\Standard\NativeMethods.cs (248)
1377public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); 1381public static extern SafeDC GetDC(IntPtr hwnd); 1386public static extern SafeDC CreateDC([MarshalAs(UnmanagedType.LPWStr)] string lpszDriver, [MarshalAs(UnmanagedType.LPWStr)] string lpszDevice, IntPtr lpszOutput, IntPtr lpInitData); 1390public static extern SafeDC CreateCompatibleDC(IntPtr hdc); 1395public static extern bool DeleteDC(IntPtr hdc); 1398private IntPtr? _hwnd; 1401public IntPtr Hwnd 1419if (!_hwnd.HasValue || _hwnd.Value == IntPtr.Zero) 1434dc = NativeMethods.CreateDC(deviceName, null, IntPtr.Zero, IntPtr.Zero); 1459IntPtr hPtr = IntPtr.Zero; 1487public static SafeDC GetDC(IntPtr hwnd) 1513return GetDC(IntPtr.Zero); 1518public static SafeDC WrapDC(IntPtr hdc) 1525_hwnd = IntPtr.Zero, 1556IntPtr unsafeHandle; 1583handle = IntPtr.Zero; 1620handle = IntPtr.Zero; 1665public IntPtr lpszDefaultScheme; 1711public IntPtr lpCreateParams; 1712public IntPtr hInstance; 1713public IntPtr hMenu; 1714public IntPtr hwndParent; 1730public IntPtr hwnd; 1740public IntPtr hNameMappings; 1782public IntPtr hWnd; 1786public IntPtr hIcon; 1805IntPtr hBalloonIcon; 1823IntPtr pidl; 1833IntPtr psl; // An IShellLink instance that when launched opens a recently used item in the specified 2156public IntPtr hook; 2157public IntPtr unhook; 2164public IntPtr DebugEventCallback; 2202public IntPtr hwnd; 2203public IntPtr hwndInsertAfter; 2219public IntPtr hInstance; 2220public IntPtr hIcon; 2221public IntPtr hCursor; 2222public IntPtr hbrBackground; 2227public IntPtr hIconSm; 2238public IntPtr dwExtraInfo; 2303internal delegate IntPtr WndProc(IntPtr hwnd, WM uMsg, IntPtr wParam, IntPtr lParam); 2306internal delegate IntPtr WndProcHook(IntPtr hwnd, WM uMsg, IntPtr wParam, IntPtr lParam, ref bool handled); 2309internal delegate IntPtr MessageHandler(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled); 2338private static extern bool _ChangeWindowMessageFilterEx(IntPtr hwnd, WM message, MSGFLT action, [In, Out, Optional] ref CHANGEFILTERSTRUCT pChangeFilterStruct); 2343public static HRESULT ChangeWindowMessageFilterEx(IntPtr hwnd, WM message, MSGFLT action, out MSGFLTINFO filterInfo) 2383public static extern CombineRgnResult CombineRgn(IntPtr hrgnDest, IntPtr hrgnSrc1, IntPtr hrgnSrc2, RGN fnCombineMode); 2387private static extern IntPtr _CommandLineToArgvW([MarshalAs(UnmanagedType.LPWStr)] string cmdLine, out int numArgs); 2392IntPtr argv = IntPtr.Zero; 2398if (argv == IntPtr.Zero) 2406IntPtr currArg = Marshal.ReadIntPtr(argv, i * Marshal.SizeOf(typeof(IntPtr))); 2414IntPtr p = _LocalFree(argv); 2416Assert.AreEqual(IntPtr.Zero, p); 2422private static extern SafeHBITMAP _CreateDIBSection(SafeDC hdc, [In] ref BITMAPINFO bitmapInfo, int iUsage, [Out] out IntPtr ppvBits, IntPtr hSection, int dwOffset); 2426private static extern SafeHBITMAP _CreateDIBSectionIntPtr(IntPtr hdc, [In] ref BITMAPINFO bitmapInfo, int iUsage, [Out] out IntPtr ppvBits, IntPtr hSection, int dwOffset); 2429public static SafeHBITMAP CreateDIBSection(SafeDC hdc, ref BITMAPINFO bitmapInfo, out IntPtr ppvBits, IntPtr hSection, int dwOffset) 2435hBitmap = _CreateDIBSectionIntPtr(IntPtr.Zero, ref bitmapInfo, DIB_RGB_COLORS, out ppvBits, hSection, dwOffset); 2452private static extern IntPtr _CreateRoundRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nWidthEllipse, int nHeightEllipse); 2455public static IntPtr CreateRoundRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nWidthEllipse, int nHeightEllipse) 2457IntPtr ret = _CreateRoundRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse); 2458if (IntPtr.Zero == ret) 2467private static extern IntPtr _CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect); 2470public static IntPtr CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) 2472IntPtr ret = _CreateRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect); 2473if (IntPtr.Zero == ret) 2482private static extern IntPtr _CreateRectRgnIndirect([In] ref RECT lprc); 2485public static IntPtr CreateRectRgnIndirect(RECT lprc) 2487IntPtr ret = _CreateRectRgnIndirect(ref lprc); 2488if (IntPtr.Zero == ret) 2497public static extern IntPtr CreateSolidBrush(int crColor); 2501private static extern IntPtr _CreateWindowEx( 2510IntPtr hWndParent, 2511IntPtr hMenu, 2512IntPtr hInstance, 2513IntPtr lpParam); 2516public static IntPtr CreateWindowEx( 2525IntPtr hWndParent, 2526IntPtr hMenu, 2527IntPtr hInstance, 2528IntPtr lpParam) 2530IntPtr ret = _CreateWindowEx(dwExStyle, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); 2531if (IntPtr.Zero == ret) 2541public static extern IntPtr DefWindowProc(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam); 2546public static extern bool DeleteObject(IntPtr hObject); 2551public static extern bool DestroyIcon(IntPtr handle); 2556public static extern bool DestroyWindow(IntPtr hwnd); 2561public static extern bool IsWindow(IntPtr hwnd); 2566IntPtr hWnd, 2574public static extern int DwmExtendFrameIntoClientArea(IntPtr hwnd, ref MARGINS pMarInset); 2620public static extern bool DwmDefWindowProc(IntPtr hwnd, WM msg, IntPtr wParam, IntPtr lParam, out IntPtr plResult); 2624private static extern HRESULT _DwmSetWindowAttribute(IntPtr hwnd, DWMWA dwAttribute, ref int pvAttribute, int cbAttribute); 2627public static HRESULT DwmSetWindowAttributeSystemBackdropType(IntPtr hwnd, DWMSBT dwBackdropType) 2635public static HRESULT DwmSetWindowAttributeUseImmersiveDarkMode(IntPtr hwnd, bool useImmersiveDarkMode) 2643public static void DwmSetWindowAttributeFlip3DPolicy(IntPtr hwnd, DWMFLIP3D flip3dPolicy) 2651public static void DwmSetWindowAttributeDisallowPeek(IntPtr hwnd, bool disallowPeek) 2660private static extern int _EnableMenuItem(IntPtr hMenu, SC uIDEnableItem, MF uEnable); 2663public static MF EnableMenuItem(IntPtr hMenu, SC uIDEnableItem, MF uEnable) 2673private static extern bool _RemoveMenu(IntPtr hMenu, uint uPosition, uint uFlags); 2676public static void RemoveMenu(IntPtr hMenu, SC uPosition, MF uFlags) 2687private static extern bool _DrawMenuBar(IntPtr hWnd); 2690public static void DrawMenuBar(IntPtr hWnd) 2702public static extern bool FindClose(IntPtr handle); 2718private static extern bool _GetClientRect(IntPtr hwnd, [Out] out RECT lpRect); 2721public static RECT GetClientRect(IntPtr hwnd) 2768private static extern int _GetModuleFileName(IntPtr hModule, StringBuilder lpFilename, int nSize); 2771public static string GetModuleFileName(IntPtr hModule) 2796private static extern IntPtr _GetModuleHandle([MarshalAs(UnmanagedType.LPWStr)] string lpModuleName); 2798public static IntPtr GetModuleHandle(string lpModuleName) 2800IntPtr retPtr = _GetModuleHandle(lpModuleName); 2801if (retPtr == IntPtr.Zero) 2811private static extern bool _GetMonitorInfo(IntPtr hMonitor, [In, Out] MONITORINFO lpmi); 2814public static MONITORINFO GetMonitorInfo(IntPtr hMonitor) 2825private static extern IntPtr _GetStockObject(StockObject fnObject); 2827public static IntPtr GetStockObject(StockObject fnObject) 2829IntPtr retPtr = _GetStockObject(fnObject); 2830if (retPtr == IntPtr.Zero) 2839public static extern IntPtr GetSystemMenu(IntPtr hWnd, [MarshalAs(UnmanagedType.Bool)] bool bRevert); 2847public static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL nIndex) 2849IntPtr ret = IntPtr.Zero; 2850if (8 == IntPtr.Size) 2858if (IntPtr.Zero == ret) 2886public static extern void SetWindowThemeAttribute([In] IntPtr hwnd, [In] WINDOWTHEMEATTRIBUTETYPE eAttribute, [In] ref WTA_OPTIONS pvAttribute, [In] uint cbAttribute); 2891private static extern bool GetWindowPlacement(IntPtr hwnd, WINDOWPLACEMENT lpwndpl); 2894public static WINDOWPLACEMENT GetWindowPlacement(IntPtr hwnd) 2907private static extern bool _GetWindowRect(IntPtr hWnd, out RECT lpRect); 2909public static RECT GetWindowRect(IntPtr hwnd) 2921public static extern Status GdipCreateBitmapFromStream(IStream stream, out IntPtr bitmap); 2925public static extern Status GdipCreateHBITMAPFromBitmap(IntPtr bitmap, out IntPtr hbmReturn, Int32 background); 2929public static extern Status GdipCreateHICONFromBitmap(IntPtr bitmap, out IntPtr hbmReturn); 2933public static extern Status GdipDisposeImage(IntPtr image); 2937public static extern Status GdipImageForceValidation(IntPtr image); 2941public static extern Status GdiplusStartup(out IntPtr token, StartupInput input, out StartupOutput output); 2945public static extern Status GdiplusShutdown(IntPtr token); 2950public static extern bool IsWindowVisible(IntPtr hwnd); 2954private static extern IntPtr _LocalFree(IntPtr hMem); 2958public static extern IntPtr MonitorFromWindow(IntPtr hwnd, uint dwFlags); 2963private static extern bool _PostMessage(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam); 2966public static void PostMessage(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam) 3010private static extern IntPtr _SetActiveWindow(IntPtr hWnd); 3013public static IntPtr SetActiveWindow(IntPtr hwnd) 3016IntPtr ret = _SetActiveWindow(hwnd); 3017if (ret == IntPtr.Zero) 3027public static IntPtr SetClassLongPtr(IntPtr hwnd, GCLP nIndex, IntPtr dwNewLong) 3029if (8 == IntPtr.Size) 3039private static extern int SetClassLongPtr32(IntPtr hWnd, GCLP nIndex, int dwNewLong); 3044private static extern IntPtr SetClassLongPtr64(IntPtr hWnd, GCLP nIndex, IntPtr dwNewLong); 3053private static extern bool _SetProcessWorkingSetSize(IntPtr hProcess, IntPtr dwMinimiumWorkingSetSize, IntPtr dwMaximumWorkingSetSize); 3056public static void SetProcessWorkingSetSize(IntPtr hProcess, int dwMinimumWorkingSetSize, int dwMaximumWorkingSetSize) 3066public static IntPtr SetWindowLongPtr(IntPtr hwnd, GWL nIndex, IntPtr dwNewLong) 3068if (8 == IntPtr.Size) 3077private static extern int _SetWindowRgn(IntPtr hWnd, IntPtr hRgn, [MarshalAs(UnmanagedType.Bool)] bool bRedraw); 3080public static void SetWindowRgn(IntPtr hWnd, IntPtr hRgn, bool bRedraw) 3092private static extern bool _SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, SWP uFlags); 3095public static bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, SWP uFlags) 3112public static extern bool ShowWindow(IntPtr hwnd, SW nCmdShow); 3172public static extern uint TrackPopupMenuEx(IntPtr hmenu, uint fuFlags, int x, int y, IntPtr hwnd, IntPtr lptpm); 3176private static extern IntPtr _SelectObject(SafeDC hdc, IntPtr hgdiobj); 3179public static IntPtr SelectObject(SafeDC hdc, IntPtr hgdiobj) 3181IntPtr ret = _SelectObject(hdc, hgdiobj); 3182if (ret == IntPtr.Zero) 3191private static extern IntPtr _SelectObjectSafeHBITMAP(SafeDC hdc, SafeHBITMAP hgdiobj); 3194public static IntPtr SelectObject(SafeDC hdc, SafeHBITMAP hgdiobj) 3196IntPtr ret = _SelectObjectSafeHBITMAP(hdc, hgdiobj); 3197if (ret == IntPtr.Zero) 3210public static extern IntPtr SendMessage(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam); 3215private static extern bool _UnregisterClassAtom(IntPtr lpClassName, IntPtr hInstance); 3220private static extern bool _UnregisterClassName(string lpClassName, IntPtr hInstance); 3223public static void UnregisterClass(short atom, IntPtr hinstance) 3231public static void UnregisterClass(string lpClassName, IntPtr hInstance) 3243IntPtr hwnd, 3257IntPtr hwnd, 3258IntPtr hdcDst, 3259IntPtr pptDst, 3260IntPtr psize, 3261IntPtr hdcSrc, 3262IntPtr pptSrc, 3269IntPtr hwnd, 3287IntPtr hwnd, 3292if (!_UpdateLayeredWindowIntPtr(hwnd, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, crKey, ref pblend, dwFlags)) 3323private static extern HRESULT _DwmGetCompositionTimingInfo(IntPtr hwnd, ref DWM_TIMING_INFO pTimingInfo); 3325public static DWM_TIMING_INFO? DwmGetCompositionTimingInfo(IntPtr hwnd) 3347public static extern void DwmInvalidateIconicBitmaps(IntPtr hwnd); 3351public static extern void DwmSetIconicThumbnail(IntPtr hwnd, IntPtr hbmp, DWM_SIT dwSITFlags); 3355public static extern void DwmSetIconicLivePreviewBitmap(IntPtr hwnd, IntPtr hbmp, RefPOINT pptClient, DWM_SIT dwSITFlags);
System\Windows\Standard\ShellProvider.cs (84)
334public IntPtr hIcon; 381HRESULT Next(uint celt, out IntPtr rgelt, out int pceltFetched); 471[In] IntPtr hwnd, 475[Out] out IntPtr ppidl, 479[In] IntPtr hwnd, 486[In] IntPtr pidl, 492object BindToStorage([In] IntPtr pidl, [In] IBindCtx pbc, [In] ref Guid riid); 502HRESULT CompareIDs([In] IntPtr lParam, [In] IntPtr pidl1, [In] IntPtr pidl2); 514object CreateViewObject([In] IntPtr hwndOwner, [In] ref Guid riid); 523[In] IntPtr apidl, 532[In] IntPtr hwndOwner, 534[In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.SysInt, SizeParamIndex = 2)] IntPtr apidl, 545void GetDisplayNameOf([In] IntPtr pidl, [In] SHGDN uFlags, [Out] out IntPtr pName); 550void SetNameOf([In] IntPtr hwnd, 551[In] IntPtr pidl, 554[Out] out IntPtr ppidlOut); 639IntPtr rgKeys, 646IntPtr keyType, 652PROPVARIANT GetProperty(IntPtr key); 654Guid GetCLSID(IntPtr key); 656FILETIME GetFileTime(IntPtr key); 658int GetInt32(IntPtr key); 661string GetString(IntPtr key); 663uint GetUInt32(IntPtr key); 665ulong GetUInt64(IntPtr key); 668void GetBool(IntPtr key); 679void GetIDList(out IntPtr ppidl); 680void SetIDList(IntPtr pidl); 694void Resolve(IntPtr hwnd, uint fFlags); 714void AddTab(IntPtr hwnd); 720void DeleteTab(IntPtr hwnd); 726void ActivateTab(IntPtr hwnd); 732void SetActiveAlt(IntPtr hwnd); 744new void AddTab(IntPtr hwnd); 745new void DeleteTab(IntPtr hwnd); 746new void ActivateTab(IntPtr hwnd); 747new void SetActiveAlt(IntPtr hwnd); 762void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 883new void AddTab(IntPtr hwnd); 884new void DeleteTab(IntPtr hwnd); 885new void ActivateTab(IntPtr hwnd); 886new void SetActiveAlt(IntPtr hwnd); 889new void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 894HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 897HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 900HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 903HRESULT UnregisterTab(IntPtr hwndTab); 906HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 909HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 912HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 915HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 918HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 921HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 924HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 928HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip); 944new void AddTab(IntPtr hwnd); 945new void DeleteTab(IntPtr hwnd); 946new void ActivateTab(IntPtr hwnd); 947new void SetActiveAlt(IntPtr hwnd); 950new void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 954[PreserveSig] new HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 955[PreserveSig] new HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 956[PreserveSig] new HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 957[PreserveSig] new HRESULT UnregisterTab(IntPtr hwndTab); 958[PreserveSig] new HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 959[PreserveSig] new HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 960[PreserveSig] new HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 961[PreserveSig] new HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 962[PreserveSig] new HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 963[PreserveSig] new HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 964[PreserveSig] new HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 966[PreserveSig] new HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip); 970void SetTabProperties(IntPtr hwndTab, STPF stpFlags);
System\Windows\Standard\Utilities.cs (9)
49public static int GET_X_LPARAM(IntPtr lParam) 56public static int GET_Y_LPARAM(IntPtr lParam) 227public static void SafeDeleteObject(ref IntPtr gdiObject) 229IntPtr p = gdiObject; 230gdiObject = IntPtr.Zero; 231if (IntPtr.Zero != p) 238public static void SafeDestroyWindow(ref IntPtr hwnd) 240IntPtr p = hwnd; 241hwnd = IntPtr.Zero;
System\Windows\SystemCommands.cs (8)
33IntPtr hwnd = new WindowInteropHelper(window).Handle; 34if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd)) 39NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero); 82IntPtr hwnd = new WindowInteropHelper(window).Handle; 83if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd)) 88IntPtr hmenu = NativeMethods.GetSystemMenu(hwnd, false); 90uint cmd = NativeMethods.TrackPopupMenuEx(hmenu, TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD, (int)physicalScreenLocation.X, (int)physicalScreenLocation.Y, hwnd, IntPtr.Zero); 93NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
System\Windows\SystemParameters.cs (3)
5776HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 5780IntPtr dc = UnsafeNativeMethods.GetDC(desktopWnd); 5784if (dc == IntPtr.Zero)
System\Windows\SystemResources.cs (9)
1127parent: IntPtr.Zero, 1297private static void InvalidateTabletDevices(WindowMessage msg, IntPtr wParam, IntPtr lParam) 1339private static IntPtr SystemThemeFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1440return IntPtr.Zero ; 1527return DpiUtil.GetProcessDpiAwarenessContextValue(IntPtr.Zero);
System\Windows\ThemeManager.cs (2)
140IntPtr handle = new WindowInteropHelper(window).Handle; 142if (handle != IntPtr.Zero)
System\Windows\Window.cs (97)
267UnsafeNativeMethods.SendMessage( CriticalHandle, WindowMessage.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_MOUSEMOVE, IntPtr.Zero); 268UnsafeNativeMethods.SendMessage( CriticalHandle, WindowMessage.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero); 309_dialogOwnerHandle = IntPtr.Zero; 319if (_dialogOwnerHandle == IntPtr.Zero) 326if ((_dialogOwnerHandle != IntPtr.Zero) && 329_dialogOwnerHandle = IntPtr.Zero; 334if (_dialogOwnerHandle != IntPtr.Zero) 339while (_dialogOwnerHandle != IntPtr.Zero) 375IntPtr hWndCapture = SafeNativeMethods.GetCapture(); 376if (hWndCapture != IntPtr.Zero) 444if ( (_dialogPreviousActiveHandle != IntPtr.Zero) && 1245SetOwnerHandle(_ownerWindow != null ? _ownerWindow.CriticalHandle: IntPtr.Zero); 2749new HandleRef(null, IntPtr.Zero), 2832new HandleRef(null, IntPtr.Zero), 2933new HandleRef(null, IntPtr.Zero), 3097internal IntPtr CriticalHandle 3107return IntPtr.Zero; 3118internal IntPtr OwnerHandle 3498private bool ThreadWindowsCallback(IntPtr hWnd, IntPtr lparam) 3527IntPtr hWnd = (IntPtr)_threadWindowHandles[i]; 3652IntPtr GetCurrentMonitorFromMousePosition() 3699IntPtr hMonitor = IntPtr.Zero; 3700if ((_ownerHandle == IntPtr.Zero) || 3712if (hMonitor != IntPtr.Zero) 3736if (Owner.CriticalHandle == IntPtr.Zero) 3754if ((_ownerHandle != IntPtr.Zero) && UnsafeNativeMethods.IsWindow(new HandleRef(null, _ownerHandle))) 3782private static NativeMethods.RECT WorkAreaBoundsForHwnd(IntPtr hwnd) 3784IntPtr hMonitor = MonitorFromWindow(hwnd); 3789private static NativeMethods.RECT WorkAreaBoundsForMointor(IntPtr hMonitor) 3793Debug.Assert(hMonitor != IntPtr.Zero); 3799private static IntPtr MonitorFromWindow(IntPtr hwnd) 3801IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(null, hwnd), NativeMethods.MONITOR_DEFAULTTONEAREST); 3802if (hMonitor == IntPtr.Zero) 3817internal static void CalculateCenterScreenPosition(IntPtr hMonitor, Size currentSizeDeviceUnits, ref double leftDeviceUnits, ref double topDeviceUnits) 3866private Rect GetNormalRectDeviceUnits(IntPtr hwndHandle) 3893private Rect GetNormalRectLogicalUnits(IntPtr hwndHandle) 4038(IntPtr)NativeMethods.ICON_BIG, 4044(IntPtr)NativeMethods.ICON_SMALL, 4071private void SetOwnerHandle(IntPtr ownerHandle) 4080if (_ownerHandle == ownerHandle && _ownerHandle == IntPtr.Zero) 4088_ownerHandle = (IntPtr.Zero == ownerHandle && !ShowInTaskbar) 4155private IntPtr WindowFilterMessage( IntPtr hwnd, 4157IntPtr wParam, 4158IntPtr lParam, 4161IntPtr retInt = IntPtr.Zero ; 4234private bool WmCommand(IntPtr wParam, IntPtr lParam) 4394(_dialogPreviousActiveHandle != IntPtr.Zero) && 4492private bool WmActivate( IntPtr wParam ) 4535private bool WmSizeChanged(IntPtr wParam) 4769private bool WmGetMinMaxInfo( IntPtr lParam ) 4845private bool WmNcHitTest( IntPtr lParam, ref IntPtr refInt ) 4867internal virtual bool HandleWmNcHitTestMsg(IntPtr lParam, ref IntPtr refInt) 4932private bool WmShowWindow(IntPtr wParam, IntPtr lParam) 5910IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(this, CriticalHandle), NativeMethods.MONITOR_DEFAULTTONULL); 5912if (hMonitor != IntPtr.Zero) 6153new HandleRef(null, IntPtr.Zero), 6273IntPtr.Zero, 6296if (_ownerHandle == IntPtr.Zero) 6318SetOwnerHandle(IntPtr.Zero); 6326UnsafeNativeMethods.PostMessage(new HandleRef(this, CriticalHandle), WM_APPLYTASKBARITEMINFO, IntPtr.Zero, IntPtr.Zero); 6661nativeTB.hIcon = IntPtr.Zero; 6778if (manager.Dirty && CriticalHandle != IntPtr.Zero) 6780UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_STYLE, (IntPtr)_styleDoNotUse.Value); 6781UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,CriticalHandle), NativeMethods.GWL_EXSTYLE, (IntPtr)_styleExDoNotUse.Value); 6848SetOwnerHandle(IntPtr.Zero); 7160private IntPtr _ownerHandle = IntPtr.Zero; // no need to dispose this 7209private IntPtr _dialogOwnerHandle = IntPtr.Zero; 7210private IntPtr _dialogPreviousActiveHandle; 7301internal IntPtr CriticalHandle 7311return IntPtr.Zero; 7323IntPtr monitor; 7328if ( monitor != IntPtr.Zero ) 7738return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE; 7746/// happens in <see cref="MonitorEnumProc(IntPtr, IntPtr, ref Runtime.InteropServices.NativeMethods.RECT, IntPtr)"/>) 7753var nullHandle = new HandleRef(null, IntPtr.Zero); 7757IntPtr.Zero, 7759IntPtr.Zero); 7787private bool MonitorEnumProc(IntPtr hMonitor, IntPtr hdcMonitor, ref NativeMethods.RECT lprcMonitor, IntPtr dwData)
PresentationFramework-SystemDrawing (10)
SystemDrawingExtension.cs (10)
44internal override IntPtr GetHandleFromMetafile(Object data) 46IntPtr hMetafile = IntPtr.Zero; 59internal override Object GetMetafileFromHemf(IntPtr hMetafile) 72internal override IntPtr GetHBitmap(object data, out int width, out int height) 79return IntPtr.Zero; 91internal override IntPtr GetHBitmapFromBitmap(object data) 94return (bitmap != null) ? bitmap.GetHbitmap() : IntPtr.Zero; 98internal override IntPtr ConvertMetafileToHBitmap(IntPtr handle)
PresentationUI (26)
MS\Internal\Documents\Application\CommandEnforcer.cs (1)
139if ((!_isRMMissing) && (IntPtr.Size == 4))
MS\Internal\Documents\Application\FileController.cs (1)
460IntPtr.Zero, originalUri, doc.DestinationToken.Location);
MS\Internal\Documents\Application\NativeDirectoryServicesQueryAPIs.cs (4)
45[In] IntPtr hwndParent, 76public IntPtr pHandlerParameters; 78public IntPtr pPersistQuery; // Originally an IPersistQuery (not an IntPtr), which we do not use. 79public IntPtr pFormParameters; // Originally a union in the COM definition;
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (4)
202IntPtr handle = helper.Handle; 2290public WrapperIWin32Window(IntPtr handle) 2299IntPtr System.Windows.Forms.IWin32Window.Handle 2307private IntPtr _handle;
MS\Internal\Documents\DocumentSignatureManager.cs (5)
337internal void ShowSigningDialog(IntPtr parentWindow) 353IntPtr parentWindow, 707internal void OnSign(SignatureResources? signatureResources, IntPtr parentWindow) 744IntPtr parentWindow) 917private static X509Certificate2 ShowCertificatePickerDialog(IntPtr parentWindow)
MS\Internal\Documents\PeoplePickerWrapper.cs (11)
55internal String[] Show(IntPtr hWndParent) 119private IDataObject OpenQueryWindow(IntPtr hWndParent) 144IntPtr queryInitParamsPtr = Marshal.AllocCoTaskMem(Marshal.SizeOf(queryInitParams)); 177openQueryWindowParams.pPersistQuery = IntPtr.Zero; //We aren't persisting this query anywhere 178openQueryWindowParams.pFormParameters = IntPtr.Zero; //We aren't pre-populating the form 263private void ValidateHWnd(IntPtr hWndParent) 265if( hWndParent != IntPtr.Zero ) 324Invariant.Assert(_ptrToDsObjectNames != IntPtr.Zero, "Invalid pointer to DsObjectNames data."); 417IntPtr nameOffset = new IntPtr(_ptrToDsObjectNames.ToInt64() + dsObject.offsetName); 448IntPtr offset = new IntPtr(_ptrToDsObjectNames.ToInt64() + 495private IntPtr _ptrToDsObjectNames;
ReachFramework (56)
MS\Internal\Printing\Configuration\COMPSTUISRID.cs (1)
79this._compstuiHandle = UnsafeNativeMethods.LoadLibraryExW("compstui.dll", IntPtr.Zero, SafeLoadLibraryFlags);
MS\Internal\Printing\Configuration\DevMode.cs (2)
457public static DevMode FromIntPtr(IntPtr devModeWPointer) 459if (devModeWPointer == IntPtr.Zero)
MS\Internal\Printing\Configuration\SafeWinSpoolPrinterHandle.cs (2)
19: base(IntPtr.Zero, true) 29return (base.handle == IntPtr.Zero);
MS\Internal\Printing\Configuration\UnsafeNativeMethods.cs (7)
79public static extern uint PTCloseProviderImpl(IntPtr handle); 202out IntPtr devMode, 282public static extern bool ClosePrinter(IntPtr hPrinter); 285public static extern IntPtr CreateICW(string lpszDriver, string lpszDevice, string lpszOutput, SafeMemoryHandle devmodePtr); 297public static extern SafeModuleHandle LoadLibraryExW(string lpFileName, IntPtr hFile, LoadLibraryExFlags dwFlags); 300public static extern bool FreeLibrary(IntPtr hModule); 403out IntPtr devMode,
MS\Internal\Printing\Configuration\WinSpoolPrinterCapabilities.cs (8)
67IntPtr hdc = UnsafeNativeMethods.CreateICW(this._driverName, this._deviceName, null, this._devMode); 68if (hdc != IntPtr.Zero) 450IntPtr baseAddr = buffer.Handle.DangerousGetHandle(); 476IntPtr baseAddr = buffer.Handle.DangerousGetHandle(); 502IntPtr baseAddr = buffer.Handle.DangerousGetHandle(); 530IntPtr baseAddr = buffer.Handle.DangerousGetHandle(); 558IntPtr baseAddr = buffer.Handle.DangerousGetHandle(); 561IntPtr strAddr = new IntPtr(baseAddr.ToInt64() + offset);
Packaging\XpsDocument.cs (1)
922internal static void SaveWithUI(IntPtr parent, Uri source, Uri target)
PrintConfig\FallbackPTProvider.cs (17)
60if (false == UnsafeNativeMethods.OpenPrinterW(deviceName, out this._deviceHandle, new HandleRef(this, IntPtr.Zero))) 518result = UnsafeNativeMethods.DocumentPropertiesW(new HandleRef(this, IntPtr.Zero), this._deviceHandle, this._deviceName, outPtr, buffer, flags); 756IntPtr ptr = pPrinterBuffer.Handle.DangerousGetHandle(); 759IntPtr pPrinterName = Marshal.ReadIntPtr(ptr, 1 * Marshal.SizeOf(typeof(IntPtr))); 760if (pPrinterName != IntPtr.Zero) 766IntPtr pPortName = Marshal.ReadIntPtr(ptr, 3 * Marshal.SizeOf(typeof(IntPtr))); 767if (pPortName != IntPtr.Zero) 773IntPtr pDriverName = Marshal.ReadIntPtr(ptr, 4 * Marshal.SizeOf(typeof(IntPtr))); 774if (pDriverName != IntPtr.Zero) 780IntPtr pDevMode = Marshal.ReadIntPtr(ptr, 7 * Marshal.SizeOf(typeof(IntPtr))); 781if (pDevMode != IntPtr.Zero) 825IntPtr pDevMode = Marshal.ReadIntPtr(pPrinterBuffer.Handle.DangerousGetHandle()); 826if (pDevMode != IntPtr.Zero)
PrintConfig\PTProvider.cs (11)
54private SafePTProviderHandle() : base(IntPtr.Zero, true) 68return (IsClosed || (handle == IntPtr.Zero)); 400IntPtr umDevMode = Marshal.AllocCoTaskMem(devMode.Length); 432if (umDevMode != IntPtr.Zero) 435umDevMode = IntPtr.Zero; 468IntPtr umDevMode = IntPtr.Zero; 497if (umDevMode != IntPtr.Zero) 500umDevMode = IntPtr.Zero; 801uint hResult = UnsafeNativeMethods.CreateStreamOnHGlobal(SafeMemoryHandle.Wrap(IntPtr.Zero), true, out result); 821stream.Seek(0, 0 /*STREAM_SEEK_SET*/ , IntPtr.Zero);
PrintSystemExceptions\InteropWin32ApiThunk.cs (2)
31public extern static int InvokeFormatMessage(int a, IntPtr b , int c, int d, System.Text.StringBuilder e, int f, IntPtr g);
PrintSystemExceptions\PrintSystemException.cs (2)
277IntPtr.Zero, 282IntPtr.Zero);
Serialization\RCW\_SECURITY_ATTRIBUTES.cs (1)
24public IntPtr lpSecurityDescriptor;
Serialization\RCW\IPrintDocumentPackageTarget.cs (1)
31void GetPackageTarget([In] ref Guid guidTargetType, [In] ref Guid riid, out IntPtr ppvTarget);
Serialization\RCW\IXpsOMObjectFactory.cs (1)
162IXpsOMPackageWriter CreatePackageWriterOnFile([MarshalAs(UnmanagedType.LPWStr)] [In] string fileName, [In] IntPtr securityAttributes, [In] uint flagsAndAttributes, [In] int optimizeMarkupSize, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_INTERLEAVING")] [In] XPS_INTERLEAVING interleaving, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri documentSequencePartName, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMCoreProperties coreProperties, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMImageResource packageThumbnail, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMPrintTicketResource documentSequencePrintTicket, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri discardControlPartName);
System.Collections.Concurrent (7)
System\Collections\Concurrent\ConcurrentDictionary.cs (5)
2210if (IntPtr.Size == 8) 2227if (IntPtr.Size == 8) 2262if (IntPtr.Size == 8) 2304typeof(T) == typeof(IntPtr) || 2326return IntPtr.Size == 8;
System\Collections\Concurrent\PartitionerStatic.cs (2)
1659Debug.Assert((DEFAULT_BYTES_PER_CHUNK % IntPtr.Size) == 0, "bytes per chunk should be a multiple of pointer size"); 1660chunkSize = (DEFAULT_BYTES_PER_CHUNK / IntPtr.Size);
System.Collections.Immutable (1)
System\Collections\Frozen\Constants.cs (1)
82|| ((typeof(T) == typeof(nint) || typeof(T) == typeof(nuint)) && IntPtr.Size == 4);
System.Console (9)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.FileDescriptors.cs (1)
19return new SafeFileHandle((IntPtr)fileNumber, ownsHandle: false);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.FLock.cs (1)
28internal static partial int FLock(IntPtr fd, LockOperations operation);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
70username = Marshal.PtrToStringUTF8((IntPtr)passwd.Name);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Write.cs (1)
24internal static unsafe partial int Write(IntPtr fd, byte* buffer, int bufferSize);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
102path = Marshal.PtrToStringUTF8((IntPtr)passwd.HomeDirectory);
System.Diagnostics.DiagnosticSource (2)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
System.Diagnostics.FileVersionInfo (1)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
System.Diagnostics.Process (40)
Microsoft\Win32\SafeHandles\SafeProcessHandle.cs (3)
26: this(IntPtr.Zero) 30internal SafeProcessHandle(IntPtr handle) 40public SafeProcessHandle(IntPtr existingHandle, bool ownsHandle)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.ParseMapModules.cs (1)
67EntryPointAddress = IntPtr.Zero // unknown
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
36return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
70username = Marshal.PtrToStringUTF8((IntPtr)passwd.Name);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.FormatInfo.cs (1)
63Marshal.PtrToStringUTF8((IntPtr)formatBuffer)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SchedGetSetAffinity.cs (2)
12internal static partial int SchedSetAffinity(int pid, ref IntPtr mask); 15internal static partial int SchedGetAffinity(int pid, out IntPtr mask);
System\Diagnostics\Process.cs (9)
39private IntPtr _minWorkingSet; 40private IntPtr _maxWorkingSet; 43private IntPtr _processorAffinity; 130public IntPtr Handle => SafeHandle.DangerousGetHandle(); 264public IntPtr MaxWorkingSet 288public IntPtr MinWorkingSet 521public IntPtr ProcessorAffinity 1023private void SetWorkingSetLimits(IntPtr? min, IntPtr? max)
System\Diagnostics\Process.Linux.cs (11)
180private IntPtr ProcessorAffinityCore 186IntPtr set; 208private void GetWorkingSetLimits(out IntPtr minWorkingSet, out IntPtr maxWorkingSet) 210minWorkingSet = IntPtr.Zero; // no defined limit available 224switch (IntPtr.Size) 236maxWorkingSet = (IntPtr)rsslim; 245private static void SetWorkingSetLimitsCore(IntPtr? newMin, IntPtr? newMax, out IntPtr resultingMin, out IntPtr resultingMax)
System\Diagnostics\Process.Unix.cs (3)
843return new AnonymousPipeClientStream(direction, new SafePipeHandle((IntPtr)fd, ownsHandle: true)); 1055public IntPtr MainWindowHandle => IntPtr.Zero;
System\Diagnostics\ProcessModule.cs (2)
39public IntPtr BaseAddress { get; internal set; } 53public IntPtr EntryPointAddress { get; internal set; }
System\Diagnostics\ProcessStartInfo.cs (1)
154public IntPtr ErrorDialogParentHandle { get; set; }
System\Diagnostics\ProcessThread.cs (2)
114public unsafe IntPtr StartAddress 116get { return (IntPtr)_threadInfo._startAddress; }
System\Diagnostics\ProcessThread.Unix.cs (1)
45public IntPtr ProcessorAffinity
System.Diagnostics.StackTrace (15)
System\Diagnostics\StackTraceSymbols.cs (12)
53internal void GetSourceLineInfo(Assembly assembly, string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, bool isFileLayout, 54IntPtr inMemoryPdbAddress, int inMemoryPdbSize, int methodToken, int ilOffset, 118private unsafe MetadataReader? TryGetReader(Assembly assembly, string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, bool isFileLayout, IntPtr inMemoryPdbAddress, int inMemoryPdbSize) 120if (loadedPeAddress == IntPtr.Zero && assemblyPath == null && inMemoryPdbAddress == IntPtr.Zero) 128provider = inMemoryPdbAddress != IntPtr.Zero ? 144private static unsafe MetadataReaderProvider? TryOpenReaderForInMemoryPdb(IntPtr inMemoryPdbAddress, int inMemoryPdbSize) 146Debug.Assert(inMemoryPdbAddress != IntPtr.Zero); 170private static unsafe PEReader? TryGetPEReader(string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, bool isFileLayout) 172if (loadedPeAddress != IntPtr.Zero && loadedPeSize > 0) 186private static MetadataReaderProvider? TryOpenReaderFromAssemblyFile(string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, bool isFileLayout)
System\Diagnostics\SymbolStore\ISymbolBinder.cs (1)
16ISymbolReader? GetReader(IntPtr importer, string filename, string searchPath);
System\Diagnostics\SymbolStore\ISymbolWriter.cs (2)
14void Initialize(IntPtr emitter, string filename, bool fFullBuild); 171void SetUnderlyingWriter(IntPtr underlyingWriter);
System.DirectoryServices (1)
artifacts\obj\System.DirectoryServices\Debug\net9.0\System.DirectoryServices.notsupported.cs (1)
476public System.IntPtr Handle { get { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); } }
System.Formats.Tar (4)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
70username = Marshal.PtrToStringUTF8((IntPtr)passwd.Name);
System.IO.Compression (16)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (5)
19internal static readonly IntPtr ZNullPtr = IntPtr.Zero; 207SetHandle(IntPtr.Zero); 231public IntPtr NextIn 243public IntPtr NextOut
src\libraries\Common\src\System\IO\Compression\ZLibNative.ZStream.cs (4)
19internal IntPtr nextIn; //Bytef *next_in; /* next input byte */ 20internal IntPtr nextOut; //Bytef *next_out; /* next output byte should be put there */ 22internal IntPtr msg; //char *msg; /* last error message, NULL if no error */ 24private readonly IntPtr internalState; //internal state that is not visible to managed code
System\IO\Compression\DeflateZLib\Deflater.cs (3)
131_zlibStream.NextIn = (IntPtr)_inputBufferHandle.Pointer; 144_zlibStream.NextIn = (IntPtr)inputBufferPtr; 178_zlibStream.NextOut = (IntPtr)bufPtr;
System\IO\Compression\DeflateZLib\Inflater.cs (3)
152IntPtr nextInPtr = _zlibStream.NextIn; 204_zlibStream.NextIn = (IntPtr)_inputBufferHandle.Pointer; 278_zlibStream.NextOut = (IntPtr)bufPtr;
System\IO\Compression\ZipArchiveEntry.cs (1)
358private static readonly bool s_allowLargeZipArchiveEntriesInUpdateMode = IntPtr.Size > 4;
System.IO.Compression.Brotli (21)
src\libraries\Common\src\Interop\Interop.Brotli.cs (8)
14internal static partial SafeBrotliDecoderHandle BrotliDecoderCreateInstance(IntPtr allocFunc, IntPtr freeFunc, IntPtr opaque); 25internal static partial void BrotliDecoderDestroyInstance(IntPtr state); 31internal static partial SafeBrotliEncoderHandle BrotliEncoderCreateInstance(IntPtr allocFunc, IntPtr freeFunc, IntPtr opaque); 45internal static partial void BrotliEncoderDestroyInstance(IntPtr state);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBrotliHandle.cs (4)
11public SafeBrotliEncoderHandle() : base(IntPtr.Zero, true) { } 19public override bool IsInvalid => handle == IntPtr.Zero; 24public SafeBrotliDecoderHandle() : base(IntPtr.Zero, true) { } 32public override bool IsInvalid => handle == IntPtr.Zero;
System\IO\Compression\dec\BrotliDecoder.cs (3)
19_state = Interop.Brotli.BrotliDecoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
System\IO\Compression\enc\BrotliEncoder.cs (6)
27_state = Interop.Brotli.BrotliEncoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); 42_state = Interop.Brotli.BrotliEncoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
System.IO.Compression.ZipFile (3)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
System.IO.FileSystem.DriveInfo (5)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.cs (1)
31callbackContext->_results.Add(Marshal.PtrToStringUTF8((IntPtr)name)!);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.FormatInfo.cs (1)
63Marshal.PtrToStringUTF8((IntPtr)formatBuffer)!;
System.IO.FileSystem.Watcher (3)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
System.IO.IsolatedStorage (1)
System\IO\IsolatedStorage\IsolatedStorageFileStream.cs (1)
324public override IntPtr Handle
System.IO.MemoryMappedFiles (29)
Microsoft\Win32\SafeMemoryMappedFileHandle.Unix.cs (3)
53IntPtr handlePtr; 64handlePtr = IntPtr.MaxValue; 74SetHandle((IntPtr)(-1));
Microsoft\Win32\SafeMemoryMappedViewHandle.Unix.cs (2)
10internal SafeMemoryMappedViewHandle(IntPtr handle, bool ownsHandle) 18IntPtr addr = handle;
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Fcntl.cs (2)
14internal static partial int DangerousSetIsNonBlocking(IntPtr fd, int isNonBlocking); 29internal static partial int GetFD(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MAdvise.cs (1)
12internal static partial int MAdvise(IntPtr addr, ulong length, MemoryAdvice advice);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MMap.cs (5)
32internal static partial IntPtr MMap( 33IntPtr addr, ulong len, 39internal static partial IntPtr MMap( 40IntPtr addr, ulong len, 42IntPtr fd, long offset);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MSync.cs (1)
20internal static partial int MSync(IntPtr addr, ulong len, MemoryMappedSyncFlags flags);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MUnmap.cs (1)
12internal static partial int MUnmap(IntPtr addr, ulong len);
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (4)
295if (IntPtr.Size == 4 && capacity > uint.MaxValue) 352if (IntPtr.Size == 4 && capacity > uint.MaxValue) 411if (IntPtr.Size == 4 && size > uint.MaxValue) 445if (IntPtr.Size == 4 && size > uint.MaxValue)
System\IO\MemoryMappedFiles\MemoryMappedView.cs (1)
86if (IntPtr.Size == 4 && newSize > uint.MaxValue)
System\IO\MemoryMappedFiles\MemoryMappedView.Unix.cs (6)
80IntPtr addr; 84IntPtr.Zero, // don't specify an address; let the system choose one 99IntPtr.Zero, 108if (addr == IntPtr.Zero) // note that shim uses null pointer, not non-null MAP_FAILED sentinel 140(IntPtr)ptr, (ulong)capacity, 159private static void DisableForkingIfPossible(IntPtr addr, ulong length)
System.IO.Pipes (12)
Microsoft\Win32\SafeHandles\SafePipeHandle.cs (1)
25public SafePipeHandle(IntPtr preexistingHandle, bool ownsHandle)
Microsoft\Win32\SafeHandles\SafePipeHandle.Unix.cs (2)
56base.SetHandle((IntPtr)DefaultInvalidHandle); 133internal void SetHandle(IntPtr descriptor, bool ownsHandle = true)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Fcntl.cs (2)
14internal static partial int DangerousSetIsNonBlocking(IntPtr fd, int isNonBlocking); 29internal static partial int GetFD(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.FLock.cs (1)
28internal static partial int FLock(IntPtr fd, LockOperations operation);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
36return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
70username = Marshal.PtrToStringUTF8((IntPtr)passwd.Name);
System.Linq.Expressions (2)
System\Dynamic\Utils\DelegateHelpers.cs (1)
350return (t.IsPointer) ? typeof(IntPtr) : t;
System\Linq\Expressions\Compiler\DelegateHelpers.cs (1)
119Type[] delegateCtorSignature = { typeof(object), typeof(IntPtr) };
System.Linq.Parallel (2)
System\Linq\Parallel\Scheduling\Scheduling.cs (2)
88Debug.Assert((DEFAULT_BYTES_PER_CHUNK % IntPtr.Size) == 0, "bytes per chunk should be a multiple of pointer size"); 89chunkSize = (DEFAULT_BYTES_PER_CHUNK / IntPtr.Size);
System.Management (1)
artifacts\obj\System.Management\Debug\net9.0\System.Management.notsupported.cs (1)
159public static explicit operator System.IntPtr (System.Management.ManagementBaseObject managementObject) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemManagement); }
System.Net.Http (40)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
22protected DebugSafeHandle(IntPtr invalidValue, bool ownsHandle) : base(ownsHandle)
src\libraries\Common\src\System\Net\HttpKnownHeaderNames.TryGetHeaderName.cs (4)
33public static unsafe bool TryGetHeaderName(IntPtr buffer, int length, out string? name) 37if (buffer == IntPtr.Zero) 365private static unsafe bool EqualsOrdinal(string left, IntPtr right, int rightLength) 368Debug.Assert(right != IntPtr.Zero);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.Associate.cs (4)
59DataPointer = (IntPtr)string1Bytes, 64DataPointer = (IntPtr)string2Bytes, 69DataPointer = (IntPtr)string3Bytes, 74DataPointer = (IntPtr)string4Bytes,
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
System\Net\Http\HttpTelemetry.cs (20)
241DataPointer = (IntPtr)(arg1Ptr), 246DataPointer = (IntPtr)(arg2Ptr), 251DataPointer = (IntPtr)(&arg3), 256DataPointer = (IntPtr)(arg4Ptr), 261DataPointer = (IntPtr)(&arg5), 266DataPointer = (IntPtr)(&arg6), 271DataPointer = (IntPtr)(&arg7), 289DataPointer = (IntPtr)(&arg1), 294DataPointer = (IntPtr)(&arg2), 299DataPointer = (IntPtr)(&arg3), 316DataPointer = (IntPtr)(&arg1), 321DataPointer = (IntPtr)(&arg2), 326DataPointer = (IntPtr)(&arg3), 351DataPointer = (IntPtr)(&arg1), 356DataPointer = (IntPtr)(&arg2), 361DataPointer = (IntPtr)(&arg3), 366DataPointer = (IntPtr)arg4Ptr, 371DataPointer = (IntPtr)arg5Ptr, 376DataPointer = (IntPtr)(&arg6), 381DataPointer = (IntPtr)arg7Ptr,
System\Net\Http\NetEventSource.Http.cs (5)
93DataPointer = (IntPtr)(&arg1), 98DataPointer = (IntPtr)(&arg2), 103DataPointer = (IntPtr)(&arg3), 108DataPointer = (IntPtr)string4Bytes, 113DataPointer = (IntPtr)string5Bytes,
System.Net.HttpListener (18)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (4)
297protected void ProtectedInvokeCallback(object? result, IntPtr userToken) 340ProtectedInvokeCallback(result, IntPtr.Zero); 346ProtectedInvokeCallback(null, IntPtr.Zero); 353protected virtual void Complete(IntPtr userToken)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.Associate.cs (4)
59DataPointer = (IntPtr)string1Bytes, 64DataPointer = (IntPtr)string2Bytes, 69DataPointer = (IntPtr)string3Bytes, 74DataPointer = (IntPtr)string4Bytes,
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (4)
60DataPointer = (IntPtr)arg1Ptr, 65DataPointer = (IntPtr)arg2Ptr, 70DataPointer = (IntPtr)(&bufferLength), 75DataPointer = (IntPtr)arg3Ptr,
System.Net.Mail (19)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
src\libraries\Common\src\System\Net\ContextAwareResult.cs (4)
324base.Complete(IntPtr.Zero); 332protected override void Complete(IntPtr userToken) 355if (userToken != IntPtr.Zero || context == null) 367base.Complete(IntPtr.Zero);
src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
22protected DebugSafeHandle(IntPtr invalidValue, bool ownsHandle) : base(ownsHandle)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (4)
297protected void ProtectedInvokeCallback(object? result, IntPtr userToken) 340ProtectedInvokeCallback(result, IntPtr.Zero); 346ProtectedInvokeCallback(null, IntPtr.Zero); 353protected virtual void Complete(IntPtr userToken)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.Associate.cs (4)
59DataPointer = (IntPtr)string1Bytes, 64DataPointer = (IntPtr)string2Bytes, 69DataPointer = (IntPtr)string3Bytes, 74DataPointer = (IntPtr)string4Bytes,
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
System.Net.NameResolution (15)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
36return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Socket.cs (1)
14internal static unsafe partial Error Socket(int addressFamily, int socketType, int protocolType, IntPtr* socket);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
152uint addr = (uint)System.Runtime.InteropServices.Marshal.ReadInt32((IntPtr)address);
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (3)
21IntPtr invalid = (IntPtr)(-1); 22IntPtr socket = invalid;
System\Net\NameResolutionPal.Unix.cs (3)
53? Marshal.PtrToStringUTF8((IntPtr)hostEntry.CanonicalName) 109localAliases[i] = Marshal.PtrToStringUTF8((IntPtr)hostEntry.Aliases[i])!; 180return socketError == SocketError.Success ? Marshal.PtrToStringUTF8((IntPtr)buffer) : null;
System.Net.NetworkInformation (13)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetDomainName.cs (1)
34return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
36return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.NetworkChange.cs (2)
20public static unsafe partial Error CreateNetworkChangeListenerSocket(IntPtr* socket); 23public static unsafe partial Error ReadEvents(SafeHandle socket, delegate* unmanaged<IntPtr, NetworkChangeKind, void> onNetworkChange);
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
System\Net\NetworkInformation\LinuxNetworkInterface.cs (4)
80IntPtr globalMemory = (IntPtr)null; 88globalMemory = (IntPtr)nii; 96var lni = new LinuxNetworkInterface(Marshal.PtrToStringUTF8((IntPtr)nii->Name)!, nii->InterfaceIndex, systemProperties);
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (2)
157IntPtr newSocket; 222private static void ProcessEvent(IntPtr socket, Interop.Sys.NetworkChangeKind kind)
System.Net.Ping (7)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Socket.cs (1)
14internal static unsafe partial Error Socket(int addressFamily, int socketType, int protocolType, IntPtr* socket);
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
152uint addr = (uint)System.Runtime.InteropServices.Marshal.ReadInt32((IntPtr)address);
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (3)
21IntPtr invalid = (IntPtr)(-1); 22IntPtr socket = invalid;
System.Net.Primitives (13)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetDomainName.cs (1)
34return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
36return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
152uint addr = (uint)System.Runtime.InteropServices.Marshal.ReadInt32((IntPtr)address);
System\Net\NetworkCredential.cs (3)
161IntPtr ptr = IntPtr.Zero; 170if (ptr != IntPtr.Zero)
System.Net.Quic (127)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs (12)
19private static unsafe partial int ObjObj2Txt(byte* buf, int buf_len, IntPtr a); 22private static partial IntPtr CryptoNative_GetObjectDefinitionByName(string friendlyName); 23internal static IntPtr GetObjectDefinitionByName(string friendlyName) 25IntPtr ret = CryptoNative_GetObjectDefinitionByName(friendlyName); 26if (ret == IntPtr.Zero) 36internal static partial IntPtr ObjNid2Obj(int nid); 39internal static partial void Asn1ObjectFree(IntPtr o); 45internal static partial void Asn1BitStringFree(IntPtr o); 55internal static partial void Asn1OctetStringFree(IntPtr o); 57internal static unsafe string GetOidValue(IntPtr asn1ObjectPtr) 76return Marshal.PtrToStringUTF8((IntPtr)bufStack, bytesNeeded); 102return Marshal.PtrToStringUTF8((IntPtr)buf, bytesNeeded);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.BIO.cs (1)
20internal static partial bool BioDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Crypto.cs (9)
37private static partial int GetX509NameRawBytes(IntPtr x509Name, byte[]? buf, int cBuf); 43internal static partial IntPtr GetX509CrlNextUpdate(SafeX509CrlHandle crl); 55internal static partial IntPtr GetX509EkuField(SafeEkuExtensionHandle eku, int loc); 61private static partial int GetAsn1StringBytes(IntPtr asn1, byte[]? buf, int cBuf); 74IntPtr ptr = GetX509RootStorePath_private(&usedDefault); 86private static unsafe partial IntPtr GetX509RootStorePath_private(byte* defaultPath); 89private static unsafe partial IntPtr GetX509RootStoreFile_private(byte* defaultPath); 108internal static byte[] GetAsn1StringBytes(IntPtr asn1) 118internal static X500DistinguishedName LoadX500Name(IntPtr namePtr)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (4)
27internal static partial IntPtr ErrReasonErrorString(ulong error); 40ret = Marshal.PtrToStringUTF8((IntPtr)buf)!; 100internal static void CheckValidOpenSslHandle(IntPtr handle) 102if (handle == IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509.cs (22)
16internal static partial IntPtr GetX509NotBefore(SafeX509Handle x509); 19internal static partial IntPtr GetX509NotAfter(SafeX509Handle x509); 22internal static partial IntPtr GetX509SignatureAlgorithm(SafeX509Handle x509); 25internal static partial IntPtr GetX509PublicKeyAlgorithm(SafeX509Handle x509); 28internal static partial IntPtr GetX509PublicKeyBytes(SafeX509Handle x509); 40internal static partial SafeX509Handle DecodeX509(IntPtr buf, int len); 49internal static partial void X509Destroy(IntPtr a); 55internal static partial SafeX509Handle X509Duplicate(IntPtr handle); 68internal static partial SafeX509Handle X509UpRef(IntPtr handle); 96internal static partial IntPtr X509GetIssuerName(SafeX509Handle x); 99internal static partial IntPtr X509GetSubjectName(SafeX509Handle x); 129internal static partial IntPtr X509GetExt(SafeX509Handle x, int loc); 133internal static partial IntPtr X509ExtensionGetOid(IntPtr ex); 137internal static partial IntPtr X509ExtensionGetData(IntPtr ex); 141internal static partial bool X509ExtensionGetCritical(IntPtr ex); 161internal static partial void X509StoreDestroy(IntPtr v); 240private static unsafe partial int CryptoNative_X509StoreCtxSetVerifyCallback(SafeX509StoreCtxHandle ctx, delegate* unmanaged<int, IntPtr, int> callback, void* appData); 242internal static unsafe void X509StoreCtxSetVerifyCallback(SafeX509StoreCtxHandle ctx, delegate* unmanaged<int, IntPtr, int> callback, void* appData) 259private static partial IntPtr CryptoNative_X509VerifyCertErrorString(int n); 262internal static partial void X509CrlDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Ext.cs (2)
19internal static partial int X509ExtensionDestroy(IntPtr x); 38internal static partial void ExtendedKeyUsageDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Name.cs (2)
52base(IntPtr.Zero, ownsHandle: true) 64base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (7)
16internal static partial void RecursiveFreeX509Stack(IntPtr stack); 29internal static partial IntPtr GetX509StackField(SafeX509StackHandle stack, int loc); 36internal static partial IntPtr GetX509StackField(SafeSharedX509StackHandle stack, int loc); 67base(IntPtr.Zero, ownsHandle: true) 74SetHandle(IntPtr.Zero); 80get { return handle == IntPtr.Zero; } 104base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (5)
16internal static partial void X509StoreCtxDestroy(IntPtr v); 75base(IntPtr.Zero, ownsHandle: true) 79internal SafeX509StoreCtxHandle(IntPtr handle, bool ownsHandle) : 87SetHandle(IntPtr.Zero); 93get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (11)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; } 32base(IntPtr.Zero, ownsHandle: true) 39SetHandle(IntPtr.Zero); 45get { return handle == IntPtr.Zero; } 52base(IntPtr.Zero, ownsHandle: true) 59SetHandle(IntPtr.Zero); 65get { return handle == IntPtr.Zero; } 72base(IntPtr.Zero, ownsHandle: true) 80base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (4)
16base(IntPtr.Zero, ownsHandle: true) 22IntPtr h = handle; 23SetHandle(IntPtr.Zero); 44return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (3)
14protected SafeInteriorHandle(IntPtr invalidHandleValue, bool ownsHandle) 28SetHandle(IntPtr.Zero); 38return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (9)
31base(IntPtr.Zero, ownsHandle: true) 38SetHandle(IntPtr.Zero); 44get { return handle == IntPtr.Zero; } 51base(IntPtr.Zero, ownsHandle: true) 58SetHandle(IntPtr.Zero); 64get { return handle == IntPtr.Zero; } 71base(IntPtr.Zero, ownsHandle: true) 78SetHandle(IntPtr.Zero); 84get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (6)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; } 33base(IntPtr.Zero, ownsHandle: true) 40SetHandle(IntPtr.Zero); 46get { return handle == IntPtr.Zero; }
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
152uint addr = (uint)System.Runtime.InteropServices.Marshal.ReadInt32((IntPtr)address);
System\Net\Quic\Internal\MsQuicApi.cs (2)
76IntPtr msQuicHandle; 157string? gitHash = Marshal.PtrToStringUTF8((IntPtr)libGitHash);
System\Net\Quic\Internal\MsQuicConfiguration.cs (3)
17=> certificate is X509Certificate2 certificate2 && certificate2.Handle != IntPtr.Zero && certificate2.HasPrivateKey; 221(void*)IntPtr.Zero, 273PrivateKeyPassword = (sbyte*)IntPtr.Zero
System\Net\Quic\Internal\MsQuicExtensions.cs (4)
21=> $"{{ {nameof(NEW_CONNECTION.Info)} = {{ {nameof(QUIC_NEW_CONNECTION_INFO.QuicVersion)} = {NEW_CONNECTION.Info->QuicVersion}, {nameof(QUIC_NEW_CONNECTION_INFO.LocalAddress)} = {MsQuicHelpers.QuicAddrToIPEndPoint(NEW_CONNECTION.Info->LocalAddress)}, {nameof(QUIC_NEW_CONNECTION_INFO.RemoteAddress)} = {MsQuicHelpers.QuicAddrToIPEndPoint(NEW_CONNECTION.Info->RemoteAddress)} }}, {nameof(NEW_CONNECTION.Connection)} = 0x{(IntPtr)NEW_CONNECTION.Connection:X11} }}", 44=> $"{{ {nameof(PEER_STREAM_STARTED.Stream)} = 0x{(IntPtr)PEER_STREAM_STARTED.Stream:X11} {nameof(PEER_STREAM_STARTED.Flags)} = {PEER_STREAM_STARTED.Flags} }}", 56=> $"{{ {nameof(DATAGRAM_SEND_STATE_CHANGED.ClientContext)} = 0x{(IntPtr)DATAGRAM_SEND_STATE_CHANGED.ClientContext:X11}, {nameof(DATAGRAM_SEND_STATE_CHANGED.State)} = {DATAGRAM_SEND_STATE_CHANGED.State} }}", 62=> $"{{ {nameof(PEER_CERTIFICATE_RECEIVED.DeferredStatus)} = {PEER_CERTIFICATE_RECEIVED.DeferredStatus}, {nameof(PEER_CERTIFICATE_RECEIVED.DeferredErrorFlags)} = {PEER_CERTIFICATE_RECEIVED.DeferredErrorFlags}, {nameof(PEER_CERTIFICATE_RECEIVED.Certificate)} = 0x{(IntPtr)PEER_CERTIFICATE_RECEIVED.Certificate:X11} }}",
System\Net\Quic\Internal\MsQuicSafeHandle.cs (3)
28public override bool IsInvalid => handle == IntPtr.Zero; 33: base((IntPtr)handle, ownsHandle: true) 62SetHandle(IntPtr.Zero);
System\Net\Quic\QuicConnection.cs (4)
349IntPtr targetHostPtr = Marshal.StringToCoTaskMemUTF8(sni); 618var task = _sslConnectionOptions.StartAsyncCertificateValidation((IntPtr)data.Certificate, (IntPtr)data.Chain); 646GCHandle stateHandle = GCHandle.FromIntPtr((IntPtr)context);
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (3)
69internal async Task<bool> StartAsyncCertificateValidation(IntPtr certificatePtr, IntPtr chainPtr) 83if (certificatePtr != IntPtr.Zero)
System\Net\Quic\QuicListener.cs (2)
344SslClientHelloInfo clientHello = new SslClientHelloInfo(data.Info->ServerNameLength > 0 ? Marshal.PtrToStringUTF8((IntPtr)data.Info->ServerName, data.Info->ServerNameLength) : "", SslProtocols.Tls13); 371GCHandle stateHandle = GCHandle.FromIntPtr((IntPtr)context);
System\Net\Quic\QuicStream.cs (1)
660GCHandle stateHandle = GCHandle.FromIntPtr((IntPtr)context);
System.Net.Requests (21)
src\libraries\Common\src\System\Net\ContextAwareResult.cs (4)
324base.Complete(IntPtr.Zero); 332protected override void Complete(IntPtr userToken) 355if (userToken != IntPtr.Zero || context == null) 367base.Complete(IntPtr.Zero);
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (4)
297protected void ProtectedInvokeCallback(object? result, IntPtr userToken) 340ProtectedInvokeCallback(result, IntPtr.Zero); 346ProtectedInvokeCallback(null, IntPtr.Zero); 353protected virtual void Complete(IntPtr userToken)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.Associate.cs (4)
59DataPointer = (IntPtr)string1Bytes, 64DataPointer = (IntPtr)string2Bytes, 69DataPointer = (IntPtr)string3Bytes, 74DataPointer = (IntPtr)string4Bytes,
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
System\Net\TimerThread.cs (5)
169private IntPtr _thisHandle; 205if (_thisHandle == IntPtr.Zero) 207_thisHandle = (IntPtr)GCHandle.Alloc(this); 245if (_thisHandle != IntPtr.Zero) 248_thisHandle = IntPtr.Zero;
System.Net.Security (281)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs (6)
17internal IntPtr _data; 24if (_data == IntPtr.Zero || _length == 0) 43if (_data == IntPtr.Zero || _length == 0) 54internal unsafe ReadOnlySpan<byte> Span => (_data != IntPtr.Zero && _length != 0) ? 60if (_data != IntPtr.Zero) 63_data = IntPtr.Zero;
src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.cs (6)
16IntPtr bufferPtr, 48ref IntPtr inputName); 73ref IntPtr credHandle); 95IntPtr cbt, 136IntPtr cbt, 195ref IntPtr contextHandle);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs (12)
19private static unsafe partial int ObjObj2Txt(byte* buf, int buf_len, IntPtr a); 22private static partial IntPtr CryptoNative_GetObjectDefinitionByName(string friendlyName); 23internal static IntPtr GetObjectDefinitionByName(string friendlyName) 25IntPtr ret = CryptoNative_GetObjectDefinitionByName(friendlyName); 26if (ret == IntPtr.Zero) 36internal static partial IntPtr ObjNid2Obj(int nid); 39internal static partial void Asn1ObjectFree(IntPtr o); 45internal static partial void Asn1BitStringFree(IntPtr o); 55internal static partial void Asn1OctetStringFree(IntPtr o); 57internal static unsafe string GetOidValue(IntPtr asn1ObjectPtr) 76return Marshal.PtrToStringUTF8((IntPtr)bufStack, bytesNeeded); 102return Marshal.PtrToStringUTF8((IntPtr)buf, bytesNeeded);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.BIO.cs (1)
20internal static partial bool BioDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Crypto.cs (9)
37private static partial int GetX509NameRawBytes(IntPtr x509Name, byte[]? buf, int cBuf); 43internal static partial IntPtr GetX509CrlNextUpdate(SafeX509CrlHandle crl); 55internal static partial IntPtr GetX509EkuField(SafeEkuExtensionHandle eku, int loc); 61private static partial int GetAsn1StringBytes(IntPtr asn1, byte[]? buf, int cBuf); 74IntPtr ptr = GetX509RootStorePath_private(&usedDefault); 86private static unsafe partial IntPtr GetX509RootStorePath_private(byte* defaultPath); 89private static unsafe partial IntPtr GetX509RootStoreFile_private(byte* defaultPath); 108internal static byte[] GetAsn1StringBytes(IntPtr asn1) 118internal static X500DistinguishedName LoadX500Name(IntPtr namePtr)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (4)
27internal static partial IntPtr ErrReasonErrorString(ulong error); 40ret = Marshal.PtrToStringUTF8((IntPtr)buf)!; 100internal static void CheckValidOpenSslHandle(IntPtr handle) 102if (handle == IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OCSP.cs (11)
15internal static partial void OcspRequestDestroy(IntPtr ocspReq); 24internal static partial SafeOcspRequestHandle X509BuildOcspRequest(IntPtr subject, IntPtr issuer); 31IntPtr subject, 32IntPtr* issuers, 39IntPtr x509Subject, 40ReadOnlySpan<IntPtr> x509Issuers, 47fixed (IntPtr* pIssuers = x509Issuers) 92internal static partial void OcspResponseDestroy(IntPtr ocspReq); 108handle = IntPtr.Zero; 123handle = IntPtr.Zero;
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (26)
188Interop.Ssl.SslCtxSetAlpnSelectCb(sslCtx, &AlpnServerSelectCallback, IntPtr.Zero); 340Debug.Assert(Interop.Ssl.SslGetData(sslHandle) == IntPtr.Zero); 401Span<IntPtr> handles = certList.Count <= 256 ? 402stackalloc IntPtr[256] : 403new IntPtr[certList.Count]; 604internal static IntPtr GetPeerCertificate(SafeSslHandle context) 635private static int VerifyClientCertificate(int preverify_ok, IntPtr x509_ctx_ptr) 647private static unsafe int AlpnServerSelectCallback(IntPtr ssl, byte** outp, byte* outlen, byte* inp, uint inlen, IntPtr arg) 651IntPtr sslData = Ssl.SslGetData(ssl); 653if (sslData == IntPtr.Zero) 706private static unsafe int NewSessionCallback(IntPtr ssl, IntPtr session) 708Debug.Assert(ssl != IntPtr.Zero); 709Debug.Assert(session != IntPtr.Zero); 711IntPtr ptr = Ssl.SslGetData(ssl); 712if (ptr != IntPtr.Zero) 731private static unsafe void RemoveSessionCallback(IntPtr ctx, IntPtr session) 733Debug.Assert(ctx != IntPtr.Zero && session != IntPtr.Zero); 735IntPtr ptr = Ssl.SslCtxGetData(ctx); 736if (ptr == IntPtr.Zero) 749IntPtr name = Ssl.SessionGetHostname(session); 750Debug.Assert(name != IntPtr.Zero); 755private static unsafe void KeyLogCallback(IntPtr ssl, char* line)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SetProtocolOptions.cs (1)
14internal static partial void SslCtxSetProtocolOptions(IntPtr ctx, SslProtocols protocols);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (36)
26internal static partial IntPtr SslV2_3Method(); 35internal static partial SslErrorCode SslGetError(IntPtr ssl, int ret); 41internal static partial void SslDestroy(IntPtr ssl); 53internal static partial IntPtr SslGetVersion(SafeSslHandle ssl); 60internal static unsafe partial IntPtr SslGetServerName(IntPtr ssl); 63internal static unsafe partial int SslSetSession(SafeSslHandle ssl, IntPtr session); 66internal static partial void SslGetAlpnSelected(SafeSslHandle ssl, out IntPtr protocol, out int len); 70IntPtr protocol; 94internal static partial int SslShutdown(IntPtr ssl); 117internal static partial IntPtr SslGetPeerCertificate(SafeSslHandle ssl); 123internal static partial int SslGetPeerFinished(SafeSslHandle ssl, IntPtr buf, int count); 126internal static partial int SslGetFinished(SafeSslHandle ssl, IntPtr buf, int count); 140private static partial IntPtr GetOpenSslCipherSuiteName(SafeSslHandle ssl, int cipherSuite, out int isTls12OrLower); 150internal static partial IntPtr SslGetData(IntPtr ssl); 153internal static partial IntPtr SslGetData(SafeSslHandle ssl); 156internal static partial int SslSetData(SafeSslHandle ssl, IntPtr data); 159internal static partial int SslSetData(IntPtr ssl, IntPtr data); 177internal static partial IntPtr SessionGetHostname(IntPtr session); 180internal static partial void SessionFree(IntPtr session); 183internal static partial int SessionSetHostname(IntPtr session, IntPtr name); 243private static unsafe partial bool SslAddClientCAs(SafeSslHandle ssl, IntPtr* x509s, int count); 245internal static unsafe bool SslAddClientCAs(SafeSslHandle ssl, Span<IntPtr> x509handles) 247fixed (IntPtr* pHandles = &MemoryMarshal.GetReference(x509handles)) 308internal static readonly IntPtr SSLv23_method = SslV2_3Method(); 412get { return handle == IntPtr.Zero; } 437Interop.Ssl.SslSetData(handle, IntPtr.Zero); 441IntPtr h = handle; 442SetHandle(IntPtr.Zero); 470public SafeSslHandle() : base(IntPtr.Zero, true) 474internal SafeSslHandle(IntPtr validSslPointer, bool ownsHandle) : base(IntPtr.Zero, ownsHandle)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtx.cs (40)
19internal static partial SafeSslContextHandle SslCtxCreate(IntPtr method); 22internal static partial void SslCtxDestroy(IntPtr ctx); 25internal static partial IntPtr SslCtxGetData(IntPtr ctx); 28internal static partial int SslCtxSetData(SafeSslContextHandle ctx, IntPtr data); 31internal static partial int SslCtxSetData(IntPtr ctx, IntPtr data); 34internal static unsafe partial void SslCtxSetAlpnSelectCb(SafeSslContextHandle ctx, delegate* unmanaged<IntPtr, byte**, byte*, byte*, uint, IntPtr, int> callback, IntPtr arg); 37internal static unsafe partial void SslCtxSetKeylogCallback(SafeSslContextHandle ctx, delegate* unmanaged<IntPtr, char*, void> callback); 40internal static unsafe partial int SslCtxSetCaching(SafeSslContextHandle ctx, int mode, int cacheSize, int contextIdLength, Span<byte> contextId, delegate* unmanaged<IntPtr, IntPtr, int> neewSessionCallback, delegate* unmanaged<IntPtr, IntPtr, void> removeSessionCallback); 43internal static unsafe partial void SslCtxRemoveSession(SafeSslContextHandle ctx, IntPtr session); 71private Dictionary<string, IntPtr>? _sslSessions; 75: base(IntPtr.Zero, true) 79internal SafeSslContextHandle(IntPtr handle, bool ownsHandle) 86get { return handle == IntPtr.Zero; } 96Interop.Ssl.SslCtxSetData(handle, IntPtr.Zero); 100foreach (IntPtr session in _sslSessions.Values) 113SetHandle(IntPtr.Zero); 122_sslSessions = new Dictionary<string, IntPtr>(); 126Interop.Ssl.SslCtxSetData(this, (IntPtr)_gch); 129internal bool TryAddSession(IntPtr namePtr, IntPtr session) 131Debug.Assert(_sslSessions != null && session != IntPtr.Zero); 133if (_sslSessions == null || namePtr == IntPtr.Zero) 148IntPtr oldSession = IntPtr.Zero; 161if (oldSession != IntPtr.Zero) 179internal void RemoveSession(IntPtr namePtr, IntPtr session) 188IntPtr oldSession = IntPtr.Zero; 192if (_sslSessions.TryGetValue(targetName, out IntPtr existingSession) && existingSession == session) 219Debug.Assert(Interop.Ssl.SslGetData(sslHandle) == IntPtr.Zero); 220Interop.Ssl.SslSetData(sslHandle, (IntPtr)_gch); 224if (_sslSessions.TryGetValue(name, out IntPtr session))
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509.cs (22)
16internal static partial IntPtr GetX509NotBefore(SafeX509Handle x509); 19internal static partial IntPtr GetX509NotAfter(SafeX509Handle x509); 22internal static partial IntPtr GetX509SignatureAlgorithm(SafeX509Handle x509); 25internal static partial IntPtr GetX509PublicKeyAlgorithm(SafeX509Handle x509); 28internal static partial IntPtr GetX509PublicKeyBytes(SafeX509Handle x509); 40internal static partial SafeX509Handle DecodeX509(IntPtr buf, int len); 49internal static partial void X509Destroy(IntPtr a); 55internal static partial SafeX509Handle X509Duplicate(IntPtr handle); 68internal static partial SafeX509Handle X509UpRef(IntPtr handle); 96internal static partial IntPtr X509GetIssuerName(SafeX509Handle x); 99internal static partial IntPtr X509GetSubjectName(SafeX509Handle x); 129internal static partial IntPtr X509GetExt(SafeX509Handle x, int loc); 133internal static partial IntPtr X509ExtensionGetOid(IntPtr ex); 137internal static partial IntPtr X509ExtensionGetData(IntPtr ex); 141internal static partial bool X509ExtensionGetCritical(IntPtr ex); 161internal static partial void X509StoreDestroy(IntPtr v); 240private static unsafe partial int CryptoNative_X509StoreCtxSetVerifyCallback(SafeX509StoreCtxHandle ctx, delegate* unmanaged<int, IntPtr, int> callback, void* appData); 242internal static unsafe void X509StoreCtxSetVerifyCallback(SafeX509StoreCtxHandle ctx, delegate* unmanaged<int, IntPtr, int> callback, void* appData) 259private static partial IntPtr CryptoNative_X509VerifyCertErrorString(int n); 262internal static partial void X509CrlDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Ext.cs (2)
19internal static partial int X509ExtensionDestroy(IntPtr x); 38internal static partial void ExtendedKeyUsageDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Name.cs (2)
52base(IntPtr.Zero, ownsHandle: true) 64base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (7)
16internal static partial void RecursiveFreeX509Stack(IntPtr stack); 29internal static partial IntPtr GetX509StackField(SafeX509StackHandle stack, int loc); 36internal static partial IntPtr GetX509StackField(SafeSharedX509StackHandle stack, int loc); 67base(IntPtr.Zero, ownsHandle: true) 74SetHandle(IntPtr.Zero); 80get { return handle == IntPtr.Zero; } 104base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (5)
16internal static partial void X509StoreCtxDestroy(IntPtr v); 75base(IntPtr.Zero, ownsHandle: true) 79internal SafeX509StoreCtxHandle(IntPtr handle, bool ownsHandle) : 87SetHandle(IntPtr.Zero); 93get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (11)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; } 32base(IntPtr.Zero, ownsHandle: true) 39SetHandle(IntPtr.Zero); 45get { return handle == IntPtr.Zero; } 52base(IntPtr.Zero, ownsHandle: true) 59SetHandle(IntPtr.Zero); 65get { return handle == IntPtr.Zero; } 72base(IntPtr.Zero, ownsHandle: true) 80base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\GssSafeHandles.cs (9)
52get { return handle == IntPtr.Zero; } 58SetHandle(IntPtr.Zero); 63: base(IntPtr.Zero, true) 134: base(IntPtr.Zero, true) 140get { return handle == IntPtr.Zero; } 146SetHandle(IntPtr.Zero); 159: base(IntPtr.Zero, true) 165get { return handle == IntPtr.Zero; } 171SetHandle(IntPtr.Zero);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (4)
16base(IntPtr.Zero, ownsHandle: true) 22IntPtr h = handle; 23SetHandle(IntPtr.Zero); 44return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (3)
14protected SafeInteriorHandle(IntPtr invalidHandleValue, bool ownsHandle) 28SetHandle(IntPtr.Zero); 38return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (9)
31base(IntPtr.Zero, ownsHandle: true) 38SetHandle(IntPtr.Zero); 44get { return handle == IntPtr.Zero; } 51base(IntPtr.Zero, ownsHandle: true) 58SetHandle(IntPtr.Zero); 64get { return handle == IntPtr.Zero; } 71base(IntPtr.Zero, ownsHandle: true) 78SetHandle(IntPtr.Zero); 84get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (6)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; } 33base(IntPtr.Zero, ownsHandle: true) 40SetHandle(IntPtr.Zero); 46get { return handle == IntPtr.Zero; }
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
22protected DebugSafeHandle(IntPtr invalidValue, bool ownsHandle) : base(ownsHandle)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (4)
60DataPointer = (IntPtr)arg1Ptr, 65DataPointer = (IntPtr)arg2Ptr, 70DataPointer = (IntPtr)(&bufferLength), 75DataPointer = (IntPtr)arg3Ptr,
src\libraries\Common\src\System\Net\Security\Unix\SafeDeleteContext.cs (3)
16public SafeDeleteContext(IntPtr handle) : base(handle, true) 20public SafeDeleteContext(IntPtr handle, bool ownsHandle) : base(handle, ownsHandle) 26get { return (IntPtr.Zero == handle); }
src\libraries\Common\src\System\Net\Security\Unix\SafeDeleteSslContext.cs (2)
17public SafeDeleteSslContext(IntPtr handle) : base(handle, true) 21public SafeDeleteSslContext(IntPtr handle, bool ownsHandle) : base(handle, ownsHandle)
src\libraries\Common\src\System\Net\Security\Unix\SafeFreeCredentials.cs (1)
26protected SafeFreeCredentials(IntPtr handle, bool ownsHandle) : base(handle, ownsHandle)
System\Net\CertificateValidationPal.Unix.cs (5)
39IntPtr remoteCertificate = Interop.OpenSsl.GetPeerCertificate((SafeSslHandle)securityContext); 42if (remoteCertificate == IntPtr.Zero) 66IntPtr certPtr = Interop.Crypto.GetX509StackField(chainStack, i); 68if (certPtr != IntPtr.Zero) 86if (remoteCertificate != IntPtr.Zero)
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (1)
434IntPtr cbtData = (nint)_channelBinding.DangerousGetHandle() + appDataOffset;
System\Net\NegotiateAuthenticationPal.Unix.cs (1)
592IntPtr cbtAppData = channelBinding.DangerousGetHandle() + appDataOffset;
System\Net\Security\NetEventSource.Security.cs (8)
298DataPointer = (IntPtr)(arg1Ptr), 303DataPointer = (IntPtr)(&arg2), 308DataPointer = (IntPtr)(&arg3), 313DataPointer = (IntPtr)(&arg4), 318DataPointer = (IntPtr)(&arg5), 323DataPointer = (IntPtr)(&arg6), 328DataPointer = (IntPtr)(&arg7), 333DataPointer = (IntPtr)(&arg8),
System\Net\Security\NetSecurityTelemetry.cs (5)
263DataPointer = (IntPtr)(&arg1), 268DataPointer = (IntPtr)(arg2Ptr), 290DataPointer = (IntPtr)(&arg1), 295DataPointer = (IntPtr)(&arg2), 300DataPointer = (IntPtr)(arg3Ptr),
System\Net\Security\Pal.Managed\SafeChannelBindingHandle.cs (4)
18internal IntPtr CertHashPtr { get; } 40IntPtr cbtPrefixPtr = handle + SecChannelBindingSize; 59public override bool IsInvalid => handle == IntPtr.Zero; 64SetHandle(IntPtr.Zero);
System\Net\Security\SslConnectionInfo.Linux.cs (1)
48private unsafe SslProtocols MapProtocolVersion(IntPtr protocolVersion)
System\Net\Security\SslStream.Protocol.cs (1)
290if (certificate.Handle != IntPtr.Zero)
System\Net\Security\SslStreamCertificateContext.Linux.cs (5)
252IntPtr subject = TargetCertificate.Handle; 253IntPtr issuer = caCert.Handle; 266IntPtr[] issuerHandles = ArrayPool<IntPtr>.Shared.Rent(_privateIntermediateCertificates.Length + 1); 327ArrayPool<IntPtr>.Shared.Return(issuerHandles);
System.Net.Sockets (75)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Accept.cs (1)
12internal static unsafe partial Error Accept(SafeHandle socket, byte* socketAddress, int* socketAddressLen, IntPtr* acceptedFd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Disconnect.cs (1)
12internal static partial Error Disconnect(IntPtr socket);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Fcntl.cs (2)
14internal static partial int DangerousSetIsNonBlocking(IntPtr fd, int isNonBlocking); 29internal static partial int GetFD(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetSockOpt.cs (1)
16internal static unsafe partial Error GetSockOpt(IntPtr socket, SocketOptionLevel optionLevel, SocketOptionName optionName, byte* optionValue, int* optionLen);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.LingerOption.cs (1)
25internal static unsafe partial Error SetLingerOption(IntPtr socket, LingerOption* option);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SetSockOpt.cs (1)
16internal static unsafe partial Error SetSockOpt(IntPtr socket, SocketOptionLevel optionLevel, SocketOptionName optionName, byte* optionValue, int optionLen);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Shutdown.cs (1)
16internal static partial Error Shutdown(IntPtr socket, SocketShutdown how);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Socket.cs (1)
14internal static unsafe partial Error Socket(int addressFamily, int socketType, int protocolType, IntPtr* socket);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SocketEvent.cs (9)
25public IntPtr Data; 31internal static unsafe partial Error CreateSocketEventPort(IntPtr* port); 34internal static partial Error CloseSocketEventPort(IntPtr port); 43internal static partial Error TryChangeSocketEventRegistration(IntPtr port, SafeHandle socket, SocketEvents currentEvents, SocketEvents newEvents, IntPtr data); 46internal static partial Error TryChangeSocketEventRegistration(IntPtr port, IntPtr socket, SocketEvents currentEvents, SocketEvents newEvents, IntPtr data); 49internal static unsafe partial Error WaitForSocketEvents(IntPtr port, SocketEvent* buffer, int* count);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Write.cs (1)
24internal static unsafe partial int Write(IntPtr fd, byte* buffer, int bufferSize);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (4)
60DataPointer = (IntPtr)arg1Ptr, 65DataPointer = (IntPtr)arg2Ptr, 70DataPointer = (IntPtr)(&bufferLength), 75DataPointer = (IntPtr)arg3Ptr,
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
152uint addr = (uint)System.Runtime.InteropServices.Marshal.ReadInt32((IntPtr)address);
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (3)
21IntPtr invalid = (IntPtr)(-1); 22IntPtr socket = invalid;
System\Net\Sockets\SafeSocketHandle.cs (2)
43public SafeSocketHandle(IntPtr preexistingHandle, bool ownsHandle) 172private void SetHandleAndValid(IntPtr handle)
System\Net\Sockets\SafeSocketHandle.Unix.cs (1)
283private Interop.Error CloseHandle(IntPtr handle)
System\Net\Sockets\Socket.cs (1)
383public IntPtr Handle => SafeHandle.DangerousGetHandle();
System\Net\Sockets\SocketAsyncContext.Unix.cs (11)
618public IntPtr AcceptedFileDescriptor; 622public Action<IntPtr, Memory<byte>, SocketError>? Callback { get; set; } 627Debug.Assert(ErrorCode == SocketError.Success || AcceptedFileDescriptor == (IntPtr)(-1), $"Unexpected values: ErrorCode={ErrorCode}, AcceptedFileDescriptor={AcceptedFileDescriptor}"); 638IntPtr fd = AcceptedFileDescriptor; 1274IntPtr handle = _socket.DangerousGetHandle(); 1417public SocketError Accept(Memory<byte> socketAddress, out int socketAddressLen, out IntPtr acceptedFd) 1426Debug.Assert(errorCode == SocketError.Success || acceptedFd == (IntPtr)(-1), $"Unexpected values: errorCode={errorCode}, acceptedFd={acceptedFd}"); 1442public SocketError AcceptAsync(Memory<byte> socketAddress, out int socketAddressLen, out IntPtr acceptedFd, Action<IntPtr, Memory<byte>, SocketError> callback, CancellationToken cancellationToken) 1454Debug.Assert(errorCode == SocketError.Success || acceptedFd == (IntPtr)(-1), $"Unexpected values: errorCode={errorCode}, acceptedFd={acceptedFd}"); 1473acceptedFd = (IntPtr)(-1);
System\Net\Sockets\SocketAsyncEngine.Unix.cs (10)
77private readonly IntPtr _port; 83private readonly ConcurrentDictionary<IntPtr, SocketAsyncContextWrapper> _handleToContextMap = new ConcurrentDictionary<IntPtr, SocketAsyncContextWrapper>(); 100public static bool TryRegisterSocket(IntPtr socketHandle, SocketAsyncContext context, out SocketAsyncEngine? engine, out Interop.Error error) 109private bool TryRegisterCore(IntPtr socketHandle, SocketAsyncContext context, out Interop.Error error) 130public void UnregisterSocket(IntPtr socketHandle) 137_port = (IntPtr)(-1); 144fixed (IntPtr* portPtr = &_port) 277if (_port != (IntPtr)(-1)) 292private readonly ConcurrentDictionary<IntPtr, SocketAsyncContextWrapper> _handleToContextMap;
System\Net\Sockets\SocketAsyncEventArgs.Unix.cs (5)
13private IntPtr _acceptedFileDescriptor; 26private void AcceptCompletionCallback(IntPtr acceptedFileDescriptor, Memory<byte> socketAddress, SocketError socketError) 33private void CompleteAcceptOperation(IntPtr acceptedFileDescriptor, Memory<byte> socketAddress, SocketError socketError) 54_acceptedFileDescriptor = (IntPtr)(-1); 58IntPtr acceptedFd;
System\Net\Sockets\SocketPal.Unix.cs (12)
61IntPtr fd; 66Debug.Assert(fd != (IntPtr)(-1), "fd should not be -1"); 79fd = (IntPtr)(-1); 86Debug.Assert(fd == (IntPtr)(-1), $"Unexpected fd: {fd}"); 607public static unsafe bool TryCompleteAccept(SafeSocketHandle socket, Memory<byte> socketAddress, out int socketAddressLen, out IntPtr acceptedFd, out SocketError errorCode) 609IntPtr fd = IntPtr.Zero; 623acceptedFd = (IntPtr)(-1); 631Debug.Assert(fd != (IntPtr)(-1), "Expected fd != -1"); 639acceptedFd = (IntPtr)(-1); 1104IntPtr acceptedFd; 2009internal static unsafe SafeSocketHandle CreateSocket(IntPtr fileDescriptor)
System.Net.WebClient (2)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
System.Net.WebSockets (15)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (5)
19internal static readonly IntPtr ZNullPtr = IntPtr.Zero; 207SetHandle(IntPtr.Zero); 231public IntPtr NextIn 243public IntPtr NextOut
src\libraries\Common\src\System\IO\Compression\ZLibNative.ZStream.cs (4)
19internal IntPtr nextIn; //Bytef *next_in; /* next input byte */ 20internal IntPtr nextOut; //Bytef *next_out; /* next output byte should be put there */ 22internal IntPtr msg; //char *msg; /* last error message, NULL if no error */ 24private readonly IntPtr internalState; //internal state that is not visible to managed code
System\Net\WebSockets\Compression\WebSocketDeflater.cs (4)
129_stream.NextIn = (IntPtr)fixedInput; 132_stream.NextOut = (IntPtr)fixedOutput; 161_stream.NextIn = IntPtr.Zero; 164_stream.NextOut = (IntPtr)fixedOutput;
System\Net\WebSockets\Compression\WebSocketInflater.cs (2)
136_stream.NextIn = (IntPtr)(bufferPtr + _position); 235stream.NextOut = (IntPtr)bufPtr;
System.Numerics.Tensors (4)
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertHelpers.cs (4)
647private static bool IsUInt32Like<T>() => typeof(T) == typeof(uint) || (IntPtr.Size == 4 && typeof(T) == typeof(nuint)); 650private static bool IsInt32Like<T>() => typeof(T) == typeof(int) || (IntPtr.Size == 4 && typeof(T) == typeof(nint)); 653private static bool IsUInt64Like<T>() => typeof(T) == typeof(ulong) || (IntPtr.Size == 8 && typeof(T) == typeof(nuint)); 656private static bool IsInt64Like<T>() => typeof(T) == typeof(long) || (IntPtr.Size == 8 && typeof(T) == typeof(nint));
System.Private.CoreLib (1586)
artifacts\obj\Eventing\x64\Debug\NativeRuntimeEventSource.CoreCLR.cs (24)
123private void GCAllocationTick_V4(uint AllocationAmount, uint AllocationKind, ushort ClrInstanceID, ulong AllocationAmount64, IntPtr TypeID, string TypeName, uint HeapIndex, IntPtr Address, ulong ObjectSize) 193private void GCSampledObjectAllocationHigh(IntPtr Address, IntPtr TypeID, uint ObjectCountForTypeSample, ulong TotalSizeForTypeSample, ushort ClrInstanceID) 214private void GCGenerationRange(byte Generation, IntPtr RangeStart, ulong RangeUsedLength, ulong RangeReservedLength, ushort ClrInstanceID) 249private void FinalizeObject(IntPtr TypeID, IntPtr ObjectID, ushort ClrInstanceID) 256private void SetGCHandle(IntPtr HandleID, IntPtr ObjectID, uint Kind, uint Generation, ulong AppDomainID, ushort ClrInstanceID) 263private void DestroyGCHandle(IntPtr HandleID, ushort ClrInstanceID) 270private void GCSampledObjectAllocationLow(IntPtr Address, IntPtr TypeID, uint ObjectCountForTypeSample, ulong TotalSizeForTypeSample, ushort ClrInstanceID) 277private void PinObjectAtGCTime(IntPtr HandleID, IntPtr ObjectID, ulong ObjectSize, string TypeName, ushort ClrInstanceID) 396private void ThreadCreating(IntPtr ID, ushort ClrInstanceID) 403private void ThreadRunning(IntPtr ID, ushort ClrInstanceID) 431private void ExceptionThrown_V1(string ExceptionType, string ExceptionMessage, IntPtr ExceptionEIP, uint ExceptionHRESULT, ushort ExceptionFlags, ushort ClrInstanceID) 823private void GCPerHeapHistory_V3(ushort ClrInstanceID, IntPtr FreeListAllocated, IntPtr FreeListRejected, IntPtr EndOfSegAllocated, IntPtr CondemnedAllocated, IntPtr PinnedAllocated, IntPtr PinnedAllocatedAdvance, uint RunningFreeListEfficiency, uint CondemnReasons0, uint CondemnReasons1, uint CompactMechanisms, uint ExpandMechanisms, uint HeapIndex, IntPtr ExtraGen0Commit, uint Count)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (17)
68private IntPtr _dummy; // For alignment 106IntPtr classlibAddress) 209RhFailFastReason reason, object unhandledException, IntPtr classlibAddress, ref ExInfo exInfo) 256private static void AppendExceptionStackFrameViaClasslib(object exception, IntPtr ip, 297internal static Exception GetClasslibException(ExceptionIDs id, IntPtr address) 453internal IntPtr IP; 559IntPtr faultingCodeAddress = exInfo._pExContext->IP; 636IntPtr faultingCodeAddress = exInfo._pExContext->IP; 747IntPtr pReversePInvokePropagationCallback = IntPtr.Zero; 748IntPtr pReversePInvokePropagationContext = IntPtr.Zero; 779UpdateStackTrace(exceptionObj, exInfo._frameIter.FramePointer, (IntPtr)frameIter.OriginalControlPC, frameIter.SP, ref isFirstRethrowFrame, ref prevFramePtr, ref isFirstFrame, ref exInfo); 821if (pCatchHandler == null && pReversePInvokePropagationCallback == IntPtr.Zero && !isExceptionIntercepted 832(IntPtr)prevOriginalPC, // IP of the last frame that did not handle the exception 838Debug.Assert(pCatchHandler != null || pReversePInvokePropagationCallback != IntPtr.Zero || unwoundReversePInvoke || isExceptionIntercepted, "We should have a handler if we're starting the second pass"); 963private static void UpdateStackTrace(object exceptionObj, UIntPtr curFramePtr, IntPtr ip, UIntPtr sp,
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\StackFrameIterator.cs (1)
18internal IntPtr ControlPC;
src\Internal\Runtime\InteropServices\ComActivationContextInternal.cs (1)
18public IntPtr ClassFactoryDest;
src\Internal\Runtime\InteropServices\ComponentActivator.CoreCLR.cs (2)
13private static void OnDisabledGetFunctionPointerCall(IntPtr typeNameNative, IntPtr methodNameNative)
src\Internal\Runtime\InteropServices\InMemoryAssemblyLoader.PlatformNotSupported.cs (2)
22public static unsafe void LoadInMemoryAssembly(IntPtr moduleHandle, IntPtr assemblyPath)
src\libraries\Common\src\Interop\Interop.Calendar.cs (5)
18internal static unsafe bool EnumCalendarInfo(delegate* unmanaged<char*, IntPtr, void> callback, string localeName, CalendarId calendarId, CalendarDataType calendarDataType, IntPtr context) 20return EnumCalendarInfo((IntPtr)callback, localeName, calendarId, calendarDataType, context); 27private static unsafe partial bool EnumCalendarInfo(IntPtr callback, string localeName, CalendarId calendarId, CalendarDataType calendarDataType, IntPtr context);
src\libraries\Common\src\Interop\Interop.Collation.cs (11)
14internal static unsafe partial ResultCode GetSortHandle(string localeName, out IntPtr sortHandle); 17internal static partial void CloseSortHandle(IntPtr handle); 20internal static unsafe partial int CompareString(IntPtr sortHandle, char* lpStr1, int cwStr1Len, char* lpStr2, int cwStr2Len, CompareOptions options); 23internal static unsafe partial int IndexOf(IntPtr sortHandle, char* target, int cwTargetLength, char* pSource, int cwSourceLength, CompareOptions options, int* matchLengthPtr); 26internal static unsafe partial int LastIndexOf(IntPtr sortHandle, char* target, int cwTargetLength, char* pSource, int cwSourceLength, CompareOptions options, int* matchLengthPtr); 31internal static unsafe partial bool StartsWith(IntPtr sortHandle, char* target, int cwTargetLength, char* source, int cwSourceLength, CompareOptions options, int* matchedLength); 36internal static unsafe partial bool EndsWith(IntPtr sortHandle, char* target, int cwTargetLength, char* source, int cwSourceLength, CompareOptions options, int* matchedLength); 40internal static partial bool StartsWith(IntPtr sortHandle, string target, int cwTargetLength, string source, int cwSourceLength, CompareOptions options); 44internal static partial bool EndsWith(IntPtr sortHandle, string target, int cwTargetLength, string source, int cwSourceLength, CompareOptions options); 47internal static unsafe partial int GetSortKey(IntPtr sortHandle, char* str, int strLength, byte* sortKey, int sortKeyLength, CompareOptions options); 50internal static partial int GetSortVersion(IntPtr sortHandle);
src\libraries\Common\src\Interop\Interop.HostPolicy.cs (6)
12internal delegate void corehost_resolve_component_dependencies_result_fn(IntPtr assemblyPaths, 13IntPtr nativeSearchPaths, IntPtr resourceSearchPaths); 16internal delegate void corehost_error_writer_fn(IntPtr message); 30internal static partial IntPtr corehost_set_error_writer(IntPtr errorWriter);
src\libraries\Common\src\Interop\Interop.ICU.cs (6)
15internal static void InitICUFunctions(IntPtr icuuc, IntPtr icuin, ReadOnlySpan<char> version, ReadOnlySpan<char> suffix) 17Debug.Assert(icuuc != IntPtr.Zero); 18Debug.Assert(icuin != IntPtr.Zero); 24internal static partial void InitICUFunctions(IntPtr icuuc, IntPtr icuin, string version, string? suffix);
src\libraries\Common\src\Interop\Interop.TimeZoneInfo.cs (1)
20internal static unsafe partial int WindowsIdToIanaId(string windowsId, IntPtr region, char* ianaId, int ianaIdLength);
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.DynamicLoad.cs (8)
12internal static partial IntPtr LoadLibrary(string filename); 15internal static partial IntPtr GetLoadLibraryError(); 18internal static partial IntPtr GetProcAddress(IntPtr handle, byte* symbol); 21internal static partial IntPtr GetProcAddress(IntPtr handle, string symbol); 24internal static partial void FreeLibrary(IntPtr handle); 27internal static partial IntPtr GetDefaultSearchOrderPseudoHandle();
src\libraries\Common\src\Interop\Unix\System.Native\Interop.FLock.cs (1)
28internal static partial int FLock(IntPtr fd, LockOperations operation);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetCwd.cs (1)
57return Marshal.PtrToStringUTF8((IntPtr)ptr);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetEnv.cs (1)
12internal static unsafe partial IntPtr GetEnv(string name);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetEnviron.cs (2)
12internal static unsafe partial IntPtr GetEnviron(); 15internal static unsafe partial void FreeEnviron(IntPtr environ);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
36return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
70username = Marshal.PtrToStringUTF8((IntPtr)passwd.Name);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.LowLevelMonitor.cs (7)
12internal static partial IntPtr LowLevelMonitor_Create(); 15internal static partial void LowLevelMonitor_Destroy(IntPtr monitor); 18internal static partial void LowLevelMonitor_Acquire(IntPtr monitor); 21internal static partial void LowLevelMonitor_Release(IntPtr monitor); 24internal static partial void LowLevelMonitor_Wait(IntPtr monitor); 28internal static partial bool LowLevelMonitor_TimedWait(IntPtr monitor, int timeoutMilliseconds); 31internal static partial void LowLevelMonitor_Signal_Release(IntPtr monitor);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MksTemps.cs (1)
12internal static unsafe partial IntPtr MksTemps(
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.cs (1)
31callbackContext->_results.Add(Marshal.PtrToStringUTF8((IntPtr)name)!);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.ReadDir.cs (3)
57internal static partial IntPtr OpenDir(string path); 64internal static unsafe partial int ReadDirR(IntPtr dir, byte* buffer, int bufferSize, DirectoryEntry* outputEntry); 67internal static partial int CloseDir(IntPtr dir);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Threading.cs (4)
13internal static unsafe partial bool CreateThread(IntPtr stackSize, delegate* unmanaged<IntPtr, IntPtr> startAddress, IntPtr parameter);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Write.cs (1)
24internal static unsafe partial int Write(IntPtr fd, byte* buffer, int bufferSize);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.CloseHandle.cs (1)
13internal static partial bool CloseHandle(IntPtr handle);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.EventWaitHandle.cs (1)
24internal static partial SafeWaitHandle CreateEventEx(IntPtr lpSecurityAttributes, string? name, uint flags, uint desiredAccess);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (8)
21IntPtr lpSource, 26IntPtr arguments); 32GetMessage(errorCode, IntPtr.Zero); 34internal static unsafe string GetMessage(int errorCode, IntPtr moduleHandle) 37if (moduleHandle != IntPtr.Zero) 46int length = FormatMessage(flags, moduleHandle, unchecked((uint)errorCode), 0, bufferPtr, stackBuffer.Length, IntPtr.Zero); 58IntPtr nativeMsgPtr = default; 61int length = FormatMessage(flags | FORMAT_MESSAGE_ALLOCATE_BUFFER, moduleHandle, unchecked((uint)errorCode), 0, &nativeMsgPtr, 0, IntPtr.Zero);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.Globalization.cs (11)
66IntPtr sortHandle); 79IntPtr sortHandle); 91IntPtr lParam); 115IntPtr lpVersionInformation, 127internal static unsafe partial bool EnumSystemLocalesEx(delegate* unmanaged<char*, uint, void*, BOOL> lpLocaleEnumProcEx, uint dwFlags, void* lParam, IntPtr reserved); 134internal static partial int GetCalendarInfoEx(string? lpLocaleName, uint Calendar, IntPtr lpReserved, uint CalType, IntPtr lpCalData, int cchData, out int lpValue); 137internal static partial int GetCalendarInfoEx(string? lpLocaleName, uint Calendar, IntPtr lpReserved, uint CalType, IntPtr lpCalData, int cchData, IntPtr lpValue); 147internal static unsafe partial bool EnumCalendarInfoExEx(delegate* unmanaged<char*, uint, IntPtr, void*, BOOL> pCalInfoEnumProcExEx, string lpLocaleName, uint Calendar, string? lpReserved, uint CalType, void* lParam);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.Mutex.cs (1)
18internal static partial SafeWaitHandle CreateMutexEx(IntPtr lpMutexAttributes, string? name, uint flags, uint desiredAccess);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.Semaphore.cs (1)
16internal static partial SafeWaitHandle CreateSemaphoreEx(IntPtr lpSecurityAttributes, int initialCount, int maximumCount, string? name, uint flags, uint desiredAccess);
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (35)
25private static readonly Dictionary<IntPtr, Delegate> s_delegates = new Dictionary<IntPtr, Delegate>(); 36public delegate int ComponentEntryPoint(IntPtr args, int sizeBytes); 38private static string MarshalToString(IntPtr arg, string argName) 62public static unsafe int LoadAssemblyAndGetFunctionPointer(IntPtr assemblyPathNative, 63IntPtr typeNameNative, 64IntPtr methodNameNative, 65IntPtr delegateTypeNative, 66IntPtr reserved, 67IntPtr functionHandle) 79ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 86*(IntPtr*)functionHandle = InternalGetFunctionPointer(alc, typeName, methodName, delegateTypeNative); 109public static unsafe int LoadAssembly(IntPtr assemblyPathNative, IntPtr loadContext, IntPtr reserved) 118ArgumentOutOfRangeException.ThrowIfNotEqual(loadContext, IntPtr.Zero); 119ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 179public static unsafe int LoadAssemblyBytes(byte* assembly, nint assemblyByteLength, byte* symbols, nint symbolsByteLength, IntPtr loadContext, IntPtr reserved) 189ArgumentOutOfRangeException.ThrowIfNotEqual(loadContext, IntPtr.Zero); 190ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 224public static unsafe int GetFunctionPointer(IntPtr typeNameNative, 225IntPtr methodNameNative, 226IntPtr delegateTypeNative, 227IntPtr loadContext, 228IntPtr reserved, 229IntPtr functionHandle) 257ArgumentOutOfRangeException.ThrowIfNotEqual(loadContext, IntPtr.Zero); 258ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 263*(IntPtr*)functionHandle = InternalGetFunctionPointer(AssemblyLoadContext.Default, typeName, methodName, delegateTypeNative); 297private static IntPtr InternalGetFunctionPointer(AssemblyLoadContext alc, 300IntPtr delegateTypeNative) 311if (delegateTypeNative == IntPtr.Zero) 315else if (delegateTypeNative == (IntPtr)(-1)) 328IntPtr functionPtr;
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\IsolatedComponentLoadContext.cs (2)
46protected override IntPtr LoadUnmanagedDll(string unmanagedDllName) 54return IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\CriticalHandleZeroOrMinusOneIsInvalid.cs (2)
13: base(IntPtr.Zero) 17public override bool IsInvalid => handle == IntPtr.Zero || handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.cs (1)
17public SafeFileHandle(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle)
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeHandleZeroOrMinusOneIsInvalid.cs (2)
12protected SafeHandleZeroOrMinusOneIsInvalid(bool ownsHandle) : base(IntPtr.Zero, ownsHandle) 16public override bool IsInvalid => handle == IntPtr.Zero || handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeWaitHandle.cs (1)
22public SafeWaitHandle(IntPtr existingHandle, bool ownsHandle) : base(ownsHandle)
src\libraries\System.Private.CoreLib\src\System\AccessViolationException.cs (2)
42private IntPtr _ip; // Address of faulting instruction. 43private IntPtr _target; // Address that could not be accessed.
src\libraries\System.Private.CoreLib\src\System\ArgumentNullException.cs (2)
85internal static unsafe void ThrowIfNull(IntPtr argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 87if (argument == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Buffers\ArrayPoolEventSource.cs (14)
58payload[0].DataPointer = ((IntPtr)(&bufferId)); 61payload[1].DataPointer = ((IntPtr)(&bufferSize)); 64payload[2].DataPointer = ((IntPtr)(&poolId)); 67payload[3].DataPointer = ((IntPtr)(&bucketId)); 84payload[0].DataPointer = ((IntPtr)(&bufferId)); 87payload[1].DataPointer = ((IntPtr)(&bufferSize)); 90payload[2].DataPointer = ((IntPtr)(&poolId)); 93payload[3].DataPointer = ((IntPtr)(&bucketId)); 96payload[4].DataPointer = ((IntPtr)(&reason)); 133payload[0].DataPointer = ((IntPtr)(&bufferId)); 136payload[1].DataPointer = ((IntPtr)(&bufferSize)); 139payload[2].DataPointer = ((IntPtr)(&poolId)); 142payload[3].DataPointer = ((IntPtr)(&bucketId)); 145payload[4].DataPointer = ((IntPtr)(&reason));
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Decoder.cs (5)
179int i0 = Unsafe.Add(ref decodingMap, (IntPtr)t0); 180int i1 = Unsafe.Add(ref decodingMap, (IntPtr)t1); 191int i2 = Unsafe.Add(ref decodingMap, (IntPtr)t2); 192int i3 = Unsafe.Add(ref decodingMap, (IntPtr)t3); 213int i2 = Unsafe.Add(ref decodingMap, (IntPtr)t2);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Encoder.cs (9)
683uint i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 18)); 684uint i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 12) & 0x3F)); 685uint i2 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 6) & 0x3F)); 686uint i3 = Unsafe.Add(ref encodingMap, (IntPtr)(i & 0x3F)); 706uint i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 18)); 707uint i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 12) & 0x3F)); 708uint i2 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 6) & 0x3F)); 727uint i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 10)); 728uint i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 4) & 0x3F));
src\libraries\System.Private.CoreLib\src\System\ComAwareWeakReference.cs (4)
26private IntPtr _pComWeakRef; 46IntPtr pComWeakRef = ObjectToComWeakRef(target, out long wrapperId); 62private ComInfo(IntPtr pComWeakRef, long wrapperId) 64Debug.Assert(pComWeakRef != IntPtr.Zero);
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (2)
1234if ((source == typeof(IntPtr) && target == typeof(IntPtr)) ||
src\libraries\System.Private.CoreLib\src\System\Diagnostics\DebugProvider.Unix.cs (1)
89int bytesWritten = Interop.Sys.Write((IntPtr)2 /* stderr */, buf + totalBytesWritten, bufCount);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackFrameExtensions.cs (5)
13return stackFrame.GetNativeImageBase() != IntPtr.Zero; 33public static IntPtr GetNativeIP(this StackFrame stackFrame) 35return IntPtr.Zero; 38public static IntPtr GetNativeImageBase(this StackFrame stackFrame) 40return IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipe.cs (5)
13internal IntPtr ProviderID; 19internal IntPtr Payload; 105Marshal.FreeCoTaskMem((IntPtr)m_pProviderName); 109Marshal.FreeCoTaskMem((IntPtr)m_pFilterData); 145Marshal.FreeCoTaskMem((IntPtr)providersNativePointer);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipe.Internal.cs (6)
30internal static unsafe partial IntPtr CreateProvider(string providerName, 35internal static unsafe partial IntPtr DefineEvent(IntPtr provHandle, uint eventID, long keywords, uint eventVersion, uint level, void *pMetadata, uint metadataLength); 38internal static partial IntPtr GetProvider(string providerName); 41internal static partial void DeleteProvider(IntPtr provHandle); 47internal static unsafe partial void WriteEventData(IntPtr eventHandle, EventProvider.EventData* pEventData, uint dataCount, Guid* activityId, Guid* relatedActivityId);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventDispatcher.cs (1)
25private readonly IntPtr m_RuntimeProviderID;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventProvider.cs (5)
12private IntPtr _provHandle; 65EventPipeEventProvider _this = (EventPipeEventProvider)GCHandle.FromIntPtr((IntPtr)callbackContext).Target!; 104IntPtr eventHandle, 110if (eventHandle != IntPtr.Zero) 140internal override unsafe IntPtr DefineEventHandle(uint eventID, string eventName, long keywords, uint eventVersion, uint level,
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeMetadataGenerator.cs (3)
535else if (type == typeof(IntPtr)) 661if (parameterType == typeof(IntPtr)) 662return IntPtr.Size == 4 ? TypeCode.Int32 : TypeCode.Int64;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipePayloadDecoder.cs (2)
31if (parameterType == typeof(IntPtr)) 34payload = payload.Slice(IntPtr.Size);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (14)
289else if (data is IntPtr) 291dataDescriptor->Size = (uint)sizeof(IntPtr); 292IntPtr* intptrPtr = (IntPtr*)dataBuffer; 293*intptrPtr = (IntPtr)data; 468internal unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, IntPtr eventHandle, Guid* activityID, Guid* childActivityID, object?[] eventPayload) 693protected internal unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, IntPtr eventHandle, Guid* activityID, Guid* childActivityID, int dataCount, IntPtr data) 716IntPtr eventHandle, 720IntPtr data) 1272IntPtr eventHandle, 1287internal virtual unsafe IntPtr DefineEventHandle(uint eventID, string eventName, long keywords, uint eventVersion, 1290return IntPtr.Zero; 1385Marshal.Copy((IntPtr)(void*)filterData->Ptr, data, 0, data.Length);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (68)
734IntPtr eventHandle = m_eventPipeProvider._eventProvider.DefineEventHandle( 743Debug.Assert(eventHandle != IntPtr.Zero); 772descrs[0].DataPointer = (IntPtr)(&arg1); 786descrs[0].DataPointer = (IntPtr)(&arg1); 789descrs[1].DataPointer = (IntPtr)(&arg2); 803descrs[0].DataPointer = (IntPtr)(&arg1); 806descrs[1].DataPointer = (IntPtr)(&arg2); 809descrs[2].DataPointer = (IntPtr)(&arg3); 824descrs[0].DataPointer = (IntPtr)(&arg1); 838descrs[0].DataPointer = (IntPtr)(&arg1); 841descrs[1].DataPointer = (IntPtr)(&arg2); 855descrs[0].DataPointer = (IntPtr)(&arg1); 858descrs[1].DataPointer = (IntPtr)(&arg2); 861descrs[2].DataPointer = (IntPtr)(&arg3); 879descrs[0].DataPointer = (IntPtr)string1Bytes; 899descrs[0].DataPointer = (IntPtr)string1Bytes; 902descrs[1].DataPointer = (IntPtr)string2Bytes; 924descrs[0].DataPointer = (IntPtr)string1Bytes; 927descrs[1].DataPointer = (IntPtr)string2Bytes; 930descrs[2].DataPointer = (IntPtr)string3Bytes; 949descrs[0].DataPointer = (IntPtr)string1Bytes; 952descrs[1].DataPointer = (IntPtr)(&arg2); 970descrs[0].DataPointer = (IntPtr)string1Bytes; 973descrs[1].DataPointer = (IntPtr)(&arg2); 976descrs[2].DataPointer = (IntPtr)(&arg3); 995descrs[0].DataPointer = (IntPtr)string1Bytes; 998descrs[1].DataPointer = (IntPtr)(&arg2); 1017descrs[0].DataPointer = (IntPtr)(&arg1); 1020descrs[1].DataPointer = (IntPtr)string2Bytes; 1039descrs[0].DataPointer = (IntPtr)(&arg1); 1042descrs[1].DataPointer = (IntPtr)string2Bytes; 1060descrs[0].DataPointer = (IntPtr)(&blobSize); 1063descrs[1].DataPointer = (IntPtr)(&blobSize); // valid address instead of empty content 1073descrs[0].DataPointer = (IntPtr)(&blobSize); 1076descrs[1].DataPointer = (IntPtr)blob; 1092descrs[0].DataPointer = (IntPtr)(&arg1); 1098descrs[1].DataPointer = (IntPtr)(&blobSize); 1101descrs[2].DataPointer = (IntPtr)(&blobSize); // valid address instead of empty contents 1111descrs[1].DataPointer = (IntPtr)(&blobSize); 1114descrs[2].DataPointer = (IntPtr)blob; 1188public unsafe IntPtr DataPointer 1190get => (IntPtr)(void*)m_Ptr; 1338if (metadata.EnabledForETW && !m_etwProvider.WriteEvent(ref metadata.Descriptor, metadata.EventHandle, pActivityId, relatedActivityId, eventDataCount, (IntPtr)data)) 1341if (metadata.EnabledForEventPipe && !m_eventPipeProvider.WriteEvent(ref metadata.Descriptor, metadata.EventHandle, pActivityId, relatedActivityId, eventDataCount, (IntPtr)data)) 1519IntPtr eventHandle, 1523IntPtr data) 1706IntPtr dataPointer = data->DataPointer; 1752else if (IntPtr.Size == 4 && dataType == typeof(IntPtr)) 1754decoded = *(IntPtr*)dataPointer; 1812else if (IntPtr.Size == 8 && dataType == typeof(IntPtr)) 1814decoded = *(IntPtr*)dataPointer; 1862decoded = dataPointer == IntPtr.Zero ? null : new string((char*)dataPointer, 0, (data->Size >> 1) - 1); 2082IntPtr dataPointer = data->DataPointer; 2083args[i] = dataPointer == IntPtr.Zero ? null : new string((char*)dataPointer, 0, (data->Size >> 1) - 1); 2193m_etwProvider?.WriteEvent(ref descr, IntPtr.Zero, null, null, 1, (IntPtr)((void*)&data)); 2197if (m_writeEventStringEventHandle == IntPtr.Zero) 2206if (m_writeEventStringEventHandle == IntPtr.Zero) 2223m_eventPipeProvider.WriteEvent(ref descr, m_writeEventStringEventHandle, null, null, 1, (IntPtr)((void*)&data)); 2430public IntPtr EventHandle; // EventPipeEvent handle. 2879if (!m_etwProvider.WriteEvent(ref manifestDescr, IntPtr.Zero, null, null, 2, (IntPtr)dataDescrs)) 3458metadata.EventHandle = IntPtr.Zero; 3827private IntPtr m_writeEventStringEventHandle = IntPtr.Zero; 5912else if (type == typeof(IntPtr))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\FrameworkEventSource.cs (9)
49descrs[0].DataPointer = (IntPtr)(&arg1); 52descrs[1].DataPointer = (IntPtr)(&arg2); 55descrs[2].DataPointer = (IntPtr)string3Bytes; 58descrs[3].DataPointer = (IntPtr)(&arg4); 61descrs[4].DataPointer = (IntPtr)(&arg5); 64descrs[5].DataPointer = (IntPtr)(&arg6); 84descrs[0].DataPointer = (IntPtr)(&arg1); 87descrs[1].DataPointer = (IntPtr)(&arg2); 90descrs[2].DataPointer = (IntPtr)string3Bytes;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\NativeRuntimeEventSource.Threading.NativeSinks.cs (19)
226IntPtr NativeOverlapped, 227IntPtr Overlapped, // 0 if the Windows thread pool is used, the relevant info could be obtained from the NativeOverlapped* if necessary 243IntPtr overlapped = (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode(); 246(IntPtr)nativeOverlapped, 261ThreadPoolIOEnqueue((IntPtr)registeredWaitHandle.GetHashCode(), IntPtr.Zero, registeredWaitHandle.Repeating); 268IntPtr NativeOverlapped, 269IntPtr Overlapped, // 0 if the Windows thread pool is used, the relevant info could be obtained from the NativeOverlapped* if necessary 284IntPtr overlapped = (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode(); 287(IntPtr)nativeOverlapped, 300ThreadPoolIODequeue((IntPtr)registeredWaitHandle.GetHashCode(), IntPtr.Zero); 323IntPtr overlapped = (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode(); 326(IntPtr)nativeOverlapped, 333IntPtr NativeOverlapped, 334IntPtr Overlapped, // 0 if the Windows thread pool is used, the relevant info could be obtained from the NativeOverlapped* if necessary
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\NativeRuntimeEventSource.Threading.NativeSinks.Internal.cs (7)
86IntPtr NativeOverlapped, 87IntPtr Overlapped, 94IntPtr NativeOverlapped, 95IntPtr Overlapped, 107IntPtr NativeOverlapped, 108IntPtr Overlapped, 115IntPtr AssociatedObjectID,
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\DataCollector.cs (3)
137Marshal.Copy((IntPtr)p, buffer, oldPos, size); 176Marshal.Copy((IntPtr)p, buffer, oldPos, size); 341datasTemp->DataPointer = (IntPtr)this.scratch;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\NameInfo.cs (4)
74public IntPtr GetOrCreateEventHandle(EventProvider provider, TraceLoggingEventHandleTable eventHandleTable, EventDescriptor descriptor, TraceLoggingEventTypes eventTypes) 76IntPtr eventHandle; 77if ((eventHandle = eventHandleTable[descriptor.EventId]) == IntPtr.Zero) 81if ((eventHandle = eventHandleTable[descriptor.EventId]) == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyValue.cs (7)
45public IntPtr AsIntPtr; 93private PropertyValue(IntPtr value) : this(new Scalar() { AsIntPtr = value }, sizeof(IntPtr)) { } 115if (type == typeof(IntPtr)) return value => new PropertyValue((IntPtr)value!); 240if (type == typeof(IntPtr)) { var f = GetGetMethod<IntPtr>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); }
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\SimpleTypeInfos.cs (4)
91public static TraceLoggingTypeInfo IntPtr() => s_intptr ??= new ScalarTypeInfo(typeof(IntPtr), Statics.IntPtrType); 152public static TraceLoggingTypeInfo IntPtr() => s_intptr ??= new ScalarArrayTypeInfo(typeof(IntPtr[]), Statics.IntPtrType, System.IntPtr.Size); 153public static TraceLoggingTypeInfo UIntPtr() => s_uintptr ??= new ScalarArrayTypeInfo(typeof(UIntPtr[]), Statics.UIntPtrType, System.IntPtr.Size);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (5)
32public static readonly TraceLoggingDataType IntPtrType = IntPtr.Size == 8 35public static readonly TraceLoggingDataType UIntPtrType = IntPtr.Size == 8 38public static readonly TraceLoggingDataType HexIntPtrType = IntPtr.Size == 8 466else if (elementType == typeof(IntPtr)) 548else if (dataType == typeof(IntPtr))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventHandleTable.cs (9)
15private IntPtr[] m_innerTable; 19m_innerTable = new IntPtr[DefaultLength]; 22internal IntPtr this[int eventID] 26IntPtr ret = IntPtr.Zero; 27IntPtr[] innerTable = Volatile.Read(ref m_innerTable); 38internal void SetEventHandle(int eventID, IntPtr eventHandle) 51IntPtr[] newTable = new IntPtr[newSize];
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventSource.cs (9)
419IntPtr eventHandle = nameInfo.GetOrCreateEventHandle(m_eventPipeProvider, m_eventHandleTable, descriptor, eventTypes); 420Debug.Assert(eventHandle != IntPtr.Zero); 468(IntPtr)descriptors); 529IntPtr eventHandle = nameInfo.GetOrCreateEventHandle(m_eventPipeProvider, m_eventHandleTable, descriptor, eventTypes); 530Debug.Assert(eventHandle != IntPtr.Zero); 572(IntPtr)descriptors); 597IntPtr eventHandle = nameInfo.GetOrCreateEventHandle(m_eventPipeProvider, m_eventHandleTable, descriptor, eventTypes); 598Debug.Assert(eventHandle != IntPtr.Zero); 666(IntPtr)descriptors);
src\libraries\System.Private.CoreLib\src\System\Enum.cs (3)
1182CorElementType.ELEMENT_TYPE_I => Unsafe.As<byte, IntPtr>(ref data), 1272CorElementType.ELEMENT_TYPE_I => Unsafe.As<byte, IntPtr>(ref data).GetHashCode(), 1544return string.Create(Unsafe.SizeOf<TStorage>() * 2, (IntPtr)ptr, (destination, intptr) =>
src\libraries\System.Private.CoreLib\src\System\Environment.cs (1)
181public static bool Is64BitProcess => IntPtr.Size == 8;
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendarData.Icu.cs (2)
437return Interop.Globalization.EnumCalendarInfo(&EnumCalendarInfoCallback, localeName, calendarId, dataType, (IntPtr)callbackContext); 442private static unsafe void EnumCalendarInfoCallback(char* calendarStringPtr, IntPtr context)
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendarData.Nls.cs (7)
31return Interop.Kernel32.GetCalendarInfoEx(localeName, (uint)calendar, IntPtr.Zero, calType | CAL_RETURN_NUMBER, IntPtr.Zero, 0, out data) != 0; 41int ret = Interop.Kernel32.GetCalendarInfoEx(localeName, (uint)calendar, IntPtr.Zero, calType, (IntPtr)buffer, BUFFER_LENGTH, IntPtr.Zero); 64private static unsafe Interop.BOOL EnumCalendarInfoCallback(char* lpCalendarInfoString, uint calendar, IntPtr pReserved, void* lParam) 96private static unsafe Interop.BOOL EnumCalendarsCallback(char* lpCalendarInfoString, uint calendar, IntPtr reserved, void* lParam)
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.cs (1)
42private IntPtr _sortHandle;
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (4)
987private static readonly Dictionary<string, IntPtr> s_sortNameToSortHandleCache = new Dictionary<string, IntPtr>(); 989internal static IntPtr GetCachedSortHandle(string sortName) 993if (!s_sortNameToSortHandleCache.TryGetValue(sortName, out IntPtr result))
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Nls.cs (15)
18internal static unsafe IntPtr NlsGetSortHandle(string cultureName) 22return IntPtr.Zero; 25IntPtr handle; 26int ret = Interop.Kernel32.LCMapStringEx(cultureName, Interop.Kernel32.LCMAP_SORTHANDLE, null, 0, &handle, IntPtr.Size, null, null, IntPtr.Zero); 41return IntPtr.Zero; 140int sortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 162if (Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 214string? localeName = _sortHandle != IntPtr.Zero ? null : _sortName; 267string? localeName = _sortHandle != IntPtr.Zero ? null : _sortName; 395int sortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 409if (Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 494actualSortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 546sortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 574return Interop.Kernel32.IsNLSDefinedString(Interop.Kernel32.COMPARE_STRING, 0, IntPtr.Zero, pText, text.Length);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Nls.cs (3)
128Interop.Kernel32.EnumSystemLocalesEx(&EnumSystemLocalesProc, Interop.Kernel32.LOCALE_SPECIFICDATA | Interop.Kernel32.LOCALE_SUPPLEMENTAL, &context, IntPtr.Zero); 499Interop.Kernel32.EnumSystemLocalesEx(&EnumAllSystemLocalesProc, flags, &context, IntPtr.Zero); 527Interop.Kernel32.EnumSystemLocalesEx(&EnumAllSystemLocalesProc, Interop.Kernel32.LOCALE_REPLACEMENT, &context, IntPtr.Zero);
src\libraries\System.Private.CoreLib\src\System\Globalization\GlobalizationMode.cs (2)
76private static IntPtr LoadLibrary(string library, bool failOnLoadFailure) 78if (!NativeLibrary.TryLoad(library, typeof(object).Assembly, DllImportSearchPath.ApplicationDirectory | DllImportSearchPath.System32, out IntPtr lib) && failOnLoadFailure)
src\libraries\System.Private.CoreLib\src\System\Globalization\GlobalizationMode.Unix.cs (2)
76IntPtr icuucLib = LoadLibrary(CreateLibraryName("libicuuc", suffixAndSeparator, extension, version, versionAtEnd), failOnLoadFailure: true); 77IntPtr icuinLib = LoadLibrary(CreateLibraryName("libicui18n", suffixAndSeparator, extension, version, versionAtEnd), failOnLoadFailure: true);
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (2)
179IntPtr byteOffset = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.Utf8.cs (4)
174IntPtr byteOffset = IntPtr.Zero; 484IntPtr byteOffset = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.Nls.cs (2)
28int ret = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _textInfoName, 47private IntPtr _sortHandle;
src\libraries\System.Private.CoreLib\src\System\Half.cs (5)
882/// <summary>Explicitly converts a half-precision floating-point value to its nearest representable <see cref="IntPtr" /> value.</summary> 884/// <returns><paramref name="value" /> converted to its nearest representable <see cref="IntPtr" /> value.</returns> 887/// <summary>Explicitly converts a half-precision floating-point value to its nearest representable <see cref="IntPtr" /> value, throwing an overflow exception for any values that fall outside the representable range.</summary> 889/// <returns><paramref name="value" /> converted to its nearest representable <see cref="IntPtr" /> value.</returns> 890/// <exception cref="OverflowException"><paramref name="value" /> is not representable by <see cref="IntPtr" />.</exception>
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerator.Unix.cs (11)
23private IntPtr _directoryHandle; 40if (_directoryHandle == IntPtr.Zero) 69private IntPtr CreateDirectoryHandle(string path, bool ignoreNotFound = false) 71IntPtr handle = Interop.Sys.OpenDir(path); 72if (handle == IntPtr.Zero) 77return IntPtr.Zero; 86IntPtr handle = Interlocked.Exchange(ref _directoryHandle, IntPtr.Zero); 87if (handle != IntPtr.Zero) 217_directoryHandle = IntPtr.Zero; 219while (_directoryHandle == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs (5)
23public FileStream(IntPtr handle, FileAccess access) 30public FileStream(IntPtr handle, FileAccess access, bool ownsHandle) 37public FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize) 44public FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync) 226public virtual IntPtr Handle => _strategy.Handle;
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (6)
28512, (IntPtr)pKey, (span, key) => // 12 == 8 + 1 (for period) + 3 737ReadOnlySpanPtr1 = (IntPtr)(&first), 738ReadOnlySpanPtr2 = (IntPtr)(&second), 739ReadOnlySpanPtr3 = (IntPtr)(&third), 740ReadOnlySpanPtr4 = (IntPtr)(&fourth), 790public IntPtr ReadOnlySpanPtr1, ReadOnlySpanPtr2, ReadOnlySpanPtr3, ReadOnlySpanPtr4;
src\libraries\System.Private.CoreLib\src\System\IO\Path.Unix.cs (1)
121IntPtr fd = Interop.CheckIo(Interop.Sys.MksTemps(pPath, SuffixByteLength), tempPath, isDirError: true);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
102path = Marshal.PtrToStringUTF8((IntPtr)passwd.HomeDirectory);
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamStrategy.cs (1)
18internal IntPtr Handle => SafeFileHandle.DangerousGetHandle();
src\libraries\System.Private.CoreLib\src\System\Math.cs (3)
90/// <param name="value">A number that is greater than <see cref="IntPtr.MinValue" />, but less than or equal to <see cref="IntPtr.MaxValue" />.</param> 91/// <returns>A native signed integer, x, such that 0 \u2264 x \u2264 <see cref="IntPtr.MaxValue" />.</returns>
src\libraries\System.Private.CoreLib\src\System\Memory.cs (1)
346refToReturn = ref Unsafe.Add(ref refToReturn, (IntPtr)(void*)desiredStartIndex);
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (8)
1416if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 1425if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint))) 1482if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 1491if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint))) 1548if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 1557if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint))) 1614if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 1623if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint)))
src\libraries\System.Private.CoreLib\src\System\Numerics\BitOperations.cs (2)
397(IntPtr)(int)((value * 0x07C4ACDDu) >> 27)); 580(IntPtr)(int)(((value & (uint)-(int)value) * 0x077CB531u) >> 27)); // Multi-cast mitigates redundant conv.u8
src\libraries\System.Private.CoreLib\src\System\ReadOnlyMemory.cs (1)
268refToReturn = ref Unsafe.Add(ref refToReturn, (IntPtr)(void*)desiredStartIndex);
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (9)
294IntPtr* pByRefFixedStorage = (IntPtr*)&byrefs; 322IntPtr* pArgStorage = stackalloc IntPtr[_argCount]; 323NativeMemory.Clear(pArgStorage, (nuint)_argCount * (nuint)sizeof(IntPtr)); 353IntPtr* pStorage = stackalloc IntPtr[2 * _argCount]; 354NativeMemory.Clear(pStorage, (nuint)(2 * _argCount) * (nuint)sizeof(IntPtr)); 357IntPtr* pByRefStorage = pStorage + _argCount;
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (17)
14private IntPtr _addressOrOffset; 76_methodTable = (MethodTable*)typeof(IntPtr).TypeHandle.Value; 104_methodTable = (MethodTable*)typeof(IntPtr).TypeHandle.Value; 143(void*)Unsafe.As<byte, IntPtr>(ref Unsafe.AddByteOffset(ref obj.GetRawData(), _addressOrOffset)), 147return Volatile.Read(ref Unsafe.As<IntPtr, object>(ref *(IntPtr*)_addressOrOffset)); 160ref Unsafe.As<IntPtr, object>(ref *(IntPtr*)_addressOrOffset).GetRawData()); 163return Pointer.Box((void*)Unsafe.As<byte, IntPtr>( 256Volatile.Write(ref Unsafe.As<IntPtr, object?>(ref *(IntPtr*)_addressOrOffset), value); 412else if (fieldType == typeof(IntPtr) || 439else if (fieldType == typeof(IntPtr) || 450if (IntPtr.Size == 4) 454else if (IntPtr.Size == 8) 466if (IntPtr.Size == 4) 470else if (IntPtr.Size == 8)
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokerEmitUtil.cs (8)
15internal unsafe delegate object? InvokeFunc_RefArgs(object? obj, IntPtr* refArguments); 72Unbox(il, typeof(IntPtr)); 129Unbox(il, typeof(IntPtr)); 151Type[] delegateParameters = new Type[3] { typeof(object), typeof(object), typeof(IntPtr*) }; 180il.Emit(OpCodes.Ldc_I4, i * IntPtr.Size); 189il.Emit(OpCodes.Ldobj, parameterType.IsPointer || parameterType.IsFunctionPointer ? typeof(IntPtr) : parameterType); 274il.Emit(OpCodes.Box, typeof(IntPtr)); 302il.Emit(OpCodes.Box, typeof(IntPtr));
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokeUtils.cs (1)
114if (srcObject is IntPtr or UIntPtr)
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.Constructor.cs (4)
27IntPtr* pStorage = stackalloc IntPtr[2 * argCount]; 28NativeMemory.Clear(pStorage, (nuint)(2 * argCount) * (nuint)sizeof(IntPtr)); 31IntPtr* pByRefStorage = pStorage + argCount;
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs (9)
164IntPtr* pByRefFixedStorage = (IntPtr*)&byrefs; 207IntPtr* pArgStorage = stackalloc IntPtr[_argCount * 2]; 208NativeMemory.Clear(pArgStorage, (nuint)_argCount * (nuint)sizeof(IntPtr) * 2); 242IntPtr* pStorage = stackalloc IntPtr[3 * _argCount]; 243NativeMemory.Clear(pStorage, (nuint)(3 * _argCount) * (nuint)sizeof(IntPtr)); 246IntPtr* pByRefStorage = pStorage + _argCount;
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (9)
347IntPtr* pByRefFixedStorage = (IntPtr*)&byrefs; 375IntPtr* pArgStorage = stackalloc IntPtr[_argCount]; 376NativeMemory.Clear(pArgStorage, (nuint)_argCount * (nuint)sizeof(IntPtr)); 406IntPtr* pStorage = stackalloc IntPtr[2 * _argCount]; 407NativeMemory.Clear(pStorage, (nuint)(2 * _argCount) * (nuint)sizeof(IntPtr)); 410IntPtr* pByRefStorage = pStorage + _argCount;
src\libraries\System.Private.CoreLib\src\System\Reflection\Pointer.cs (2)
60internal IntPtr GetPointerValue() => (IntPtr)_ptr;
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\QCallHandles.cs (5)
52private IntPtr _module; 71private IntPtr _assembly; 76_assembly = assembly?.GetUnderlyingNativeHandle() ?? IntPtr.Zero; 84private IntPtr _handle; 89_handle = type?.GetUnderlyingNativeHandle() ?? IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeFeature.cs (1)
46/// Indicates that this version of runtime supports <see cref="System.IntPtr" /> and <see cref="System.UIntPtr" /> as numeric types.
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\Unsafe.cs (5)
128public static ref T Add<T>(ref T source, IntPtr elementOffset) 615public static ref T AddByteOffset<T>(ref T source, IntPtr byteOffset) 689public static IntPtr ByteOffset<T>([AllowNull] ref readonly T origin, [AllowNull] ref readonly T target) 812public static ref T Subtract<T>(ref T source, IntPtr elementOffset) 861public static ref T SubtractByteOffset<T>(ref T source, IntPtr byteOffset)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CLong.cs (4)
11using NativeType = System.IntPtr; 27private readonly NativeType _value; 35_value = (NativeType)value; 45_value = checked((NativeType)value);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\IEnumConnectionPoints.cs (1)
15int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] IConnectionPoint[] rgelt, IntPtr pceltFetched);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\IEnumConnections.cs (1)
24int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] CONNECTDATA[] rgelt, IntPtr pceltFetched);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\IEnumMoniker.cs (1)
15int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] IMoniker[] rgelt, IntPtr pceltFetched);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\IEnumString.cs (1)
15int Next(int celt, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 0), Out] string[] rgelt, IntPtr pceltFetched);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\IEnumVARIANT.cs (1)
15int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] object?[] rgVar, IntPtr pceltFetched);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\IStream.cs (5)
32void Read([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1), Out] byte[] pv, int cb, IntPtr pcbRead); 33void Write([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] byte[] pv, int cb, IntPtr pcbWritten); 36void Seek(long dlibMove, int dwOrigin, IntPtr plibNewPosition); 38void CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\ITypeComp.cs (3)
24public IntPtr lpfuncdesc; 26public IntPtr lpvardesc; 28public IntPtr lptcomp;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\ITypeInfo.cs (23)
66public IntPtr lpstrSchema; 86public IntPtr lprgscode; // /* [size_is(cScodes)] */ SCODE RPC_FAR *lprgscode; 87public IntPtr lprgelemdescParam; // /* [size_is(cParams)] */ ELEMDESC __RPC_FAR *lprgelemdescParam; 114public IntPtr dwReserved; 136public IntPtr lpVarValue; 144public IntPtr lpValue; 187public IntPtr lpvarValue; 201public IntPtr rgvarg; 202public IntPtr rgdispidNamedArgs; 217public IntPtr pvReserved; 218public IntPtr pfnDeferredFillIn; 301void GetTypeAttr(out IntPtr ppTypeAttr); 303void GetFuncDesc(int index, out IntPtr ppFuncDesc); 304void GetVarDesc(int index, out IntPtr ppVarDesc); 309void Invoke([MarshalAs(UnmanagedType.IUnknown)] object pvInstance, int memid, short wFlags, ref DISPPARAMS pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, out int puArgErr); 311void GetDllEntry(int memid, INVOKEKIND invKind, IntPtr pBstrDllName, IntPtr pBstrName, IntPtr pwOrdinal); 313void AddressOfMember(int memid, INVOKEKIND invKind, out IntPtr ppv); 318void ReleaseTypeAttr(IntPtr pTypeAttr); 320void ReleaseFuncDesc(IntPtr pFuncDesc); 322void ReleaseVarDesc(IntPtr pVarDesc);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\ITypeInfo2.cs (17)
14new void GetTypeAttr(out IntPtr ppTypeAttr); 16new void GetFuncDesc(int index, out IntPtr ppFuncDesc); 17new void GetVarDesc(int index, out IntPtr ppVarDesc); 22new void Invoke([MarshalAs(UnmanagedType.IUnknown)] object pvInstance, int memid, short wFlags, ref DISPPARAMS pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, out int puArgErr); 24new void GetDllEntry(int memid, INVOKEKIND invKind, IntPtr pBstrDllName, IntPtr pBstrName, IntPtr pwOrdinal); 26new void AddressOfMember(int memid, INVOKEKIND invKind, out IntPtr ppv); 31new void ReleaseTypeAttr(IntPtr pTypeAttr); 33new void ReleaseFuncDesc(IntPtr pFuncDesc); 35new void ReleaseVarDesc(IntPtr pVarDesc); 47void GetAllCustData(IntPtr pCustData); 48void GetAllFuncCustData(int index, IntPtr pCustData); 49void GetAllParamCustData(int indexFunc, int indexParam, IntPtr pCustData); 50void GetAllVarCustData(int index, IntPtr pCustData); 51void GetAllImplTypeCustData(int index, IntPtr pCustData);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\ITypeLib.cs (2)
50void GetLibAttr(out IntPtr ppTLibAttr); 57void ReleaseTLibAttr(IntPtr pTLibAttr);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\ITypeLib2.cs (4)
19new void GetLibAttr(out IntPtr ppTLibAttr); 26new void ReleaseTLibAttr(IntPtr pTLibAttr); 28void GetLibStatistics(IntPtr pcUniqueNames, out int pcchUniqueNames); 31void GetAllCustData(IntPtr pCustData);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (4)
37/// Enumeration of flags for <see cref="ComWrappers.GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags)"/>. 92public IntPtr Vtable; 99public IntPtr Vtable; 127protected abstract object? CreateObject(IntPtr externalComObject, CreateObjectFlags flags);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CriticalHandle.cs (3)
123protected IntPtr handle; // This must be protected so derived classes can use out params. 127protected CriticalHandle(IntPtr invalidHandleValue) 157protected void SetHandle(IntPtr handle)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\DispatchWrapper.cs (1)
19IntPtr pdisp = Marshal.GetIDispatchForObject(obj);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (20)
28private IntPtr _handle; 44IntPtr handle = InternalAlloc(value, type); 56private GCHandle(IntPtr handle) => _handle = handle; 75IntPtr handle = Interlocked.Exchange(ref _handle, IntPtr.Zero); 85IntPtr handle = _handle; 92IntPtr handle = _handle; 108public readonly IntPtr AddrOfPinnedObject() 112IntPtr handle = _handle; 135return (IntPtr)Unsafe.AsPointer(ref Unsafe.As<string>(target).GetRawStringData()); 139return (IntPtr)Unsafe.AsPointer(ref MemoryMarshal.GetArrayDataReference(Unsafe.As<Array>(target))); 142return (IntPtr)Unsafe.AsPointer(ref target.GetRawData()); 153public static explicit operator GCHandle(IntPtr value) => FromIntPtr(value); 155public static GCHandle FromIntPtr(IntPtr value) 162public static explicit operator IntPtr(GCHandle value) => ToIntPtr(value); 164public static IntPtr ToIntPtr(GCHandle value) => value._handle; 180private static IntPtr GetHandleValue(IntPtr handle) => new IntPtr(handle & ~1); // Remove Pin flag 183private static bool IsPinned(IntPtr handle) => (handle & 1) != 0; // Check Pin flag 186private static void ThrowIfInvalid(IntPtr handle)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\HandleRef.cs (5)
11private readonly IntPtr _handle; 14public HandleRef(object? wrapper, IntPtr handle) 22public IntPtr Handle => _handle; 24public static explicit operator IntPtr(HandleRef value) => value._handle; 26public static IntPtr ToIntPtr(HandleRef value) => value._handle;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ICustomMarshaler.cs (3)
17object MarshalNativeToManaged(IntPtr pNativeData); 19IntPtr MarshalManagedToNative(object ManagedObj); 21void CleanUpNativeData(IntPtr pNativeData);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ICustomQueryInterface.cs (1)
12CustomQueryInterfaceResult GetInterface([In] ref Guid iid, out IntPtr ppv);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (128)
31public static IntPtr AllocHGlobal(int cb) => AllocHGlobal((nint)cb); 33public static unsafe string? PtrToStringAnsi(IntPtr ptr) 43public static unsafe string PtrToStringAnsi(IntPtr ptr, int len) 51public static unsafe string? PtrToStringUni(IntPtr ptr) 61public static unsafe string PtrToStringUni(IntPtr ptr, int len) 69public static unsafe string? PtrToStringUTF8(IntPtr ptr) 80public static unsafe string PtrToStringUTF8(IntPtr ptr, int byteLen) 133public static unsafe int QueryInterface(IntPtr pUnk, in Guid iid, out IntPtr ppv) 138fixed (IntPtr* p = &ppv) 140return ((delegate* unmanaged<IntPtr, Guid*, IntPtr*, int>)(*(*(void***)pUnk + 0 /* IUnknown.QueryInterface slot */)))(pUnk, pIID, p); 144public static unsafe int AddRef(IntPtr pUnk) 148return ((delegate* unmanaged<IntPtr, int>)(*(*(void***)pUnk + 1 /* IUnknown.AddRef slot */)))(pUnk); 151public static unsafe int Release(IntPtr pUnk) 155return ((delegate* unmanaged<IntPtr, int>)(*(*(void***)pUnk + 2 /* IUnknown.Release slot */)))(pUnk); 164public static unsafe IntPtr UnsafeAddrOfPinnedArrayElement(Array arr, int index) 170return (IntPtr)((byte*)pRawData + (uint)index * (nuint)arr.GetElementSize()); 173public static unsafe IntPtr UnsafeAddrOfPinnedArrayElement<T>(T[] arr, int index) 180return (IntPtr)((byte*)pRawData + (uint)index * (nuint)sizeof(T)); 184public static IntPtr OffsetOf<T>(string fieldName) => OffsetOf(typeof(T), fieldName); 186public static void Copy(int[] source, int startIndex, IntPtr destination, int length) 191public static void Copy(char[] source, int startIndex, IntPtr destination, int length) 196public static void Copy(short[] source, int startIndex, IntPtr destination, int length) 201public static void Copy(long[] source, int startIndex, IntPtr destination, int length) 206public static void Copy(float[] source, int startIndex, IntPtr destination, int length) 211public static void Copy(double[] source, int startIndex, IntPtr destination, int length) 216public static void Copy(byte[] source, int startIndex, IntPtr destination, int length) 221public static void Copy(IntPtr[] source, int startIndex, IntPtr destination, int length) 226private static unsafe void CopyToNative<T>(T[] source, int startIndex, IntPtr destination, int length) 236public static void Copy(IntPtr source, int[] destination, int startIndex, int length) 241public static void Copy(IntPtr source, char[] destination, int startIndex, int length) 246public static void Copy(IntPtr source, short[] destination, int startIndex, int length) 251public static void Copy(IntPtr source, long[] destination, int startIndex, int length) 256public static void Copy(IntPtr source, float[] destination, int startIndex, int length) 261public static void Copy(IntPtr source, double[] destination, int startIndex, int length) 266public static void Copy(IntPtr source, byte[] destination, int startIndex, int length) 271public static void Copy(IntPtr source, IntPtr[] destination, int startIndex, int length) 276private static unsafe void CopyToManaged<T>(IntPtr source, T[] destination, int startIndex, int length) 289public static unsafe byte ReadByte(IntPtr ptr, int ofs) 303public static byte ReadByte(IntPtr ptr) => ReadByte(ptr, 0); 305public static unsafe short ReadInt16(IntPtr ptr, int ofs) 327public static short ReadInt16(IntPtr ptr) => ReadInt16(ptr, 0); 329public static unsafe int ReadInt32(IntPtr ptr, int ofs) 351public static int ReadInt32(IntPtr ptr) => ReadInt32(ptr, 0); 356public static IntPtr ReadIntPtr(object ptr, int ofs) 365public static IntPtr ReadIntPtr(IntPtr ptr, int ofs) 374public static IntPtr ReadIntPtr(IntPtr ptr) => ReadIntPtr(ptr, 0); 376public static unsafe long ReadInt64(IntPtr ptr, int ofs) 398public static long ReadInt64(IntPtr ptr) => ReadInt64(ptr, 0); 400public static unsafe void WriteByte(IntPtr ptr, int ofs, byte val) 414public static void WriteByte(IntPtr ptr, byte val) => WriteByte(ptr, 0, val); 416public static unsafe void WriteInt16(IntPtr ptr, int ofs, short val) 438public static void WriteInt16(IntPtr ptr, short val) => WriteInt16(ptr, 0, val); 440public static void WriteInt16(IntPtr ptr, int ofs, char val) => WriteInt16(ptr, ofs, (short)val); 447public static void WriteInt16(IntPtr ptr, char val) => WriteInt16(ptr, 0, (short)val); 449public static unsafe void WriteInt32(IntPtr ptr, int ofs, int val) 471public static void WriteInt32(IntPtr ptr, int val) => WriteInt32(ptr, 0, val); 473public static void WriteIntPtr(IntPtr ptr, int ofs, IntPtr val) 487public static void WriteIntPtr(object ptr, int ofs, IntPtr val) 498public static void WriteIntPtr(IntPtr ptr, IntPtr val) => WriteIntPtr(ptr, 0, val); 500public static unsafe void WriteInt64(IntPtr ptr, int ofs, long val) 522public static void WriteInt64(IntPtr ptr, long val) => WriteInt64(ptr, 0, val); 547public static void StructureToPtr<T>([DisallowNull] T structure, IntPtr ptr, bool fDeleteOld) 558public static object? PtrToStructure(IntPtr ptr, 564if (ptr == IntPtr.Zero) 588public static void PtrToStructure(IntPtr ptr, object structure) 596public static void PtrToStructure<T>(IntPtr ptr, [DisallowNull] T structure) 606public static T? PtrToStructure<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T>(IntPtr ptr) 608if (ptr == IntPtr.Zero) 629public static void DestroyStructure<T>(IntPtr ptr) => DestroyStructure(ptr, typeof(T)); 635public static IntPtr GetHINSTANCE(Module m) 639return (IntPtr)(-1); 646public static Exception? GetExceptionForHR(int errorCode) => GetExceptionForHR(errorCode, IntPtr.Zero); 648public static Exception? GetExceptionForHR(int errorCode, IntPtr errorInfo) 862public static void ThrowExceptionForHR(int errorCode, IntPtr errorInfo) 870public static IntPtr SecureStringToBSTR(SecureString s) 880public static IntPtr SecureStringToCoTaskMemAnsi(SecureString s) 890public static IntPtr SecureStringToCoTaskMemUnicode(SecureString s) 900public static IntPtr SecureStringToGlobalAllocAnsi(SecureString s) 910public static IntPtr SecureStringToGlobalAllocUnicode(SecureString s) 920public static unsafe IntPtr StringToHGlobalAnsi(string? s) 924return IntPtr.Zero; 936IntPtr ptr = AllocHGlobal((IntPtr)nb); 942public static unsafe IntPtr StringToHGlobalUni(string? s) 946return IntPtr.Zero; 957IntPtr ptr = AllocHGlobal((IntPtr)nb); 965private static unsafe IntPtr StringToHGlobalUTF8(string? s) 969return IntPtr.Zero; 974IntPtr ptr = AllocHGlobal(checked(nb + 1)); 983public static unsafe IntPtr StringToCoTaskMemUni(string? s) 987return IntPtr.Zero; 998IntPtr ptr = AllocCoTaskMem(nb); 1006public static unsafe IntPtr StringToCoTaskMemUTF8(string? s) 1010return IntPtr.Zero; 1015IntPtr ptr = AllocCoTaskMem(checked(nb + 1)); 1024public static unsafe IntPtr StringToCoTaskMemAnsi(string? s) 1028return IntPtr.Zero; 1040IntPtr ptr = AllocCoTaskMem(nb); 1093public static Delegate GetDelegateForFunctionPointer(IntPtr ptr, Type t) 1118public static TDelegate GetDelegateForFunctionPointer<TDelegate>(IntPtr ptr) 1141public static IntPtr GetFunctionPointerForDelegate(Delegate d) 1150public static IntPtr GetFunctionPointerForDelegate<TDelegate>(TDelegate d) where TDelegate : notnull 1166public static unsafe void ZeroFreeBSTR(IntPtr s) 1168if (s == IntPtr.Zero) 1176public static unsafe void ZeroFreeCoTaskMemAnsi(IntPtr s) 1181public static unsafe void ZeroFreeCoTaskMemUnicode(IntPtr s) 1183if (s == IntPtr.Zero) 1191public static unsafe void ZeroFreeCoTaskMemUTF8(IntPtr s) 1193if (s == IntPtr.Zero) 1201public static unsafe void ZeroFreeGlobalAllocAnsi(IntPtr s) 1203if (s == IntPtr.Zero) 1211public static unsafe void ZeroFreeGlobalAllocUnicode(IntPtr s) 1213if (s == IntPtr.Zero) 1221public static unsafe IntPtr StringToBSTR(string? s) 1225return IntPtr.Zero; 1228IntPtr bstr = AllocBSTR(s.Length); 1235public static string PtrToStringBSTR(IntPtr ptr) 1242internal static unsafe uint SysStringByteLen(IntPtr s) 1255public static void InitHandle(SafeHandle safeHandle, IntPtr handle)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.NoCom.cs (18)
25public static IntPtr CreateAggregatedObject(IntPtr pOuter, object o) 42public static IntPtr CreateAggregatedObject<T>(IntPtr pOuter, T o) where T : notnull 75public static IntPtr GetComInterfaceForObject(object o, Type T) 82public static IntPtr GetComInterfaceForObject(object o, Type T, CustomQueryInterfaceMode mode) 88public static IntPtr GetComInterfaceForObject<T, TInterface>([DisallowNull] T o) 100public static IntPtr GetIDispatchForObject(object o) 106public static IntPtr GetIUnknownForObject(object o) 113public static void GetNativeVariantForObject(object? obj, IntPtr pDstNativeVariant) 120public static void GetNativeVariantForObject<T>(T? obj, IntPtr pDstNativeVariant) 126public static object GetTypedObjectForIUnknown(IntPtr pUnk, Type t) 132public static object GetObjectForIUnknown(IntPtr pUnk) 139public static object? GetObjectForNativeVariant(IntPtr pSrcNativeVariant) 146public static T? GetObjectForNativeVariant<T>(IntPtr pSrcNativeVariant) 153public static object?[] GetObjectsForNativeVariants(IntPtr aSrcNativeVariant, int cVars) 160public static T[] GetObjectsForNativeVariants<T>(IntPtr aSrcNativeVariant, int cVars) 194public static object GetUniqueObjectForIUnknown(IntPtr unknown)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.Unix.cs (22)
11public static string? PtrToStringAuto(IntPtr ptr, int len) 16public static string? PtrToStringAuto(IntPtr ptr) 21public static IntPtr StringToHGlobalAuto(string? s) 26public static IntPtr StringToCoTaskMemAuto(string? s) 33private static bool IsNullOrWin32Atom(IntPtr ptr) => ptr == IntPtr.Zero; 59public static unsafe IntPtr AllocHGlobal(IntPtr cb) 64public static unsafe void FreeHGlobal(IntPtr hglobal) 69public static unsafe IntPtr ReAllocHGlobal(IntPtr pv, IntPtr cb) 74public static IntPtr AllocCoTaskMem(int cb) => AllocHGlobal((nint)(uint)cb); 76public static void FreeCoTaskMem(IntPtr ptr) => FreeHGlobal(ptr); 78public static unsafe IntPtr ReAllocCoTaskMem(IntPtr pv, int cb) 86return IntPtr.Zero; 92internal static unsafe IntPtr AllocBSTR(int length) 97ulong cbNative = 2 * (ulong)(uint)length + (uint)sizeof(IntPtr) + (uint)sizeof(char) + WIN32_ALLOC_ALIGN; 118internal static unsafe IntPtr AllocBSTRByteLen(uint length) 123ulong cbNative = (ulong)(uint)length + (uint)sizeof(IntPtr) + (uint)sizeof(char) + WIN32_ALLOC_ALIGN; 147public static unsafe void FreeBSTR(IntPtr ptr)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\AnsiStringMarshaller.cs (2)
40=> Marshal.PtrToStringAnsi((IntPtr)unmanaged); 47=> Marshal.FreeCoTaskMem((IntPtr)unmanaged);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ArrayMarshaller.cs (1)
99=> Marshal.FreeCoTaskMem((IntPtr)unmanaged);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\BStrStringMarshaller.cs (3)
36return Marshal.PtrToStringBSTR((IntPtr)unmanaged); 44=> Marshal.FreeBSTR((IntPtr)unmanaged); 96Debug.Assert(lengthInBytes == Marshal.SysStringByteLen((IntPtr)ptrToFirstChar));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (26)
27if (IntPtr.Size == 4) 29Debug.Assert(variantSize == (4 * IntPtr.Size)); 33Debug.Assert(IntPtr.Size == 8); 34Debug.Assert(variantSize == (3 * IntPtr.Size)); 67public IntPtr _record; 68public IntPtr _recordInfo; 75public IntPtr _data; 91public IntPtr _stream; 99public IntPtr _data; 121[FieldOffset(0)] public IntPtr _bstr; 122[FieldOffset(0)] public IntPtr _unknown; 123[FieldOffset(0)] public IntPtr _dispatch; 124[FieldOffset(0)] public IntPtr _pvarVal; 125[FieldOffset(0)] public IntPtr _byref; 158if (_typeUnion._unionTypes._unknown != IntPtr.Zero) 165if (_typeUnion._unionTypes._record._recordInfo != IntPtr.Zero) 168if (_typeUnion._unionTypes._record._record != IntPtr.Zero) 170Marshal.ThrowExceptionForHR(((delegate* unmanaged<IntPtr, IntPtr, int>)(*(*(void***)_typeUnion._unionTypes._record._recordInfo + 4 /* IRecordInfo.RecordClear slot */)))(_typeUnion._unionTypes._record._recordInfo, _typeUnion._unionTypes._record._record)); 185if (_typeUnion._unionTypes._unknown != IntPtr.Zero) 193if (versionedStream != null && versionedStream->_stream != IntPtr.Zero) 213foreach (var str in GetRawDataRef<Vector<IntPtr>>().AsSpan()) 220foreach (var str in GetRawDataRef<Vector<IntPtr>>().AsSpan()) 493if (_typeUnion._unionTypes._bstr == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\PointerArrayMarshaller.cs (7)
52public static ReadOnlySpan<IntPtr> GetManagedValuesSource(T*[]? managed) 53=> Unsafe.As<IntPtr[]>(managed); 83public static Span<IntPtr> GetManagedValuesDestination(T*[]? managed) 84=> Unsafe.As<IntPtr[]>(managed); 100=> Marshal.FreeCoTaskMem((IntPtr)unmanaged); 159public ReadOnlySpan<IntPtr> GetManagedValuesSource() => Unsafe.As<IntPtr[]>(_managedArray);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SafeHandleMarshaller.cs (5)
39public IntPtr ToUnmanaged() => _handle!.DangerousGetHandle(); 61private IntPtr _originalHandleValue; 94public IntPtr ToUnmanaged() => _originalHandleValue; 100public void FromUnmanaged(IntPtr value) 172public void FromUnmanaged(IntPtr value)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SpanMarshaller.cs (1)
104=> Marshal.FreeCoTaskMem((IntPtr)unmanaged);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\Utf16StringMarshaller.cs (2)
29=> Marshal.PtrToStringUni((IntPtr)unmanaged); 36=> Marshal.FreeCoTaskMem((IntPtr)unmanaged);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\Utf8StringMarshaller.cs (2)
42=> Marshal.PtrToStringUTF8((IntPtr)unmanaged); 49=> Marshal.FreeCoTaskMem((IntPtr)unmanaged);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (21)
22public delegate IntPtr DllImportResolver(string libraryName, 40public static IntPtr Load(string libraryPath) 54public static bool TryLoad(string libraryPath, out IntPtr handle) 59return handle != IntPtr.Zero; 84public static IntPtr Load(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) 119public static bool TryLoad(string libraryName, Assembly assembly, DllImportSearchPath? searchPath, out IntPtr handle) 131return handle != IntPtr.Zero; 140public static void Free(IntPtr handle) 142if (handle == IntPtr.Zero) 156public static IntPtr GetExport(IntPtr handle, string name) 172public static bool TryGetExport(IntPtr handle, string name, out IntPtr address) 178return address != IntPtr.Zero; 231internal static IntPtr LoadLibraryCallbackStub(string libraryName, Assembly assembly, 236return IntPtr.Zero; 241return IntPtr.Zero; 251public static IntPtr GetMainProgramHandle() 253IntPtr result = IntPtr.Zero; 261if (result == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (6)
342/// <summary>Explicitly converts a native-sized floating-point value to its nearest representable <see cref="IntPtr" /> value.</summary> 344/// <returns><paramref name="value" /> converted to its nearest representable <see cref="IntPtr" /> value.</returns> 348/// <summary>Explicitly converts a native-sized floating-point value to its nearest representable <see cref="IntPtr" /> value, throwing an overflow exception for any values that fall outside the representable range.</summary> 350/// <returns><paramref name="value" /> converted to its nearest representable <see cref="IntPtr" /> value.</returns> 351/// <exception cref="OverflowException"><paramref name="value" /> is not representable by <see cref="IntPtr" />.</exception> 505/// <summary>Implicitly converts a <see cref="System.IntPtr" /> value to its nearest representable native-sized floating-point value.</summary>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ObjectiveC\ObjectiveCMarshal.PlatformNotSupported.cs (6)
33public unsafe delegate delegate* unmanaged<IntPtr, void> UnhandledExceptionPropagationHandler( 36out IntPtr context); 60delegate* unmanaged<IntPtr, int> isReferencedCallback, 61delegate* unmanaged<IntPtr, void> trackedObjectEnteredFinalization, 93out Span<IntPtr> taggedMemory) 132public static void SetMessageSendCallback(MessageSendFunction msgSendFunction, IntPtr func)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeBuffer.cs (1)
91if (IntPtr.Size == 4 && numBytes > uint.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeHandle.cs (4)
35protected IntPtr handle; 64protected SafeHandle(IntPtr invalidHandleValue, bool ownsHandle) 96protected internal void SetHandle(IntPtr handle) => this.handle = handle; 98public IntPtr DangerousGetHandle() => handle;
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyDependencyResolver.cs (2)
50IntPtr errorWriterPtr = Marshal.GetFunctionPointerForDelegate(errorWriter); 51IntPtr previousErrorWriterPtr = Interop.HostPolicy.corehost_set_error_writer(errorWriterPtr);
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (14)
48private readonly IntPtr _nativeAssemblyLoadContext; 54private event Func<Assembly, string, IntPtr>? _resolvingUnmanagedDll; 102var thisHandlePtr = GCHandle.ToIntPtr(thisHandle); 148var thisStrongHandlePtr = GCHandle.ToIntPtr(thisStrongHandle); 189public event Func<Assembly, string, IntPtr>? ResolvingUnmanagedDll 438protected IntPtr LoadUnmanagedDllFromPath(string unmanagedDllPath) 453protected virtual IntPtr LoadUnmanagedDll(string unmanagedDllName) 456return IntPtr.Zero; 612private static Assembly? Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) 809internal IntPtr GetResolvedUnmanagedDll(Assembly assembly, string unmanagedDllName) 812foreach (Func<Assembly, string, IntPtr> handler in Delegate.EnumerateInvocationList(_resolvingUnmanagedDll)) 814IntPtr resolvedDll = handler(assembly, unmanagedDllName); 815if (resolvedDll != IntPtr.Zero) 821return IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.Unix.cs (1)
12return IntPtr.Size == 4 ? uint.MaxValue : ulong.MaxValue;
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (1)
961value = default(IntPtr);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\RabinKarp.cs (1)
34private static int HashShiftPerElement => IntPtr.Size == 8 ? 2 : 1;
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\StringSearchValues.cs (1)
385int maxLength = IntPtr.Size == 4 ? 1_000_000_000 : int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (12)
306internal unsafe IntPtr MarshalToBSTR() 315IntPtr ptr = IntPtr.Zero; 325IntPtr result = ptr; 326ptr = IntPtr.Zero; 332if (ptr != IntPtr.Zero) 344internal unsafe IntPtr MarshalToString(bool globalAlloc, bool unicode) 353IntPtr ptr = IntPtr.Zero; 388IntPtr result = ptr; 389ptr = IntPtr.Zero; 395if (ptr != IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Span.cs (1)
287SpanHelpers.ClearWithReferences(ref Unsafe.As<T, IntPtr>(ref _reference), (uint)_length * (nuint)(sizeof(T) / sizeof(nuint)));
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.cs (2)
15public static unsafe void ClearWithReferences(ref IntPtr ip, nuint pointerSizeLength) 17Debug.Assert(Unsafe.IsOpportunisticallyAligned(ref ip, (uint)sizeof(IntPtr)), "Should've been aligned on natural word boundary.");
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (2)
316if (IntPtr.Size >= 8 && (elementCount - i) >= (nuint)(8 / sizeof(TFrom))) 426if (IntPtr.Size < 8 || !Vector128.IsHardwareAccelerated)
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (3)
1333if (IntPtr.Size >= 8) 1375if (IntPtr.Size >= 8) 1435if (IntPtr.Size >= 8)
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (4)
558if (IntPtr.Size >= 8) 590if (IntPtr.Size >= 8) 641if (IntPtr.Size >= 8) 701if (IntPtr.Size >= 8)
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs (2)
237if (IntPtr.Size == 8) 305if (IntPtr.Size == 8)
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Validation.cs (1)
446if (IntPtr.Size >= 8 && BitConverter.IsLittleEndian)
src\libraries\System.Private.CoreLib\src\System\Threading\EventWaitHandle.Windows.cs (1)
29SafeWaitHandle handle = Interop.Kernel32.CreateEventEx(IntPtr.Zero, name, eventFlags, AccessRights);
src\libraries\System.Private.CoreLib\src\System\Threading\Interlocked.cs (14)
198public static IntPtr Exchange(ref IntPtr location1, IntPtr value) 202return (IntPtr)Interlocked.Exchange(ref Unsafe.As<IntPtr, long>(ref location1), (long)value); 381/// <param name="location1">The destination <see cref="IntPtr"/>, whose value is compared with the value of <paramref name="comparand"/> and possibly replaced by <paramref name="value"/>.</param> 382/// <param name="value">The <see cref="IntPtr"/> that replaces the destination value if the comparison results in equality.</param> 383/// <param name="comparand">The <see cref="IntPtr"/> that is compared to the value at <paramref name="location1"/>.</param> 388public static IntPtr CompareExchange(ref IntPtr location1, IntPtr value, IntPtr comparand) 392return (IntPtr)Interlocked.CompareExchange(ref Unsafe.As<IntPtr, long>(ref location1), (long)value, (long)comparand);
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelMonitor.Unix.cs (4)
10private IntPtr _nativeMonitor; 15if (_nativeMonitor == IntPtr.Zero) 23if (_nativeMonitor == IntPtr.Zero) 29_nativeMonitor = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Threading\NativeOverlapped.cs (3)
11public IntPtr InternalLow; 12public IntPtr InternalHigh; 15public IntPtr EventHandle;
src\libraries\System.Private.CoreLib\src\System\Threading\Overlapped.cs (3)
15private IntPtr _eventHandle; 23public Overlapped(int offsetLo, int offsetHi, IntPtr hEvent, IAsyncResult? ar) 62public IntPtr EventHandleIntPtr
src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (6)
26private IntPtr UserUnregisterWaitHandleValue { get; set; } 28private static IntPtr InvalidHandleValue => new IntPtr(-1); 110UserUnregisterWaitHandleValue = UserUnregisterWaitHandle?.DangerousGetHandle() ?? IntPtr.Zero; 140UserUnregisterWaitHandleValue = IntPtr.Zero; 167IntPtr handleValue = UserUnregisterWaitHandleValue; 170if (handleValue != IntPtr.Zero && handleValue != InvalidHandleValue)
src\libraries\System.Private.CoreLib\src\System\Threading\Semaphore.Windows.cs (1)
30SafeWaitHandle myHandle = Interop.Kernel32.CreateSemaphoreEx(IntPtr.Zero, initialCount, maximumCount, name, 0, AccessRights);
src\libraries\System.Private.CoreLib\src\System\Threading\SynchronizationContext.cs (2)
42public virtual int Wait(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout) 48protected static int WaitHelper(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TplEventSource.cs (22)
203eventPayload[0].DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)); 206eventPayload[1].DataPointer = ((IntPtr)(&OriginatingTaskID)); 209eventPayload[2].DataPointer = ((IntPtr)(&TaskID)); 212eventPayload[3].DataPointer = ((IntPtr)(&CreatingTaskID)); 215eventPayload[4].DataPointer = ((IntPtr)(&TaskCreationOptions)); 218eventPayload[5].DataPointer = ((IntPtr)(&appDomain)); 275eventPayload[0].DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)); 278eventPayload[1].DataPointer = ((IntPtr)(&OriginatingTaskID)); 281eventPayload[2].DataPointer = ((IntPtr)(&TaskID)); 284eventPayload[3].DataPointer = ((IntPtr)(&isExceptionalInt)); 319eventPayload[0].DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)); 322eventPayload[1].DataPointer = ((IntPtr)(&OriginatingTaskID)); 325eventPayload[2].DataPointer = ((IntPtr)(&TaskID)); 328eventPayload[3].DataPointer = ((IntPtr)(&Behavior)); 331eventPayload[4].DataPointer = ((IntPtr)(&ContinueWithTaskID)); 411eventPayload[0].DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)); 414eventPayload[1].DataPointer = ((IntPtr)(&OriginatingTaskID)); 417eventPayload[2].DataPointer = ((IntPtr)(&ContinueWithTaskId)); 444eventPayload[0].DataPointer = ((IntPtr)(&TaskID)); 448eventPayload[1].DataPointer = ((IntPtr)operationNamePtr); 452eventPayload[2].DataPointer = ((IntPtr)(&RelatedContext)); 496eventPayload[0].DataPointer = ((IntPtr)(&Work));
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (4)
563public static IntPtr VolatileRead(ref IntPtr address) => Volatile.Read(ref address); 608public static void VolatileWrite(ref IntPtr address, IntPtr value) => Volatile.Write(ref address, value);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPool.Unix.cs (1)
103public static bool BindHandle(IntPtr osHandle) =>
src\libraries\System.Private.CoreLib\src\System\Threading\Volatile.cs (7)
110private struct VolatileIntPtr { public volatile IntPtr Value; } 114public static IntPtr Read(ref readonly IntPtr location) => 115Unsafe.As<IntPtr, VolatileIntPtr>(ref Unsafe.AsRef(in location)).Value; 119public static void Write(ref IntPtr location, IntPtr value) => 120Unsafe.As<IntPtr, VolatileIntPtr>(ref location).Value = value;
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (12)
15protected static readonly IntPtr InvalidHandle = new IntPtr(-1); 46public virtual IntPtr Handle 240Span<IntPtr> unsafeWaitHandles) 324IntPtr[] unsafeWaitHandles = new IntPtr[waitHandles.Length]; 330Span<IntPtr> unsafeWaitHandles = stackalloc IntPtr[waitHandles.Length]; 382IntPtr[] unsafeWaitHandles = new IntPtr[safeWaitHandles.Length]; 392Span<IntPtr> unsafeWaitHandles = stackalloc IntPtr[safeWaitHandles.Length]; 404internal static int WaitMultipleIgnoringSyncContext(Span<IntPtr> handles, bool waitAll, int millisecondsTimeout)
src\libraries\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.cs (7)
20private static IntPtr s_freeList; // Lock-free linked stack of free ThreadPoolNativeOverlapped instances. 23private IntPtr _nextFree; // if this instance if free, points to the next free instance. 48IntPtr freePtr; 53while ((freePtr = Volatile.Read(ref s_freeList)) != IntPtr.Zero) 60overlapped->_nextFree = IntPtr.Zero; 167IntPtr freePtr = Volatile.Read(ref s_freeList); 170if (Interlocked.CompareExchange(ref s_freeList, (IntPtr)overlapped, freePtr) == freePtr)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.FullGlobalizationData.cs (2)
65IntPtr regionPtr = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (3)
281IntPtr dirHandle = Interop.Sys.OpenDir(currentPath); 282if (dirHandle == IntPtr.Zero) 342if (dirHandle != IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\TypedReference.cs (5)
24IntPtr[] fields = new IntPtr[flds.Length]; 65private static extern unsafe void InternalMakeTypedReference(void* result, object target, IntPtr[] flds, RuntimeType lastFieldType); 69if (_type == IntPtr.Zero) 80internal bool IsNull => Unsafe.IsNullRef(ref _value) && _type == IntPtr.Zero;
src\System\ArgIterator.cs (3)
13private IntPtr _argCookie; // Cookie from the EE. 18internal IntPtr _ptr; 23private IntPtr _argPtr; // Pointer to remaining args.
src\System\Array.CoreCLR.cs (7)
426Debug.Assert(totalByteLength % (nuint)sizeof(IntPtr) == 0); 427SpanHelpers.ClearWithReferences(ref Unsafe.As<byte, IntPtr>(ref pStart), totalByteLength / (nuint)sizeof(IntPtr)); 463SpanHelpers.ClearWithReferences(ref Unsafe.As<byte, IntPtr>(ref ptr), byteLength / (uint)sizeof(IntPtr)); 622return (IntPtr)thisMT->ElementType == (IntPtr)RuntimeHelpers.GetMethodTable(value);
src\System\ComAwareWeakReference.CoreCLR.cs (5)
13private static partial void ComWeakRefToObject(IntPtr pComWeakRef, long wrapperId, ObjectHandleOnStack retRcw); 15internal static object? ComWeakRefToObject(IntPtr pComWeakRef, long wrapperId) 33int header = *(int*)(pRawData - sizeof(IntPtr) - sizeof(int)); 43private static partial IntPtr ObjectToComWeakRef(ObjectHandleOnStack retRcw, out long wrapperId); 53return IntPtr.Zero;
src\System\Delegate.CoreCLR.cs (17)
26internal IntPtr _methodPtr; 32internal IntPtr _methodPtrAux; 106if (_methodPtrAux == IntPtr.Zero) 108if (d._methodPtrAux != IntPtr.Zero) 117if (d._methodPtrAux == IntPtr.Zero) 151if (_methodPtrAux == IntPtr.Zero) 169if (_methodPtrAux == IntPtr.Zero) 473private extern void DelegateConstruct(object target, IntPtr slot); 476internal extern IntPtr GetMulticastInvoke(); 479internal extern IntPtr GetInvokeMethod(); 501internal static IntPtr AdjustTarget(object target, IntPtr methodPtr) 507private static partial IntPtr AdjustTarget(ObjectHandleOnStack target, IntPtr methodPtr); 509internal void InitializeVirtualCallStub(IntPtr methodPtr) 516private static partial void InitializeVirtualCallStub(ObjectHandleOnStack d, IntPtr methodPtr); 520return (_methodPtrAux == IntPtr.Zero) ? _target : null;
src\System\Diagnostics\StackFrame.CoreCLR.cs (3)
60private static partial RuntimeMethodHandleInternal GetMethodDescFromNativeIP(IntPtr ip); 69internal static MethodBase? GetMethodFromNativeIP(IntPtr ip) 73if (method.Value == IntPtr.Zero)
src\System\Diagnostics\StackFrameHelper.cs (9)
25private IntPtr[]? rgMethodHandle; 28private IntPtr[]? rgLoadedPeAddress; 31private IntPtr[]? rgInMemoryPdbAddress; 42private delegate void GetSourceLineInfoDelegate(Assembly? assembly, string assemblyPath, IntPtr loadedPeAddress, 43int loadedPeSize, bool isFileLayout, IntPtr inMemoryPdbAddress, int inMemoryPdbSize, int methodToken, int ilOffset, 115typeof(Assembly), typeof(string), typeof(IntPtr), typeof(int), typeof(bool), typeof(IntPtr), 164IntPtr mh = rgMethodHandle![i]; 166if (mh == IntPtr.Zero)
src\System\Exception.CoreCLR.cs (1)
187private readonly IntPtr _xptrs; // Internal EE stuff
src\System\GC.CoreCLR.cs (7)
107internal static extern Array AllocateNewArray(IntPtr typeHandle, int length, GC_ALLOC_FLAGS flags); 139if (IntPtr.Size == 4) 150if (IntPtr.Size == 4) 370private static partial IntPtr _RegisterFrozenSegment(IntPtr sectionAddress, nint sectionSize); 373private static partial void _UnregisterFrozenSegment(IntPtr segmentHandle); 836string nameAsString = Marshal.PtrToStringUTF8((IntPtr)name)!;
src\System\MulticastDelegate.CoreCLR.cs (15)
548private void CtorClosed(object target, IntPtr methodPtr) 558private void CtorClosedStatic(object target, IntPtr methodPtr) 566private void CtorRTClosed(object target, IntPtr methodPtr) 576private void CtorOpened(object target, IntPtr methodPtr, IntPtr shuffleThunk) 585private void CtorVirtualDispatch(object target, IntPtr methodPtr, IntPtr shuffleThunk) 594private void CtorCollectibleClosedStatic(object target, IntPtr methodPtr, IntPtr gchandle) 603private void CtorCollectibleOpened(object target, IntPtr methodPtr, IntPtr shuffleThunk, IntPtr gchandle) 613private void CtorCollectibleVirtualDispatch(object target, IntPtr methodPtr, IntPtr shuffleThunk, IntPtr gchandle)
src\System\Reflection\Associates.cs (2)
58stackalloc IntPtr[genericArguments.Length] : 59new IntPtr[genericArguments.Length];
src\System\Reflection\ConstructorInvoker.CoreCLR.cs (1)
16private unsafe object? InterpretedInvoke(object? obj, IntPtr* args)
src\System\Reflection\Emit\CustomAttributeBuilder.cs (2)
250return t != typeof(IntPtr) && t != typeof(UIntPtr); 286if (passedType == typeof(IntPtr) || passedType == typeof(UIntPtr))
src\System\Reflection\Emit\DynamicILGenerator.cs (3)
780internal override void ResolveToken(int token, out IntPtr typeHandle, out IntPtr methodHandle, out IntPtr fieldHandle)
src\System\Reflection\Emit\SignatureHelper.cs (1)
547IntPtr handle = type.TypeHandle.Value;
src\System\Reflection\LoaderAllocator.cs (3)
26internal IntPtr m_nativeLoaderAllocator; 30private static partial bool Destroy(IntPtr nativeLoaderAllocator); 34if (m_nativeLoaderAllocator == IntPtr.Zero)
src\System\Reflection\MdImport.cs (27)
111internal readonly IntPtr m_constArray; 113public IntPtr Signature => m_constArray; 207private readonly IntPtr m_metadataImport2; 232IntPtr pNativeType, 305private static extern unsafe IntPtr GetMetadataImport(RuntimeModule module); 318private static unsafe partial void Enum(IntPtr scope, int type, int parent, ref int length, int* shortResult, ObjectHandleOnStack longResult); 372IntPtr scope, 395private static extern unsafe int GetUserString(IntPtr scope, int mdToken, out char* stringMetadataEncoding, out int length); 407private static extern unsafe int GetName(IntPtr scope, int mdToken, out byte* name); 416private static extern unsafe int GetNamespace(IntPtr scope, int mdToken, out byte* namesp); 425private static extern unsafe int GetEventProps(IntPtr scope, int mdToken, out void* name, out int eventAttributes); 434private static extern int GetFieldDefProps(IntPtr scope, int mdToken, out int fieldAttributes); 443private static extern unsafe int GetPropertyProps(IntPtr scope, int mdToken, out void* name, out int propertyAttributes, out ConstArray signature); 452private static extern int GetParentToken(IntPtr scope, int mdToken, out int tkParent); 461private static extern int GetParamDefProps(IntPtr scope, int parameterToken, out int sequence, out int attributes); 470private static extern int GetGenericParamProps(IntPtr scope, int genericParameter, out int flags); 481private static extern int GetScopeProps(IntPtr scope, out Guid mvid); 497private static extern int GetSigOfMethodDef(IntPtr scope, int methodToken, ref ConstArray signature); 507private static extern int GetSignatureFromToken(IntPtr scope, int methodToken, ref ConstArray signature); 517private static extern int GetMemberRefProps(IntPtr scope, int memberTokenRef, out ConstArray signature); 526private static extern int GetCustomAttributeProps(IntPtr scope, 540private static extern int GetClassLayout(IntPtr scope, int typeTokenDef, out int packSize, out int classSize); 551private static extern int GetFieldOffset(IntPtr scope, int typeTokenDef, int fieldTokenDef, out int offset, out bool found); 567private static extern int GetSigOfFieldDef(IntPtr scope, int fieldToken, ref ConstArray fieldMarshal); 577private static extern int GetFieldMarshal(IntPtr scope, int fieldToken, ref ConstArray fieldMarshal); 587private static extern unsafe int GetPInvokeMap(IntPtr scope, 607private static extern bool IsValidToken(IntPtr scope, int token);
src\System\Reflection\MethodBase.CoreCLR.cs (1)
54private IntPtr GetMethodDesc() { return MethodHandle.Value; }
src\System\Reflection\MethodBaseInvoker.CoreCLR.cs (2)
32private unsafe object? InterpretedInvoke_Constructor(object? obj, IntPtr* args) => 35private unsafe object? InterpretedInvoke_Method(object? obj, IntPtr* args) =>
src\System\Reflection\MethodInvoker.CoreCLR.cs (2)
33private unsafe object? InterpretedInvoke_Method(object? obj, IntPtr* args) => 36private unsafe object? InterpretedInvoke_Constructor(object? obj, IntPtr* args) =>
src\System\Reflection\RtFieldInfo.cs (2)
16private readonly IntPtr m_fieldHandle; 121internal IntPtr GetFieldHandle()
src\System\Reflection\RuntimeAssembly.cs (2)
32private IntPtr m_assembly; // slack for ptr datum on unmanaged side 37internal IntPtr GetUnderlyingNativeHandle() { return m_assembly; }
src\System\Reflection\RuntimeConstructorInfo.CoreCLR.cs (1)
27private readonly IntPtr m_handle;
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (1)
19private readonly IntPtr m_handle;
src\System\Reflection\RuntimeModule.cs (2)
20private readonly IntPtr m_pData; 528internal IntPtr GetUnderlyingNativeHandle()
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (21)
103private static unsafe partial void PrepareMethod(RuntimeMethodHandleInternal method, IntPtr* pInstantiation, int cInstantiation); 116ReadOnlySpan<IntPtr> instantiationHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(instantiation, stackScratch: stackalloc IntPtr[8]); 117fixed (IntPtr* pInstantiation = instantiationHandles) 270nuint rawSize = pMT->BaseSize - (nuint)(2 * sizeof(IntPtr)); 344return (MethodTable*)Unsafe.Add(ref Unsafe.As<byte, IntPtr>(ref obj.GetRawData()), -1); 359public static IntPtr AllocateTypeAssociatedMemory(Type type, int size) 370private static partial IntPtr AllocateTypeAssociatedMemory(QCallTypeHandle type, uint size); 373private static extern IntPtr AllocTailCallArgBuffer(int size, IntPtr gcDesc); 376private static extern unsafe TailCallTls* GetTailCallInfo(IntPtr retAddrSlot, IntPtr* retAddr); 380IntPtr callersRetAddrSlot, 381delegate*<IntPtr, ref byte, PortableTailCallFrame*, void> callTarget, 384IntPtr callersRetAddr; 413if (tls->ArgBuffer != IntPtr.Zero && *(int*)tls->ArgBuffer == 1 /* TAILCALLARGBUFFER_INSTARG_ONLY */) 662return BaseSize > (uint)(3 * sizeof(IntPtr)); 674return (int)((BaseSize - (uint)(3 * sizeof(IntPtr))) / (uint)(2 * sizeof(int))); 798public IntPtr TailCallAwareReturnAddress; 799public delegate*<IntPtr, ref byte, PortableTailCallFrame*, void> NextCall; 806public IntPtr ArgBuffer;
src\System\Runtime\DependentHandle.cs (19)
57private IntPtr _handle; 66IntPtr handle = InternalAlloc(target, dependent); 91IntPtr handle = _handle; 102IntPtr handle = _handle; 128IntPtr handle = _handle; 139IntPtr handle = _handle; 164IntPtr handle = _handle; 226IntPtr handle = _handle; 240private static extern IntPtr InternalAlloc(object? target, object? dependent); 243private static IntPtr InternalAllocWithGCTransition(object? target, object? dependent) 247private static partial IntPtr _InternalAllocWithGCTransition(ObjectHandleOnStack target, ObjectHandleOnStack dependent); 251private static extern object? InternalGetTarget(IntPtr dependentHandle); 262private static extern object? InternalGetDependent(IntPtr dependentHandle); 265private static extern object? InternalGetTargetAndDependent(IntPtr dependentHandle, out object? dependent); 268private static extern void InternalSetDependent(IntPtr dependentHandle, object? dependent); 271private static extern void InternalSetTargetToNull(IntPtr dependentHandle); 274private static extern bool InternalFree(IntPtr dependentHandle); 277private static void InternalFreeWithGCTransition(IntPtr dependentHandle) 281private static partial void _InternalFreeWithGCTransition(IntPtr dependentHandle);
src\System\Runtime\ExceptionServices\InternalCalls.cs (2)
28internal static unsafe partial IntPtr RhpCallCatchFunclet( 40internal static unsafe partial void RhpAppendExceptionStackFrame(ObjectHandleOnStack exceptionObj, IntPtr ip, UIntPtr sp, int flags, EH.ExInfo* exInfo);
src\System\Runtime\InteropServices\ComWrappers.cs (33)
37/// This can be done through an API like <see cref="Marshal.Release(IntPtr)"/>. 42public static unsafe bool TryGetComInstance(object obj, out IntPtr unknown) 46unknown = IntPtr.Zero; 55private static partial bool TryGetComInstanceInternal(ObjectHandleOnStack wrapperMaybe, out IntPtr externalComObject); 64public static unsafe bool TryGetObject(IntPtr unknown, [NotNullWhen(true)] out object? obj) 67if (unknown == IntPtr.Zero) 77private static partial bool TryGetObjectInternal(IntPtr wrapperMaybe, ObjectHandleOnStack instance); 85/// Given a <see cref="System.IntPtr"/> from a generated Vtable, convert to the target type. 102public IntPtr GcHandle; 130public IntPtr GetOrCreateComInterfaceForObject(object instance, CreateComInterfaceFlags flags) 132IntPtr ptr; 150private static bool TryGetOrCreateComInterfaceForObjectInternal(ComWrappers impl, object instance, CreateComInterfaceFlags flags, out IntPtr retValue) 159private static partial bool TryGetOrCreateComInterfaceForObjectInternal(ObjectHandleOnStack comWrappersImpl, long wrapperId, ObjectHandleOnStack instance, CreateComInterfaceFlags flags, out IntPtr retValue); 198public object GetOrCreateObjectForComInstance(IntPtr externalComObject, CreateObjectFlags flags) 201if (!TryGetOrCreateObjectForComInstanceInternal(this, externalComObject, IntPtr.Zero, flags, null, out obj)) 208internal static object? CallCreateObject(ComWrappersScenario scenario, ComWrappers? comWrappersImpl, IntPtr externalComObject, CreateObjectFlags flags) 240public object GetOrRegisterObjectForComInstance(IntPtr externalComObject, CreateObjectFlags flags, object wrapper) 242return GetOrRegisterObjectForComInstance(externalComObject, flags, wrapper, IntPtr.Zero); 261public object GetOrRegisterObjectForComInstance(IntPtr externalComObject, CreateObjectFlags flags, object wrapper, IntPtr inner) 287IntPtr externalComObject, 288IntPtr innerMaybe, 296if (innerMaybe != IntPtr.Zero && !flags.HasFlag(CreateObjectFlags.Aggregation)) 306private static partial bool TryGetOrCreateObjectForComInstanceInternal(ObjectHandleOnStack comWrappersImpl, long wrapperId, IntPtr externalComObject, IntPtr innerMaybe, CreateObjectFlags flags, ObjectHandleOnStack wrapper, ObjectHandleOnStack retValue); 379public static void GetIUnknownImpl(out IntPtr fpQueryInterface, out IntPtr fpAddRef, out IntPtr fpRelease) 383private static partial void GetIUnknownImplInternal(out IntPtr fpQueryInterface, out IntPtr fpAddRef, out IntPtr fpRelease); 385internal static int CallICustomQueryInterface(object customQueryInterfaceMaybe, ref Guid iid, out IntPtr ppObject) 390ppObject = IntPtr.Zero;
src\System\Runtime\InteropServices\GCHandle.CoreCLR.cs (12)
10internal static IntPtr InternalAlloc(object? value, GCHandleType type) 12IntPtr handle = _InternalAlloc(value, type); 19private static extern IntPtr _InternalAlloc(object? value, GCHandleType type); 22private static IntPtr InternalAllocWithGCTransition(object? value, GCHandleType type) 26private static partial IntPtr _InternalAllocWithGCTransition(ObjectHandleOnStack value, GCHandleType type); 28internal static void InternalFree(IntPtr handle) 35private static extern bool _InternalFree(IntPtr handle); 38private static void InternalFreeWithGCTransition(IntPtr dependentHandle) 42private static partial void _InternalFreeWithGCTransition(IntPtr dependentHandle); 47internal static extern object? InternalGet(IntPtr handle); 55internal static extern void InternalSet(IntPtr handle, object? value); 58internal static extern object? InternalCompareExchange(IntPtr handle, object? value, object? oldValue);
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (21)
36public static IntPtr OffsetOf(Type t, string fieldName) 58private static partial nint OffsetOf(IntPtr pFD); 99private static unsafe T ReadValueSlow<T>(object ptr, int ofs, Func<IntPtr, int, T> readValueHelper) 115IntPtr pNativeHome = IntPtr.Zero; 165private static unsafe void WriteValueSlow<T>(object ptr, int ofs, T val, Action<IntPtr, int, T> writeValueHelper) 182IntPtr pNativeHome = IntPtr.Zero; 229public static extern /* struct _EXCEPTION_POINTERS* */ IntPtr GetExceptionPointers(); 243public static unsafe void StructureToPtr(object structure, IntPtr ptr, bool fDeleteOld) 255if (!TryGetStructMarshalStub((IntPtr)pMT, &structMarshalStub, &size)) 276private static unsafe void PtrToStructureHelper(IntPtr ptr, object structure, bool allowValueClasses) 285if (!TryGetStructMarshalStub((IntPtr)pMT, &structMarshalStub, &size)) 304public static unsafe void DestroyStructure(IntPtr ptr, Type structuretype) 330internal static unsafe partial bool TryGetStructMarshalStub(IntPtr th, delegate*<ref byte, byte*, int, ref CleanupWorkListElement?, void>* structMarshalStub, nuint* size); 366internal static Exception GetExceptionForHRInternal(int errorCode, IntPtr errorInfo) 374private static partial void GetExceptionForHRInternal(int errorCode, IntPtr errorInfo, ObjectHandleOnStack exception); 973internal static Delegate GetDelegateForFunctionPointerInternal(IntPtr ptr, RuntimeType t) 981private static partial void GetDelegateForFunctionPointerInternal(IntPtr ptr, QCallTypeHandle t, ObjectHandleOnStack retDelegate); 983internal static IntPtr GetFunctionPointerForDelegateInternal(Delegate d) 989private static partial IntPtr GetFunctionPointerForDelegateInternal(ObjectHandleOnStack d);
src\System\Runtime\InteropServices\MemoryMarshal.CoreCLR.cs (1)
44return ref Unsafe.AddByteOffset(ref Unsafe.As<RawData>(array).Data, (nuint)RuntimeHelpers.GetMethodTable(array)->BaseSize - (nuint)(2 * sizeof(IntPtr)));
src\System\Runtime\InteropServices\NativeLibrary.CoreCLR.cs (6)
11internal static IntPtr LoadLibraryByName(string libraryName, Assembly assembly, DllImportSearchPath? searchPath, bool throwOnError) 24internal static partial IntPtr LoadFromPath(string libraryName, [MarshalAs(UnmanagedType.Bool)] bool throwOnError); 27internal static partial IntPtr LoadByName(string libraryName, QCallAssembly callingAssembly, 32internal static partial void FreeLib(IntPtr handle); 35internal static partial IntPtr GetSymbol(IntPtr handle, string symbolName, [MarshalAs(UnmanagedType.Bool)] bool throwOnError);
src\System\Runtime\Loader\AssemblyLoadContext.CoreCLR.cs (18)
15private static partial IntPtr InitializeAssemblyLoadContext(IntPtr ptrAssemblyLoadContext, [MarshalAs(UnmanagedType.Bool)] bool fRepresentsTPALoadContext, [MarshalAs(UnmanagedType.Bool)] bool isCollectible); 18private static partial void PrepareForAssemblyLoadContextRelease(IntPtr ptrNativeAssemblyBinder, IntPtr ptrAssemblyLoadContextStrong); 22private static partial void LoadFromStream(IntPtr ptrNativeAssemblyBinder, IntPtr ptrAssemblyArray, int iAssemblyArrayLen, IntPtr ptrSymbols, int iSymbolArrayLen, ObjectHandleOnStack retAssembly); 28internal static partial void InternalStartProfile(string? profile, IntPtr ptrNativeAssemblyBinder); 32private static partial void LoadFromPath(IntPtr ptrNativeAssemblyBinder, string? ilPath, string? niPath, ObjectHandleOnStack retAssembly); 113private static Assembly? ResolveSatelliteAssembly(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) 123private static IntPtr ResolveUnmanagedDll(string unmanagedDllName, IntPtr gchManagedAssemblyLoadContext) 131private static IntPtr ResolveUnmanagedDllUsingEvent(string unmanagedDllName, Assembly assembly, IntPtr gchManagedAssemblyLoadContext) 139private static Assembly? ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) 147private static partial IntPtr GetLoadContextForAssembly(QCallAssembly assembly); 161IntPtr ptrAssemblyLoadContext = GetLoadContextForAssembly(new QCallAssembly(ref runtimeAssembly)); 162if (ptrAssemblyLoadContext == IntPtr.Zero)
src\System\RuntimeArgumentHandle.cs (2)
16private IntPtr m_ptr; 18internal IntPtr Value => m_ptr;
src\System\RuntimeHandles.cs (78)
48public static RuntimeTypeHandle FromIntPtr(IntPtr value) => new RuntimeTypeHandle(Type.GetTypeFromHandleUnsafe(value)); 54/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="RuntimeTypeHandle"/> object.</returns> 56public static IntPtr ToIntPtr(RuntimeTypeHandle value) => value.Value; 78public IntPtr Value => m_type?.m_handle ?? 0; 163internal static ReadOnlySpan<IntPtr> CopyRuntimeTypeHandles(RuntimeTypeHandle[]? inHandles, Span<IntPtr> stackScratch) 170Span<IntPtr> outHandles = inHandles.Length <= stackScratch.Length ? 172new IntPtr[inHandles.Length]; 186internal static IntPtr[]? CopyRuntimeTypeHandles(Type[]? inHandles, out int length) 194IntPtr[] outHandles = new IntPtr[inHandles.Length]; 215IntPtr typeHandle = genericParameter.TypeHandle.Value; 239IntPtr* pTypeHandles = stackalloc IntPtr[] 260IntPtr* pTypeHandles, 373else if (_handle.Value != IntPtr.Zero) 377return !(_handle.Value == IntPtr.Zero); 401internal static extern bool GetFields(RuntimeType type, IntPtr* result, int* count); 420private static partial IntPtr GetGCHandle(QCallTypeHandle handle, GCHandleType type); 422internal IntPtr GetGCHandle(GCHandleType type) 429private static partial IntPtr FreeGCHandle(QCallTypeHandle typeHandle, IntPtr objHandle); 431internal IntPtr FreeGCHandle(IntPtr objHandle) 533private static partial void Instantiate(QCallTypeHandle handle, IntPtr* pInst, int numGenericArgs, ObjectHandleOnStack type); 537IntPtr ptr = inst.TypeHandle.Value; 548IntPtr[]? instHandles = CopyRuntimeTypeHandles(inst, out int instCount); 550fixed (IntPtr* pInst = instHandles) 635private static extern bool SatisfiesConstraints(RuntimeType paramType, IntPtr* pTypeContext, int typeContextLength, IntPtr* pMethodContext, int methodContextLength, RuntimeType toType); 639IntPtr[]? typeContextHandles = CopyRuntimeTypeHandles(typeContext, out int typeContextLength); 640IntPtr[]? methodContextHandles = CopyRuntimeTypeHandles(methodContext, out int methodContextLength); 642fixed (IntPtr* pTypeContextHandles = typeContextHandles, pMethodContextHandles = methodContextHandles) 689return m_handle == IntPtr.Zero; 692internal IntPtr Value => m_handle; 694internal RuntimeMethodHandleInternal(IntPtr value) 699internal IntPtr m_handle; 710public RuntimeMethodInfoStub(IntPtr methodHandleValue, object keepalive) 774public IntPtr Value => m_value != null ? m_value.Value.Value : IntPtr.Zero; 796public static RuntimeMethodHandle FromIntPtr(IntPtr value) 807/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="RuntimeMethodHandle"/> object.</returns> 808public static IntPtr ToIntPtr(RuntimeMethodHandle value) => value.Value; 825internal static partial IntPtr GetFunctionPointer(RuntimeMethodHandleInternal handle); 827public IntPtr GetFunctionPointer() 829IntPtr ptr = GetFunctionPointer(EnsureNonNullMethodInfo(m_value!).Value); 1042return m_handle == IntPtr.Zero; 1045internal IntPtr Value => m_handle; 1047internal RuntimeFieldHandleInternal(IntPtr value) 1052internal IntPtr m_handle; 1112public IntPtr Value => m_ptr != null ? m_ptr.Value.Value : IntPtr.Zero; 1144public static RuntimeFieldHandle FromIntPtr(IntPtr value) 1155/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="RuntimeFieldHandle"/> object.</returns> 1156public static IntPtr ToIntPtr(RuntimeFieldHandle value) => value.Value; 1190internal static extern IntPtr GetStaticFieldAddress(RtFieldInfo field); 1310typeInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, stackScratch: stackalloc IntPtr[8]); 1315methodInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, stackScratch: stackalloc IntPtr[8]); 1318fixed (IntPtr* typeInstArgs = typeInstantiationContextHandles, methodInstArgs = methodInstantiationContextHandles) 1341IntPtr* typeInstArgs, 1343IntPtr* methodInstArgs, 1360ReadOnlySpan<IntPtr> typeInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, stackScratch: stackalloc IntPtr[8]); 1361ReadOnlySpan<IntPtr> methodInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, stackScratch: stackalloc IntPtr[8]); 1370internal static RuntimeMethodHandleInternal ResolveMethodHandleInternal(RuntimeModule module, int methodToken, ReadOnlySpan<IntPtr> typeInstantiationContext, ReadOnlySpan<IntPtr> methodInstantiationContext) 1376fixed (IntPtr* typeInstArgs = typeInstantiationContext, methodInstArgs = methodInstantiationContext) 1393IntPtr* typeInstArgs, 1395IntPtr* methodInstArgs, 1416typeInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, stackScratch: stackalloc IntPtr[8]); 1421methodInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, stackScratch: stackalloc IntPtr[8]); 1424fixed (IntPtr* typeInstArgs = typeInstantiationContextHandles, methodInstArgs = methodInstantiationContextHandles) 1447IntPtr* typeInstArgs, 1449IntPtr* methodInstArgs, 1586internal abstract void ResolveToken(int token, out IntPtr typeHandle, out IntPtr methodHandle, out IntPtr fieldHandle);
src\System\RuntimeType.CoreCLR.cs (16)
860IntPtr* pResult = stackalloc IntPtr[64]; 865fixed (IntPtr* pBigResult = new IntPtr[count]) 878IntPtr* ppFieldHandles, int count, RuntimeType declaringType, ref ListBuilder<RuntimeFieldInfo> list) 2388private IntPtr m_cache; 2389internal IntPtr m_handle; 2410internal IntPtr GetUnderlyingNativeHandle() 2425if (m_cache != IntPtr.Zero) 2440if (m_cache != IntPtr.Zero) 2456if (m_cache == IntPtr.Zero) 2459IntPtr newgcHandle = th.GetGCHandle(GCHandleType.WeakTrackResurrection); 2460IntPtr gcHandle = Interlocked.CompareExchange(ref m_cache, newgcHandle, IntPtr.Zero); 2461if (gcHandle != IntPtr.Zero) 2481if (Volatile.Read(ref m_cache) == IntPtr.Zero)
src\System\String.CoreCLR.cs (1)
37internal static unsafe void InternalCopy(string src, IntPtr dest, int len)
src\System\StubHelpers.cs (152)
47internal static unsafe IntPtr ConvertToNative(int flags, string strManaged, IntPtr pNativeBuffer) 51return IntPtr.Zero; 82Marshal.FreeCoTaskMem((IntPtr)pbNativeBuffer); 113return (IntPtr)pbNativeBuffer; 116internal static unsafe string? ConvertToManaged(IntPtr cstr) 118if (IntPtr.Zero == cstr) 124internal static unsafe void ConvertFixedToNative(int flags, string strManaged, IntPtr pNativeBuffer, int length) 178internal static unsafe string ConvertFixedToManaged(IntPtr cstr, int length) 192internal static unsafe IntPtr ConvertToNative(StringBuilder sb, IntPtr pNativeBuffer, int flags) 196return IntPtr.Zero; 210return (IntPtr)pbNativeBuffer; 213internal static unsafe void ConvertToManaged(StringBuilder sb, IntPtr pNative) 215if (pNative == IntPtr.Zero) 226internal static unsafe IntPtr ConvertToNative(string strManaged, IntPtr pNativeBuffer) 230return IntPtr.Zero; 246if (pNativeBuffer != IntPtr.Zero) 277return (IntPtr)ptrToFirstChar; 281internal static unsafe string? ConvertToManaged(IntPtr bstr) 283if (IntPtr.Zero == bstr) 325internal static void ClearNative(IntPtr pNative) 333internal static unsafe IntPtr ConvertToNative(string strManaged, bool fBestFit, bool fThrowOnUnmappableChar, ref int cch) 337return IntPtr.Zero; 372internal static unsafe string? ConvertToManaged(IntPtr pNative, int cch) 374if (IntPtr.Zero == pNative) 382internal static void ClearNative(IntPtr pNative) 384if (IntPtr.Zero != pNative) 393internal static unsafe IntPtr ConvertToNative(int flags, string strManaged) 397return IntPtr.Zero; 409IntPtr bstr = Marshal.AllocBSTRByteLen(length); 418internal static unsafe string? ConvertToManaged(IntPtr bstr) 420if (IntPtr.Zero == bstr) 433internal static void ClearNative(IntPtr pNative) 441internal static unsafe void ConvertToNative(string? strManaged, IntPtr nativeHome, int length) 452internal static unsafe string ConvertToManaged(IntPtr nativeHome, int length) 502internal static unsafe IntPtr ConvertSafeHandleToNative(SafeHandle? handle, ref CleanupWorkListElement? cleanupWorkList) 580internal IntPtr m_pElementMT; 582internal IntPtr m_pManagedNativeArrayMarshaler; 589internal static unsafe void CreateMarshaler(IntPtr pMarshalState, IntPtr pMT, int dwFlags, bool nativeDataValid, IntPtr pManagedMarshaler) 601internal static void ConvertSpaceToNative(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 608private static partial void ConvertSpaceToNative(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome); 610internal static void ConvertContentsToNative(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 617private static partial void ConvertContentsToNative(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome); 619internal static void ConvertSpaceToManaged(IntPtr pMarshalState, ref object? pManagedHome, IntPtr pNativeHome, 628private static partial void ConvertSpaceToManaged(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome, 631internal static void ConvertContentsToManaged(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 638private static partial void ConvertContentsToManaged(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome); 640internal static unsafe void ClearNative(IntPtr pMarshalState, IntPtr pNativeHome, int cElements) 642IntPtr nativeHome = *(IntPtr*)pNativeHome; 644if (nativeHome != IntPtr.Zero) 652internal static partial void ClearNativeContents(IntPtr pMarshalState, IntPtr pNativeHome, int cElements); 661internal IntPtr m_pElementMT; 662internal IntPtr m_pManagedElementMarshaler; 663internal IntPtr m_Array; 671internal static unsafe void CreateMarshaler(IntPtr pMarshalState, IntPtr pMT, int dwFlags, int cElements, IntPtr pManagedMarshaler) 683internal static unsafe void ConvertSpaceToNative(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 696internal static void ConvertContentsToNative(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 703private static partial void ConvertContentsToNative(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome); 705internal static void ConvertSpaceToManaged(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome) 713private static partial void ConvertSpaceToManaged(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome); 715internal static void ConvertContentsToManaged(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 722private static partial void ConvertContentsToManaged(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome); 725internal static void ClearNativeContents(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 732private static partial void ClearNativeContents(IntPtr pMarshalState, IntPtr pNativeHome); 796private static partial void GetMarshaler(IntPtr pCMHelper, ObjectHandleOnStack retMarshaler); 798internal static ICustomMarshaler GetMarshaler(IntPtr pCMHelper) 805internal static unsafe void ConvertContentsToNative(ICustomMarshaler marshaler, in object pManagedHome, IntPtr* pNativeHome) 816internal static void ConvertContentsToManaged(ICustomMarshaler marshaler, ref object pManagedHome, IntPtr* pNativeHome) 819if (*pNativeHome == IntPtr.Zero) 828internal static void ClearNative(ICustomMarshaler marshaler, ref object pManagedHome, IntPtr* pNativeHome) 831if (*pNativeHome == IntPtr.Zero) 846internal static void ClearManaged(ICustomMarshaler marshaler, in object pManagedHome, IntPtr* pNativeHome) 874private readonly IntPtr pvArrayMarshaler; 901internal AsAnyMarshaler(IntPtr pvArrayMarshaler) 904Debug.Assert(pvArrayMarshaler != IntPtr.Zero, "pvArrayMarshaler must not be null"); 914private unsafe IntPtr ConvertArrayToNative(object pManagedHome, int dwFlags) 936if (elementType == typeof(IntPtr)) 938vt = (IntPtr.Size == 4 ? VarEnum.VT_I4 : VarEnum.VT_I8); 942vt = (IntPtr.Size == 4 ? VarEnum.VT_UI4 : VarEnum.VT_UI8); 959IntPtr.Zero, // not needed as we marshal primitive VTs only 962IntPtr.Zero); // not needed as we marshal primitive VTs only 964IntPtr pNativeHome; 965IntPtr pNativeHomeAddr = new IntPtr(&pNativeHome); 987private static IntPtr ConvertStringToNative(string pManagedHome, int dwFlags) 989IntPtr pNativeHome; 998IntPtr.Zero); // unmanaged buffer will be allocated 1014private unsafe IntPtr ConvertStringBuilderToNative(StringBuilder pManagedHome, int dwFlags) 1016IntPtr pNativeHome; 1096private unsafe IntPtr ConvertLayoutToNative(object pManagedHome, int dwFlags) 1103IntPtr pNativeHome = Marshal.AllocCoTaskMem(allocSize); 1121internal IntPtr ConvertToNative(object pManagedHome, int dwFlags) 1124return IntPtr.Zero; 1129IntPtr pNativeHome; 1163internal unsafe void ConvertToManaged(object pManagedHome, IntPtr pNativeHome) 1185if (pNativeHome == IntPtr.Zero) 1201if (pNativeHome == IntPtr.Zero) 1218internal void ClearNative(IntPtr pNativeHome) 1220if (pNativeHome != IntPtr.Zero) 1311public IntPtr AddRef() 1390internal static extern IntPtr GetDelegateTarget(Delegate pThis); 1401internal static IntPtr AddToCleanupList(ref CleanupWorkListElement? pCleanupWorkList, SafeHandle handle) 1467internal static partial IntPtr CreateCustomMarshalerHelper(IntPtr pMD, int paramToken, IntPtr hndManagedType); 1474internal static IntPtr SafeHandleAddRef(SafeHandle pHandle, ref bool success) 1506internal static extern IntPtr ProfilerBeginTransitionCallback(IntPtr pSecretParam, IntPtr pThread, object pThis); 1509internal static extern void ProfilerEndTransitionCallback(IntPtr pMD, IntPtr pThread); 1547bool success = Marshal.TryGetStructMarshalStub((IntPtr)pMT, &structMarshalStub, &size); 1566bool success = Marshal.TryGetStructMarshalStub((IntPtr)pMT, &structMarshalStub, &size); 1585bool success = Marshal.TryGetStructMarshalStub((IntPtr)pMT, &structMarshalStub, &size); 1595internal static extern object AllocateInternal(IntPtr typeHandle); 1598internal static extern void MarshalToUnmanagedVaListInternal(IntPtr va_list, uint vaListSize, IntPtr pArgIterator); 1601internal static extern void MarshalToManagedVaListInternal(IntPtr va_list, IntPtr pArgIterator); 1604internal static extern uint CalcVaListSize(IntPtr va_list); 1607internal static extern void ValidateObject(object obj, IntPtr pMD, object pThis); 1610internal static extern void LogPinnedArgument(IntPtr localDesc, IntPtr nativeArg); 1613internal static extern void ValidateByref(IntPtr byref, IntPtr pMD, object pThis); // the byref is pinned so we can safely "cast" it to IntPtr 1617internal static extern IntPtr GetStubContext(); 1631internal static extern IntPtr NextCallReturnAddress();
src\System\Text\StringBuilder.CoreCLR.cs (1)
106internal unsafe void InternalCopy(IntPtr dest, int charLen) =>
src\System\Threading\SynchronizationContext.CoreCLR.cs (1)
8private static int InvokeWaitMethodHelper(SynchronizationContext syncContext, IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)
src\System\Threading\Thread.CoreCLR.cs (6)
15private readonly IntPtr _ptr; 17internal ThreadHandle(IntPtr pThread) 46private IntPtr _DONT_USE_InternalThread; // Pointer 72IntPtr thread = _DONT_USE_InternalThread; 75if (thread == IntPtr.Zero) 111private static extern IntPtr InternalGetCurrentThread();
src\System\Threading\WaitHandle.CoreCLR.cs (8)
12private static extern int WaitOneCore(IntPtr waitHandle, int millisecondsTimeout, bool useTrivialWaits); 14private static unsafe int WaitMultipleIgnoringSyncContextCore(Span<IntPtr> waitHandles, bool waitAll, int millisecondsTimeout) 16fixed (IntPtr* pWaitHandles = &MemoryMarshal.GetReference(waitHandles)) 23private static extern unsafe int WaitMultipleIgnoringSyncContext(IntPtr* waitHandles, int numHandles, bool waitAll, int millisecondsTimeout); 25private static int SignalAndWaitCore(IntPtr waitHandleToSignal, IntPtr waitHandleToWaitOn, int millisecondsTimeout) 38private static extern int SignalAndWaitNative(IntPtr waitHandleToSignal, IntPtr waitHandleToWaitOn, int millisecondsTimeout);
src\System\Type.CoreCLR.cs (1)
83internal static extern RuntimeType GetTypeFromHandleUnsafe(IntPtr handle);
src\System\TypedReference.CoreCLR.cs (1)
17private readonly IntPtr _type;
src\System\ValueType.cs (1)
112hashCode.Add((IntPtr)pMT);
System.Private.DataContractSerialization (2)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
System.Private.Uri (4)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
System\UriHelper.cs (2)
16return string.Create(span.Length, (IntPtr)(&span), static (buffer, spanPtr) => 623return string.Create(tmpStrToClean.Length - charsToRemove, (IntPtr)(&tmpStrToClean), static (buffer, strToCleanPtr) =>
System.Private.Xml (2)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
System.Reflection.Metadata (17)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
System\Reflection\Internal\MemoryBlocks\NativeHeapMemoryBlock.cs (4)
20private IntPtr _pointer; 46IntPtr ptr = Interlocked.Exchange(ref _pointer, IntPtr.Zero); 47if (ptr != IntPtr.Zero)
System\Reflection\Internal\Utilities\EncodingHelper.netcoreapp.cs (1)
48Marshal.Copy((IntPtr)bytes, buffer, prefix.Length, byteCount);
System\Reflection\Internal\Utilities\ReadOnlyUnmanagedMemoryStream.cs (1)
34Marshal.Copy((IntPtr)(_data + _position), buffer, offset, bytesRead);
System\Reflection\Internal\Utilities\StreamExtensions.cs (1)
35Marshal.Copy(buffer, 0, (IntPtr)destination, bytesRead);
System\Reflection\Metadata\BlobReader.cs (1)
437Marshal.Copy((IntPtr)GetCurrentPointerAndAdvance(byteCount), buffer, bufferOffset, byteCount);
System\Reflection\Metadata\Ecma335\Encoding\BlobEncoders.cs (1)
974/// Encodes <see cref="System.IntPtr"/>.
System\Reflection\Metadata\Internal\StringHeap.cs (1)
188Marshal.Copy((IntPtr)block.Pointer, bytes, prefix.Length, block.Length);
System\Reflection\Metadata\MetadataReaderProvider.cs (2)
50/// <exception cref="ArgumentNullException"><paramref name="start"/> is <see cref="IntPtr.Zero"/>.</exception> 64/// <exception cref="ArgumentNullException"><paramref name="start"/> is <see cref="IntPtr.Zero"/>.</exception>
System\Reflection\Metadata\Signatures\SignatureTypeCode.cs (1)
125/// Represents a <see cref="System.IntPtr"/> in signatures.
System\Reflection\PortableExecutable\PEReader.cs (2)
49/// <exception cref="ArgumentNullException"><paramref name="peImage"/> is <see cref="IntPtr.Zero"/>.</exception> 67/// <exception cref="ArgumentNullException"><paramref name="peImage"/> is <see cref="IntPtr.Zero"/>.</exception>
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net9.0\System.Runtime.Forwards.cs (1)
278[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IntPtr))]
System.Runtime.Caching (1)
System\Runtime\Caching\CacheMemoryMonitor.cs (1)
92bool is64bit = (IntPtr.Size == 8);
System.Runtime.InteropServices (16)
System\Runtime\InteropServices\ComTypes\FORMATETC.cs (1)
13public IntPtr ptd;
System\Runtime\InteropServices\ComTypes\STGMEDIUM.cs (1)
12public IntPtr unionmember;
System\Runtime\InteropServices\Marshalling\ComInterfaceMarshaller.cs (1)
13/// to <see cref="ComWrappers.GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags)"/>.
System\Runtime\InteropServices\Marshalling\ComVariantMarshaller.cs (7)
182return Marshal.PtrToStringBSTR(*(IntPtr*)unmanaged.GetRawDataRef<nint>()); 239*(IntPtr*)_unmanaged.GetRawDataRef<nint>() = default; 288ref IntPtr bstrStorage = ref *(IntPtr*)_unmanaged.GetRawDataRef<nint>(); 295ref IntPtr bstrStorage = ref *(IntPtr*)_unmanaged.GetRawDataRef<nint>(); 310*(IntPtr*)_unmanaged.GetRawDataRef<nint>() = StrategyBasedComWrappers.DefaultMarshallingInstance.GetOrCreateComInterfaceForObject(unkObj, CreateComInterfaceFlags.None);
System\Runtime\InteropServices\Marshalling\UniqueComInterfaceMarshaller.cs (1)
14/// to <see cref="ComWrappers.GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags)"/>.
System\Runtime\InteropServices\RuntimeEnvironment.cs (1)
32public static IntPtr GetRuntimeInterfaceAsIntPtr(Guid clsid, Guid riid) => throw new PlatformNotSupportedException();
System\Security\SecureStringMarshal.cs (4)
10public static IntPtr SecureStringToCoTaskMemAnsi(SecureString s) => Marshal.SecureStringToCoTaskMemAnsi(s); 11public static IntPtr SecureStringToGlobalAllocAnsi(SecureString s) => Marshal.SecureStringToGlobalAllocAnsi(s); 12public static IntPtr SecureStringToCoTaskMemUnicode(SecureString s) => Marshal.SecureStringToCoTaskMemUnicode(s); 13public static IntPtr SecureStringToGlobalAllocUnicode(SecureString s) => Marshal.SecureStringToGlobalAllocUnicode(s);
System.Runtime.InteropServices.JavaScript (4)
artifacts\obj\System.Runtime.InteropServices.JavaScript\Debug\net9.0\System.Runtime.InteropServices.JavaScript.notsupported.cs (4)
252public void ToManaged(out IntPtr value) { throw new System.PlatformNotSupportedException(System.SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported); } 253public void ToJS(IntPtr value) { throw new System.PlatformNotSupportedException(System.SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported); } 254public void ToManaged(out IntPtr? value) { throw new System.PlatformNotSupportedException(System.SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported); } 255public void ToJS(IntPtr? value) { throw new System.PlatformNotSupportedException(System.SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported); }
System.Runtime.Numerics (7)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
System\Number.BigInteger.cs (1)
968strResult = string.Create(strLength, (digits, ptr: (IntPtr)ptr, base1E9Value.Length, sNegative), static (span, state) =>
System\Numerics\BigInteger.cs (3)
1967/// <summary>Explicitly converts a big integer to a <see cref="IntPtr" /> value.</summary> 1969/// <returns><paramref name="value" /> converted to <see cref="IntPtr" /> value.</returns> 2222/// <summary>Implicitly converts a <see cref="IntPtr" /> value to a big integer.</summary>
System\Numerics\Complex.cs (1)
879/// <summary>Implicitly converts a <see cref="IntPtr" /> value to a double-precision complex number.</summary>
System.Security.Cryptography (404)
Microsoft\Win32\SafeHandles\SafePasswordHandle.cs (2)
78SetHandle((IntPtr)(-1)); 111handle.handle = (IntPtr)(-1);
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
70username = Marshal.PtrToStringUTF8((IntPtr)passwd.Name);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs (12)
19private static unsafe partial int ObjObj2Txt(byte* buf, int buf_len, IntPtr a); 22private static partial IntPtr CryptoNative_GetObjectDefinitionByName(string friendlyName); 23internal static IntPtr GetObjectDefinitionByName(string friendlyName) 25IntPtr ret = CryptoNative_GetObjectDefinitionByName(friendlyName); 26if (ret == IntPtr.Zero) 36internal static partial IntPtr ObjNid2Obj(int nid); 39internal static partial void Asn1ObjectFree(IntPtr o); 45internal static partial void Asn1BitStringFree(IntPtr o); 55internal static partial void Asn1OctetStringFree(IntPtr o); 57internal static unsafe string GetOidValue(IntPtr asn1ObjectPtr) 76return Marshal.PtrToStringUTF8((IntPtr)bufStack, bytesNeeded); 102return Marshal.PtrToStringUTF8((IntPtr)buf, bytesNeeded);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Bignum.cs (2)
14internal static partial void BigNumDestroy(IntPtr a); 38internal static byte[]? ExtractBignum(IntPtr bignum, int targetSize)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.BIO.cs (1)
20internal static partial bool BioDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Crypto.cs (9)
37private static partial int GetX509NameRawBytes(IntPtr x509Name, byte[]? buf, int cBuf); 43internal static partial IntPtr GetX509CrlNextUpdate(SafeX509CrlHandle crl); 55internal static partial IntPtr GetX509EkuField(SafeEkuExtensionHandle eku, int loc); 61private static partial int GetAsn1StringBytes(IntPtr asn1, byte[]? buf, int cBuf); 74IntPtr ptr = GetX509RootStorePath_private(&usedDefault); 86private static unsafe partial IntPtr GetX509RootStorePath_private(byte* defaultPath); 89private static unsafe partial IntPtr GetX509RootStoreFile_private(byte* defaultPath); 108internal static byte[] GetAsn1StringBytes(IntPtr asn1) 118internal static X500DistinguishedName LoadX500Name(IntPtr namePtr)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Dsa.cs (8)
16internal static partial bool DsaUpRef(IntPtr dsa); 19internal static partial void DsaDestroy(IntPtr dsa); 101IntPtr p_bn, q_bn, g_bn, y_bn, x_bn; // these are not owned 151out IntPtr p, out int p_cb, 152out IntPtr q, out int q_cb, 153out IntPtr g, out int g_cb, 154out IntPtr y, out int y_cb, 155out IntPtr x, out int x_cb);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EcDsa.ImportExport.cs (4)
106out IntPtr d_bn_not_owned, out int d_cb); 113IntPtr d_bn_not_owned; 178out IntPtr d_bn_not_owned, out int d_cb, 194IntPtr d_bn_not_owned;
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EcKey.cs (4)
27internal static partial void EcKeyDestroy(IntPtr a); 35internal static partial bool EcKeyUpRef(IntPtr r); 65IntPtr objCurveName = Interop.Crypto.ObjNid2Obj(nidCurveName); 66if (objCurveName != IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (4)
27internal static partial IntPtr ErrReasonErrorString(ulong error); 40ret = Marshal.PtrToStringUTF8((IntPtr)buf)!; 100internal static void CheckValidOpenSslHandle(IntPtr handle) 102if (handle == IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.Cipher.cs (31)
15IntPtr cipher, 23IntPtr cipher); 76internal static partial void EvpCipherDestroy(IntPtr ctx); 244internal static partial IntPtr EvpAes128Ecb(); 247internal static partial IntPtr EvpAes128Cbc(); 250internal static partial IntPtr EvpAes128Gcm(); 253internal static partial IntPtr EvpAes128Cfb8(); 256internal static partial IntPtr EvpAes128Cfb128(); 259internal static partial IntPtr EvpAes128Ccm(); 262internal static partial IntPtr EvpAes192Ecb(); 265internal static partial IntPtr EvpAes192Cbc(); 268internal static partial IntPtr EvpAes192Gcm(); 271internal static partial IntPtr EvpAes192Cfb8(); 274internal static partial IntPtr EvpAes192Cfb128(); 277internal static partial IntPtr EvpAes192Ccm(); 280internal static partial IntPtr EvpAes256Ecb(); 283internal static partial IntPtr EvpAes256Cbc(); 286internal static partial IntPtr EvpAes256Gcm(); 289internal static partial IntPtr EvpAes256Cfb128(); 292internal static partial IntPtr EvpAes256Cfb8(); 295internal static partial IntPtr EvpAes256Ccm(); 298internal static partial IntPtr EvpDesCbc(); 301internal static partial IntPtr EvpDesEcb(); 304internal static partial IntPtr EvpDesCfb8(); 307internal static partial IntPtr EvpDes3Cbc(); 310internal static partial IntPtr EvpDes3Ecb(); 313internal static partial IntPtr EvpDes3Cfb8(); 316internal static partial IntPtr EvpDes3Cfb64(); 319internal static partial IntPtr EvpRC2Cbc(); 322internal static partial IntPtr EvpRC2Ecb(); 325internal static partial IntPtr EvpChaCha20Poly1305();
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.cs (9)
16internal static partial SafeEvpMdCtxHandle EvpMdCtxCreate(IntPtr type); 19internal static partial void EvpMdCtxDestroy(IntPtr ctx); 22internal static partial int EvpDigestReset(SafeEvpMdCtxHandle ctx, IntPtr type); 47internal static unsafe partial int EvpDigestOneShot(IntPtr type, byte* source, int sourceSize, byte* md, uint* mdSize); 50private static unsafe partial int EvpDigestXOFOneShot(IntPtr type, ReadOnlySpan<byte> source, int sourceSize, Span<byte> md, uint len); 53internal static partial int EvpMdSize(IntPtr md); 65IntPtr digestEvp, 73IntPtr digestEvp, 97internal static unsafe int EvpDigestXOFOneShot(IntPtr type, ReadOnlySpan<byte> source, Span<byte> destination)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.DigestAlgs.cs (41)
12private static volatile IntPtr s_evpMd5; 13private static volatile IntPtr s_evpSha1; 14private static volatile IntPtr s_evpSha256; 15private static volatile IntPtr s_evpSha384; 16private static volatile IntPtr s_evpSha512; 17private static volatile IntPtr s_evpSha3_256; 18private static volatile IntPtr s_evpSha3_384; 19private static volatile IntPtr s_evpSha3_512; 20private static volatile IntPtr s_evpSha3_Shake128; 21private static volatile IntPtr s_evpSha3_Shake256; 29private static partial IntPtr CryptoNative_EvpMd5(); 31private static IntPtr EvpMd5() => 32s_evpMd5 != IntPtr.Zero ? s_evpMd5 : (s_evpMd5 = CryptoNative_EvpMd5()); 35private static partial IntPtr CryptoNative_EvpSha1(); 37private static IntPtr EvpSha1() => 38s_evpSha1 != IntPtr.Zero ? s_evpSha1 : (s_evpSha1 = CryptoNative_EvpSha1()); 41private static partial IntPtr CryptoNative_EvpSha256(); 43private static IntPtr EvpSha256() => 44s_evpSha256 != IntPtr.Zero ? s_evpSha256 : (s_evpSha256 = CryptoNative_EvpSha256()); 47private static partial IntPtr CryptoNative_EvpSha384(); 49private static IntPtr EvpSha384() => 50s_evpSha384 != IntPtr.Zero ? s_evpSha384 : (s_evpSha384 = CryptoNative_EvpSha384()); 53private static partial IntPtr CryptoNative_EvpSha512(); 55private static IntPtr EvpSha512() => 56s_evpSha512 != IntPtr.Zero ? s_evpSha512 : (s_evpSha512 = CryptoNative_EvpSha512()); 59private static partial IntPtr CryptoNative_EvpSha3_256(); 61private static IntPtr EvpSha3_256() 73private static partial IntPtr CryptoNative_EvpSha3_384(); 75private static IntPtr EvpSha3_384() 87private static partial IntPtr CryptoNative_EvpSha3_512(); 89private static IntPtr EvpSha3_512() 101private static partial IntPtr CryptoNative_EvpShake128(); 103private static IntPtr EvpShake128() 115private static partial IntPtr CryptoNative_EvpShake256(); 117private static IntPtr EvpShake256() 128internal static IntPtr HashAlgorithmToEvp(string hashAlgorithmId) 137IntPtr sha3_256 = EvpSha3_256(); 140IntPtr sha3_384 = EvpSha3_384(); 143IntPtr sha3_512 = EvpSha3_512(); 146IntPtr shake128 = EvpShake128(); 149IntPtr shake256 = EvpShake256();
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.Mac.cs (2)
14internal static partial void EvpMacFree(IntPtr mac); 17internal static partial void EvpMacCtxFree(IntPtr ctx);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.cs (9)
39internal static partial void EvpPkeyDestroy(IntPtr pkey); 106private static partial int CryptoNative_GetPkcs8PrivateKeySize(IntPtr pkey, out int p8size); 108private static int GetPkcs8PrivateKeySize(IntPtr pkey) 131private static unsafe partial int CryptoNative_EncodePkcs8PrivateKey(IntPtr pkey, byte* buf); 140IntPtr handle = pkey.DangerousGetHandle(); 167private static partial int CryptoNative_GetSubjectPublicKeyInfoSize(IntPtr pkey); 169private static int GetSubjectPublicKeyInfoSize(IntPtr pkey) 182private static unsafe partial int CryptoNative_EncodeSubjectPublicKeyInfo(IntPtr pkey, byte* buf); 191IntPtr handle = pkey.DangerousGetHandle();
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Ecdh.cs (1)
24internal static partial void EvpPKeyCtxDestroy(IntPtr ctx);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Rsa.cs (11)
15private static partial SafeEvpPKeyHandle CryptoNative_EvpPKeyCreateRsa(IntPtr rsa); 17internal static SafeEvpPKeyHandle EvpPKeyCreateRsa(IntPtr rsa) 19Debug.Assert(rsa != IntPtr.Zero); 54IntPtr digestAlgorithm, 62IntPtr digestAlgorithm, 89IntPtr digestAlgorithm, 97IntPtr digestAlgorithm, 122IntPtr digestAlgorithm, 131IntPtr digestAlgorithm, 157IntPtr digestAlgorithm, 166IntPtr digestAlgorithm,
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Hmac.cs (4)
14internal static partial SafeHmacCtxHandle HmacCreate(ref byte key, int keyLen, IntPtr md); 17internal static partial void HmacDestroy(IntPtr ctx); 32private static unsafe partial int HmacOneShot(IntPtr type, byte* key, int keySize, byte* source, int sourceSize, byte* md, int* mdSize); 34internal static unsafe int HmacOneShot(IntPtr type, ReadOnlySpan<byte> key, ReadOnlySpan<byte> source, Span<byte> destination)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.LookupFriendlyNameByOid.cs (1)
12internal static partial int LookupFriendlyNameByOid(string oidValue, ref IntPtr friendlyNamePtr);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OCSP.cs (11)
15internal static partial void OcspRequestDestroy(IntPtr ocspReq); 24internal static partial SafeOcspRequestHandle X509BuildOcspRequest(IntPtr subject, IntPtr issuer); 31IntPtr subject, 32IntPtr* issuers, 39IntPtr x509Subject, 40ReadOnlySpan<IntPtr> x509Issuers, 47fixed (IntPtr* pIssuers = x509Issuers) 92internal static partial void OcspResponseDestroy(IntPtr ocspReq); 108handle = IntPtr.Zero; 123handle = IntPtr.Zero;
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Pkcs7.cs (1)
28internal static partial void Pkcs7Destroy(IntPtr p7);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.PooledCrypto.cs (1)
11internal static ArraySegment<byte> RentAsn1StringBytes(IntPtr asn1)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509.cs (22)
16internal static partial IntPtr GetX509NotBefore(SafeX509Handle x509); 19internal static partial IntPtr GetX509NotAfter(SafeX509Handle x509); 22internal static partial IntPtr GetX509SignatureAlgorithm(SafeX509Handle x509); 25internal static partial IntPtr GetX509PublicKeyAlgorithm(SafeX509Handle x509); 28internal static partial IntPtr GetX509PublicKeyBytes(SafeX509Handle x509); 40internal static partial SafeX509Handle DecodeX509(IntPtr buf, int len); 49internal static partial void X509Destroy(IntPtr a); 55internal static partial SafeX509Handle X509Duplicate(IntPtr handle); 68internal static partial SafeX509Handle X509UpRef(IntPtr handle); 96internal static partial IntPtr X509GetIssuerName(SafeX509Handle x); 99internal static partial IntPtr X509GetSubjectName(SafeX509Handle x); 129internal static partial IntPtr X509GetExt(SafeX509Handle x, int loc); 133internal static partial IntPtr X509ExtensionGetOid(IntPtr ex); 137internal static partial IntPtr X509ExtensionGetData(IntPtr ex); 141internal static partial bool X509ExtensionGetCritical(IntPtr ex); 161internal static partial void X509StoreDestroy(IntPtr v); 240private static unsafe partial int CryptoNative_X509StoreCtxSetVerifyCallback(SafeX509StoreCtxHandle ctx, delegate* unmanaged<int, IntPtr, int> callback, void* appData); 242internal static unsafe void X509StoreCtxSetVerifyCallback(SafeX509StoreCtxHandle ctx, delegate* unmanaged<int, IntPtr, int> callback, void* appData) 259private static partial IntPtr CryptoNative_X509VerifyCertErrorString(int n); 262internal static partial void X509CrlDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Ext.cs (2)
19internal static partial int X509ExtensionDestroy(IntPtr x); 38internal static partial void ExtendedKeyUsageDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (7)
16internal static partial void RecursiveFreeX509Stack(IntPtr stack); 29internal static partial IntPtr GetX509StackField(SafeX509StackHandle stack, int loc); 36internal static partial IntPtr GetX509StackField(SafeSharedX509StackHandle stack, int loc); 67base(IntPtr.Zero, ownsHandle: true) 74SetHandle(IntPtr.Zero); 80get { return handle == IntPtr.Zero; } 104base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (5)
16internal static partial void X509StoreCtxDestroy(IntPtr v); 75base(IntPtr.Zero, ownsHandle: true) 79internal SafeX509StoreCtxHandle(IntPtr handle, bool ownsHandle) : 87SetHandle(IntPtr.Zero); 93get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (11)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; } 32base(IntPtr.Zero, ownsHandle: true) 39SetHandle(IntPtr.Zero); 45get { return handle == IntPtr.Zero; } 52base(IntPtr.Zero, ownsHandle: true) 59SetHandle(IntPtr.Zero); 65get { return handle == IntPtr.Zero; } 72base(IntPtr.Zero, ownsHandle: true) 80base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBignumHandle.Unix.cs (4)
13base(IntPtr.Zero, ownsHandle: true) 17internal SafeBignumHandle(IntPtr handle, bool ownsHandle) 25SetHandle(IntPtr.Zero); 31get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (4)
16base(IntPtr.Zero, ownsHandle: true) 22IntPtr h = handle; 23SetHandle(IntPtr.Zero); 44return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeDsaHandle.Unix.cs (5)
14base(IntPtr.Zero, ownsHandle: true) 21SetHandle(IntPtr.Zero); 27get { return handle == IntPtr.Zero; } 30internal static SafeDsaHandle DuplicateHandle(IntPtr handle) 32Debug.Assert(handle != IntPtr.Zero);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEcKeyHandle.Unix.cs (5)
14base(IntPtr.Zero, ownsHandle: true) 21SetHandle(IntPtr.Zero); 27get { return handle == IntPtr.Zero; } 30internal static SafeEcKeyHandle DuplicateHandle(IntPtr handle) 32Debug.Assert(handle != IntPtr.Zero);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpCipherCtxHandle.Unix.cs (3)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpMdCtxHandle.Unix.cs (2)
13base(IntPtr.Zero, ownsHandle: true) 25get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpPkeyCtxHandle.Unix.cs (4)
12: base(IntPtr.Zero, ownsHandle: true) 16public SafeEvpPKeyCtxHandle(IntPtr handle, bool ownsHandle) 24SetHandle(IntPtr.Zero); 28public override bool IsInvalid => handle == IntPtr.Zero;
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeHmacCtxHandle.Unix.cs (3)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (3)
14protected SafeInteriorHandle(IntPtr invalidHandleValue, bool ownsHandle) 28SetHandle(IntPtr.Zero); 38return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafePkcs7Handle.Unix.cs (3)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (9)
31base(IntPtr.Zero, ownsHandle: true) 38SetHandle(IntPtr.Zero); 44get { return handle == IntPtr.Zero; } 51base(IntPtr.Zero, ownsHandle: true) 58SetHandle(IntPtr.Zero); 64get { return handle == IntPtr.Zero; } 71base(IntPtr.Zero, ownsHandle: true) 78SetHandle(IntPtr.Zero); 84get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (6)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; } 33base(IntPtr.Zero, ownsHandle: true) 40SetHandle(IntPtr.Zero); 46get { return handle == IntPtr.Zero; }
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (6)
190IntPtr hashAlgorithm = IntPtr.Zero; 257IntPtr hashAlgorithm = IntPtr.Zero; 789IntPtr digestAlgorithm = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithm.Name); 829IntPtr digestAlgorithm = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithm.Name);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
102path = Marshal.PtrToStringUTF8((IntPtr)passwd.HomeDirectory);
System\Security\Cryptography\AesCcm.OpenSsl.cs (2)
153private static IntPtr GetCipher(int keySizeInBits) 162return IntPtr.Zero;
System\Security\Cryptography\AesGcm.OpenSsl.cs (2)
122private static IntPtr GetCipher(int keySizeInBits) 131return IntPtr.Zero;
System\Security\Cryptography\AesImplementation.OpenSsl.cs (3)
21IntPtr algorithm = GetAlgorithm(key.Length * 8, feedback * 8, cipherMode); 36IntPtr algorithm = GetAlgorithm(key.Length * 8, feedback * 8, cipherMode); 40private static IntPtr GetAlgorithm(int keySize, int feedback, CipherMode cipherMode) =>
System\Security\Cryptography\ChaCha20Poly1305.OpenSsl.cs (3)
13Interop.Crypto.EvpChaCha20Poly1305() != IntPtr.Zero; 121private static IntPtr GetCipher(int keySizeInBits) 128return IntPtr.Zero;
System\Security\Cryptography\Cng.NotSupported.cs (3)
21protected SafeNCryptHandle(IntPtr handle, SafeHandle parentHandle) : base(default(bool)) 39public SafeNCryptKeyHandle(IntPtr handle, SafeHandle parentHandle) 113public IntPtr ParentWindowHandle { get => default; set { } }
System\Security\Cryptography\CngKeyCreationParameters.cs (1)
44public IntPtr ParentWindowHandle { get; set; }
System\Security\Cryptography\CspParameters.cs (2)
17private IntPtr _parentWindowHandle; 82public IntPtr ParentWindowHandle
System\Security\Cryptography\DesImplementation.OpenSsl.cs (3)
21IntPtr algorithm = GetAlgorithm(cipherMode, feedbackSize); 39IntPtr algorithm = GetAlgorithm(cipherMode, feedbackSize); 45private static IntPtr GetAlgorithm(CipherMode cipherMode, int feedbackSize)
System\Security\Cryptography\DSAOpenSsl.cs (3)
59/// Create an DSAOpenSsl from an existing <see cref="IntPtr"/> whose value is an 73public DSAOpenSsl(IntPtr handle) 75if (handle == IntPtr.Zero)
System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs (3)
46/// Create an ECDsaOpenSsl from an existing <see cref="IntPtr"/> whose value is an 60public ECDiffieHellmanOpenSsl(IntPtr handle) 62if (handle == IntPtr.Zero)
System\Security\Cryptography\ECDsaOpenSsl.cs (3)
46/// Create an ECDsaOpenSsl from an existing <see cref="IntPtr"/> whose value is an 60public ECDsaOpenSsl(IntPtr handle) 62if (handle == IntPtr.Zero)
System\Security\Cryptography\FixedMemoryKeyBox.cs (3)
12internal FixedMemoryKeyBox(ReadOnlySpan<byte> key) : base(IntPtr.Zero, ownsHandle: true) 16SetHandle((IntPtr)memory); 29public override bool IsInvalid => handle == IntPtr.Zero;
System\Security\Cryptography\HashProviderDispenser.OpenSsl.cs (2)
47IntPtr evpType = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmId); 48Debug.Assert(evpType != IntPtr.Zero);
System\Security\Cryptography\HashProviderDispenser.Unix.cs (4)
40IntPtr evpType = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmId); 41Debug.Assert(evpType != IntPtr.Zero); 58IntPtr evpType = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmId); 59Debug.Assert(evpType != IntPtr.Zero);
System\Security\Cryptography\LiteHash.Unix.cs (12)
14IntPtr algorithm = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmId); 20IntPtr algorithm = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmId); 26IntPtr algorithm = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmId); 34private readonly IntPtr _algorithm; 38internal LiteXof(IntPtr algorithm) 40Debug.Assert(algorithm != IntPtr.Zero); 47private LiteXof(SafeEvpMdCtxHandle ctx, IntPtr algorithm) 111private readonly IntPtr _algorithm; 116internal LiteHash(IntPtr algorithm) 118Debug.Assert(algorithm != IntPtr.Zero); 191internal LiteHmac(IntPtr algorithm, ReadOnlySpan<byte> key) 193Debug.Assert(algorithm != IntPtr.Zero);
System\Security\Cryptography\OidLookup.OpenSsl.cs (5)
20IntPtr friendlyNamePtr = IntPtr.Zero; 26Debug.Assert(friendlyNamePtr != IntPtr.Zero, "friendlyNamePtr != IntPtr.Zero"); 43IntPtr sharedObject = Interop.Crypto.GetObjectDefinitionByName(friendlyName); 45if (sharedObject == IntPtr.Zero)
System\Security\Cryptography\OpenSslCipher.cs (1)
13public OpenSslCipher(IntPtr algorithm, CipherMode cipherMode, int blockSizeInBytes, int paddingSizeInBytes, byte[] key, byte[]? iv, bool encrypting)
System\Security\Cryptography\OpenSslCipherLite.cs (2)
25IntPtr algorithm, 32Debug.Assert(algorithm != IntPtr.Zero);
System\Security\Cryptography\Pbkdf2Implementation.OpenSsl.cs (1)
19IntPtr evpHashType = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmName.Name);
System\Security\Cryptography\PemEncoding.cs (2)
531(LabelPointer: (IntPtr)(&label), DataPointer: (IntPtr)(&data)),
System\Security\Cryptography\RandomNumberGenerator.cs (1)
238(IntPtr)(&choices),
System\Security\Cryptography\RC2Implementation.OpenSsl.cs (3)
21IntPtr algorithm = GetAlgorithm(cipherMode); 38IntPtr algorithm = GetAlgorithm(cipherMode); 44private static IntPtr GetAlgorithm(CipherMode cipherMode) => cipherMode switch
System\Security\Cryptography\RSAOpenSsl.cs (3)
27/// Create an RSAOpenSsl from an existing <see cref="IntPtr"/> whose value is an 41public RSAOpenSsl(IntPtr handle) 43if (handle == IntPtr.Zero)
System\Security\Cryptography\SafeEvpPKeyHandle.OpenSsl.cs (4)
20base(IntPtr.Zero, ownsHandle: true) 29public SafeEvpPKeyHandle(IntPtr handle, bool ownsHandle) 37SetHandle(IntPtr.Zero); 43get { return handle == IntPtr.Zero; }
System\Security\Cryptography\TripleDesImplementation.OpenSsl.cs (3)
21IntPtr algorithm = GetAlgorithm(cipherMode, feedbackSize); 37IntPtr algorithm = GetAlgorithm(cipherMode, feedbackSize); 48private static IntPtr GetAlgorithm(CipherMode cipherMode, int feedbackSizeInBytes) => cipherMode switch
System\Security\Cryptography\X509Certificates\CertificatePal.cs (1)
10internal static partial ICertificatePal FromHandle(IntPtr handle);
System\Security\Cryptography\X509Certificates\CertificatePal.OpenSsl.cs (1)
13internal static partial ICertificatePal FromHandle(IntPtr handle)
System\Security\Cryptography\X509Certificates\ChainPal.cs (2)
8internal static partial IChainPal FromHandle(IntPtr chainContext); 10internal static partial bool ReleaseSafeX509ChainHandle(IntPtr handle);
System\Security\Cryptography\X509Certificates\ChainPal.OpenSsl.cs (2)
14internal static partial IChainPal FromHandle(IntPtr chainContext) 19internal static partial bool ReleaseSafeX509ChainHandle(IntPtr handle)
System\Security\Cryptography\X509Certificates\ICertificatePalCore.cs (1)
12IntPtr Handle { get; }
System\Security\Cryptography\X509Certificates\OpenSslCrlCache.cs (2)
132IntPtr nextUpdatePtr = Interop.Crypto.GetX509CrlNextUpdate(crl); 138if (nextUpdatePtr == IntPtr.Zero)
System\Security\Cryptography\X509Certificates\OpenSslExportProvider.cs (1)
62private static void PushHandle(IntPtr certPtr, SafeX509StackHandle publicCerts)
System\Security\Cryptography\X509Certificates\OpenSslPkcsFormatReader.cs (1)
230IntPtr certHandle = Interop.Crypto.GetX509StackField(certs, i);
System\Security\Cryptography\X509Certificates\OpenSslX509CertificateReader.cs (14)
26public static ICertificatePal FromHandle(IntPtr handle) 28if (handle == IntPtr.Zero) 254public IntPtr Handle 256get { return _cert == null ? IntPtr.Zero : _cert.DangerousGetHandle(); } 307IntPtr oidPtr = Interop.Crypto.GetX509PublicKeyAlgorithm(cert); 326IntPtr keyBytesPtr = Interop.Crypto.GetX509PublicKeyBytes(cert); 348IntPtr oidPtr = Interop.Crypto.GetX509SignatureAlgorithm(cert); 452IntPtr ext = Interop.Crypto.X509GetExt(cert, i); 455IntPtr oidPtr = Interop.Crypto.X509ExtensionGetOid(ext); 459IntPtr dataPtr = Interop.Crypto.X509ExtensionGetData(ext); 499IntPtr ext = Interop.Crypto.X509GetExt(cert, i); 503IntPtr oidPtr = Interop.Crypto.X509ExtensionGetOid(ext); 510IntPtr dataPtr = Interop.Crypto.X509ExtensionGetData(ext); 778internal static DateTime ExtractValidityDateTime(IntPtr validityDatePtr)
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (13)
220IntPtr lastCert = IntPtr.Zero; 230IntPtr currentHandle = currentCert.DangerousGetHandle(); 282Span<IntPtr> tempChain = stackalloc IntPtr[DefaultChainCapacity]; 291int targetSize = checked(chainSize * IntPtr.Size); 293tempChain = MemoryMarshal.Cast<byte, IntPtr>(tempChainRent.AsSpan(0, targetSize)); 547IntPtr rootPtr = Interop.Crypto.GetX509StackField(chainStack, start); 610IntPtr certPtr = Interop.Crypto.GetX509StackField(chainStack, i); 640private static unsafe int VerifyCallback(int ok, IntPtr ctx) 886IntPtr elementCertPtr = Interop.Crypto.GetX509StackField(chainStack, i); 888if (elementCertPtr == IntPtr.Zero) 1302private static void AddToStackAndUpRef(IntPtr cert, SafeX509StackHandle stack)
System\Security\Cryptography\X509Certificates\OpenSslX509Encoder.cs (2)
249IntPtr oidPtr = Interop.Crypto.GetX509EkuField(eku, i); 251if (oidPtr == IntPtr.Zero)
System\Security\Cryptography\X509Certificates\StorePal.cs (1)
10internal static partial IStorePal FromHandle(IntPtr storeHandle);
System\Security\Cryptography\X509Certificates\StorePal.OpenSsl.cs (1)
14internal static partial IStorePal FromHandle(IntPtr storeHandle)
System\Security\Cryptography\X509Certificates\X509Certificate.cs (3)
132public X509Certificate(IntPtr handle) 245public IntPtr Handle => Pal is null ? IntPtr.Zero : Pal.Handle;
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
118public X509Certificate2(IntPtr handle)
System\Security\Cryptography\X509Certificates\X509Chain.cs (4)
28public X509Chain(IntPtr chainContext) 61public IntPtr ChainContext 69return IntPtr.Zero; 110if (customCertificate == null || customCertificate.Handle == IntPtr.Zero)
System\Security\Cryptography\X509Certificates\X509Store.cs (3)
79public X509Store(IntPtr storeHandle) 85public IntPtr StoreHandle 94return IntPtr.Zero;
System.Security.Principal.Windows (9)
artifacts\obj\System.Security.Principal.Windows\Debug\net9.0\System.Security.Principal.Windows.notsupported.cs (9)
11public SafeAccessTokenHandle() : base (default(System.IntPtr), default(bool)) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 12public SafeAccessTokenHandle(System.IntPtr handle) : base (default(System.IntPtr), default(bool)) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 77public SecurityIdentifier(System.IntPtr binaryForm) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 237public WindowsIdentity(System.IntPtr userToken) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 238public WindowsIdentity(System.IntPtr userToken, string type) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 239public WindowsIdentity(System.IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 240public WindowsIdentity(System.IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType, bool isAuthenticated) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 258public virtual System.IntPtr Token { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } }
System.Speech (6)
artifacts\obj\System.Speech\Debug\net9.0\System.Speech.notsupported.cs (6)
1005int Write(System.IntPtr data, int count); 1106public SpeechEventInfo(short eventId, short parameterType, int param1, System.IntPtr param2) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } 1109public System.IntPtr Param2 { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } } 1141public abstract System.IntPtr GetOutputFormat(System.Speech.Synthesis.TtsEngine.SpeakOutputFormat speakOutputFormat, System.IntPtr targetWaveFormat); 1143public abstract void Speak(System.Speech.Synthesis.TtsEngine.TextFragment[] fragment, System.IntPtr waveHeader, System.Speech.Synthesis.TtsEngine.ITtsEngineSite site);
System.Text.Encoding.CodePages (5)
Microsoft\Win32\SafeHandles\SafeAllocHHandle.cs (3)
14internal SafeAllocHHandle(IntPtr handle) : base(true) 21get { return new SafeAllocHHandle(IntPtr.Zero); } 26if (handle != IntPtr.Zero)
System\Text\BaseCodePageEncoding.cs (2)
372safeNativeMemoryHandle = new SafeAllocHHandle((IntPtr)pNativeMemory); 408if (safeNativeMemoryHandle != null && safeNativeMemoryHandle.DangerousGetHandle() == IntPtr.Zero)
System.Text.Encodings.Web (3)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
System\Text\Encodings\Web\SpanUtility.cs (1)
247if (IntPtr.Size == 4)
System.Text.Json (3)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
System\Text\Json\Serialization\Converters\Value\UnsupportedTypeConverterFactory.cs (1)
27type == typeof(IntPtr) ||
System.Text.Json.SourceGeneration (1)
Helpers\KnownTypeSymbols.cs (1)
253public INamedTypeSymbol? IntPtrType => GetOrResolveType(typeof(IntPtr), ref _IntPtrType);
System.Text.RegularExpressions (5)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
System\Text\RegularExpressions\Regex.Replace.cs (1)
232string result = string.Create(length, (IntPtr)(&tmpSpan), static (dest, spanPtr) =>
System\Text\RegularExpressions\RegexCharClass.cs (1)
1602.Create(SetStartIndex + count, (IntPtr)(&tmpChars), static (span, charsPtr) =>
System\Text\RegularExpressions\RegexReplacement.cs (1)
275result = string.Create(length, ((IntPtr)(&tmpSpan), input, replacement), static (dest, state) =>
System.Text.RegularExpressions.Generator (2)
src\libraries\Common\src\System\HexConverter.cs (1)
387if (IntPtr.Size == 8)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (1)
1602.Create(SetStartIndex + count, (IntPtr)(&tmpChars), static (span, charsPtr) =>
System.Threading (2)
System\Threading\CDSsyncETWBCLProvider.cs (2)
80DataPointer = ((IntPtr)(&senseAsInt32)) 85DataPointer = ((IntPtr)(&phaseNum))
System.Threading.Tasks.Parallel (17)
System\Threading\Tasks\ParallelETWProvider.cs (15)
122DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)) 127DataPointer = ((IntPtr)(&OriginatingTaskID)) 132DataPointer = ((IntPtr)(&ForkJoinContextID)) 137DataPointer = ((IntPtr)(&OperationType)) 142DataPointer = ((IntPtr)(&InclusiveFrom)) 147DataPointer = ((IntPtr)(&ExclusiveTo)) 182DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)) 187DataPointer = ((IntPtr)(&OriginatingTaskID)) 192DataPointer = ((IntPtr)(&ForkJoinContextID)) 197DataPointer = ((IntPtr)(&TotalIterations)) 232DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)) 237DataPointer = ((IntPtr)(&OriginatingTaskID)) 242DataPointer = ((IntPtr)(&ForkJoinContextID)) 247DataPointer = ((IntPtr)(&OperationType)) 252DataPointer = ((IntPtr)(&ActionCount))
System\Threading\Tasks\ParallelRangeManager.cs (2)
114if (IntPtr.Size == 4 && _use32BitCurrentIndex) 254_use32BitCurrentIndex = IntPtr.Size == 4 && nRangeSize <= int.MaxValue;
System.Transactions.Local (2)
System\Transactions\IDtcTransaction.cs (2)
15void Abort(IntPtr reason, int retaining, int async); 17void GetTransactionInfo(IntPtr transactionInformation);
System.Web.HttpUtility (2)
src\libraries\Common\src\System\HexConverter.cs (2)
196return string.Create(bytes.Length * 2, (RosPtr: (IntPtr)(&bytes), casing), static (chars, args) => 387if (IntPtr.Size == 8)
System.Windows.Controls.Ribbon (26)
Microsoft\Windows\Controls\Ribbon\NativeMethods.cs (16)
211public IntPtr handle; 213public IntPtr wParam; 214public IntPtr lParam; 301public IntPtr hwnd; 302public IntPtr hwndInsertAfter; 323public static extern IntPtr MonitorFromRect(ref RECT rect, int flags); 336public static extern IntPtr GetCapture(); 356private static extern IntPtr IntGetDC(HandleRef hWnd); 357public static IntPtr GetDC(HandleRef hWnd) 359IntPtr hDc = IntGetDC(hWnd); 360if (hDc == IntPtr.Zero) 372HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 451internal static IntPtr Add(IntPtr handle, int type) 484internal static IntPtr Remove(IntPtr handle, int type)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (2)
1610IntPtr monitorPtr = NativeMethods.MonitorFromRect(ref popupPlacementTargetRect, NativeMethods.MONITOR_DEFAULTTONEAREST); 1611if (monitorPtr != IntPtr.Zero)
Microsoft\Windows\Controls\Ribbon\RibbonDropDownHelper.cs (2)
174IntPtr monitor = NativeMethods.MonitorFromRect(ref nativeBounds, NativeMethods.MONITOR_DEFAULTTONEAREST); 175if (monitor != IntPtr.Zero)
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (6)
1002public static bool IsOurWindow(IntPtr hwnd, DependencyObject element) 1005if (hwnd != IntPtr.Zero) 1028IntPtr capturedHwnd = IntPtr.Zero; 1035if (capturedHwnd != IntPtr.Zero && 1050(capturedHwnd == IntPtr.Zero ||
System.Xaml (2)
System\Xaml\Schema\XamlTypeInvoker.cs (2)
276typeof(Action<object>).GetConstructor(new Type[] { typeof(Object), typeof(IntPtr) }); 339IntPtr constPtr = tConstInfo.MethodHandle.GetFunctionPointer();
UIAutomationClient (259)
MS\Internal\Automation\Accessible.cs (9)
29internal static Accessible Create( IntPtr hwnd, int idObject, int idChild ) 62internal IntPtr Window 66if (_hwnd == IntPtr.Zero) 72_hwnd = IntPtr.Zero; 83_hwnd = IntPtr.Zero; 92internal static bool CompareClass(IntPtr hwnd, string szClass) 97internal static bool IsComboDropdown(IntPtr hwnd) 102internal static bool IsStatic(IntPtr hwnd) 120private IntPtr _hwnd;
MS\Internal\Automation\BoundingRectTracker.cs (6)
45internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 48if ( hwnd == IntPtr.Zero || idObject != UnsafeNativeMethods.OBJID_WINDOW ) 69private void OnHide(IntPtr hwnd, int idObject, int idChild) 76private void OnLocationChange(IntPtr hwnd, int idObject, int idChild) 85private void HandleBoundingRectChange(IntPtr hwnd) 152private IntPtr _lastHwnd; // and hwnd for dup checking
MS\Internal\Automation\ClickablePoint.cs (1)
37if (SafeNativeMethods.MonitorFromRect( ref winRect, SafeNativeMethods.MONITOR_DEFAULTTONULL ) == IntPtr.Zero)
MS\Internal\Automation\ClientEventManager.cs (2)
555private static void OnWindowHideOrClose( IntPtr hwnd, AutomationElement rawEl, int [] runtimeId ) 618private static void OnWindowShowOrOpen( IntPtr hwnd, AutomationElement rawEl )
MS\Internal\Automation\EventListenerClientSide.cs (1)
62internal void OnEvent(IntPtr argsAddr, object[,] requestedData, string treeStructure)
MS\Internal\Automation\FocusTracker.cs (19)
46internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 48if (hwnd != IntPtr.Zero) 78private void HandleFocusChange(IntPtr hwnd, Accessible acc, int idObject, int idChild, uint eventTime) 81if (hwnd != IntPtr.Zero) 120private AutomationElement GetFocusedElementFromWinEvent(IntPtr hwnd, int idObject, int idChild) 200private void OnEventObjectFocus(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 221private void OnEventSystemMenuStart(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 228private void OnEventSystemMenuEnd(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 243private void OnEventObjectDestroy(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 253IntPtr hwndCur = _accCurrent.Window; 254if (hwndCur == IntPtr.Zero || !SafeNativeMethods.IsWindow(NativeMethods.HWND.Cast(hwndCur))) 270HandleFocusChange(IntPtr.Zero, null, 0, 0, eventTime); 276private void OnEventSystemMenuPopupStart(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 286private void OnEventSystemCaptureStart(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 294IntPtr i = Misc.SendMessageTimeout(NativeMethods.HWND.Cast(hwnd), UnsafeNativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 309private void OnEventSystemCaptureEnd(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 354private IntPtr _hwndLastBeforeMenu; // the last hwnd before a menu got focus
MS\Internal\Automation\HwndProxyElementProvider.cs (40)
125IntPtr len = Misc.SendMessageTimeout( _hwnd, UnsafeNativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero ); 135if (Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETTEXT, new IntPtr(ilen + 1), str) == IntPtr.Zero) 165return ((IntPtr) _hwnd).ToInt32(); 354if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_MINIMIZE, IntPtr.Zero)) 375if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_MAXIMIZE, IntPtr.Zero)) 397if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_CLOSE, IntPtr.Zero)) 585IntPtr dwResult; 589IntPtr ret = UnsafeNativeMethods.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero, UnsafeNativeMethods.SMTO_ABORTIFHUNG, 0, out dwResult); 590if ( ret == IntPtr.Zero ) 809Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETMINMAXINFO, IntPtr.Zero, ref minMaxInfo); 873IntPtr hmenu = GetSystemMenuHandle(); 874if (hmenu != IntPtr.Zero) 918IntPtr hmenu = GetSystemMenuHandle(); 919if (hmenu != IntPtr.Zero) 1003private IntPtr GetSystemMenuHandle() 1007if (GetMenuBarInfo(_hwnd, UnsafeNativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero) 1012return IntPtr.Zero; 1464IntPtr visibilityOverride = UnsafeNativeMethods.GetProp(hwnd, "UIA_WindowVisibilityOverridden"); 1656private bool IsMenuItemSelectable(IntPtr hmenu, int item) 1721private static IntPtr MAKELPARAM( int low, int high ) 1723return (IntPtr)((high << 16) | (low & 0xffff)); 1737IntPtr hrgn = Misc.CreateRectRgn(0, 0, 0, 0); // NOTE: Must be deleted before returning 1738if (hrgn == IntPtr.Zero) 1796IntPtr hwndCompare = UnsafeNativeMethods.WindowFromPhysicalPoint(x1, y1); 1803if (hwndCompare != (IntPtr)hwnd) 1834IntPtr lr = Misc.SendMessageTimeout( hChild, UnsafeNativeMethods.WM_NCHITTEST, IntPtr.Zero, MAKELPARAM( (int)x, (int)y ) ); 2011if (parent == IntPtr.Zero) 2015IntPtr lresult = Misc.SendMessageTimeout(parent, UnsafeNativeMethods.WM_MDIACTIVATE, (IntPtr)hwnd, IntPtr.Zero); 2016return lresult == IntPtr.Zero; 2091&& msg.wParam == (IntPtr) atom)
MS\Internal\Automation\MenuTracker.cs (2)
45internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 58if( hwnd == IntPtr.Zero )
MS\Internal\Automation\Misc.cs (34)
270private static int IntPtrToInt32(IntPtr intPtr) 279internal static IntPtr CreateRectRgn(int left, int top, int right, int bottom) 281IntPtr result = SafeNativeMethods.CreateRectRgn(left, top, right, bottom); 284if (result == IntPtr.Zero) 292internal static bool CloseHandle(IntPtr handle) 305internal static bool DeleteObject(IntPtr hrgn) 366internal static int GetModuleFileNameEx(MS.Internal.Automation.SafeProcessHandle hProcess, IntPtr hModule, StringBuilder buffer, int length) 408IntPtr result = IntPtr.Zero; 411if (IntPtr.Size == 4) 426if ((result == IntPtr.Zero) && (error != 0)) 494IntPtr[] handles = { handle.DangerousGetHandle() }; 520internal static IntPtr OpenProcess(int dwDesiredAccess, bool fInherit, int dwProcessId, NativeMethods.HWND hwnd) 522IntPtr processHandle = UnsafeNativeMethods.OpenProcess(dwDesiredAccess, fInherit, dwProcessId); 527if (processHandle == IntPtr.Zero 542if (processHandle == IntPtr.Zero) 550internal static bool PostMessage(NativeMethods.HWND hWnd, int nMsg, IntPtr wParam, IntPtr lParam) 589internal static IntPtr SendMessageTimeout(NativeMethods.HWND hwnd, int Msg, IntPtr wParam, IntPtr lParam) 594IntPtr lresult; 595IntPtr smtoRetVal = UnsafeNativeMethods.SendMessageTimeout(hwnd, Msg, wParam, lParam, 0, 10000, out lresult); 598if (smtoRetVal == IntPtr.Zero) 606internal static IntPtr SendMessageTimeout(NativeMethods.HWND hwnd, int Msg, IntPtr wParam, ref UnsafeNativeMethods.MINMAXINFO lParam) 611IntPtr lresult; 612IntPtr smtoRetVal = UnsafeNativeMethods.SendMessageTimeout(hwnd, Msg, wParam, ref lParam, 0, 10000, out lresult); 615if (smtoRetVal == IntPtr.Zero) 623internal static IntPtr SendMessageTimeout(NativeMethods.HWND hwnd, int Msg, IntPtr wParam, StringBuilder lParam) 628IntPtr lresult; 629IntPtr smtoRetVal = UnsafeNativeMethods.SendMessageTimeout(hwnd, Msg, wParam, lParam, 0, 10000, out lresult); 632if (smtoRetVal == IntPtr.Zero)
MS\Internal\Automation\ProxyManager.cs (6)
205internal static IRawElementProviderSimple GetNonClientProvider( IntPtr hwnd ) 215internal static IRawElementProviderSimple GetUser32FocusedMenuProvider( IntPtr hwnd ) 319if (Misc.GetModuleFileNameEx(processHandle, (IntPtr)instance, sb, NativeMethods.MAX_PATH) == 0) 799IntPtr result = Misc.SendMessageTimeout(hwnd, UnsafeNativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX);
MS\Internal\Automation\SafeHandles.cs (6)
26: base(IntPtr.Zero, true) 34get { return handle == IntPtr.Zero; } 50: base(IntPtr.Zero, true) 57get { return handle == IntPtr.Zero; } 71: base(IntPtr.Zero, true) 77get { return handle == IntPtr.Zero; }
MS\Internal\Automation\UiaCoreApi.cs (42)
78public IntPtr _conditions; // ptr to array-of-ptrs to conditions 81internal UiaAndOrCondition(ConditionType conditionType, IntPtr conditions, int conditionCount) 93public IntPtr _condition; 95internal UiaNotCondition(IntPtr condition) 116internal IntPtr _pProperties; 118internal IntPtr _pPatterns; 144IntPtr dataStart = Marshal.AllocCoTaskMem((properties.Length + patterns.Length) * sizeof(int)); 148_pProperties = (IntPtr)pdata; 155_pPatterns = (IntPtr)pdata; 166if (_pProperties != IntPtr.Zero) 270private IntPtr _pCondition; 272private IntPtr _pProperties; 274private IntPtr _pPatterns; 279internal UiaMiniCacheRequest(UiaCacheRequest cr, IntPtr conditionPtr) 307internal IntPtr pFindCondition; 331internal delegate void UiaEventCallback(IntPtr args, 483internal static SafeNodeHandle UiaNodeFromHandle(IntPtr hwnd) 562internal static extern bool UiaHasServerSideProvider(IntPtr hwnd); 564internal static bool UiaNodeRelease(IntPtr hnode) 569internal static bool UiaPatternRelease(IntPtr hobj) 574internal static bool UiaTextRangeRelease(IntPtr hobj) 597internal static void UiaRemoveEvent(IntPtr hevent) 602internal static void UiaEventAddWindow(SafeEventHandle hevent, IntPtr hwnd) 607internal static void UiaEventRemoveWindow(SafeEventHandle hevent, IntPtr hwnd) 622private static int[] ArrayFromIntPtr(IntPtr pInts, int cInts) 624if (pInts == IntPtr.Zero) 641internal static AutomationEventArgs GetUiaEventArgs(IntPtr argsAddr) 1144IntPtr errorInfoAsIntPtr = Marshal.GetIUnknownForObject(errorInfo); 1168private static extern int SetErrorInfo(int dwReserved, IntPtr errorInfo); 1239private static extern int RawUiaNodeFromHandle(IntPtr hwnd, out SafeNodeHandle hnode); 1266private static extern bool RawUiaNodeRelease(IntPtr hnode); 1269private static extern bool RawUiaPatternRelease(IntPtr hobj); 1272private static extern bool RawUiaTextRangeRelease(IntPtr hobj); 1279private static extern int RawUiaRemoveEvent(IntPtr hevent); 1282private static extern int RawUiaEventAddWindow(SafeEventHandle hevent, IntPtr hwnd); 1285private static extern int RawUiaEventRemoveWindow(SafeEventHandle hevent, IntPtr hwnd); 1496internal IntPtr _pRuntimeId; 1514internal IntPtr _pRuntimeId; 1525internal IntPtr _displayString; 1526internal IntPtr _activityId; 1555private delegate IRawElementProviderSimple[] UiaProviderCallback(IntPtr hwnd, ProviderType providerType); 1570IRawElementProviderSimple [] OnGetProvider(IntPtr hwnd, ProviderType providerType)
MS\Internal\Automation\WindowHideOrCloseTracker.cs (3)
18internal delegate void WindowHideOrCloseHandler( IntPtr hwnd, AutomationElement rawEl, int[] runtimeId ); 50internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 57if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WindowInteractionStateTracker.cs (4)
47internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 56if (hwnd == IntPtr.Zero) 75private void OnStateChange(IntPtr hwnd, int idObject, int idChild) 137private IntPtr _lastHwnd; // and hwnd for dup checking
MS\Internal\Automation\WindowShowOrOpenTracker.cs (3)
19internal delegate void WindowShowOrOpenHandler( IntPtr hwnd, AutomationElement rawEl ); 51internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 58if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WindowVisualStateTracker.cs (4)
44internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 53if (hwnd == IntPtr.Zero) 72private void OnStateChange(IntPtr hwnd, int idObject, int idChild) 129private IntPtr _lastHwnd; // and hwnd for dup checking
MS\Internal\Automation\WinEventWrap.cs (11)
39_hHooks = new IntPtr[_eventIds.Length]; 59internal virtual void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 116_hHooks[i] = UnsafeNativeMethods.SetWinEventHook(eventId, eventId, IntPtr.Zero, _winEventProc, 0, 0, _fFlags); 117if (_hHooks[i] == IntPtr.Zero) 136if (_hHooks[i] != IntPtr.Zero) 143_hHooks[i] = IntPtr.Zero; 186private void WinEventReentrancyFilter(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime) 226private void PreWinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 272internal WinEvent(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 281public IntPtr _hwnd; 289private IntPtr [] _hHooks; // the returned handles(s) from SetWinEventHook
MS\Win32\NativeMethods.cs (5)
34public IntPtr h; 36public static HWND Cast(IntPtr h) 43public static implicit operator IntPtr(HWND h) 53hTemp.h = IntPtr.Zero; 150public delegate void WinEventProcDef(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime);
MS\Win32\SafeNativeMethods.cs (7)
130public static extern bool EnumThreadWindows(int dwThreadId, EnumThreadWndProc enumThreadWndProc, IntPtr lParam); 181internal static extern IntPtr CreateRectRgn(int left, int top, int right, int bottom); 184internal static extern int GetWindowRgn(IntPtr hwnd, IntPtr hrgn); 187internal static extern bool PtInRegion(IntPtr hrgn, int x, int y); 203public static extern int GetModuleFileNameEx(MS.Internal.Automation.SafeProcessHandle hProcess, IntPtr hModule, StringBuilder buffer, int length); 211public static extern IntPtr MonitorFromRect( ref NativeMethods.RECT rect, int dwFlags );
MS\Win32\UnsafeNativeMethods.cs (38)
22public static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); 30public static extern bool CloseHandle(IntPtr handle); 42public static extern IntPtr OpenProcess( int dwDesiredAccess, bool fInherit, int dwProcessId ); 81public IntPtr dwExtraInfo; 91public IntPtr dwExtraInfo; 141IntPtr hwnd, 148public static extern int WindowFromAccessibleObject ( IAccessible acc, ref IntPtr hwnd ); 151internal static extern IntPtr GetProcessHandleFromHwnd(IntPtr hwnd); 154internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags); 157internal static extern bool UnhookWinEvent(IntPtr winEventHook); 172private static extern IntPtr IntWindowFromPoint(POINT pt); 175private static extern IntPtr IntWindowFromPhysicalPoint(POINT pt); 177public static IntPtr WindowFromPhysicalPoint(int x, int y) 193public static extern IntPtr SendMessageTimeout( 194NativeMethods.HWND hwnd, int Msg, IntPtr wParam, IntPtr lParam, int flags, int uTimeout, out IntPtr pResult ); 197public static extern IntPtr SendMessageTimeout( 198NativeMethods.HWND hwnd, int Msg, IntPtr wParam, ref MINMAXINFO lParam, int flags, int uTimeout, out IntPtr pResult ); 203public static extern IntPtr SendMessageTimeout( 204NativeMethods.HWND hwnd, int Msg, IntPtr wParam, StringBuilder lParam, int flags, int uTimeout, out IntPtr pResult); 214public IntPtr wParam; 215public IntPtr lParam; 235public static extern IntPtr DispatchMessage( 240NativeMethods.HWND hWnd, int nMsg, IntPtr wParam, IntPtr lParam); 267public static readonly IntPtr HTTRANSPARENT = new IntPtr(-1); 268public static readonly IntPtr HTCLIENT = new IntPtr(1); 306public static extern int MsgWaitForMultipleObjects(int nCount, IntPtr[] handles, bool fWaitAll, int dwMilliseconds, int dwWakeMask); 344internal static extern int GetMenuState(IntPtr hMenu, int uId, int uFlags); 357internal IntPtr hMenu; 366internal static extern bool DeleteObject(IntPtr hrgn); 373internal static extern IntPtr GetProp(IntPtr hwnd, string name);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (4)
46public static extern Int32 GetWindowLong(IntPtr hWnd, int nIndex ); 49public static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex ); 57public static extern bool GetMenuBarInfo (IntPtr hwnd, int idObject, uint idItem, ref UnsafeNativeMethods.MENUBARINFO mbi);
System\Windows\Automation\AutomationElement.cs (2)
432public static AutomationElement FromHandle(IntPtr hwnd) 434Misc.ValidateArgument(hwnd != IntPtr.Zero, nameof(SR.HwndMustBeNonNULL));
System\Windows\Automation\ClientSideProviderDescription.cs (1)
51public delegate IRawElementProviderSimple ClientSideProviderFactoryCallback(IntPtr hwnd, int idChild, int idObject);
System\Windows\Automation\Condition.cs (7)
23: base(IntPtr.Zero, true) 31get { return handle == IntPtr.Zero; } 51IntPtr mem = Marshal.AllocCoTaskMem(size); 65int intPtrSize = Marshal.SizeOf(typeof(IntPtr)); 70IntPtr mem = Marshal.AllocCoTaskMem(conditions.Length * intPtrSize); 78IntPtr* pdata = (IntPtr*)sh.handle;
System\Windows\Automation\Text\TextRange.cs (2)
29: base(IntPtr.Zero, true) 36get { return handle == IntPtr.Zero; }
UIAutomationClientSideProviders (1830)
MS\Internal\AutomationProxies\Accessible.cs (13)
161internal static Accessible CreateNativeFromEvent(IntPtr hwnd, int idObject, int idChild) 165IntPtr wParam = IntPtr.Zero; 170IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject)); 171if (lResult == IntPtr.Zero) 449internal bool InSameHwnd(IntPtr hwnd) 451bool inSameHwnd = Window != IntPtr.Zero && Window == hwnd; 858internal IntPtr Window 862if (_hwnd == IntPtr.Zero) 869_hwnd = IntPtr.Zero; 884_hwnd = IntPtr.Zero; 894internal static int AccessibleObjectFromWindow(IntPtr hwnd, int idObject, ref Accessible acc) 1512private IntPtr _hwnd;
MS\Internal\AutomationProxies\ClickablePoint.cs (14)
27_hwndProgman = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null); 28if (_hwndProgman == IntPtr.Zero) 60static internal bool GetPoint(IntPtr hwnd, ArrayList alIn, ArrayList alOut, ref NativeMethods.Win32Point pt) 62IntPtr hwndStart = hwnd; 63IntPtr hwndCurrent = hwnd; 67for (hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT)) 82if (hwnd == IntPtr.Zero) 101if (hwnd == IntPtr.Zero) 111IntPtr hwndClip = hwnd == _hwndDesktop ? _hwndProgman : hwnd; 238private static bool ClickableInRect(IntPtr hwnd, ref NativeMethods.Win32Point pt, bool fRiAsInsideRect, ArrayList alIn, ArrayList alOut) 266int lr = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 474private static IntPtr _hwndDesktop = UnsafeNativeMethods.GetDesktopWindow(); 479private static IntPtr _hwndProgman;
MS\Internal\AutomationProxies\CommonGetThemePartSize.cs (10)
24internal ThemePart (IntPtr hwnd, string sClass) 32_hTheme = new SafeThemeHandle(IntPtr.Zero, false); 62fSuccess = GetThemePartSize(_hTheme, IntPtr.Zero, iPartId, iStateId, IntPtr.Zero, (int)THEMESIZE.TS_TRUE, &size) == IntPtr.Zero; 205private static unsafe extern IntPtr GetThemePartSize(SafeThemeHandle hTheme, IntPtr hdc, int iPartId, int iStateId, IntPtr prc, int eSize, NativeMethods.SIZE* psz); 208private static extern IntPtr OpenThemeData(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)]string s);
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (14)
48SetHandle(Misc.VirtualAllocEx(_processHandle, IntPtr.Zero, new UIntPtr((uint)cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE)); 73internal IntPtr Address 81internal void WriteTo(IntPtr sourceAddress, IntPtr cbSize) 83IntPtr count; 87internal void ReadFrom(IntPtr remoteAddress, IntPtr destAddress, IntPtr cbSize) 89IntPtr count; 93internal void ReadFrom(SafeCoTaskMem destAddress, IntPtr cbSize) 95IntPtr count; 98internal void ReadFrom(IntPtr destAddress, IntPtr cbSize) 100IntPtr count;
MS\Internal\AutomationProxies\CommonXSendMessage.cs (132)
41internal static string GetTextWithinStructure(IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr lParam, int cbSize, IntPtr pszText, int maxLength) 47internal static unsafe string GetTextWithinStructure(IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr lParam, int cbSize, IntPtr pszText, int maxLength, bool ignoreSendResult) 68IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr lParam, int cbSize, 69IntPtr pszText, int maxLength, ProcessorTypes remoteBitness, bool ignoreSendResult) 90IntPtr remoteTextArea = new IntPtr((byte*)rmem.Address.ToPointer() + cbSize); 101*(IntPtr*)((byte*)pszText.ToPointer()) = remoteTextArea; 108IntPtr result = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 111if (!ignoreSendResult && result == IntPtr.Zero) 139internal static void GetProcessTypes(IntPtr hwnd, out ProcessorTypes localBitness, out ProcessorTypes remoteBitness) 141if (IsWOW64Process(IntPtr.Zero)) 179internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr wParam, ref string str, int maxLength) 197if (Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address) == IntPtr.Zero) 209internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr ptrStructure, int cbSize) 216internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr ptrStructure, int cbSize, ErrorValue errorCode) 238IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 241if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 256internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr ptrStructure, int lParam, int cbSize) 263internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr ptrStructure, int lParam, int cbSize, ErrorValue errorCode) 285IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam)); 288if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 303internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr ptrStructure1, IntPtr ptrStructure2, int cbSize1, int cbSize2) 310internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr ptrStructure1, IntPtr ptrStructure2, int cbSize1, int cbSize2, ErrorValue errorCode) 341IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem1.Address, rmem2.Address); 344if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 361internal static int XSendGetIndex(IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr ptrStructure, int cbSize) 402internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVITEM item) 410return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 416return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, 425return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 431internal static unsafe bool SetItem(IntPtr hwnd, int index, NativeMethods.LVITEM item) 457internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.LVITEM_V6 item) 467return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 474bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 486bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 498internal static unsafe bool SetGroupInfo(IntPtr hwnd, NativeMethods.LVGROUP group) 528internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP group) 573internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP_V6 group) 618internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP item) 662internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP_V6 item, int mask) 669IntPtr textAddress = IntPtr.Zero; 743internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TCITEM item) 786internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.TCITEM item) 825internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.HDITEM item) 868internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.HDITEM item) 907internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.TVITEM item) 917return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 924bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 937bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 950internal static unsafe bool SetItem(IntPtr hwnd, NativeMethods.TVITEM item) 958return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 964return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 970return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 975internal static unsafe IntPtr HitTestTreeView(IntPtr hwnd, int x, int y) 980IntPtr hitTestItem = IntPtr.Zero; 985if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref clientPoint, 1)) 991if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo), 1000if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo32), 1009if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo64), 1021internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TVITEM item) 1029return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1036hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), 1044return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1060internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TBBUTTON item) 1112internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TOOLINFO item) 1122IntPtr wParam = new IntPtr(maxTextLength); 1162internal static Rect GetItemRect(IntPtr hwnd, int msg, int index) 1185IntPtr localRectStart = new IntPtr(&rectW32.left); 1192Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2); 1235internal static string GetItemText(IntPtr hwnd, int msg, int index, int textLen) 1258if (Misc.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero) 1333private static string ListView_V6_GetGroupTextOnWinXp(IntPtr hwnd, NativeMethods.LVGROUP group) 1355if (group.pszHeader != IntPtr.Zero) 1367IntPtr count; 1381private static string ListView_V6_GetGroupTextOnWinXp(IntPtr hwnd, LVGROUP_32 group) 1415IntPtr count; 1429private static string ListView_V6_GetGroupTextOnWinXp(IntPtr hwnd, LVGROUP_64 group) 1463IntPtr count; 1478private static bool IsWOW64Process(IntPtr hwnd) 1623nativeItem.pszText = IntPtr.Zero; 1722nativeItem.pszText = IntPtr.Zero; 1723nativeItem.hbm = IntPtr.Zero; 1730nativeItem.pvFilter = IntPtr.Zero; 1826nativeItem.pszText = IntPtr.Zero; 1943nativeItem.pszText = IntPtr.Zero; 1950nativeItem.puColumns = IntPtr.Zero; 2020internal IntPtr pszSubtitle; 2022internal IntPtr pszTask; 2024internal IntPtr pszDescriptionTop; 2026internal IntPtr pszDescriptionBottom; 2032internal IntPtr pszSubsetTitle; // NULL if group is not subset 2140nativeItem.pszHeader = IntPtr.Zero; 2142nativeItem.pszFooter = IntPtr.Zero; 2223nativeItem.pszHeader = IntPtr.Zero; 2225nativeItem.pszFooter = IntPtr.Zero; 2233nativeItem.pszSubtitle = IntPtr.Zero; 2235nativeItem.pszTask = IntPtr.Zero; 2237nativeItem.pszDescriptionTop = IntPtr.Zero; 2239nativeItem.pszDescriptionBottom = IntPtr.Zero; 2245nativeItem.pszSubsetTitle = IntPtr.Zero; // NULL if group is not subset 2334nativeItem.iString = IntPtr.Zero; 2432nativeItem.hItem = IntPtr.Zero; 2435nativeItem.pszText = IntPtr.Zero; 2574nativeItem.hwnd = IntPtr.Zero; 2577nativeItem.hinst = IntPtr.Zero; 2578nativeItem.pszText = IntPtr.Zero;
MS\Internal\AutomationProxies\EventManager.cs (35)
44internal static void DispatchEvent(ProxySimple el, IntPtr hwnd, int eventId, object idProp, int idObject) 146private static void HandleIsReadOnlyProperty(ProxySimple el, IntPtr hwnd, int eventId) 160private static void HandleStructureChangedEventWindow(ProxySimple el, IntPtr hwnd, int eventId) 168private static void HandleCanMinimizeProperty(ProxySimple el, IntPtr hwnd, int eventId) 179private static void HandleCanMaximizeProperty(ProxySimple el, IntPtr hwnd, int eventId) 190private static void HandleValueProperty(ProxySimple el, IntPtr hwnd, int eventId) 199private static void HandleRangeValueProperty(ProxySimple el, IntPtr hwnd, int eventId) 208private static void HandleIsSelectedProperty(ProxySimple el, IntPtr hwnd, int eventId) 217private static void HandleExpandCollapseStateProperty(ProxySimple el, IntPtr hwnd, int eventId) 226private static void HandleColumnCountProperty(ProxySimple el, IntPtr hwnd, int eventId) 235private static void HandleRowCountProperty(ProxySimple el, IntPtr hwnd, int eventId) 244private static void HandleColumnProperty(ProxySimple el, IntPtr hwnd, int eventId) 253private static void HandleRowProperty(ProxySimple el, IntPtr hwnd, int eventId) 262private static void HandleColumnHeadersProperty(ProxySimple el, IntPtr hwnd, int eventId) 271private static void HandleRowHeadersProperty(ProxySimple el, IntPtr hwnd, int eventId) 280private static void HandleIsSelectionRequiredProperty(ProxySimple el, IntPtr hwnd, int eventId) 289private static void HandleVerticalViewSizeProperty(ProxySimple el, IntPtr hwnd, int eventId) 298private static void HandleHorizontalViewSizeProperty(ProxySimple el, IntPtr hwnd, int eventId) 307private static void HandleToggleStateProperty(ProxySimple el, IntPtr hwnd, int eventId) 316private static void HandleInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId) 330private static void HandleScrollInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId) 342private static void HandleWindowInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId) 354private static void HandleMenuItemInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId) 365private static void HandleElementSelectedEvent(ProxySimple el, IntPtr hwnd, int eventId) 378private static void HandleElementAddedToSelectionEvent(ProxySimple el, IntPtr hwnd, int eventId) 390private static void HandleElementRemovedFromSelectionEvent(ProxySimple el, IntPtr hwnd, int eventId) 402private static void HandleStructureChangedEventClient(ProxySimple el, IntPtr hwnd, int eventId) 421private static void HandleVerticalScrollPercentProperty(ProxySimple el, IntPtr hwnd, int eventId) 430private static void HandleHorizontalScrollPercentProperty(ProxySimple el, IntPtr hwnd, int eventId) 440private static void HandleInvalidatedEvent(ProxySimple el, IntPtr hwnd, int eventId) 453private static WindowVisualState GetWindowVisualState(IntPtr hwnd) 472private static void HandleTextSelectionChangedEvent(ProxySimple el, IntPtr hwnd, int eventId) 578private delegate void RaiseEvent (ProxySimple el, IntPtr hwnd, int eventId); 588private static IntPtr _hwndLast = IntPtr.Zero;
MS\Internal\AutomationProxies\Misc.cs (199)
92internal static void CheckEnabled(IntPtr hwnd) 123internal static bool CloseHandle(IntPtr processHandle) 157internal static IntPtr DispatchMessage(ref NativeMethods.MSG msg) 168internal unsafe static bool EnumChildWindows(IntPtr hwnd, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam) 181internal static IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string className, string wndName) 183IntPtr result = NativeMethodsSetLastError.FindWindowEx(hwndParent, hwndChildAfter, className, wndName); 186if (result == IntPtr.Zero) 194internal static string GetClassName(IntPtr hwnd) 213internal static string GetControlName(IntPtr label, bool stripMnemonic) 215if (label == IntPtr.Zero) 235internal static bool GetClientRectInScreenCoordinates(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 245if (!MapWindowPoints(hwnd, IntPtr.Zero, ref leftTop, 1)) 251if (!MapWindowPoints(hwnd, IntPtr.Zero, ref rightBottom, 1)) 260internal static bool GetClientRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 277internal static bool GetComboBoxInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbi) 306internal static IntPtr GetDC(IntPtr hwnd) 308IntPtr hdc = UnsafeNativeMethods.GetDC(hwnd); 311if (hdc == IntPtr.Zero) 319internal static IntPtr GetFocusedWindow() 323return ProxyGetGUIThreadInfo(0, out gui) ? gui.hwndFocus : IntPtr.Zero; 326internal static string GetItemToolTipText(IntPtr hwnd, IntPtr hwndToolTip, int item) 328if (hwndToolTip != IntPtr.Zero) 374internal static IntPtr GetLabelhwnd(IntPtr hwnd) 379return IntPtr.Zero; 383IntPtr hwndParent = Misc.GetParent(hwnd); 384if (hwndParent == IntPtr.Zero || hwndParent == UnsafeNativeMethods.GetDesktopWindow()) 386return IntPtr.Zero; 389IntPtr peer = hwnd; 393while ((peer = NativeMethodsSetLastError.GetWindow(peer, NativeMethods.GW_HWNDPREV)) != IntPtr.Zero) 398int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero); 427return IntPtr.Zero; 430internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint item, ref NativeMethods.MENUBARINFO mbi) 443internal static int GetMenuItemCount(IntPtr hmenu) 456internal static bool GetMenuItemInfo(IntPtr hmenu, int item, bool byPosition, ref NativeMethods.MENUITEMINFO menuItemInfo) 469internal static bool GetMenuItemRect(IntPtr hwnd, IntPtr hmenu, int item, out NativeMethods.Win32Rect rc) 482internal static bool GetMessage(ref NativeMethods.MSG msg, IntPtr hwnd, int msgFilterMin, int msgFilterMax) 496internal static int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf) 509internal static IntPtr GetParent(IntPtr hwnd) 511IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 514if (hwndParent == IntPtr.Zero) 522internal static bool GetScrollBarInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollBarInfo sbi) 535internal static bool GetScrollInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollInfo si) 555internal static int GetTextExtentPoint32(IntPtr hdc, string text, int length, out NativeMethods.SIZE size) 574internal static unsafe string GetUnsafeText(IntPtr hwnd, int uMsg, IntPtr wParam, int maxLength) 577IntPtr memAddr = IntPtr.Zero; // Ptr to remote mem 586memAddr = VirtualAlloc(IntPtr.Zero, new UIntPtr(cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE); 592if (ProxySendMessage(hwnd, uMsg, wParam, memAddr) == IntPtr.Zero) 613if (memAddr != IntPtr.Zero) 620internal static IntPtr GetWindow(IntPtr hwnd, int cmd) 622IntPtr resultHwnd = NativeMethodsSetLastError.GetWindow(hwnd, cmd); 625if (resultHwnd == IntPtr.Zero) 634internal static int GetWindowExStyle(IntPtr hwnd) 648internal static int GetWindowId(IntPtr hwnd) 662internal static IntPtr GetWindowParent(IntPtr hwnd) 674return (IntPtr)result; 677internal static bool GetWindowRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 690internal static int GetWindowStyle(IntPtr hwnd) 703internal static uint GetWindowThreadProcessId(IntPtr hwnd, out uint processId) 749internal static bool IsEnabled(IntPtr hwnd) 762if (hwnd == IntPtr.Zero) 769internal static bool IsControlRTL(IntPtr hwnd) 775internal static bool IsLayoutRTL(IntPtr hwnd) 780internal static bool IsReadingRTL(IntPtr hwnd) 820static internal bool IsItemVisible(IntPtr hwnd, ref NativeMethods.Win32Rect itemRect) 873internal static bool IsProgmanWindow(IntPtr hwnd) 875while (hwnd != IntPtr.Zero) 900internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Rect rect, int cPoints) 908if ((IsProgmanWindow(hWndFrom) && hWndTo == IntPtr.Zero) || 909(hWndFrom == IntPtr.Zero && IsProgmanWindow(hWndTo))) 925internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Point pt, int cPoints) 933if ((IsProgmanWindow(hWndFrom) && hWndTo == IntPtr.Zero) || 934(hWndFrom == IntPtr.Zero && IsProgmanWindow(hWndTo))) 1002IntPtr[] handles = { handle.DangerousGetHandle() }; 1021internal static IntPtr OpenProcess(int flags, bool inherit, uint processId, IntPtr hwnd) 1023IntPtr processHandle = UnsafeNativeMethods.OpenProcess(flags, inherit, processId); 1028if (processHandle == IntPtr.Zero 1044if (processHandle == IntPtr.Zero) 1053internal static void PostMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 1064internal static string ProxyGetClassName(IntPtr hwnd) 1072int index = ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 1161internal static string ProxyGetText(IntPtr hwnd) 1166internal static string ProxyGetText(IntPtr hwnd, int length) 1178ProxySendMessage(hwnd, NativeMethods.WM_GETTEXT, (IntPtr)str.Capacity, str); 1185internal static bool ProxyGetTitleBarInfo(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFO ti) 1201internal static bool ProxyGetTitleBarInfoEx(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFOEX ti) 1205IntPtr result; 1206IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, NativeMethods.WM_GETTITLEBARINFOEX, IntPtr.Zero, ref ti, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1208if (resultSendMessage == IntPtr.Zero) 1217internal static Rect [] GetTitlebarRects(IntPtr hwnd) 1229internal static Rect GetTitleBarRect(IntPtr hwnd) 1257internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 1259IntPtr result; 1261IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1264if (resultSendMessage == IntPtr.Zero) 1277internal static int ProxySendMessageInt(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 1279IntPtr result = ProxySendMessage(hwnd, msg, wParam, lParam); 1285internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, bool ignoreTimeout) 1287IntPtr result; 1289IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1292if (resultSendMessage == IntPtr.Zero) 1305internal static int ProxySendMessageInt(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, bool ignoreTimeout) 1307IntPtr result = ProxySendMessage(hwnd, msg, wParam, lParam, ignoreTimeout); 1311internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, StringBuilder sb) 1313IntPtr result; 1315IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, sb, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1318if (resultSendMessage == IntPtr.Zero) 1331internal static int ProxySendMessageInt(IntPtr hwnd, int msg, IntPtr wParam, StringBuilder sb) 1333IntPtr result = ProxySendMessage(hwnd, msg, wParam, sb); 1337internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, ref NativeMethods.Win32Rect lParam) 1339IntPtr result; 1341IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, ref lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1344if (resultSendMessage == IntPtr.Zero) 1352internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, out int wParam, out int lParam) 1354IntPtr result; 1356IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, out wParam, out lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1359if (resultSendMessage == IntPtr.Zero) 1379internal static bool PtInWindowRect(IntPtr hwnd, int x, int y) 1390internal static bool ReadProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr source, IntPtr dest, IntPtr size, out IntPtr bytesRead) 1403internal static bool ReadProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr source, MS.Internal.AutomationProxies.SafeCoTaskMem destAddress, IntPtr size, out IntPtr bytesRead) 1417internal static string RealGetWindowClass(IntPtr hwnd) 1433internal static bool RegisterHotKey(IntPtr hwnd, short atom, int modifiers, int vk) 1446internal static int ReleaseDC(IntPtr hwnd, IntPtr hdc) 1467internal static IntPtr SelectObject(IntPtr hdc, IntPtr hObject) 1495static internal bool SetFocus(IntPtr hwnd) 1539if (RegisterHotKey(IntPtr.Zero, atom, 0, vk)) 1587if (!GetMessage(ref msg, IntPtr.Zero, 0, 0)) 1609UnregisterHotKey(IntPtr.Zero, atom); 1617internal static int SetScrollPos(IntPtr hwnd, int bar, int pos, bool redraw) 1635internal static IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags) 1730internal static bool UnhookWinEvent(IntPtr winEventHook) 1752internal static bool UnregisterHotKey(IntPtr hwnd, short atom) 1765internal static IntPtr VirtualAlloc(IntPtr address, UIntPtr size, int allocationType, int protect) 1767IntPtr result = UnsafeNativeMethods.VirtualAlloc(address, size, allocationType, protect); 1770if (result == IntPtr.Zero) 1778internal static IntPtr VirtualAllocEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int allocationType, int protect) 1780IntPtr result = UnsafeNativeMethods.VirtualAllocEx(hProcess, address, size, allocationType, protect); 1783if (result == IntPtr.Zero) 1791internal static bool VirtualFree(IntPtr address, UIntPtr size, int freeType) 1804internal static bool VirtualFreeEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int freeType) 1817internal static bool WriteProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr dest, IntPtr sourceAddress, IntPtr size, out IntPtr bytesWritten) 1830internal static bool IsWindowInGivenProcess(IntPtr hwnd, string targetprocess) 1862internal static bool InTheShellProcess(IntPtr hwnd) 1864IntPtr hwndShell = SafeNativeMethods.GetShellWindow(); 1865if (hwndShell == IntPtr.Zero) 1876internal static bool IsComctrlV6OnOsVerV6orHigher(IntPtr hwnd) 1878int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 1913private static bool EnumToolTipWindows(IntPtr hwnd, ref UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO lParam) 1991private static Rect[] GetTitlebarRectsXP(IntPtr hwnd) 2062private static Rect[] GetTitlebarRectsEx(IntPtr hwnd)
MS\Internal\AutomationProxies\MSAAEventDispatcher.cs (6)
59internal void AdviseEventAdded(IntPtr hwnd, AutomationEvent eventId, AutomationProperty[] properties) 106internal void AdviseEventRemoved(IntPtr hwnd, AutomationEvent eventId, AutomationProperty[] properties) 167internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild) 274private void MaybeFireSelectionItemEvent(AutomationEvent eventId, Hashtable eventTable, IntPtr hwnd, int idObject, int idChild) 293private void MaybeFirePropertyChangeEvent(AutomationPattern pattern, AutomationProperty property, Hashtable eventTable, IntPtr hwnd, int idObject, int idChild, bool clientToo) 314private void MaybeFireStructureChangeEvent(int eventId, Hashtable eventTable, IntPtr hwnd, int idObject, int idChild)
MS\Internal\AutomationProxies\MSAANativeProvider.cs (9)
55protected MsaaNativeProvider(Accessible acc, IntPtr hwnd, MsaaNativeProvider parent, MsaaNativeProvider knownRoot, RootStatus isRoot) 58Debug.Assert(hwnd != IntPtr.Zero); 81private static MsaaNativeProvider Wrap(Accessible acc, IntPtr hwnd, MsaaNativeProvider parent, MsaaNativeProvider knownRoot, RootStatus isRoot) 133internal static IRawElementProviderSimple Create (IntPtr hwnd, int idChild, int idObject) 163int index = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 1063private static bool IsKnownBadWindow(IntPtr hwnd) 1083Debug.Assert(_hwnd != IntPtr.Zero); 1325protected IntPtr _hwnd; // the window we belong to
MS\Internal\AutomationProxies\MSAAWinEventWrap.cs (10)
36_hHooks = new IntPtr[1]; 56internal virtual void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild) 80_hHooks[0] = Misc.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc, 0, 0, _fFlags); 81if (_hHooks[0] == IntPtr.Zero) 98if (_hHooks[i] != IntPtr.Zero) 101_hHooks[i] = IntPtr.Zero; 127private void WinEventReentrancyFilter(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime) 206internal WinEvent(int eventId, IntPtr hwnd, int idObject, int idChild) 214public IntPtr _hwnd; 222private IntPtr [] _hHooks; // the returned handles(s) from SetWinEventHook
MS\Internal\AutomationProxies\NonClientArea.cs (17)
32internal NonClientArea (IntPtr hwnd) 107internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 112internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 146internal static IRawElementProviderSimple CreateMenuBarItem(IntPtr hwnd, int idChild, int idObject) 151private static IRawElementProviderSimple CreateMenuBarItem(IntPtr hwnd, int idChild) 153IntPtr menu = UnsafeNativeMethods.GetMenu(hwnd); 155if (menu == IntPtr.Zero) 176internal static IRawElementProviderSimple CreateSystemMenu(IntPtr hwnd, int idChild, int idObject) 181private static IRawElementProviderSimple CreateSystemMenu(IntPtr hwnd) 192internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 219int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 549IntPtr menu = UnsafeNativeMethods.GetMenu(_hwnd); 550if (menu != IntPtr.Zero) 654private static void RaiseMenuEventsOnClient(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 663private static void RaiseEventsOnClient(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 675private static void RaiseEventsOnScroll(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 745private static void RaiseEventsOnWindow(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild)
MS\Internal\AutomationProxies\ProxyFragment.cs (1)
57internal ProxyFragment (IntPtr hwnd, ProxyFragment parent, int item) : base (hwnd, parent, item)
MS\Internal\AutomationProxies\ProxyHwnd.cs (14)
49internal ProxyHwnd (IntPtr hwnd, ProxyFragment parent, int item) 192IntPtr label = Misc.GetLabelhwnd(_hwnd); 224if (_controlLabel == IntPtr.Zero && name != null && GetParent() == null) 232if (_controlLabel != IntPtr.Zero) 244IntPtr hwndParent = Misc.GetParent(_hwnd); 248if (hwndParent != IntPtr.Zero && hwndParent != UnsafeNativeMethods.GetDesktopWindow()) 272string text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, idChild); 275text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, 0); 481static protected bool PtInClientRect (IntPtr hwnd, int x, int y) 489if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 508static protected string GetLabelAccessKey(IntPtr hwnd) 511IntPtr label = Misc.GetLabelhwnd(hwnd); 512if (label != IntPtr.Zero) 567private IntPtr _controlLabel;
MS\Internal\AutomationProxies\ProxySimple.cs (7)
66internal ProxySimple(IntPtr hwnd, ProxyFragment parent, int item) 100if (_hwnd == IntPtr.Zero) 174if (_hwnd == IntPtr.Zero || (GetParent() != null && GetParent()._hwnd == _hwnd)) 340return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero; 661internal IntPtr WindowHandle 698internal IntPtr _hwnd; 718internal static IntPtr _hwndDesktop = UnsafeNativeMethods.GetDesktopWindow();
MS\Internal\AutomationProxies\QueueProcessor.cs (1)
104while (UnsafeNativeMethods.PeekMessage (ref msg, IntPtr.Zero, 0, 0, NativeMethods.PM_REMOVE))
MS\Internal\AutomationProxies\SafeProcessHandle.cs (2)
22internal SafeProcessHandle(IntPtr hwnd) : base(true) 26if (hwnd == IntPtr.Zero)
MS\Internal\AutomationProxies\SafeThemeHandle.cs (4)
24internal SafeThemeHandle(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle) 33return !IsInvalid ? CloseThemeData(handle) == (IntPtr)NativeMethods.S_OK : true; 37private static extern IntPtr CloseThemeData(IntPtr handle);
MS\Internal\AutomationProxies\WindowsAltTab.cs (8)
36internal WindowsAltTab(IntPtr hwnd, ProxyFragment parent, int item) 54internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 59internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 85internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 138if (Misc.MapWindowPoints(System.IntPtr.Zero, _hwnd, ref pt, 1)) 244GetAltTabInfo(IntPtr hwnd, int item, 330internal WindowsAltTabItem(IntPtr hwnd, WindowsAltTab parent, int item) 398if(!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (34)
36internal WindowsButton (IntPtr hwnd, ProxyFragment parent, ButtonType type, int style, Accessible acc) 90internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 95private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 152internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 196int state = Misc.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero); 324IntPtr hwndRadioButton = GetSelection(); 326if (hwndRadioButton == IntPtr.Zero || 398IntPtr hwndParent = Misc.GetParent(_hwnd); 399if (hwndParent != IntPtr.Zero && WindowsFormsHelper.IsWindowsFormsControl(hwndParent)) 503Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 517Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 524Misc.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true); 546IntPtr hwndShell = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null); 547if (hwndShell != IntPtr.Zero) 570IntPtr hwndParent = Misc.GetParent(_hwnd); 571if (hwndParent != IntPtr.Zero) 589IntPtr hwndParent = Misc.GetParent(_hwnd); 590if (hwndParent != IntPtr.Zero) 602private IntPtr GetRootAncestor() 604IntPtr hwndParent = _hwnd; 605IntPtr hwndRoot; 619} while (hwndParent != _hwndDesktop && hwndParent != IntPtr.Zero); 649int state = Misc.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero); 679unsafe private bool FindRadioButtonChild(IntPtr hwnd, void* lParam) 706private unsafe IntPtr GetSelection() 711IntPtr selectedRadiobutton = new IntPtr(0); 716return IntPtr.Zero; 719private unsafe bool FindSelectedRadioButtonChild(IntPtr hwnd, void* lParam) 733*(IntPtr*)lParam = hwnd;
MS\Internal\AutomationProxies\WindowsComboBox.cs (48)
47WindowsComboBox (IntPtr hwnd, ProxyFragment parent, IntPtr hwndEx, int item) 64internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 69internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 259if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 305if (cbInfo.hwndItem != IntPtr.Zero && IsEditableCombo()) 322if (cbInfo.hwndList != IntPtr.Zero) 343if (cbInfo.hwndItem != IntPtr.Zero && IsEditableCombo()) 360if (cbInfo.hwndList != IntPtr.Zero) 391IntPtr hwndParent = Misc.GetParent(_hwnd); 392if (hwndParent != IntPtr.Zero) 395IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.CBN_EDITUPDATE)); 501IntPtr hwndToAsk = IsComboBoxEx32() ? _hwndEx : _hwnd; 510static internal IntPtr HostedByComboEx (IntPtr hwnd) 512IntPtr hwndEx = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 514if ((IntPtr.Zero != hwndEx) && IsComboEx (hwndEx)) 519return IntPtr.Zero; 523static internal bool GetComboInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbInfo) 534cbInfo.hwndItem = IntPtr.Zero; 540if (cbInfo.hwndItem == IntPtr.Zero && IsComboEx (NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT))) 542cbInfo.hwndItem = Misc.FindWindowEx(hwnd, IntPtr.Zero, "EDIT", null); 543if (cbInfo.hwndItem != IntPtr.Zero) 562static internal bool GetDroppedState (IntPtr hwnd) 564return Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0; 567static internal void Expand (IntPtr hwnd) 569IntPtr hwndFocused = Misc.GetFocusedWindow(); 579Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 582static internal void Collapse (IntPtr hwnd) 584Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 638IntPtr hwnd = IsComboBoxEx32() ? _hwndEx : _hwnd; 660if (GetComboInfo(_hwnd, ref cbInfo) && (IntPtr.Zero != cbInfo.hwndList)) 668private ProxySimple CreateListBox (IntPtr hwndList) 674static private bool IsComboEx (IntPtr hwndEx) 676if (hwndEx == IntPtr.Zero) 695static private string SpecialText (IntPtr hwnd, int index) 700index = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 707int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 730static private void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 794private static void EditPortionEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 797IntPtr hwndCombo = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 799if (hwndCombo != IntPtr.Zero) 848return _hwndEx != IntPtr.Zero; 862private IntPtr _hwndEx; 889internal WindowsComboButton (IntPtr hwnd, ProxyFragment parent, int item) 928if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2))
MS\Internal\AutomationProxies\WindowsContainer.cs (13)
30public WindowsContainer (IntPtr hwnd, ProxyHwnd parent, int item) 56internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 61private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 99IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd(IntPtr hwnd) 104IntPtr hwndTab; 137private bool HasTabPageStyle(IntPtr hwnd) 147private bool IsTabPage(IntPtr hwnd, out IntPtr hwndTab, out int item) 149hwndTab = IntPtr.Zero; 178IntPtr hwndParent = Misc.GetParent(hwnd); 179if (hwndParent == IntPtr.Zero) 184hwndTab = Misc.FindWindowEx(hwndParent, IntPtr.Zero, "SysTabControl32", null); 186if (hwndTab == IntPtr.Zero || !SafeNativeMethods.IsWindowVisible(hwndTab))
MS\Internal\AutomationProxies\WindowsEditBox.cs (64)
39internal WindowsEditBox (IntPtr hwnd, ProxyFragment parent, int item) 71internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 76private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 92internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 109IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 110if (hwndParent != IntPtr.Zero) 153for (IntPtr hwnd = _hwnd; 154hwnd != IntPtr.Zero && string.IsNullOrEmpty(accessKey); 221IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(_hwnd); 222if (hwndUpDown != IntPtr.Zero) 232IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(_hwnd); 233if (hwndUpDown != IntPtr.Zero) 243IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(_hwnd); 244if (hwndUpDown != IntPtr.Zero) 294int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 302result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 356if (!Misc.MapWindowPoints(IntPtr.Zero, WindowHandle, ref clientLocation, 1)) 447IntPtr lParam = NativeMethods.Util.MAKELPARAM(point.x, point.y); 448int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam); 495internal static EditboxType GetEditboxtype (IntPtr hwnd) 520return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 527return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 531internal IntPtr GetFont() 533IntPtr result = Misc.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero); 539if (result == IntPtr.Zero) 550return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero); 555IntPtr hfont = GetFont(); 556Debug.Assert(hfont != IntPtr.Zero, "WindowsEditBox.GetLogfont got null HFONT"); 570Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect); 590return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero); 685return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero); 691int index = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero); 698return 0 != Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical); 745int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero); 806Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end); 812internal static string Text(IntPtr hwnd) 855IntPtr hdc = Misc.GetDC(_hwnd); 856if (hdc == IntPtr.Zero) 861IntPtr oldFont = IntPtr.Zero; 864IntPtr hfont = GetFont(); 870if (oldFont != IntPtr.Zero) 893IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 895if (hwndParent == IntPtr.Zero) 913IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 915if (hwndParent != IntPtr.Zero) 927private static bool IsInsideOfIPAddress(IntPtr hwnd) 929IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 931if (hwndParent != IntPtr.Zero) 943private static bool IsInsideOfListView(IntPtr hwnd) 945IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 947if (hwndParent != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (5)
248if (!Misc.MapWindowPoints(_provider.WindowHandle, IntPtr.Zero, ref w32point, 1)) 776IntPtr hdc = Misc.GetDC(IntPtr.Zero); 777if (hdc == IntPtr.Zero) 782Misc.ReleaseDC(IntPtr.Zero, hdc);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (7)
28internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 74internal static IRawElementProviderSimple CreateButton(IntPtr hwnd) 119static internal FormControlState GetControlState(IntPtr hwnd) 133static internal bool IsWindowsFormsControl(IntPtr hwnd) 138static internal bool IsWindowsFormsControl(IntPtr hwnd, ref FormControlState state) 149static internal string WindowsFormsID(IntPtr hwnd) 156static internal string GetControlName(IntPtr hwnd)
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (3)
34internal FormsLink (IntPtr hwnd, ProxyFragment parent, int item) 49internal static IRawElementProviderSimple Create (IntPtr hwnd, int idChild) 58internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild)
MS\Internal\AutomationProxies\WindowsGrip.cs (5)
30public WindowsGrip (IntPtr hwnd, ProxyHwnd parent, int item) 87static internal bool IsGripPresent(IntPtr hwnd, bool onStatusBar) 114int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 122int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 128internal static NativeMethods.SIZE GetGripSize(IntPtr hwnd, bool onStatusBar)
MS\Internal\AutomationProxies\WindowsHyperlink.cs (12)
30WindowsHyperlink (IntPtr hwnd, ProxyFragment parent, int item) 46internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 51private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 63internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 204if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 219bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 284return XSendMessage.XSend(_hwnd, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM)); 361internal WindowsHyperlinkItem(IntPtr hwnd, ProxyFragment parent, int item) 402return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 499bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 511Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 512Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (17)
31WindowsIPAddress (IntPtr hwnd, ProxyFragment parent, int item) 49internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 54private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 62internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 103IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd (IntPtr hwnd) 140Misc.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4)); 189IntPtr hwndChild = GetChildWindowFromIndex(column); 190if (hwndChild != IntPtr.Zero) 242private int GetIndexOfChildWindow (IntPtr target) 245IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 246while (hwndChild != IntPtr.Zero) 260private IntPtr GetChildWindowFromIndex (int index) 262IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 263for (int i = 0; ((i < index) && (hwndChild != IntPtr.Zero)); i++) 306internal ByteEditBoxOverride(IntPtr hwnd, int position) : 383Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
MS\Internal\AutomationProxies\WindowsListBox.cs (36)
33internal WindowsListBox (IntPtr hwnd, ProxyFragment parent, int item, bool parentedByCombo) 57internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 62internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 82if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && (cbInfo.hwndCombo != IntPtr.Zero)) 110internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 298int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top)); 313int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero); 388return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0; 438return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero); 447private static void RaiseEventsOnClient(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 520private static void RaiseEventsOnWindow(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 533if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && (cbInfo.hwndCombo != IntPtr.Zero)) 569int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero); 610return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 668internal ListboxItem (IntPtr hwnd, ProxyFragment parent, int item) 733int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 946Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 990internal static bool IsSelected (IntPtr hwnd, int item) 992return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 995internal static bool Select (IntPtr hwnd, int item, bool fMultipleSelection) 1005SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1045return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item; 1049return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1067return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty; 1140Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1155IntPtr wParam = 1158IntPtr hwndListBoxParent = Misc.GetParent(_hwnd); 1170Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1175IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.LBN_SELCHANGE)); 1186private bool UnSelect (IntPtr hwnd, int item) 1194return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (99)
70internal WindowsListView (IntPtr hwnd, ProxyFragment parent, int item) 99internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 104internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 114internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 501IntPtr hwndHeader = ListViewGetHeader (_hwnd); 502if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 530IntPtr hwndHeader = ListViewGetHeader (_hwnd); 531if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 646fScrollSuccess = Scroll(_hwnd, (IntPtr)dx, (IntPtr)dy); 662Scroll(_hwnd, (IntPtr)dx, (IntPtr)dy); 795IntPtr hwndHeader = ListViewGetHeader (_hwnd); 796if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 883static internal bool SetItemFocused (IntPtr hwnd, int item) 889static internal bool IsItemFocused (IntPtr hwnd, int item) 897static internal bool IsDetailMode (IntPtr hwnd) 920IntPtr hwndHeader = ListViewGetHeader(hwnd); 934static internal bool IsListMode (IntPtr hwnd) 945static internal bool IsImplementingGrid (IntPtr hwnd) 967static internal int GetColumnCount (IntPtr hwnd) 980static internal int GetRowCount (IntPtr hwnd) 993static internal int GetColumnCountOtherModes (IntPtr hwnd) 1027static internal int GetRowCountListMode (IntPtr hwnd, int itemCount) 1087internal static bool IsGroupViewEnabled (IntPtr hwnd) 1093internal static void GroupSpecificEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 1182static internal bool InReportView (IntPtr hwnd) 1189static internal void RemoveGroupAndRaiseLogicalChangedEvent (IntPtr hwnd) 1196static internal void RaiseLogicalChangedEvent (IntPtr hwnd) 1212static internal int GetItemCount (IntPtr hwnd) 1214return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1218static internal int GetSelectedItemCount (IntPtr hwnd) 1232static internal int GetStartOfSelectedItems (IntPtr hwnd) 1240static internal int GetItemNext (IntPtr hwnd, int item, int flags) 1245static internal bool IsIconView(IntPtr hwnd) 1251static internal int ListViewGetView (IntPtr hwnd) 1253return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero); 1257static internal int ApproximateViewRect (IntPtr hwnd) 1263static internal bool Scroll (IntPtr hwnd, IntPtr dx, IntPtr dy) 1269static internal unsafe bool GetItemRect (IntPtr hwnd, int item, int lvir, out NativeMethods.Win32Rect itemRectangle) 1278return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1286internal static bool ListViewIsGroupViewEnabled (IntPtr hwnd) 1288return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0; 1292static internal bool UnselectAll (IntPtr hwnd) 1298static internal bool SelectItem (IntPtr hwnd, int item) 1304static internal bool UnSelectItem (IntPtr hwnd, int item) 1310static internal bool IsItemSelected (IntPtr hwnd, int listItem) 1316static internal bool ListViewEditable (IntPtr hwnd) 1322static internal bool ListViewInvokable(IntPtr hwnd) 1350static internal IntPtr ListViewEditLabel(IntPtr hwnd, int item) 1352return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1356static internal bool ListViewSingleClickActivate (IntPtr hwnd) 1362static internal bool MultiSelected (IntPtr hwnd) 1368static internal bool Scrollable (IntPtr hwnd) 1374static internal bool EnsureVisible (IntPtr hwnd, int item, bool partialOK) 1376IntPtr partialVisible = (partialOK) ? IntPtr.Zero : new IntPtr (1); 1382static internal IntPtr ListViewGetHeader (IntPtr hwnd) 1384return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 1388static internal string GetItemText (IntPtr hwnd, NativeMethods.LVITEM item) 1397static internal NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, NativeMethods.Win32Point pt) 1404static internal NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, int item, NativeMethods.Win32Point pt) 1416if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref hitTest.pt, 1)) 1426result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1434result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1450static internal int HeaderItemCount (IntPtr hwnd) 1452return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1456static internal bool CheckBoxes (IntPtr hwnd) 1462static internal int GetCheckedState (IntPtr hwnd, int item) 1470static internal bool ListViewAutoArrange (IntPtr hwnd) 1476static public bool FullRowSelect (IntPtr hwnd) 1482static public bool HasJustifyColumnsExStyle(IntPtr hwnd) 1489static public unsafe bool GetSubItemRect (IntPtr hwnd, int item, int subItem, int lvir, out NativeMethods.Win32Rect itemRectangle) 1499return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1506static internal string GetItemToolTipText(IntPtr hwnd) 1508IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1744static private int GetRowCountOtherModes (IntPtr hwnd) 1785static private bool ListViewList (IntPtr hwnd) 1791static private unsafe bool GetItemPosition (IntPtr hwnd, int item, out NativeMethods.Win32Point pt) 1800return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref pt, 1); 1808static private int GetExtendedListViewStyle (IntPtr hwnd) 1810return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero); 1814private static int GetItemState (IntPtr hwnd, int item, int stateMask) 1819private static bool SetItemState (IntPtr hwnd, int item, int stateMask, int state) 1834IntPtr hwndHeader = ListViewGetHeader (_hwnd); 1836if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 1848private static void RaiseEventsOnClient(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild)
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (13)
31internal WindowsListViewGroup (IntPtr hwnd, ProxyFragment parent, int groupID) 331int groupIndex = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 423internal static bool IsCollapsed(IntPtr hwnd, int groupID) 464internal static ProxySimple GetFocusInGroup (IntPtr hwnd, ProxyFragment parent) 488int groupIndex = (int)Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 552static internal int GetColumnCountExternal (IntPtr hwnd, int groupID) 559static internal GroupManager.GroupInfo GetGroupInfo (IntPtr hwnd, int groupID) 662static private bool IsGroupValid (IntPtr hwnd, int groupID) 733static private int GetColumnCount (IntPtr hwnd, int groupID) 754static private int GetRowCount (IntPtr hwnd, int groupID) 778static private int GetCountOfItemsInDimension (IntPtr hwnd, int groupID, IsNewItemInDimension comparer)
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (18)
34internal void EnsureCreation(IntPtr hwnd) 42internal void Remove(IntPtr hwnd) 48internal bool Contains(IntPtr hwnd) 53internal GroupManager this[IntPtr hwnd] 112private GroupManager(int groups, IntPtr hwnd, bool isComctrlV6OnOsVerV6orHigher) 236internal static GroupManager CreateGroupManager(IntPtr hwnd) 242internal static bool ListViewHasGroup(IntPtr hwnd, int groupID) 244return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 340internal IntPtr _hwnd; 368private static unsafe GroupManager InitializeManager(IntPtr hwnd) 468XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPMETRICS, IntPtr.Zero, new IntPtr(&(metric.cbSize)), metric.cbSize, XSendMessage.ErrorValue.NoCheck); 541internal SortGroups(IntPtr hwnd) 576private IntPtr _hwnd; 598internal SortGroupItems(IntPtr hwnd) 648private IntPtr _hwnd; 665internal Group(int id, IntPtr hwnd, bool isComctrlV6OnOsVerV6orHigher) 707Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2); 847private IntPtr _hwnd; // lv hwnd
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (2)
39internal ListViewGroupSubsetLink (IntPtr hwnd, ProxyFragment parent, int item, int groupId) 78Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (22)
35internal ListViewItem (IntPtr hwnd, ProxyFragment parent, int item) 139if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRectangle, 2)) 369int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero); 686internal static int GetSubItemCount (IntPtr hwnd) 691IntPtr hwndHeader = WindowsListView.ListViewGetHeader (hwnd); 693if (hwndHeader == IntPtr.Zero) 705internal static string GetText (IntPtr hwnd, int item, int subitem) 716internal static bool IsItemWithCheckbox (IntPtr hwnd, int item) 730static internal int GetGroupID (IntPtr hwnd, int lvItem) 746internal static void SetValue (string val, IntPtr hwnd, int item) 765IntPtr hwndEdit = WindowsListView.ListViewEditLabel (hwnd, item); 767if (IntPtr.Zero == hwndEdit) 854IntPtr hwndHeader = WindowsListView.ListViewGetHeader(_hwnd); 855if (hwndHeader != IntPtr.Zero) 900static private bool IsImplementingGrid (IntPtr hwnd) 934if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 964private static void FinishEditing (bool setValueSucceeded, IntPtr hwnd, IntPtr hwndEdit) 967IntPtr key = (IntPtr)((setValueSucceeded) ? NativeMethods.VK_RETURN : NativeMethods.VK_ESCAPE); 974IntPtr keyUpLParam = new IntPtr (scanCode + (1 << 31) + (1 << 30));
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (6)
32internal ListViewItemCheckbox (IntPtr hwnd, ProxyFragment parent, int item, int checkbox) : 82if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 147internal static NativeMethods.Win32Rect ListViewCheckBoxRect (IntPtr hwnd, int item) 252if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 255Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 256Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewItemStartMenu.cs (1)
34internal ListViewItemStartMenu(IntPtr hwnd, ProxyFragment parent, int item, IAccessible acc)
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (5)
34internal WindowsListViewScrollBar(IntPtr hwnd, ProxyFragment parent, int item, int sbFlag) 105if (WindowsListView.Scroll (_hwnd, (IntPtr) dx, (IntPtr) dy)) 130WindowsListView.Scroll (_hwnd, (IntPtr) dx, (IntPtr) dy);
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (8)
29internal ListViewSubItem (IntPtr hwnd, ProxyFragment parent, int item, int itemParent) 169IntPtr ancestor = _hwnd; 170IntPtr desktop = UnsafeNativeMethods.GetDesktopWindow(); 172while (ancestor != IntPtr.Zero && ancestor != desktop) 328IntPtr hwndHeader = WindowsListView.ListViewGetHeader (_hwnd); 348internal static ProxySimple ElementProviderFromPoint (IntPtr hwnd, ProxyFragment parent, int item, int x, int y) 376int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (139)
40internal WindowsMenu(IntPtr hwnd, ProxyFragment parent, IntPtr hmenu, MenuType type, int item) 71if (!_expandedMenus.Contains(IntPtr.Zero)) 73_expandedMenus[IntPtr.Zero] = new MenuParentInfo(hwnd, item, type); 118internal static ProxySimple CreateMenuItemFromEvent(IntPtr hwndMenu, int eventId, int idChild, int idObject) 155internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 160private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 163IntPtr hmenu; 169if (hmenu == IntPtr.Zero) 172if (hmenu == IntPtr.Zero) 199internal static WindowsMenu CreateSystemMenu (IntPtr hwnd, ProxyFragment parent) 201IntPtr hSysMenu = GetSystemMenuHandle(hwnd); 202if (hSysMenu != IntPtr.Zero) 213internal static IRawElementProviderSimple CreateFocusedMenuItem(IntPtr hwnd, int idChild, int idObject) 236IntPtr hwndPopup = IntPtr.Zero; 239hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 240if (hwndPopup == IntPtr.Zero) 249if (hwndPopup != IntPtr.Zero) 255IntPtr hmenu = HmenuFromHwnd(hwndPopup); 256if (hmenu == IntPtr.Zero) 269IntPtr hSubMenu = UnsafeNativeMethods.GetSubMenu(hmenu, i); 270if (hSubMenu == IntPtr.Zero) 277IntPtr hwndSubMenuPopup = GetPopupHwndForHMenu(hSubMenu); 278if (hwndSubMenuPopup == IntPtr.Zero) 314IntPtr hmenu = UnsafeNativeMethods.GetMenu(gui.hwndActive); 465WinEventTracker.AddToNotificationList(IntPtr.Zero, new WinEventTracker.ProxyRaiseEvents(MenuEvents), _menuEvents, _menuEvents.Length); 486WinEventTracker.RemoveToNotificationList (IntPtr.Zero, _menuEvents, new WinEventTracker.ProxyRaiseEvents (MenuEvents), _menuEvents.Length); 507internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint idItem, out NativeMethods.MENUBARINFO mbi) 532internal static MenuItem GetHierarchyParent(IntPtr hwnd) 535IntPtr menuParent = IntPtr.Zero; 536IntPtr hwndParent = IntPtr.Zero; 538IntPtr menu = HmenuFromHwnd(hwnd); 539if (menu == IntPtr.Zero) 577private static bool GetSubMenuParent (IntPtr hwndMenu, out IntPtr menuParent, out IntPtr hwndParent, out int ownerMenuItemPos, out MenuType parentType) 580hwndParent = IntPtr.Zero; 581menuParent = IntPtr.Zero; 584IntPtr hMenu = HmenuFromHwnd (hwndMenu); 585if (hMenu == IntPtr.Zero) 601IntPtr hMenuPossibleParent = UnsafeNativeMethods.GetMenu (gui.hwndActive); 603if (hMenuPossibleParent != IntPtr.Zero) 619for (IntPtr hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndMenu, WindowsMenu.MenuClassName, null); 620hwndPossibleParent != IntPtr.Zero; 621hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndPossibleParent, WindowsMenu.MenuClassName, null)) 626if (hMenuPossibleParent != IntPtr.Zero) 645internal static IntPtr WindowFromSubmenu (IntPtr submenu) 647for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 648hwndSubMenu != IntPtr.Zero; 649hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, MenuClassName, null)) 653IntPtr submenuCandidate = HmenuFromHwnd (hwndSubMenu); 662return IntPtr.Zero; 667internal static MenuType GetSubMenuType (IntPtr hwnd, IntPtr hMenu) 674if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER)) 685private static int GetMenuItemParent (IntPtr hmenuPossibleParent, IntPtr hmenuChild) 718internal static IntPtr HmenuFromHwnd (IntPtr hwnd) 722return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero); 725return IntPtr.Zero; 748internal static IntPtr GetSystemMenuHandle(IntPtr hwnd) 752if (GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero) 757return IntPtr.Zero; 877private static IntPtr GetSystemPopupMenu (IntPtr hwnd) 884mbi.hMenu != IntPtr.Zero && 890return IntPtr.Zero; 894private static bool IsSystemPopupMenu (IntPtr hmenu) 896if (hmenu == IntPtr.Zero) 915private static bool IsWindowSubMenu (IntPtr hwnd) 921private static int GetHighlightedMenuItem(IntPtr hmenu) 935private static IntPtr GetPopupHwndForHMenu(IntPtr hmenu) 937IntPtr hwndPopup = IntPtr.Zero; 940hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 941if (hwndPopup == IntPtr.Zero) 947IntPtr hmenuTest = HmenuFromHwnd(hwndPopup); 951return IntPtr.Zero; 955private static void MenuEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 1013if (parent == null && _expandedMenus.Contains(IntPtr.Zero)) 1016parentInfo = (MenuParentInfo)_expandedMenus[IntPtr.Zero]; 1113private IntPtr _hmenu; 1141internal IntPtr _hwndParent; // menu's hwnd on which menuItem lives 1145internal MenuParentInfo (IntPtr hwndParent, int menuItem, MenuType type) 1174internal MenuItem (IntPtr hwnd, ProxyFragment parent, int item, IntPtr hmenu, WindowsMenu.MenuType type) 1424return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero; 1449IntPtr hwndFocus = Misc.GetFocusedWindow(); 1453if (hwndFocus != IntPtr.Zero && hwndFocus != _hwnd) 1606IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item); 1607if (submenu == IntPtr.Zero) 1612IntPtr hwndSubmenu = WindowsMenu.WindowFromSubmenu (submenu); 1614if (hwndSubmenu != IntPtr.Zero) 1625IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item); 1626if (submenu == IntPtr.Zero) 1631IntPtr hwndSubmenu = WindowsMenu.WindowFromSubmenu(submenu); 1633if (hwndSubmenu != IntPtr.Zero) 1903return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero); 1907private static bool IsSeparator (IntPtr hmenu, int position) 1959if (menuItemInfo.hSubMenu != IntPtr.Zero) 1986IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 1987return (hwndSubMenu == IntPtr.Zero || !SafeNativeMethods.IsWindowVisible(hwndSubMenu)); 1991IntPtr submenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item); 1992return (IntPtr.Zero == WindowsMenu.WindowFromSubmenu(submenu)); 2096for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowsMenu.MenuClassName, null); 2098hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, WindowsMenu.MenuClassName, null)) 2101if (hwndSubMenu == IntPtr.Zero) 2127Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' ')); 2143IntPtr hSubmenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item); 2144if (hSubmenu == IntPtr.Zero) 2148IntPtr hwndSubmenu = WindowsMenu.WindowFromSubmenu(hSubmenu); 2150if (hwndSubmenu != IntPtr.Zero) 2254if (gui.hwndCapture != IntPtr.Zero && Misc.ProxyGetClassName(gui.hwndCapture) == "ListBox") 2405(IntPtr.Zero != UnsafeNativeMethods.GetSubMenu (_hmenu, 0)) && 2543int length = UnsafeNativeMethods.GetMenuString(_hmenu, _item, IntPtr.Zero, 0, NativeMethods.MF_BYPOSITION); 2585private unsafe string TryMSAAMenuWorkAround(IntPtr dwItemData) 2587if (_hwnd == IntPtr.Zero) 2603IntPtr count; 2826internal IntPtr pszWText; // NUL-terminated text, in Unicode 2830private IntPtr _hmenu; 2859internal DestroyedMenuItem(IntPtr hwnd, int item, IntPtr hwndParent) 2994IntPtr _hwndParent;
MS\Internal\AutomationProxies\WindowsNonControl.cs (3)
28WindowsNonControl(IntPtr hwnd, ProxyFragment parent, int item) 40internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 45private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild)
MS\Internal\AutomationProxies\WindowsProgressbar.cs (9)
28WindowsProgressBar (IntPtr hwnd, ProxyFragment parent, int item) 43internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 48private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 59internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 159int cur = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 160int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero); 161int max = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (25)
29WindowsRebar (IntPtr hwnd, ProxyFragment parent, int item) 45internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 50private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 59internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 160IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd (IntPtr hwnd) 197return Misc.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero); 208return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 258internal RebarBandItem (IntPtr hwnd, ProxyFragment parent, int item) 290IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 327IntPtr hwndBand = HwndBand; 329if (hwndBand != IntPtr.Zero) 346IntPtr hwndBand = HwndBand; 348if (hwndBand != IntPtr.Zero && Misc.PtInWindowRect(hwndBand, x, y)) 381Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero); 395internal static Rect GetBoundingRectangle (IntPtr hwnd, int item) 407if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2)) 424internal IntPtr HwndBand 428if (_hwndBand == IntPtr.Zero) 455IntPtr _hwndBand = IntPtr.Zero; 481internal RebarBandChildOverrideProxy (IntPtr hwnd, ProxyFragment parent, int item)
MS\Internal\AutomationProxies\WindowsRichEdit.cs (16)
33WindowsRichEdit (IntPtr hwnd, ProxyFragment parent, int style) 58internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 63internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 72internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 193int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 200result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 613fetc.ptd = IntPtr.Zero; 620med.pUnkForRelease = IntPtr.Zero; 621med.hGlobal = IntPtr.Zero; 625if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 635if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 641IntPtr globalMem = UnsafeNativeMethods.GlobalLock(med.hGlobal); 646if (globalMem == IntPtr.Zero) 681IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 683if (hwndParent != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsScroll.cs (14)
32static internal void SetScrollPercent (IntPtr hwnd, double horizontalPercent, double verticalPercent, bool forceResults) 65static internal void Scroll (IntPtr hwnd, ScrollAmount HorizontalAmount, ScrollAmount VerticalAmount, bool fForceResults) 82static internal object GetPropertyScroll (AutomationProperty idProp, IntPtr hwnd) 114static internal bool Scrollable (IntPtr hwnd, int sbFlag) 159static internal bool HasScrollableStyle(IntPtr hwnd) 177static internal bool IsScrollable(IntPtr hwnd) 193static private double GetScrollInfo(IntPtr hwnd, int sbFlag) 250static private double ScrollViewSize(IntPtr hwnd, int sbFlag) 271static private bool SetScrollPercent(IntPtr hwnd, double fScrollPos, int sbFlag, out bool forceResults) 321bool fRet = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero) == 0; 351static private bool ScrollCursor(IntPtr hwnd, ScrollAmount amount, int sbFlag, bool fForceResults) 433int result = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (13)
33internal WindowsScrollBar (IntPtr hwnd, ProxyFragment parent, int item, int sbFlag) 63internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 68private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 79internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 416static internal bool HasVerticalScrollBar (IntPtr hwnd) 421static internal bool HasHorizontalScrollBar (IntPtr hwnd) 426internal static bool IsScrollBarVertical(IntPtr hwnd, int sbFlag) 435internal static bool IsScrollBarWithThumb (IntPtr hwnd, int sbFlag) 702Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 704Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 709private static bool HasValuePattern (IntPtr hwnd, int sbFlag)
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (11)
40internal WindowsScrollBarBits (IntPtr hwnd, ProxyFragment parent, int item, int sbFlag) 84internal static ProxySimple CreateFromChildId(IntPtr hwnd, ProxyFragment parent, int idChild, int sbFlag) 206static internal Rect GetBoundingRectangle(IntPtr hwnd, ProxyFragment parent, WindowsScrollBar.ScrollBarItem item, int sbFlag) 298static internal Rect GetVerticalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi) 301if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 389static internal Rect GetHorizontalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi) 393if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 520IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(_hwnd) : _hwnd; 567Misc.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd == _hwnd ? IntPtr.Zero : _hwnd));
MS\Internal\AutomationProxies\WindowsSlider.cs (31)
30WindowsSlider (IntPtr hwnd, ProxyFragment parent, int item) 49internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 54private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 63internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 171IntPtr parent = Misc.GetParent(_hwnd); 173if (IntPtr.Zero != parent) 182Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 264int value = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 269int maxValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 294return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero); 302return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero); 310return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 318return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero); 362internal SliderItem (IntPtr hwnd, ProxyFragment parent, int item, bool fHorizontal) 412IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 441IntPtr wParam = (IntPtr) (_item == (int) WindowsSlider.SItem.LargeDecrement ? NativeMethods.VK_PRIOR : NativeMethods.VK_NEXT); 443Misc.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero); 457internal static Rect GetBoundingRectangle (IntPtr hwnd, WindowsSlider.SItem item, bool fHorizontal) 464XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 466if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcChannel, 2)) 476XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck); 478if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcThumb, 2))
MS\Internal\AutomationProxies\WindowsSpinner.cs (21)
30internal WindowsSpinner(IntPtr hwndUpDown, IntPtr hwndEdit, ProxyFragment parent, int item) 49internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 54internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 59IntPtr hwndBuddy; 64hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 65if (hwndBuddy == IntPtr.Zero) 84internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 267internal static bool IsSpinnerEdit(IntPtr hwnd) 269return GetUpDownFromEdit(hwnd) != IntPtr.Zero; 274internal static IntPtr GetUpDownFromEdit(IntPtr hwnd) 276IntPtr hwndParent = Misc.GetParent(hwnd); 278if (hwndParent != IntPtr.Zero) 280IntPtr hwndChild = Misc.GetWindow(hwndParent, NativeMethods.GW_CHILD); 281while (hwndChild != IntPtr.Zero) 286IntPtr hwndBuddy = Misc.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 296return IntPtr.Zero;
MS\Internal\AutomationProxies\WindowsStartMenu.cs (3)
25public WindowsStartMenu(IntPtr hwnd, ProxyHwnd parent, int item) 36internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 41private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild)
MS\Internal\AutomationProxies\WindowsStatic.cs (5)
27WindowsStatic (IntPtr hwnd, ProxyFragment parent, StaticType type, int style) 53internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 58private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 110internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 172private static bool IsLinkLabel(IntPtr hwnd)
MS\Internal\AutomationProxies\WindowsStatusBar.cs (25)
29internal WindowsStatusBar(IntPtr hwnd, ProxyFragment parent, int item, Accessible acc) 50internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 55private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 64internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 108IntPtr hwndChild = accChild.Window; 109if (hwndChild == IntPtr.Zero || hwndChild == _hwnd) 114if(hwndChild != IntPtr.Zero && hwndChild != _hwnd) 295IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd(IntPtr hwnd) 304IntPtr hwndChild = IntPtr.Zero; 309if (hwndChild == IntPtr.Zero) 340return Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero); 349unsafe static private IntPtr GetChildHwnd(IntPtr hwnd, Rect rc) 353info.hwnd = IntPtr.Zero; 364unsafe static private bool FindChildFromRect(IntPtr hwnd, void* lParam) 423internal WindowsStatusBarPane (IntPtr hwnd, ProxyFragment parent, int item, Accessible acc) 559static internal Rect GetBoundingRectangle (IntPtr hwnd, int item) 599int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero); 648internal WindowsStatusBarPaneChildOverrideProxy(IntPtr hwnd, ProxyFragment parent, int item) 754public StatusBarGrip (IntPtr hwnd, ProxyHwnd parent, int item) 792internal static NativeMethods.Win32Rect GetBoundingRectangle (IntPtr hwnd) 820internal static StatusBarGrip Create(IntPtr hwnd, ProxyHwnd parent, int item) 833internal static bool HasGrip(IntPtr hwnd)
MS\Internal\AutomationProxies\WindowsSysHeader.cs (36)
37internal WindowsSysHeader (IntPtr hwnd) 54internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 59internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 71internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 80IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 81if (hwndParent != IntPtr.Zero) 164if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 168index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 184int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 251IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (_hwnd, NativeMethods.GA_PARENT); 252if (hwndParent != IntPtr.Zero) 291Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 297private static bool HeaderIsHidden (IntPtr hwnd) 303static private int OrderToIndex (IntPtr hwnd, int order) 305return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 308static private int HeaderItemCount (IntPtr hwnd) 310return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 364internal HeaderItem (IntPtr hwnd, ProxyFragment parent, int item) 436IntPtr hwndParent = Misc.GetParent(_hwnd); 437if (hwndParent != IntPtr.Zero) 488IntPtr center = NativeMethods.Util.MAKELPARAM (pt.x, pt.y); 492Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 535int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 583if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2)) 678return Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1); 703int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 732IntPtr center = NativeMethods.Util.MAKELPARAM (rectW32.left + ((rectW32.right - rectW32.left) / 2), rectW32.top + ((rectW32.bottom - rectW32.top) / 2)); 738Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 750IntPtr hwndDropDown = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "DropDown", null); 751if (hwndDropDown != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsTab.cs (89)
38public WindowsTab (IntPtr hwnd, ProxyFragment parent, int item) 66internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 71private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 81internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 264if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref hti.pt, 1)) 271IntPtr updownHwnd = this.GetUpDownHwnd (); 273if (updownHwnd != IntPtr.Zero && Misc.PtInWindowRect(updownHwnd, x, y)) 281index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType())); 295int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero); 318IntPtr upDownHwnd = GetUpDownHwnd(); 319if (upDownHwnd != IntPtr.Zero) 340IntPtr upDownHwnd = GetUpDownHwnd(); 341if (upDownHwnd != IntPtr.Zero) 359IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd (IntPtr hwnd) 505IntPtr updownHwnd = this.GetUpDownHwnd (); 507if (updownHwnd == IntPtr.Zero) 513int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 521Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 522Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 534IntPtr updownHwnd = this.GetUpDownHwnd (); 536if (updownHwnd == IntPtr.Zero) 542int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 545int posResult = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 591IntPtr updownHwnd = this.GetUpDownHwnd (); 593if (updownHwnd == IntPtr.Zero) 648internal static int GetItemCount(IntPtr hwnd) 653int count = Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 690IntPtr updownHwnd = this.GetUpDownHwnd(); 692if (updownHwnd == IntPtr.Zero) 695int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 699Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 700Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 705return GetUpDownHwnd(_hwnd) != IntPtr.Zero; 709internal static bool IsValidControl(IntPtr hwnd) 725IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 730IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 731if (hwndParent != IntPtr.Zero 752private IntPtr GetUpDownHwnd() 756private static IntPtr GetUpDownHwnd(IntPtr hwnd) 758IntPtr childHwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 765if (childHwnd != IntPtr.Zero) 783return IntPtr.Zero; 807IntPtr updownHwnd = this.GetUpDownHwnd (); 809if (updownHwnd == IntPtr.Zero) 816int newPos = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 817int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 856Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 857Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 867static internal bool SupportMultipleSelection (IntPtr hwnd) 908internal WindowsTabItem(IntPtr hwnd, ProxyFragment parent, int item, bool fIsWinform) 974IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1011Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1042IntPtr hwndChild = GetItemHwndByIndex(); 1043if (hwndChild != IntPtr.Zero && SafeNativeMethods.IsWindowVisible(hwndChild)) 1157Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero); 1237internal static string GetName(IntPtr hwnd, int item, bool fIsWinform) 1245internal static int GetCurrentSelectedItem(IntPtr hwnd) 1247return Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 1263return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item; 1285return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty; 1305if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1307Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1308Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1314Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1320private IntPtr GetItemHwndByIndex() 1324IntPtr hwndParent = _hwnd; 1330if (hwndParent != IntPtr.Zero) 1338return Misc.FindWindowEx(hwndParent, IntPtr.Zero, null, sName); 1342return IntPtr.Zero; 1346private static string GetItemText(IntPtr hwnd, int itemIndex) 1397internal WindowsTabChildOverrideProxy(IntPtr hwnd, ProxyFragment parent, int item)
MS\Internal\AutomationProxies\WindowsTitleBar.cs (10)
34public WindowsTitleBar (IntPtr hwnd, ProxyFragment parent, int item) 116int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y)); 155internal static bool HasTitleBar (IntPtr hwnd) 221private static bool IsTitleBarVisible (IntPtr hwnd) 251public TitleBarButton (IntPtr hwnd, ProxyFragment parent, int item) 436Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero); 450Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (28)
31protected WindowsToolbar (IntPtr hwnd, ProxyFragment parent, int item) 48internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 53internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 80internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 235int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero); 306if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 336return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero); 362internal ToolbarItem(IntPtr hwnd, ProxyFragment parent, int item, int idCommand) 375bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0; 376int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero); 387IntPtr hwndParent = Misc.GetParent(_hwnd); 435if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 475return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 521Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 565internal static Rect GetBoundingRectangle(IntPtr hwnd, int item) 583return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item; 605int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 642IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 650|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 657if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 684if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarAsMenu.cs (1)
29internal WindowsToolbarAsMenu(IntPtr hwnd, ProxyFragment parent, int item, Accessible acc)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (3)
29internal ToolbarItemAsMenuItem(IntPtr hwnd, ProxyFragment parent, int item, int idCommand, Accessible acc) 74if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 80if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTooltip.cs (13)
34WindowsTooltip (IntPtr hwnd, ProxyFragment parent, int item) 50internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 55private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 66internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 97WinEventTracker.AddToNotificationList( IntPtr.Zero, new WinEventTracker.ProxyRaiseEvents( OnToolTipEvents ), _toolTipEventIds, _toolTipEventIds.Length ); 114WinEventTracker.RemoveToNotificationList( IntPtr.Zero, _toolTipEventIds, new WinEventTracker.ProxyRaiseEvents( OnToolTipEvents ), _toolTipEventIds.Length ); 147private static void OnToolTipEvents( IntPtr hwnd, int eventId, object idProp, int idObject, int idChild ) 173private static bool IsToolTip( IntPtr hwnd ) 248IntPtr hwnd = UnsafeNativeMethods.WindowFromPhysicalPoint(pt.x, pt.y); 249if (hwnd == IntPtr.Zero) 306IntPtr hwnd = UnsafeNativeMethods.WindowFromPhysicalPoint(pt.x, pt.y); 307if (hwnd == IntPtr.Zero) 312int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsTreeView.cs (127)
29internal WindowsTreeView (IntPtr hwnd, ProxyFragment parent, int item) 48internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 53private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 62internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 162IntPtr hNext = GetNextItem (_hwnd, ((TreeViewItem) child)._hItem); 164if (hNext != IntPtr.Zero) 189IntPtr hPrev = GetPreviousItem (_hwnd, ((TreeViewItem) child)._hItem); 191return hPrev != IntPtr.Zero ? new TreeViewItem (_hwnd, this, hPrev, (int) TVItem.TopLevel) : null; 195IntPtr hChild = GetRoot (_hwnd); 197if (hChild != IntPtr.Zero) 200IntPtr temp; 202for (temp = GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = GetNextItem (_hwnd, hChild)) 216IntPtr hChild = IntPtr.Zero; 219if (hChild != IntPtr.Zero) 239IntPtr hChild = GetRoot (_hwnd); 241if (hChild != IntPtr.Zero) 244for (IntPtr temp = GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = GetNextItem (_hwnd, hChild)) 258IntPtr hItem = XSendMessage.HitTestTreeView(_hwnd, x, y); 259if (hItem != IntPtr.Zero) 269IntPtr treeItem = GetSelection (_hwnd); 271if (treeItem != IntPtr.Zero) 286IntPtr treeItem = GetSelection(_hwnd); 288if (treeItem == IntPtr.Zero) 309return (IntPtr.Zero != GetSelection (_hwnd)); 380private ProxyFragment CreateTreeViewItem (IntPtr hItem, int depth) 385private ProxyFragment CreateTreeViewItemAndParents (IntPtr hItem) 390private ProxyFragment CreateParents (IntPtr hwnd, IntPtr hItem) 392IntPtr hItemParent = Parent (hwnd, hItem); 394if (hItemParent == IntPtr.Zero) 411private static bool Expand (IntPtr hwnd, IntPtr treeItem) 417private static bool Collapse (IntPtr hwnd, IntPtr treeItem) 423private static bool IsItemExpanded (IntPtr hwnd, IntPtr treeItem) 435private static bool SelectItem (IntPtr hwnd, IntPtr treeItem) 451private static IntPtr GetSelection (IntPtr hwnd) 453return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_CARET); 461private static IntPtr Parent (IntPtr hwnd, IntPtr treeItem) 467private static IntPtr GetNextItem (IntPtr hwnd, IntPtr treeItem) 473private static IntPtr GetPreviousItem (IntPtr hwnd, IntPtr treeItem) 479private static IntPtr GetRoot (IntPtr hwnd) 481return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_ROOT); 485private static IntPtr GetFirstChild (IntPtr hwnd, IntPtr treeItem) 495private static int GetCheckState (IntPtr hwnd, IntPtr treeItem) 503private unsafe static bool SetCheckState (IntPtr hwnd, IntPtr item, bool check) 523private static IntPtr GetNext (IntPtr hwnd, IntPtr treeItem, int flag) 529private static int GetItemState (IntPtr hwnd, IntPtr treeItem, int stateMask) 535private static bool TreeViewItem_HasChildren (IntPtr hwnd, IntPtr item) 550private static unsafe NativeMethods.Win32Rect GetItemRect (IntPtr hwnd, IntPtr treeItem, bool labelOnly) 557*((IntPtr *)&(rc.left)) = treeItem; 559IntPtr rectangle = new IntPtr (&(rc.left)); 560IntPtr partialDisplay = (labelOnly) ? new IntPtr (1) : IntPtr.Zero; 571return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty; 577private static bool GetItem (IntPtr hwnd, IntPtr item, int mask, out NativeMethods.TVITEM treeItem) 586private static string GetItemText(IntPtr hwnd, IntPtr item) 596private static bool SetItemText(IntPtr hwnd, IntPtr item, string text) 602IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item); 604if (hwndEdit == IntPtr.Zero) 613if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1) 616Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero); 624Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero); 648private static IntPtr TreeItemFromChildID(IntPtr hwnd, int idChild) 650IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 652if (hItem != IntPtr.Zero) 661int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 664return IntPtr.Zero; 724internal TreeViewItem (IntPtr hwnd, ProxyFragment parent, IntPtr hItem, int depth) 870IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 915return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero; 1013if (selectionRequired || WindowsTreeView.GetSelection(_hwnd) != IntPtr.Zero) 1235Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem); 1323IntPtr hNext = WindowsTreeView.GetNextItem (_hwnd, ((TreeViewItem) child)._hItem); 1325return hNext != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hNext, _item + 1) : null; 1333IntPtr hPrev = WindowsTreeView.GetPreviousItem (_hwnd, ((TreeViewItem) child)._hItem); 1335return hPrev != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hPrev, _item + 1) : null; 1341IntPtr hChild = WindowsTreeView.GetFirstChild (_hwnd, _hItem); 1343return hChild != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hChild, _item + 1) : null; 1354IntPtr hChild = WindowsTreeView.GetFirstChild (_hwnd, _hItem); 1356if (hChild != IntPtr.Zero) 1359for (IntPtr temp = WindowsTreeView.GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = WindowsTreeView.GetNextItem (_hwnd, hChild)) 1472if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1544Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1545Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1572IntPtr address = UnsafeNativeMethods.GetProp(_hwnd, "MSAAStateImageMapAddr"); 1573if (address == IntPtr.Zero) 1600IntPtr count; 1603IntPtr pAddress = new IntPtr((long)address + (image * readSize)); 1633return UnsafeNativeMethods.GetProp(_hwnd, "MSAAStateImageMapAddr") != IntPtr.Zero; 1640if (_hItem == IntPtr.Zero) 1643int childId = Misc.ProxySendMessageInt(_hwnd, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero); 1669internal IntPtr _hItem;
MS\Internal\AutomationProxies\WindowsUpDown.cs (36)
31internal WindowsUpDown (IntPtr hwnd, ProxyFragment parent, int item) 50internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 55internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 64internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 79private static void RaiseInvokedEvent(IntPtr hwnd, int idObject, int idChild) 231Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0)); 234Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 297IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 299if (hwndParent != IntPtr.Zero) 309internal static bool IsWinformUpdown (IntPtr hwnd) 348int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 359private static IntPtr HwndBuddy(IntPtr hwnd) 361IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 364if (hwndBuddy == IntPtr.Zero) 375IntPtr hwndBuddy = HwndBuddy(_hwnd); 376return hwndBuddy != IntPtr.Zero && Misc.ProxyGetClassName(hwndBuddy).IndexOf("EDIT", StringComparison.OrdinalIgnoreCase) != -1; 385int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 399int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 428internal SpinButtonItem (IntPtr hwnd, ProxyFragment parent, int item) 481IntPtr hwndTabParent = GetTabParent(); 482if (hwndTabParent != IntPtr.Zero) 547IntPtr center = NativeMethods.Util.MAKELPARAM (x, y); 550Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center); 551Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center); 564static internal Rect GetBoundingRectangle(IntPtr hwnd, WindowsUpDown.SpinItem item) 626private IntPtr GetTabParent() 628IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 630if (hwndParent != IntPtr.Zero) 633hwndParent = Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero; 639private static bool IsHorizontal(IntPtr hwnd)
MS\Internal\AutomationProxies\WinEventTracker.cs (15)
52static internal void AddToNotificationList (IntPtr hwnd, ProxyRaiseEvents raiseEvents, EvtIdProperty[] aEvtIdProp, int cProps) 82static internal void RemoveToNotificationList (IntPtr hwnd, EvtIdProperty[] aEvtIdProp, ProxyRaiseEvents raiseEvents, int cProps) 99internal delegate void ProxyRaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild); 128internal IntPtr _winEventHook; 181hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); 202private static void WinEventProc (int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime) 204if (hwnd == IntPtr.Zero) 248if (ecp._hwnd == hwnd || ecp._hwnd == IntPtr.Zero) 300if ((ecp._hwnd == IntPtr.Zero)) 346private static void BuildEventsList (EventFlag eFlag, IntPtr hwnd, ProxyRaiseEvents raiseEvents, EvtIdProperty[] aEvtIdProp, int cProps) 365if (hwnd == IntPtr.Zero) 421if ( (hwnd == IntPtr.Zero || ecp._hwnd == hwnd) && 461Debug.Assert (hwnd == IntPtr.Zero, @"BuildEventsList: event is global but hwnd is not null"); 607internal IntPtr _hwnd; 615internal EventCreateParams (IntPtr hwnd, object idProp, ProxyRaiseEvents raiseEvents)
MS\Internal\AutomationProxies\WinFormsSpinner.cs (16)
31internal WinformsSpinner(IntPtr hwnd, IntPtr hwndEdit, IntPtr hwndUpDown, ProxyFragment parent, int item) 110internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 115internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 132IntPtr hwndFirstChild = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 133if (hwndFirstChild == IntPtr.Zero) 139IntPtr hwndLastChild = Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDLAST); 140if (hwndLastChild == IntPtr.Zero) 153IntPtr hwndEdit; 154IntPtr hwndSpin; 310IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd(IntPtr hwnd) 432private bool IsEdit(IntPtr hwnd) 492internal WinformsSpinnerEdit(IntPtr hwnd, IntPtr hwndEdit, IntPtr hwndUpDown, ProxyFragment parent, int item)
MS\Win32\NativeMethods.cs (90)
627public static int IntPtrToInt32(IntPtr intPtr) 632internal unsafe delegate bool EnumChildrenCallbackVoid(IntPtr hwnd, void* lParam); 637internal IntPtr hwnd; 639internal IntPtr wParam; 640internal IntPtr lParam; 686internal IntPtr hwndFrom; 701internal IntPtr iString; 812internal IntPtr pszText; 815internal IntPtr lParam; 828internal IntPtr pszText; 831internal IntPtr lParam; 835internal IntPtr puColumns; 876internal IntPtr pszHeader; 878internal IntPtr pszFooter; 889pszHeader = pszFooter = IntPtr.Zero; 902internal IntPtr pszHeader; 904internal IntPtr pszFooter; 912internal IntPtr pszSubtitle; 914internal IntPtr pszTask; 916internal IntPtr pszDescriptionTop; 918internal IntPtr pszDescriptionBottom; 924internal IntPtr pszSubsetTitle; // NULL if group is not subset 932pszHeader = pszFooter = IntPtr.Zero; 938pszSubtitle = IntPtr.Zero; 940pszTask = IntPtr.Zero; 942pszDescriptionTop = IntPtr.Zero; 944pszDescriptionBottom = IntPtr.Zero; 950pszSubsetTitle = IntPtr.Zero; // NULL if group is not subset 1051internal static IntPtr MAKELPARAM (int low, int high) 1053return (IntPtr)((high << 16) | (low & 0xffff)); 1296internal IntPtr lpMinimumApplicationAddress; 1297internal IntPtr lpMaximumApplicationAddress; 1298internal IntPtr dwActiveProcessorMask; 1402internal IntPtr dwExtraInfo; 1412internal IntPtr dwExtraInfo; 1478internal IntPtr hwndCombo; 1479internal IntPtr hwndItem; 1480internal IntPtr hwndList; 1488hwndCombo = IntPtr.Zero; 1489hwndItem = IntPtr.Zero; 1490hwndList = IntPtr.Zero; 1500internal IntPtr hMenu; 1501internal IntPtr hwndMenu; 1516internal IntPtr hwndActive; 1517internal IntPtr hwndFocus; 1518internal IntPtr hwndCapture; 1519internal IntPtr hwndMenuOwner; 1520internal IntPtr hwndMoveSize; 1521internal IntPtr hwndCaret; 1562internal IntPtr hSubMenu; 1563internal IntPtr hbmpChecked; 1564internal IntPtr hbmpUnchecked; 1565internal IntPtr dwItemData; 1566internal IntPtr dwTypeData; 1568internal IntPtr hbmpItem; 1589internal IntPtr lpText; 1592internal IntPtr hwndChild; 1596internal IntPtr hbmBack; 1602internal IntPtr lParam; 1640internal IntPtr hItem; 1643internal IntPtr pszText; 1648internal IntPtr lParam; 1650internal void Init (IntPtr item) 1656pszText = IntPtr.Zero; 1661lParam = IntPtr.Zero; 1670internal IntPtr hItem; 1677hItem = IntPtr.Zero; 1788public delegate void WinEventProcDef(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime); 1812internal IntPtr pszText; 1815internal IntPtr lParam; 1822pszText = IntPtr.Zero; 1825lParam = IntPtr.Zero; 1833pszText = IntPtr.Zero; 1836lParam = IntPtr.Zero; 1863internal IntPtr pszText; 1864internal IntPtr hbm; 1867internal IntPtr lParam; 1871internal IntPtr pvFilter; 1877pszText = IntPtr.Zero; 1878hbm = IntPtr.Zero; 1881lParam = IntPtr.Zero; 1885pvFilter = IntPtr.Zero; 1932internal IntPtr hwnd; 1935internal IntPtr hinst; 1936internal IntPtr pszText; 1937internal IntPtr lParam; 1943hwnd = IntPtr.Zero; 1946hinst = IntPtr.Zero; 1947pszText = IntPtr.Zero; 1948lParam = IntPtr.Zero;
MS\Win32\SafeNativeMethods.cs (3)
26internal static extern bool IsWindowEnabled(IntPtr hWnd); 28internal static extern bool IsWindowVisible(IntPtr hWnd); 36internal static extern IntPtr GetShellWindow();
MS\Win32\UnsafeNativeMethods.cs (116)
23internal static extern int GetDeviceCaps(IntPtr hdc, int nIndex); 25internal static extern int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf); 27internal static extern IntPtr SelectObject(IntPtr hdc, IntPtr hObject); 29internal static extern IntPtr GetStockObject(int nIndex); 32internal static extern bool CloseHandle(IntPtr h); 34internal static extern IntPtr OpenProcess(int flags, bool inherit, uint dwProcessId); 48internal static extern IntPtr GlobalLock(IntPtr handle); 50internal static extern bool GlobalUnlock(IntPtr handle); 53internal static extern IntPtr VirtualAlloc(IntPtr address, UIntPtr size, int allocationType, int protect); 55internal static extern IntPtr VirtualAllocEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int allocationType, int protect); 57internal static extern bool VirtualFree(IntPtr address, UIntPtr size, int freeType); 59internal static extern bool VirtualFreeEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int freeType); 69internal static extern bool ReadProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr Source, IntPtr Dest, IntPtr /*SIZE_T*/ size, out IntPtr /*SIZE_T*/ bytesRead); 71internal static extern bool ReadProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr Source, MS.Internal.AutomationProxies.SafeCoTaskMem destAddress, IntPtr /*SIZE_T*/ size, out IntPtr /*SIZE_T*/ bytesRead); 73internal static extern bool WriteProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr Dest, IntPtr sourceAddress, IntPtr /*SIZE_T*/ size, out IntPtr /*SIZE_T*/ bytesWritten); 78internal static extern int AccessibleObjectFromWindow(IntPtr hwnd, int idObject, ref Guid iid, [In, Out, MarshalAs(UnmanagedType.IUnknown)] ref object ppvObject); 80internal static extern int ObjectFromLresult(IntPtr lResult, ref Guid iid, IntPtr wParam, [In, Out] ref IAccessible ppvObject); 82public static extern int WindowFromAccessibleObject(IAccessible acc, ref IntPtr hwnd); 90internal static extern IntPtr GetProcessHandleFromHwnd(IntPtr hwnd); 104internal IntPtr ptd; 114internal IntPtr hGlobal; 115internal IntPtr pUnkForRelease; 119internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags); 122internal static extern bool UnhookWinEvent(IntPtr winEventHook); 134internal static extern int MsgWaitForMultipleObjects(int nCount, IntPtr[] handles, bool fWaitAll, int dwMilliseconds, int dwWakeMask); 140public static extern IntPtr GetMenu(IntPtr hwnd); 142public static extern IntPtr GetSubMenu(IntPtr hmenu, int nPos); 144public static extern int GetMenuState(IntPtr hmenu, int uIDCheckItem, int uCheck); 146public static extern int GetMenuString (IntPtr hMenu, int uIDItem, StringBuilder lpString, int nMaxCount, uint uFlag); 148public static extern int GetMenuString (IntPtr hMenu, int uIDItem, IntPtr lpString, int nMaxCount, uint uFlag); 150public static extern int GetMenuItemCount(IntPtr hmenu); 152public static extern int GetMenuItemID(IntPtr hmenu, int uCheck); 154public static extern bool GetMenuItemInfo(IntPtr hMenu, int uItem, bool fByPosition, [In, Out] ref NativeMethods.MENUITEMINFO menuItemInfo); 156public static extern bool GetMenuItemRect(IntPtr hWnd, IntPtr hMenu, int uItem, out NativeMethods.Win32Rect lprcItem); 164internal static extern IntPtr DispatchMessage([In] ref NativeMethods.MSG msg); 166internal static extern int GetMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hWnd, int uMsgFilterMin, int uMsgFilterMax); 168internal static extern bool PeekMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hwnd, int uMsgFilterMin, int uMsgFilterMax, int wRemoveMsg); 170internal static extern bool PostMessage(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam); 172internal static extern IntPtr SendMessageTimeout (IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, int flags, int uTimeout, out IntPtr pResult); 174internal static extern IntPtr SendMessageTimeout (IntPtr hwnd, int uMsg, IntPtr wParam, StringBuilder lParam, int flags, int uTimeout, out IntPtr result); 176internal static extern IntPtr SendMessageTimeout(IntPtr hwnd, int uMsg, IntPtr wParam, ref NativeMethods.Win32Rect lParam, int flags, int uTimeout, out IntPtr result); 178internal static extern IntPtr SendMessageTimeout(IntPtr hwnd, int uMsg, IntPtr wParam, ref UnsafeNativeMethods.TITLEBARINFOEX lParam, int flags, int uTimeout, out IntPtr result); 180internal static extern IntPtr SendMessageTimeout(IntPtr hwnd, int uMsg, out int wParam, out int lParam, int flags, int uTimeout, out IntPtr result); 190internal static extern IntPtr MonitorFromRect(ref NativeMethods.Win32Rect rect, int dwFlags); 198internal static extern bool RegisterHotKey(IntPtr hwnd, int atom, int fsModifiers, int vk); 204internal static extern bool UnregisterHotKey(IntPtr hwnd, int atom); 233internal static extern bool GetComboBoxInfo(IntPtr hwnd, [In, Out] ref NativeMethods.COMBOBOXINFO cbInfo); 253internal static extern bool GetScrollBarInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollBarInfo lpsi); 255internal static extern bool GetScrollInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollInfo lpsi); 261internal unsafe static extern bool EnumChildWindows(IntPtr hwndParent, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam); 265internal static extern IntPtr GetDesktopWindow(); 267internal static extern bool GetClientRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect); 271public static extern bool GetTitleBarInfo(IntPtr hwnd, ref TITLEBARINFO pti); 273internal static extern bool GetWindowRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect); 275internal static extern uint GetWindowThreadProcessId(IntPtr hwnd, out uint dwProcessId); 277internal static extern bool IsWindow(IntPtr hWnd); 279internal static extern uint RealGetWindowClass(IntPtr hwnd, StringBuilder className, uint maxCount); 281internal static extern bool SetForegroundWindow(IntPtr hWnd); 284internal static extern bool GetAltTabInfo(IntPtr hwnd, int iItem, ref ALTTABINFO pati, 313private static extern IntPtr IntWindowFromPoint(POINT pt); 316private static extern IntPtr IntWindowFromPhysicalPoint(POINT pt); 318public static IntPtr WindowFromPhysicalPoint(int x, int y) 348internal delegate bool EnumThreadWndProc(IntPtr hwnd, ref ENUMTOOLTIPWINDOWINFO lParam); 353internal IntPtr hwnd; 361internal IntPtr hwnd; 370internal static extern int GetClassName(IntPtr hwnd, StringBuilder className, int maxCount); 375internal static Int32 GetWindowLong(IntPtr hWnd, int nIndex, out int error) 378IntPtr result = IntPtr.Zero; 381if (IntPtr.Size == 4) 396if ((result == IntPtr.Zero) && (error != 0)) 415internal static extern IntPtr GetProp(IntPtr hwnd, string name); 434internal static extern IntPtr GetDC(IntPtr hWnd); 436internal static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); 470public IntPtr szID; 471public IntPtr szURL;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (18)
46public static extern Int32 GetWindowLong(IntPtr hWnd, int nIndex ); 49public static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex ); 71public static extern IntPtr GetAncestor(IntPtr hwnd, int gaFlags); 74public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string className, string wndName); 77public static extern bool GetMenuBarInfo (IntPtr hwnd, int idObject, uint idItem, ref NativeMethods.MENUBARINFO mbi); 80public static extern int GetTextExtentPoint32(IntPtr hdc, [MarshalAs(UnmanagedType.LPWStr)]string lpString, int cbString, out NativeMethods.SIZE lpSize); 83public static extern IntPtr GetWindow(IntPtr hWnd, int uCmd); 86public static extern int GetWindowText(IntPtr hWnd, [Out] StringBuilder lpString, int nMaxCount); 89public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Rect rect, int cPoints); 92public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Point pt, int cPoints); 95public static extern int SetScrollPos(IntPtr hWnd, int nBar, int nPos, bool bRedraw);
UIAutomationProvider (19)
MS\Internal\Automation\UiaCoreProviderApi.cs (11)
33internal static IntPtr UiaReturnRawElementProvider(IntPtr hwnd, IntPtr wParam, IntPtr lParam, IRawElementProviderSimple el) 38internal static IRawElementProviderSimple UiaHostProviderFromHwnd(IntPtr hwnd) 107Marshal.ThrowExceptionForHR(hr, (IntPtr)(-1)); 119private static extern IntPtr RawUiaReturnRawElementProvider(IntPtr hwnd, IntPtr wParam, IntPtr lParam, IRawElementProviderSimple el); 122private static extern int RawUiaHostProviderFromHwnd(IntPtr hwnd, [MarshalAs(UnmanagedType.Interface)] out IRawElementProviderSimple provider);
System\Windows\Automation\Provider\AutomationInteropProvider.cs (7)
62public static IRawElementProviderSimple HostProviderFromHandle ( IntPtr hwnd ) 64ValidateArgument(hwnd != IntPtr.Zero, nameof(SR.HwndMustBeNonNULL)); 76public static IntPtr ReturnRawElementProvider (IntPtr hwnd, IntPtr wParam, IntPtr lParam, IRawElementProviderSimple el ) 78ValidateArgument( hwnd != IntPtr.Zero, nameof(SR.HwndMustBeNonNULL));
System\Windows\Automation\Provider\IRawElementProviderHwndOverride.cs (1)
33IRawElementProviderSimple GetOverrideProviderForHwnd( IntPtr hwnd );
UIAutomationTypes (299)
MS\Internal\Automation\UiaCoreTypesApi.cs (6)
74IntPtr automationCoreHandle = LoadLibraryHelper.SecureLoadLibraryEx(DllImport.UIAutomationCore, IntPtr.Zero, UnsafeNativeMethods.LoadLibraryFlags.LOAD_LIBRARY_SEARCH_SYSTEM32); 75if (automationCoreHandle != IntPtr.Zero) 77IntPtr entryPoint = UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, automationCoreHandle), StartListeningExportName); 78if (entryPoint != IntPtr.Zero) 104Marshal.ThrowExceptionForHR(hr, (IntPtr)(-1));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\HandleCollector.cs (4)
23internal static IntPtr Add(IntPtr handle, int type) { 62internal static IntPtr Remove(IntPtr handle, int type) {
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\LoadLibraryHelper.cs (6)
33var hModule = IntPtr.Zero; 38hModule != IntPtr.Zero) 43UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, hModule), AddDllDirectoryName) != IntPtr.Zero; 74internal static IntPtr SecureLoadLibraryEx(string lpFileName, IntPtr hFile, UnsafeNativeMethods.LoadLibraryFlags dwFlags)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (82)
104public static IntPtr InvalidIntPtr = (IntPtr)(-1); 105public static IntPtr LPSTR_TEXTCALLBACK = (IntPtr)(-1); 106public static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 902public static HandleRef HWND_TOP = new HandleRef(null, (IntPtr)0); 903public static HandleRef HWND_BOTTOM = new HandleRef(null, (IntPtr)1); 2989public IntPtr hwndTrack = IntPtr.Zero; 3014public delegate IntPtr WndProc(IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam); 3138public IntPtr hdc; 3698public IntPtr hSubMenu = IntPtr.Zero; 3699public IntPtr hbmpChecked = IntPtr.Zero; 3700public IntPtr hbmpUnchecked = IntPtr.Zero; 3754public delegate bool EnumThreadWindowsCallback(IntPtr hWnd, IntPtr lParam); 3760internal IntPtr hdr_hwndFrom; 3761internal IntPtr hdr_idFrom; 3764internal IntPtr lpOFN; 3765internal IntPtr pszFile; 3772public IntPtr hwndOwner; 3773public IntPtr hInstance; 3775public IntPtr lpstrCustomFilter; 3778public IntPtr lpstrFile; 3780public IntPtr lpstrFileTitle; 3788public IntPtr lCustData; 3791public IntPtr pvReserved; 4214public IntPtr hwndFrame; 4215public IntPtr hAccel; 4339public IntPtr hAccel; 4371public SecurityCriticalDataForSet<IntPtr> data1; 4373public SecurityCriticalDataForSet<IntPtr> data2; 4383if ((this.vt == (int)tagVT.VT_UNKNOWN || this.vt == (int)tagVT.VT_DISPATCH) && this.data1.Value != IntPtr.Zero) { 4387if (this.vt == (int)tagVT.VT_BSTR && this.data1.Value != IntPtr.Zero) { 4391this.data1.Value = this.data2.Value = IntPtr.Zero; 4498private static extern IntPtr SysAllocString([In, MarshalAs(UnmanagedType.LPWStr)]string s); 4501private static extern void SysFreeString(IntPtr pbstr); 4503data1.Value = (IntPtr)(lVal & 0xFFFFFFFF); 4504data2.Value = (IntPtr)((lVal >> 32) & 0xFFFFFFFF); 4507public IntPtr ToCoTaskMemPtr() { 4508IntPtr mem = Marshal.AllocCoTaskMem(16); 4519IntPtr val = data1.Value; 4532val = (IntPtr) Marshal.ReadByte(val); 4538val = (IntPtr) Marshal.ReadByte(val); 4545val = (IntPtr) Marshal.ReadInt16(val); 4551val = (IntPtr) Marshal.ReadInt16(val); 4558val = (IntPtr) Marshal.ReadInt32(val); 4565val = (IntPtr) Marshal.ReadInt32(val); 4625return (val != IntPtr.Zero); 4665private static IntPtr GetRefInt(IntPtr value) { 4739public delegate void TimerProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); 5018public IntPtr lpszDefaultScheme; 5038public IntPtr rgvarg; 5039public IntPtr rgdispidNamedArgs; 5070public IntPtr pvReserved; 5072public IntPtr pfnDeferredFillIn; 5141public IntPtr hwnd; 5142public IntPtr hwndInsertAfter; 5885internal abstract IntPtr AllocCoTaskMem(); 5887internal abstract void PutCoTaskMem(IntPtr ptr); 5908internal override IntPtr AllocCoTaskMem() 5910IntPtr result = Marshal.AllocCoTaskMem(buffer.Length); 5932internal override void PutCoTaskMem(IntPtr ptr) 5966internal override IntPtr AllocCoTaskMem() 5968IntPtr result = Marshal.AllocCoTaskMem(buffer.Length * 2); 5989internal override void PutCoTaskMem(IntPtr ptr) 6675internal delegate void WinEventProcDef (int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, int eventTime); 6709public IntPtr hDevice; 7012public static readonly IntPtr WTS_CURRENT_SERVER_HANDLE = IntPtr.Zero; 7227internal delegate bool MonitorEnumProc(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsOther.cs (39)
117void GetWindow( /* [out] */ ref IntPtr phwnd) ; 153IntPtr pCmdText); 220internal static extern IntPtr SetEnhMetaFileBits(uint cbBuffer, byte[] buffer); 272internal static BitmapHandle CreateFromHandle(IntPtr hbitmap, bool ownsHandle=true) 300internal IntPtr CriticalGetHandle() 323public static int SignedHIWORD(IntPtr intPtr) 328public static int SignedLOWORD(IntPtr intPtr) 350public static int IntPtrToInt32(IntPtr intPtr) 361public static IntPtr HWND_MESSAGE = new IntPtr(-3); 371public IntPtr lpfnWndProc = IntPtr.Zero; 377public IntPtr hInstance = IntPtr.Zero; 379public IntPtr hIcon = IntPtr.Zero; 381public IntPtr hCursor = IntPtr.Zero; 383public IntPtr hbrBackground = IntPtr.Zero; 385public IntPtr lpszMenuName = IntPtr.Zero; 387public IntPtr lpszClassName = IntPtr.Zero; 389public IntPtr hIconSm = IntPtr.Zero; 579 public SafeLocalMemHandle(IntPtr existingHandle, bool ownsHandle) : base(ownsHandle) 586 return (LocalFree(base.handle) == IntPtr.Zero); 590 private static extern IntPtr LocalFree(IntPtr hMem); 644public IntPtr hInstance = IntPtr.Zero; 646public IntPtr hIcon = IntPtr.Zero; 648public IntPtr hCursor = IntPtr.Zero; 650public IntPtr hbrBackground = IntPtr.Zero; 656public IntPtr hIconSm = IntPtr.Zero;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (18)
104public static extern IntPtr GetAncestor(IntPtr hwnd, int gaFlags); 107public static extern int GetKeyboardLayoutList(int size, [Out, MarshalAs(UnmanagedType.LPArray)] IntPtr[] hkls); 110public static extern IntPtr GetParent(HandleRef hWnd); 113public static extern IntPtr GetWindow(IntPtr hWnd, int uCmd); 119public static extern Int32 GetWindowLong(IntPtr hWnd, int nIndex ); 125public static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex); 128public static extern IntPtr GetWindowLongPtr(HandleRef hWnd, int nIndex); 143public static extern IntPtr SetFocus(HandleRef hWnd); 149public static extern Int32 SetWindowLong(IntPtr hWnd, int nIndex, Int32 dwNewLong); 155public static extern IntPtr SetWindowLongPtr(HandleRef hWnd, int nIndex, IntPtr dwNewLong); 158public static extern IntPtr SetWindowLongPtr(IntPtr hWnd, int nIndex, IntPtr dwNewLong); 161public static extern IntPtr SetWindowLongPtrWndProc(HandleRef hWnd, int nIndex, NativeMethods.WndProc dwNewLong);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (144)
64public static extern IntPtr GetCurrentThread(); 75public static extern IntPtr GetWindow(HandleRef hWnd, int uCmd); 84public static extern IntPtr OpenProcess(int dwDesiredAccess, bool fInherit, int dwProcessId); 100public static extern IntPtr CreateCompatibleBitmap(HandleRef hDC, int width, int height); 103public static extern IntPtr CriticalCreateCompatibleBitmap(HandleRef hDC, int width, int height); 106public static extern IntPtr CriticalGetStockObject(int stockObject); 109public static extern int CriticalFillRect(IntPtr hdc, ref NativeMethods.RECT rcFill, IntPtr brush); 119HandleCollector.Remove((IntPtr)hObject, NativeMethods.CommonHandles.GDI); 129HandleCollector.Remove((IntPtr)hObject, NativeMethods.CommonHandles.GDI); 148public static extern IntPtr SelectObject(HandleRef hdc, IntPtr obj); 151public static extern IntPtr SelectObject(HandleRef hdc, NativeMethods.BitmapHandle obj); 154public static extern IntPtr CriticalSelectObject(HandleRef hdc, IntPtr obj); 169public static extern bool CriticalRedrawWindow(HandleRef hWnd, IntPtr lprcUpdate, IntPtr hrgnUpdate, int flags); 175public static extern IntPtr ShellExecute(HandleRef hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd); 182public IntPtr hwnd; 188public IntPtr hInstApp; 189public IntPtr lpIDList; 191public IntPtr hkeyClass; 193public IntPtr hIcon; 194public IntPtr hProcess; 225public static extern int WideCharToMultiByte(int codePage, int flags, [MarshalAs(UnmanagedType.LPWStr)]string wideStr, int chars, [In,Out]byte[] pOutBytes, int bufferBytes, IntPtr defaultChar, IntPtr pDefaultUsed); 228public static extern void CopyMemoryW(IntPtr pdst, string psrc, int cb); 230public static extern void CopyMemoryW(IntPtr pdst, char[] psrc, int cb); 232public static extern void CopyMemory(IntPtr pdst, byte[] psrc, int cb); 310internal static extern int ObjectFromLresult(IntPtr lResult, ref Guid iid, IntPtr wParam, [In, Out] ref IAccessible ppvObject); 316private static extern int IntOleInitialize(IntPtr val); 320return IntOleInitialize(IntPtr.Zero); 338HandleCollector.Remove((IntPtr)handle, NativeMethods.CommonHandles.Kernel); 352public static extern int CreateStreamOnHGlobal(IntPtr hGlobal, bool fDeleteOnRelease, ref System.Runtime.InteropServices.ComTypes.IStream istream); 388HandleCollector.Remove((IntPtr)pvBaseAddress, NativeMethods.CommonHandles.Kernel); 429public static extern IntPtr GetFocus(); 513public static extern IntPtr GlobalAlloc(int uFlags, IntPtr dwBytes); 516public static extern IntPtr GlobalReAlloc(HandleRef handle, IntPtr bytes, int flags); 519public static extern IntPtr GlobalLock(HandleRef handle); 525public static extern IntPtr GlobalFree(HandleRef handle); 528public static extern IntPtr GlobalSize(HandleRef handle); 594internal static IntPtr SetFocus(HandleRef hWnd) 596IntPtr result = IntPtr.Zero; 608IntPtr result = IntPtr.Zero; 612internal static bool TrySetFocus(HandleRef hWnd, ref IntPtr result) 617if (result == IntPtr.Zero && errorCode != 0) 625internal static IntPtr GetParent(HandleRef hWnd) 627IntPtr retVal = NativeMethodsSetLastError.GetParent(hWnd); 630if (retVal == IntPtr.Zero && errorCode != 0) 639public static extern IntPtr GetAncestor(HandleRef hWnd, int flags); 657public static extern IntPtr SetParent(HandleRef hWnd, HandleRef hWndParent); 661private static extern IntPtr IntGetModuleHandle(string modName); 662internal static IntPtr GetModuleHandle(string modName) 664IntPtr retVal = IntGetModuleHandle(modName); 666if (retVal == IntPtr.Zero) 676public static extern IntPtr CallWindowProc(IntPtr wndProc, IntPtr hWnd, int msg, 677IntPtr wParam, IntPtr lParam); 680public static extern IntPtr DefWindowProc(IntPtr hWnd, Int32 Msg, IntPtr wParam, IntPtr lParam); 683public static extern IntPtr IntGetProcAddress(HandleRef hModule, string lpProcName); 685public static IntPtr GetProcAddress(HandleRef hModule, string lpProcName) 687IntPtr result = IntGetProcAddress(hModule, lpProcName); 688if(result == IntPtr.Zero) 704public static extern IntPtr GetProcAddressNoThrow(HandleRef hModule, string lpProcName); 707public static extern IntPtr LoadLibrary(string lpFileName); 873internal static extern IntPtr LoadLibraryEx([In][MarshalAs(UnmanagedType.LPTStr)]string lpFileName, IntPtr hFile, [In] LoadLibraryFlags dwFlags); 904[Out] out IntPtr hModule); 908internal static extern bool FreeLibrary([In] IntPtr hModule); 945public static extern IntPtr GetDesktopWindow(); 948public static extern IntPtr GetForegroundWindow(); 985private static extern IntPtr IntBeginPaint(HandleRef hWnd, [In, Out] ref NativeMethods.PAINTSTRUCT lpPaint); 987public static IntPtr BeginPaint(HandleRef hWnd, [In, Out, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint) { 999private static extern IntPtr IntGetDC(HandleRef hWnd); 1000public static IntPtr GetDC(HandleRef hWnd) 1002IntPtr hDc = IntGetDC(hWnd); 1003if(hDc == IntPtr.Zero) 1014HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 1023public static extern IntPtr GetActiveWindow(); 1045public static extern unsafe bool UpdateLayeredWindow(IntPtr hwnd, IntPtr hdcDst, NativeMethods.POINT* pptDst, NativeMethods.POINT* pSizeDst, IntPtr hdcSrc, NativeMethods.POINT* pptSrc, int crKey, ref NativeMethods.BLENDFUNCTION pBlend, int dwFlags); 1048public static extern IntPtr SetActiveWindow(HandleRef hWnd); 1059private static extern bool IntDestroyCursor(IntPtr hCurs); 1061public static bool DestroyCursor(IntPtr hCurs) { 1066private static extern bool IntDestroyIcon(IntPtr hIcon); 1068public static bool DestroyIcon(IntPtr hIcon) 1087private static extern bool IntDeleteObject(IntPtr hObject); 1089public static bool DeleteObject(IntPtr hObject) 1149HandleCollector.Remove((IntPtr)handle, NativeMethods.CommonHandles.Icon); 1246public static extern IntPtr IntCreateWindowEx(int dwExStyle, string lpszClassName, 1250public static IntPtr CreateWindowEx(int dwExStyle, string lpszClassName, 1253IntPtr retVal = IntCreateWindowEx(dwExStyle, lpszClassName, 1256if(retVal == IntPtr.Zero) 1274internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags); 1277internal static extern bool UnhookWinEvent(IntPtr winEventHook); 1279public delegate bool EnumChildrenCallback(IntPtr hwnd, IntPtr lParam); 1298public static extern IntPtr CreateRectRgn(int x1, int y1, int x2, int y2); 1431IntPtr GetWindow(); 1496IntPtr rgelt, 1497IntPtr pceltFetched); 1538IntPtr GetWindow(); 1568IntPtr hmenuShared, 1575IntPtr hmenuShared, 1577IntPtr holemenu, 1579IntPtr hwndActiveObject); 1584IntPtr hmenuShared); 1661IntPtr GetWindow(); 1694int GetWindow(out IntPtr hwnd); 1724int GetWindow( [Out]out IntPtr hwnd ); 1737int GetWindow( [Out]out IntPtr hwnd ); 1821IntPtr lpmsg, 1827IntPtr hwndParent, 1949IntPtr lpmsg, 1955IntPtr hwndParent, 2093IntPtr rgvar, 2138IntPtr buf, 2145IntPtr buf, 2478IntPtr pvaOut); 2891public unsafe static IntPtr ArrayToVARIANTVector(object[] args) 2893IntPtr mem = IntPtr.Zero; 2904Marshal.GetNativeVariantForObject(args[i], (IntPtr)(a + VariantSize * i)); 2910if (mem != IntPtr.Zero) 2922public unsafe static void FreeVARIANTVector(IntPtr mem, int len) 2932hrcurrent = UnsafeNativeMethods.VariantClear((IntPtr)(a + VariantSize * i)); 2961private static extern int VariantClear(IntPtr pObject); 3037IntPtr hDevice, 3053internal extern static IntPtr GetMenu([In] HandleRef hWnd); 3154IntPtr hdc, 3155IntPtr lprcClip, 3157IntPtr lParam);
WasmAppBuilder (3)
IcallTableGenerator.cs (1)
257nameof(IntPtr) => "intptr",
PInvokeTableGenerator.cs (1)
202nameof(IntPtr) => "void *",
SignatureMapper.cs (1)
41nameof(IntPtr) => 'I',
WindowsFormsIntegration (53)
MS\Win32\NativeMethods.cs (2)
16public static IntPtr HWND_TOP = IntPtr.Zero;
MS\Win32\SafeNativeMethods.cs (2)
35internal static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter,
MS\Win32\UnsafeNativeMethods.cs (13)
17public static extern bool IsChild(IntPtr hWndParent, IntPtr hwnd); 21public static extern IntPtr GetFocus(); 25internal static extern IntPtr SetParent(IntPtr hWnd, IntPtr hWndParent); 33public static extern IntPtr DispatchMessage([In] ref System.Windows.Interop.MSG msg); 37internal static extern IntPtr SendMessage(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam); 45private static extern DCSafeHandle IntCreateDC(string lpszDriver, string lpszDeviceName, string lpszOutput, IntPtr devMode); 51return IntCreateDC(lpszDriver, null, null, IntPtr.Zero); 57public static extern bool DeleteDC(IntPtr hDC);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (1)
41public static extern bool EnableWindow(IntPtr hWnd, bool enable);
System\Windows\Automation\Peers\WindowsFormsHostAutomationPeer.cs (2)
40IntPtr hwnd = wfh.Handle; 42if(hwnd != IntPtr.Zero)
System\Windows\Integration\ElementHost.cs (16)
228IntPtr focusHandle = UnsafeNativeMethods.GetFocus(); 263if (this.HwndSource != null && this.HwndSource.Handle != IntPtr.Zero) 595private IntPtr HwndSourceHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 628return IntPtr.Zero; // This value depends on the message being processed, see MSDN for the particular message. 700private void OnHwndSrcWmInputLangChange(int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 729private void OnHwndSrcWmImeNotify(int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 738if (wParam == (IntPtr)NativeMethods.IMN_SETCONVERSIONMODE || wParam == (IntPtr)NativeMethods.IMN_SETOPENSTATUS) 760private void OnHwndSourceMsgNotifyElementHost(int msg, IntPtr wParam, IntPtr lParam) 794if (!DesignMode && m.WParam == IntPtr.Zero)
System\Windows\Integration\HostUtils.cs (1)
400internal static int LOWORD(IntPtr ptr)
System\Windows\Integration\WindowsFormsHost.cs (16)
124protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 142private IntPtr OnWmGetObject(IntPtr wparam, IntPtr lparam) 144IntPtr result = IntPtr.Zero; 750private IntPtr _prevFocusHwnd = IntPtr.Zero; 770IntPtr focusHwnd = UnsafeNativeMethods.GetFocus(); 773if (IntPtr.Zero == _prevFocusHwnd ) { return; } 995(IntPtr)(uiAction | (toSet << 16)), 996IntPtr.Zero) != IntPtr.Zero)
xunit.console (12)
common\AssemblyResolution\AssemblyHelper.cs (3)
72protected override IntPtr LoadUnmanagedDll(string unmanagedDllName) 74var result = default(IntPtr);
common\AssemblyResolution\DependencyContextAssemblyCache.cs (4)
179public IntPtr LoadUnmanagedLibrary(string unmanagedLibraryName, Func<string, IntPtr> unmanagedAssemblyLoader) 181var result = default(IntPtr);
common\AssemblyResolution\Microsoft.DotNet.PlatformAbstractions\Native\NativeMethods.Darwin.cs (3)
33if (sysctl(name, 2, buf, len, IntPtr.Zero, 0) == 0 && *len < BUFFER_LENGTH) 35return Marshal.PtrToStringAnsi((IntPtr)buf, (int)*len); 51IntPtr newp,
common\AssemblyResolution\Microsoft.DotNet.PlatformAbstractions\RuntimeEnvironment.cs (1)
23return IntPtr.Size == 8 ? "x64" : "x86";
ConsoleRunner.cs (1)
181Console.WriteLine($"Microsoft.DotNet.XUnitConsoleRunner v{typeof(ConsoleRunner).Assembly.GetName().Version} ({IntPtr.Size * 8}-bit {platform})");