310 references to IntPtr
csc (1)
src\Compilers\Core\CommandLine\NativeMethods.cs (1)
55internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1);
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)
126new 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.Framework (2)
NativeMethods.cs (2)
67internal static IntPtr NullIntPtr = new IntPtr(0); 68internal static IntPtr InvalidHandle = new IntPtr(-1);
Microsoft.Build.Tasks.CodeAnalysis (1)
src\Compilers\Core\CommandLine\NativeMethods.cs (1)
55internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1);
Microsoft.Build.Tasks.Core (3)
ManifestUtil\EmbeddedManifestReader.cs (1)
14private static readonly IntPtr s_id1 = new IntPtr(1);
ManifestUtil\NativeMethods.cs (1)
14public static readonly IntPtr RT_MANIFEST = new IntPtr(24);
NativeMethods.cs (1)
530internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1);
Microsoft.Build.Utilities.UnitTests (1)
NativeMethods.cs (1)
25internal static readonly IntPtr InvalidHandle = new IntPtr(-1);
Microsoft.CodeAnalysis (2)
DiaSymReader\Utilities\InteropUtilities.cs (1)
20private static readonly IntPtr s_ignoreIErrorInfo = new IntPtr(-1);
Hashing\XxHash128.cs (1)
231Unsafe.WriteUnaligned(ref Unsafe.AddByteOffset(ref dest0, new IntPtr(sizeof(ulong))), low);
Microsoft.CodeAnalysis.CodeStyle (1)
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
231Unsafe.WriteUnaligned(ref Unsafe.AddByteOffset(ref dest0, new IntPtr(sizeof(ulong))), low);
Microsoft.CodeAnalysis.EditorFeatures (1)
Utilities\NativeMethods.cs (1)
14public static readonly IntPtr HWND_BROADCAST = new IntPtr(0xFFFF);
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
PDB\MethodDebugInfo.Native.cs (1)
58private static readonly IntPtr s_ignoreIErrorInfo = new IntPtr(-1);
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (1)
Debugger\Engine\DkmClrValue.cs (1)
96var intPtr = Environment.Is64BitProcess ? new IntPtr((long)RawValue) : new IntPtr((int)RawValue);
Microsoft.CodeAnalysis.Features (1)
SymbolSearch\Windows\NativePatching.cs (1)
28cbBuf = new IntPtr(cbBuf_);
Microsoft.CodeAnalysis.Workspaces (1)
src\Compilers\Core\Portable\Hashing\XxHash128.cs (1)
231Unsafe.WriteUnaligned(ref Unsafe.AddByteOffset(ref dest0, new IntPtr(sizeof(ulong))), low);
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);
Microsoft.VisualStudio.LanguageServices (5)
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
63private static readonly IntPtr s_docDataExisting_Unknown = new(-1);
Utilities\Exceptions.cs (4)
16Marshal.ThrowExceptionForHR(VSConstants.E_FAIL, new IntPtr(-1)); 24Marshal.ThrowExceptionForHR(VSConstants.E_INVALIDARG, new IntPtr(-1)); 32Marshal.ThrowExceptionForHR(VSConstants.E_NOTIMPL, new IntPtr(-1)); 40Marshal.ThrowExceptionForHR(VSConstants.E_UNEXPECTED, new IntPtr(-1));
MSBuildTaskHost (2)
NativeMethods.cs (2)
67internal static IntPtr NullIntPtr = new IntPtr(0); 68internal static IntPtr InvalidHandle = new IntPtr(-1);
PresentationCore (8)
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)
133return Marshal.GetExceptionForHR(hr, new IntPtr(-1)); 140Marshal.ThrowExceptionForHR(hr, new IntPtr(-1));
System\Windows\InterOp\HwndAppCommandInputProvider.cs (1)
59return handled ? new IntPtr(1) : IntPtr.Zero ;
System\Windows\InterOp\HwndStylusInputProvider.cs (2)
44UnsafeNativeMethods.SetProp(new HandleRef(this, sourceHandle), "MicrosoftTabletPenServiceProperty", new HandleRef(null, new IntPtr(MultiTouchEnabledFlag))); 142result = new IntPtr(0x0001); // tell UIHub the flick has already been handled.
System\Windows\InterOp\HwndTarget.cs (2)
90private static readonly IntPtr Handled = new IntPtr(0x1); 1462return new IntPtr(Marshal.GetHRForException(e));
PresentationFramework (20)
Microsoft\Win32\CommonDialog.cs (1)
213return new IntPtr(1);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (1)
133return Marshal.GetExceptionForHR(hr, new IntPtr(-1));
System\Windows\Application.cs (1)
2129refInt = new IntPtr(1);
System\Windows\Documents\ImmComposition.cs (3)
1331IntPtr lret = new IntPtr(requestSize); 1535return new IntPtr(1); 1737lret = UnsafeNativeMethods.SendMessage(hwndDefIme, s_MsImeMouseMessage, new IntPtr(wParam), himc);
System\Windows\Shell\WindowChromeWorker.cs (6)
385IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1)); 445retVal = new IntPtr((int) (WVR.REDRAW)); 498return new IntPtr((int)HT.CLIENT); 505return new IntPtr((int)_GetHTFromResizeGripDirection(direction)); 531return new IntPtr((int)ht); 619NativeMethods.SetWindowLongPtr(_hwnd, GWL.STYLE, new IntPtr((int)dwNewStyle));
System\Windows\Standard\NativeMethods.cs (7)
1572handle = new IntPtr(dwCookie); 2760ret = new IntPtr(NativeMethodsSetLastError.GetWindowLong(hwnd, (int)nIndex)); 2914return new IntPtr(SetClassLongPtr32(hwnd, nIndex, dwNewLong.ToInt32())); 2932if (!_SetProcessWorkingSetSize(hProcess, new IntPtr(dwMinimumWorkingSetSize), new IntPtr(dwMaximumWorkingSetSize))) 2945return new IntPtr(NativeMethodsSetLastError.SetWindowLong(hwnd, (int)nIndex, dwNewLong.ToInt32())); 3078if (!_UnregisterClassAtom(new IntPtr(atom), hinstance))
System\Windows\SystemCommands.cs (1)
36NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero);
Replay (1)
src\Compilers\Core\CommandLine\NativeMethods.cs (1)
55internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1);
System.Data.Odbc (8)
Common\System\Data\Common\AdapterUtil.Odbc.cs (1)
572internal static readonly IntPtr PtrZero = new IntPtr(0); // IntPtr.Zero
System\Data\Odbc\Odbc32.cs (5)
276internal static readonly IntPtr SQL_AUTOCOMMIT_ON = new IntPtr(1); 643internal static readonly IntPtr SQL_OV_ODBC3 = new IntPtr(3); 647internal static readonly IntPtr SQL_CP_OFF = new IntPtr(0); //Connection Pooling disabled 648internal static readonly IntPtr SQL_CP_ONE_PER_DRIVER = new IntPtr(1); //One pool per driver 649internal static readonly IntPtr SQL_CP_ONE_PER_HENV = new IntPtr(2); //One pool per environment
System\Data\Odbc\OdbcStatementHandle.cs (2)
15_value = new IntPtr(value); 168new IntPtr(cb),
System.Drawing.Common.Tests (2)
System\Drawing\Imaging\BitmapDataTests.cs (2)
67Scan0 = new IntPtr(value) 69Assert.Equal(new IntPtr(value), bd.Scan0);
System.IO.Compression (2)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (2)
169: base(new IntPtr(-1), true) 177get { return handle == new IntPtr(-1); }
System.IO.Hashing (1)
System\IO\Hashing\XxHash128.cs (1)
227Unsafe.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)
169: base(new IntPtr(-1), true) 177get { return handle == new IntPtr(-1); }
System.Private.CoreLib (15)
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\System\Reflection\RuntimeAssembly.cs (1)
734Marshal.ThrowExceptionForHR(tokenMaybe, new IntPtr(-1));
src\System\RuntimeHandles.cs (3)
2122Marshal.ThrowExceptionForHR(offsetMaybe, new IntPtr(-1)); 2140Marshal.ThrowExceptionForHR(offsetMaybe, new IntPtr(-1)); 2158Marshal.ThrowExceptionForHR(callConvMaybe, new IntPtr(-1));
System.Windows.Forms.Primitives.Tests (1)
System\Windows\Forms\Internals\ArgumentValidationTests.cs (1)
99HDC param = new(new IntPtr(24));
System.Windows.Forms.Tests (3)
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (3)
245new IntPtr(-1), 246new IntPtr(1), 247new IntPtr(250)
UIAutomationClient (10)
MS\Internal\Automation\HwndProxyElementProvider.cs (3)
126if (Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETTEXT, new IntPtr(ilen + 1), str) == IntPtr.Zero) 1449if (visibilityOverride == new IntPtr(1)) 1453else if (visibilityOverride == new IntPtr(2))
MS\Internal\Automation\input.cs (2)
62ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 ); 81ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 );
MS\Internal\Automation\Misc.cs (1)
406result = new IntPtr(iResult);
MS\Win32\UnsafeNativeMethods.cs (3)
17public static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); 262public static readonly IntPtr HTTRANSPARENT = new IntPtr(-1); 263public static readonly IntPtr HTCLIENT = new IntPtr(1);
System\Windows\Automation\Automation.cs (1)
161if ( HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.HWND.Cast( new IntPtr( (int)val ) ) ) )
UIAutomationClientSideProviders (184)
MS\Internal\AutomationProxies\Accessible.cs (2)
159wParam = new IntPtr(Environment.ProcessId); 162IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject));
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (1)
119ReadFrom(ptr, new IntPtr(maxLength * sizeof (char)));
MS\Internal\AutomationProxies\CommonXSendMessage.cs (89)
103rmem.WriteTo(lParam, new IntPtr(cbSize)); 122rmem.ReadFrom(new IntPtr((byte*)rmem.Address.ToPointer() + cbSize), new IntPtr(pchRes), new IntPtr(maxLength * sizeof(char))); 233rmem.WriteTo(ptrStructure, new IntPtr(cbSize)); 245rmem.ReadFrom(ptrStructure, new IntPtr(cbSize)); 280rmem.WriteTo(ptrStructure, new IntPtr(cbSize)); 283IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam)); 292rmem.ReadFrom(ptrStructure, new IntPtr(cbSize)); 335rmem1.WriteTo(ptrStructure1, new IntPtr(cbSize1)); 336rmem2.WriteTo(ptrStructure2, new IntPtr(cbSize2)); 348rmem1.ReadFrom(ptrStructure1, new IntPtr(cbSize1)); 349rmem2.ReadFrom(ptrStructure2, new IntPtr(cbSize2)); 377rmem.WriteTo(ptrStructure, new IntPtr(cbSize)); 383rmem.ReadFrom(ptrStructure, new IntPtr(cbSize)); 437return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType())); 443return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 449return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 505new IntPtr(group.iGroupID), new IntPtr(&group), Marshal.SizeOf(group.GetType())); 512new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 519new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 538new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 549new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 560new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 583new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 594new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 605new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 630return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszHeader), item.cchHeader); 642return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszHeader), item32.cchHeader); 654return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszHeader), item64.cchHeader); 689return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true); 707return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true); 725return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), textAddress, size, true); 751return XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 758bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 771bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 792return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 798return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), 807return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 833return XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 840bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 853bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 874return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 881hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), 889return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1001hitTestItem = new IntPtr(hitTestInfo32.hItem); 1068return XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()), ErrorValue.Zero); 1075bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), ErrorValue.Zero); 1088bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), ErrorValue.Zero); 1120IntPtr wParam = new IntPtr(maxTextLength); 1185remoteMem.WriteTo(localRectStart, new IntPtr(cMem)); 1187if (Misc.ProxySendMessageInt(hwnd, msg, new IntPtr(index), remoteMem.Address) != 0) 1189remoteMem.ReadFrom(localRectStart, new IntPtr(cMem)); 1256if (Misc.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero) 1351XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1366if (Misc.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1399XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1414if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1447XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1462if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1579pszText = new IntPtr(item.pszText), 1582lParam = new IntPtr(item.lParam) 1625lParam = new IntPtr(unchecked((int)item.lParam)) 1670pszText = new IntPtr(item.pszText), 1671hbm = new IntPtr(item.hbm), 1674lParam = new IntPtr(item.lParam), 1678pvFilter = new IntPtr(item.pvFilter) 1727lParam = new IntPtr(unchecked((int)item.lParam)), 1777pszText = new IntPtr(item.pszText), 1780lParam = new IntPtr(item.lParam), 1832lParam = new IntPtr(unchecked((int)item.lParam)), 1885pszText = new IntPtr(item.pszText), 1888lParam = new IntPtr(item.lParam), 1892puColumns = new IntPtr(item.puColumns) 1951lParam = new IntPtr(unchecked((int)item.lParam)), 1998pszHeader = new IntPtr(item.pszHeader), 2000pszFooter = new IntPtr(item.pszFooter), 2080pszHeader = new IntPtr(item.pszHeader), 2082pszFooter = new IntPtr(item.pszFooter), 2299iString = new IntPtr(item.iString) 2393hItem = new IntPtr(item.hItem), 2396pszText = new IntPtr(item.pszText), 2401lParam = new IntPtr(item.lParam) 2453lParam = new IntPtr(unchecked((int)item.lParam)) 2482hItem = new IntPtr(hitTestInfo.hItem) 2549hwnd = new IntPtr(item.hwnd), 2552hinst = new IntPtr(item.hinst), 2553pszText = new IntPtr(item.pszText), 2554lParam = new IntPtr(item.lParam) 2598lParam = new IntPtr(unchecked((int)item.lParam))
MS\Internal\AutomationProxies\Input.cs (3)
118mi.union.mouseInput.dwExtraInfo = new IntPtr( 0 ); 143ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 ); 166ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 );
MS\Internal\AutomationProxies\WindowsButton.cs (4)
494Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 508Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 557return Misc.InTheShellProcess(_hwnd) && UnsafeNativeMethods.GetProp(_hwnd, "StartButtonTag") == new IntPtr(304); 702IntPtr selectedRadiobutton = new IntPtr(0);
MS\Internal\AutomationProxies\WindowsComboBox.cs (5)
386IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.CBN_EDITUPDATE)); 570Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 575Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 698int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 716return Misc.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (1)
154if (XSendMessage.XSend(hwnd, WM_GETCONTROLNAME, new IntPtr(Misc.MaxLengthNameProperty), ref winFormsID, Misc.MaxLengthNameProperty))
MS\Internal\AutomationProxies\WindowsListBox.cs (19)
596return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 719int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 734string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen); 932Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 978return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 987SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item)); 991SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1006return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR; 1035return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1052Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect); 1121Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item)); 1126Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1142new IntPtr(NativeMethods.Util.MAKELONG( 1156Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1161IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.LBN_SELCHANGE)); 1180return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (11)
1235return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags)); 1252return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1)); 1269if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1345return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1369IntPtr partialVisible = (partialOK) ? IntPtr.Zero : new IntPtr (1); 1371return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0; 1493if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETSUBITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1792if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMPOSITION, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(pt.GetType()))) 1810return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask));
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (3)
306XSendMessage.XSendGetIndex(_hwnd, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 337bool lresult = XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 495bool 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)
240return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 393bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(ii.iGroup), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 703new 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)
969IntPtr keyUpLParam = new IntPtr (scanCode + (1 << 31) + (1 << 30)); 972Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode));
MS\Internal\AutomationProxies\WindowsMenu.cs (2)
2596if (!Misc.ReadProcessMemory(hProcess, dwItemData, new IntPtr(&msaaMenuInfo), new IntPtr(readSize), out count)) 2619if (Misc.ReadProcessMemory(hProcess, msaaMenuInfo.pszWText, new IntPtr(text), new IntPtr(readSize), out count))
MS\Internal\AutomationProxies\WindowsProgressbar.cs (1)
155int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (2)
399if (!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)
178Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 283Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (1)
596int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (5)
284Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 298return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 481Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 568result = XSendMessage.XSend(_hwnd, NativeMethods.HDM_GETITEMRECT, new IntPtr(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 724Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
MS\Internal\AutomationProxies\WindowsTab.cs (4)
653result = XSendMessage.XSend(hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(count - 1), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 1003Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1272if (!XSendMessage.XSend(_hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(_item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 1306Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (8)
299if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 428if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 468return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 514Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 598int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 643|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 650if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 677if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
73if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 79if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTreeView.cs (11)
406return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0; 412return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0; 431if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0) 437fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0; 518return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem); 524return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask)); 553IntPtr partialDisplay = (labelOnly) ? new IntPtr (1) : IntPtr.Zero; 643IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 665return new IntPtr(idChild); 1281int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED)); 1600if (!Misc.ReadProcessMemory(hProcess, pAddress, new IntPtr(&ent), new IntPtr(readSize), out count))
MS\Win32\UnsafeNativeMethods.cs (1)
379result = new IntPtr(iResult);
UIAutomationTypes (3)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (2)
664public static HandleRef HWND_TOPMOST = new HandleRef(null, new IntPtr(-1)); 665public static HandleRef HWND_NOTOPMOST = new HandleRef(null, new IntPtr(-2));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsOther.cs (1)
336public static IntPtr HWND_MESSAGE = new IntPtr(-3);
vbc (1)
src\Compilers\Core\CommandLine\NativeMethods.cs (1)
55internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1);
VBCSCompiler (1)
src\Compilers\Core\CommandLine\NativeMethods.cs (1)
55internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1);