286 references to 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 (1)
NativeInterop\HttpServerSessionHandle.cs (1)
22SetHandle(new IntPtr(1));
Microsoft.AspNetCore.Server.IISIntegration (1)
IISMiddleware.cs (1)
178var handle = new IntPtr(hexHandle);
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 (3)
ManifestUtil\EmbeddedManifestReader.cs (1)
15private static readonly IntPtr s_id1 = new IntPtr(1);
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 (9)
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\SecurityHelper.cs (2)
149return Marshal.GetExceptionForHR(hr, new IntPtr(-1)); 156Marshal.ThrowExceptionForHR(hr, new IntPtr(-1));
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (1)
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 (2)
52UnsafeNativeMethods.SetProp(new HandleRef(this, sourceHandle), "MicrosoftTabletPenServiceProperty", new HandleRef(null, new IntPtr(MultiTouchEnabledFlag))); 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));
PresentationFramework (20)
Microsoft\Win32\CommonDialog.cs (1)
245return new IntPtr(1);
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 (3)
1353IntPtr lret = new IntPtr(requestSize); 1557return new IntPtr(1); 1759lret = UnsafeNativeMethods.SendMessage(hwndDefIme, s_MsImeMouseMessage, new IntPtr(wParam), himc);
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 (1)
39NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero);
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.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 (11)
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);
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 (183)
MS\Internal\AutomationProxies\Accessible.cs (1)
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 (89)
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)); 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())); 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); 691return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true); 709return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true); 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), 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), 891return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1003hitTestItem = new IntPtr(hitTestInfo32.hItem); 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); 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); 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\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\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 (11)
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; 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 (3)
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 (3)
244return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 395bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(ii.iGroup), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 705new IntPtr(_groupID), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (1)
77XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, new IntPtr(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewItem.cs (2)
974IntPtr keyUpLParam = new IntPtr (scanCode + (1 << 31) + (1 << 30)); 977Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode));
MS\Internal\AutomationProxies\WindowsMenu.cs (2)
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 (2)
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 (3)
182Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 287Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (1)
599int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (5)
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 (4)
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 (11)
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)); 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)); 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);