286 references to IntPtr
Microsoft.AspNetCore.Http.Extensions.Tests (4)
RequestDelegateFactoryTests.cs (2)
319
new object[] { (Action<HttpContext, IntPtr[]>)Store, new[] { "-42" },new[] { new
IntPtr
(-42) } },
370
new object[] { (Action<HttpContext, IntPtr>)Store, "-42", new
IntPtr
(-42) },
RequestDelegateGenerator\RequestDelegateCreationTests.Arrays.cs (1)
125
new object[] { "IntPtr[]", new[] { "-42" },new[] { new
IntPtr
(-42) } },
RequestDelegateGenerator\RequestDelegateCreationTests.TryParse.cs (1)
33
new object[] { "IntPtr", "-42", new
IntPtr
(-42) },
Microsoft.AspNetCore.Server.HttpSys (1)
NativeInterop\HttpServerSessionHandle.cs (1)
22
SetHandle(new
IntPtr
(1));
Microsoft.AspNetCore.Server.IISIntegration (1)
IISMiddleware.cs (1)
178
var handle = new
IntPtr
(hexHandle);
Microsoft.Build (11)
BackEnd\Node\NativeMethods.cs (1)
25
internal static readonly IntPtr InvalidHandle = new
IntPtr
(-1);
InprocTrackingNativeMethods.cs (10)
98
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
104
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
110
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
116
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
122
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
128
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
134
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
140
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
146
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
220
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
Microsoft.Build.Engine (2)
LocalProvider\NativeMethods.cs (1)
17
internal static readonly IntPtr InvalidHandle = new
IntPtr
(-1);
Shared\NativeMethodsShared.cs (1)
34
internal static IntPtr NullIntPtr = new
IntPtr
(0);
Microsoft.Build.Framework (2)
NativeMethods.cs (2)
61
internal static IntPtr NullIntPtr = new
IntPtr
(0);
62
internal static IntPtr InvalidHandle = new
IntPtr
(-1);
Microsoft.Build.Tasks.Core (3)
ManifestUtil\EmbeddedManifestReader.cs (1)
15
private static readonly IntPtr s_id1 = new
IntPtr
(1);
ManifestUtil\NativeMethods.cs (1)
14
public static readonly IntPtr RT_MANIFEST = new
IntPtr
(24);
NativeMethods.cs (1)
528
internal static readonly IntPtr InvalidIntPtr = new
IntPtr
(-1);
Microsoft.Build.Utilities.Core (10)
InprocTrackingNativeMethods.cs (10)
98
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
104
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
110
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
116
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
122
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
128
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
134
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
140
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
146
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
220
Marshal.ThrowExceptionForHR(hresult, new
IntPtr
(-1));
Microsoft.Build.Utilities.UnitTests (1)
NativeMethods.cs (1)
25
internal static readonly IntPtr InvalidHandle = new
IntPtr
(-1);
Microsoft.DotNet.RemoteExecutor.Tests (2)
RemoteExecutorTests.cs (2)
119
System.Runtime.InteropServices.Marshal.StructureToPtr(1, new
IntPtr
(1), true);
143
System.Runtime.InteropServices.Marshal.StructureToPtr(1, new
IntPtr
(1), true);
MSBuildTaskHost (2)
NativeMethods.cs (2)
61
internal static IntPtr NullIntPtr = new
IntPtr
(0);
62
internal static IntPtr InvalidHandle = new
IntPtr
(-1);
PresentationCore (9)
MS\Internal\Text\TextInterface\DWriteUtil.cs (1)
39
System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(hr, new System.
IntPtr
(-1));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (2)
149
return Marshal.GetExceptionForHR(hr, new
IntPtr
(-1));
156
Marshal.ThrowExceptionForHR(hr, new
IntPtr
(-1));
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (1)
211
result.CommHandle = new SecurityCriticalDataClass<IntPtr>((IntPtr.Size == 4 ? new
IntPtr
((int)commHandle) : new IntPtr(commHandle)));
System\Windows\InterOp\HwndAppCommandInputProvider.cs (1)
69
return handled ? new
IntPtr
(1) : IntPtr.Zero ;
System\Windows\InterOp\HwndStylusInputProvider.cs (2)
52
UnsafeNativeMethods.SetProp(new HandleRef(this, sourceHandle), "MicrosoftTabletPenServiceProperty", new HandleRef(null, new
IntPtr
(MultiTouchEnabledFlag)));
154
result = new
IntPtr
(0x0001); // tell UIHub the flick has already been handled.
System\Windows\InterOp\HwndTarget.cs (2)
106
private static readonly IntPtr Handled = new
IntPtr
(0x1);
1474
return new
IntPtr
(Marshal.GetHRForException(e));
PresentationFramework (20)
Microsoft\Win32\CommonDialog.cs (1)
245
return new
IntPtr
(1);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (1)
149
return Marshal.GetExceptionForHR(hr, new
IntPtr
(-1));
System\Windows\Application.cs (1)
2121
refInt = new
IntPtr
(1);
System\Windows\Documents\ImmComposition.cs (3)
1353
IntPtr lret = new
IntPtr
(requestSize);
1557
return new
IntPtr
(1);
1759
lret = UnsafeNativeMethods.SendMessage(hwndDefIme, s_MsImeMouseMessage, new
IntPtr
(wParam), himc);
System\Windows\Shell\WindowChromeWorker.cs (6)
563
IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new
IntPtr
(-1));
623
retVal = new
IntPtr
((int) (WVR.REDRAW));
676
return new
IntPtr
((int)HT.CLIENT);
683
return new
IntPtr
((int)_GetHTFromResizeGripDirection(direction));
709
return new
IntPtr
((int)ht);
870
NativeMethods.SetWindowLongPtr(_hwnd, GWL.STYLE, new
IntPtr
((int)dwNewStyle));
System\Windows\Standard\NativeMethods.cs (7)
1595
handle = new
IntPtr
(dwCookie);
2856
ret = new
IntPtr
(NativeMethodsSetLastError.GetWindowLong(hwnd, (int)nIndex));
3033
return new
IntPtr
(SetClassLongPtr32(hwnd, nIndex, dwNewLong.ToInt32()));
3058
if (!_SetProcessWorkingSetSize(hProcess, new
IntPtr
(dwMinimumWorkingSetSize), new
IntPtr
(dwMaximumWorkingSetSize)))
3072
return new
IntPtr
(NativeMethodsSetLastError.SetWindowLong(hwnd, (int)nIndex, dwNewLong.ToInt32()));
3225
if (!_UnregisterClassAtom(new
IntPtr
(atom), hinstance))
System\Windows\SystemCommands.cs (1)
39
NativeMethods.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)
212
get { return handle == new
IntPtr
(-1); }
System.IO.Hashing (1)
System\IO\Hashing\XxHash128.cs (1)
224
Unsafe.WriteUnaligned(ref Unsafe.AddByteOffset(ref dest0, new
IntPtr
(sizeof(ulong))), low);
System.IO.MemoryMappedFiles (3)
Microsoft\Win32\SafeMemoryMappedViewHandle.Unix.cs (1)
19
handle = new
IntPtr
(-1);
System\IO\MemoryMappedFiles\MemoryMappedView.Unix.cs (2)
61
fd = new SafeFileHandle(new
IntPtr
(-1), false);
103
new 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)
455
reader.SetHandle(new
IntPtr
(fds[Interop.Sys.ReadEndOfPipe]));
456
writer.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)
212
get { 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))
17
public override bool IsInvalid => handle == new
IntPtr
(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\CriticalHandleZeroOrMinusOneIsInvalid.cs (1)
17
public override bool IsInvalid => handle == IntPtr.Zero || handle == new
IntPtr
(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (1)
53
SetHandle(new
IntPtr
(-1));
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeHandleMinusOneIsInvalid.cs (2)
12
protected SafeHandleMinusOneIsInvalid(bool ownsHandle) : base(new
IntPtr
(-1), ownsHandle)
16
public override bool IsInvalid => handle == new
IntPtr
(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeHandleZeroOrMinusOneIsInvalid.cs (1)
16
public 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)
59
set => EventHandleIntPtr = new
IntPtr
(value);
src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (1)
28
private static IntPtr InvalidHandleValue => new
IntPtr
(-1);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
15
protected static readonly IntPtr InvalidHandle = new
IntPtr
(-1);
UIAutomationClient (10)
MS\Internal\Automation\HwndProxyElementProvider.cs (3)
135
if (Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETTEXT, new
IntPtr
(ilen + 1), str) == IntPtr.Zero)
1465
if (visibilityOverride == new
IntPtr
(1))
1469
else if (visibilityOverride == new
IntPtr
(2))
MS\Internal\Automation\input.cs (2)
64
ki.union.keyboardInput.dwExtraInfo = new
IntPtr
( 0 );
81
ki.union.keyboardInput.dwExtraInfo = new
IntPtr
( 0 );
MS\Internal\Automation\Misc.cs (1)
416
result = new
IntPtr
(iResult);
MS\Win32\UnsafeNativeMethods.cs (3)
22
public static readonly IntPtr INVALID_HANDLE_VALUE = new
IntPtr
(-1);
267
public static readonly IntPtr HTTRANSPARENT = new
IntPtr
(-1);
268
public static readonly IntPtr HTCLIENT = new
IntPtr
(1);
System\Windows\Automation\Automation.cs (1)
177
if ( HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.HWND.Cast( new
IntPtr
( (int)val ) ) ) )
UIAutomationClientSideProviders (183)
MS\Internal\AutomationProxies\Accessible.cs (1)
170
IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new
IntPtr
(idObject));
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (1)
125
ReadFrom(ptr, new
IntPtr
(maxLength * sizeof (char)));
MS\Internal\AutomationProxies\CommonXSendMessage.cs (89)
105
rmem.WriteTo(lParam, new
IntPtr
(cbSize));
124
rmem.ReadFrom(new IntPtr((byte*)rmem.Address.ToPointer() + cbSize), new IntPtr(pchRes), new
IntPtr
(maxLength * sizeof(char)));
235
rmem.WriteTo(ptrStructure, new
IntPtr
(cbSize));
247
rmem.ReadFrom(ptrStructure, new
IntPtr
(cbSize));
282
rmem.WriteTo(ptrStructure, new
IntPtr
(cbSize));
285
IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem.Address, new
IntPtr
(lParam));
294
rmem.ReadFrom(ptrStructure, new
IntPtr
(cbSize));
337
rmem1.WriteTo(ptrStructure1, new
IntPtr
(cbSize1));
338
rmem2.WriteTo(ptrStructure2, new
IntPtr
(cbSize2));
350
rmem1.ReadFrom(ptrStructure1, new
IntPtr
(cbSize1));
351
rmem2.ReadFrom(ptrStructure2, new
IntPtr
(cbSize2));
379
rmem.WriteTo(ptrStructure, new
IntPtr
(cbSize));
385
rmem.ReadFrom(ptrStructure, new
IntPtr
(cbSize));
439
return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new
IntPtr
(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()));
445
return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new
IntPtr
(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()));
451
return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new
IntPtr
(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()));
507
new
IntPtr
(group.iGroupID), new IntPtr(&group), Marshal.SizeOf(group.GetType()));
514
new
IntPtr
(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType()));
521
new
IntPtr
(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType()));
540
new
IntPtr
(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType()));
551
new
IntPtr
(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType()));
562
new
IntPtr
(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType()));
585
new
IntPtr
(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType()));
596
new
IntPtr
(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType()));
607
new
IntPtr
(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType()));
632
return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new
IntPtr
(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszHeader), item.cchHeader);
644
return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new
IntPtr
(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszHeader), item32.cchHeader);
656
return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new
IntPtr
(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszHeader), item64.cchHeader);
691
return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new
IntPtr
(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true);
709
return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new
IntPtr
(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true);
727
return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new
IntPtr
(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), textAddress, size, true);
753
return XSend(hwnd, NativeMethods.TCM_GETITEMW, new
IntPtr
(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()));
760
bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new
IntPtr
(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()));
773
bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new
IntPtr
(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()));
794
return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new
IntPtr
(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax);
800
return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.TCM_GETITEMW, new
IntPtr
(index),
809
return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new
IntPtr
(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax);
835
return XSend(hwnd, NativeMethods.HDM_GETITEMW, new
IntPtr
(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()));
842
bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new
IntPtr
(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()));
855
bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new
IntPtr
(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()));
876
return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new
IntPtr
(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax);
883
hwnd, NativeMethods.HDM_GETITEMW, new
IntPtr
(index), new IntPtr(&item32),
891
return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new
IntPtr
(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax);
1003
hitTestItem = new
IntPtr
(hitTestInfo32.hItem);
1070
return XSend(hwnd, NativeMethods.TB_GETBUTTON, new
IntPtr
(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()), ErrorValue.Zero);
1077
bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new
IntPtr
(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), ErrorValue.Zero);
1090
bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new
IntPtr
(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), ErrorValue.Zero);
1122
IntPtr wParam = new
IntPtr
(maxTextLength);
1187
remoteMem.WriteTo(localRectStart, new
IntPtr
(cMem));
1189
if (Misc.ProxySendMessageInt(hwnd, msg, new
IntPtr
(index), remoteMem.Address) != 0)
1191
remoteMem.ReadFrom(localRectStart, new
IntPtr
(cMem));
1258
if (Misc.ProxySendMessage(hwnd, msg, new
IntPtr
(index), rmem.Address) != IntPtr.Zero)
1353
XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new
IntPtr
(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck);
1368
if (Misc.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new
IntPtr
(NativeMethods.MAX_PATH), out count))
1401
XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new
IntPtr
(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck);
1416
if (Misc.ReadProcessMemory(hProcess, new
IntPtr
(group.pszHeader), copyTo, new
IntPtr
(NativeMethods.MAX_PATH), out count))
1449
XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new
IntPtr
(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck);
1464
if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new
IntPtr
(NativeMethods.MAX_PATH), out count))
1581
nativeItem.pszText = new
IntPtr
(item.pszText);
1584
nativeItem.lParam = new
IntPtr
(item.lParam);
1626
nativeItem.lParam = new
IntPtr
(unchecked((int)item.lParam));
1670
nativeItem.pszText = new
IntPtr
(item.pszText);
1671
nativeItem.hbm = new
IntPtr
(item.hbm);
1674
nativeItem.lParam = new
IntPtr
(item.lParam);
1678
nativeItem.pvFilter = new
IntPtr
(item.pvFilter);
1726
nativeItem.lParam = new
IntPtr
(unchecked((int)item.lParam));
1775
nativeItem.pszText = new
IntPtr
(item.pszText);
1778
nativeItem.lParam = new
IntPtr
(item.lParam);
1829
nativeItem.lParam = new
IntPtr
(unchecked((int)item.lParam));
1881
nativeItem.pszText = new
IntPtr
(item.pszText);
1884
nativeItem.lParam = new
IntPtr
(item.lParam);
1888
nativeItem.puColumns = new
IntPtr
(item.puColumns);
1946
nativeItem.lParam = new
IntPtr
(unchecked((int)item.lParam));
1992
nativeItem.pszHeader = new
IntPtr
(item.pszHeader);
1994
nativeItem.pszFooter = new
IntPtr
(item.pszFooter);
2073
nativeItem.pszHeader = new
IntPtr
(item.pszHeader);
2075
nativeItem.pszFooter = new
IntPtr
(item.pszFooter);
2289
nativeItem.iString = new
IntPtr
(item.iString);
2381
nativeItem.hItem = new
IntPtr
(item.hItem);
2384
nativeItem.pszText = new
IntPtr
(item.pszText);
2389
nativeItem.lParam = new
IntPtr
(item.lParam);
2440
nativeItem.lParam = new
IntPtr
(unchecked((int)item.lParam));
2467
nativeHitTestInfo.hItem = new
IntPtr
(hitTestInfo.hItem);
2531
nativeItem.hwnd = new
IntPtr
(item.hwnd);
2534
nativeItem.hinst = new
IntPtr
(item.hinst);
2535
nativeItem.pszText = new
IntPtr
(item.pszText);
2536
nativeItem.lParam = new
IntPtr
(item.lParam);
2579
nativeItem.lParam = new
IntPtr
(unchecked((int)item.lParam));
MS\Internal\AutomationProxies\Input.cs (3)
119
mi.union.mouseInput.dwExtraInfo = new
IntPtr
( 0 );
142
ki.union.keyboardInput.dwExtraInfo = new
IntPtr
( 0 );
164
ki.union.keyboardInput.dwExtraInfo = new
IntPtr
( 0 );
MS\Internal\AutomationProxies\WindowsButton.cs (4)
503
Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new
IntPtr
(NativeMethods.SC_TASKLIST), IntPtr.Zero);
517
Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new
IntPtr
(1), IntPtr.Zero, true);
566
return Misc.InTheShellProcess(_hwnd) && UnsafeNativeMethods.GetProp(_hwnd, "StartButtonTag") == new
IntPtr
(304);
711
IntPtr selectedRadiobutton = new
IntPtr
(0);
MS\Internal\AutomationProxies\WindowsComboBox.cs (5)
395
IntPtr wParam = new
IntPtr
(NativeMethods.Util.MAKELONG(id, NativeMethods.CBN_EDITUPDATE));
579
Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new
IntPtr
(1), IntPtr.Zero);
584
Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new
IntPtr
(0), IntPtr.Zero);
707
int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new
IntPtr
(index), IntPtr.Zero);
725
return Misc.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new
IntPtr
(index), len);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (1)
159
if (XSendMessage.XSend(hwnd, WM_GETCONTROLNAME, new
IntPtr
(Misc.MaxLengthNameProperty), ref winFormsID, Misc.MaxLengthNameProperty))
MS\Internal\AutomationProxies\WindowsListBox.cs (19)
610
return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new
IntPtr
(-1)) != NativeMethods.LB_ERR;
733
int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new
IntPtr
(_item), IntPtr.Zero);
748
string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new
IntPtr
(_item), iTextLen);
946
Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new
IntPtr
(_item), IntPtr.Zero);
992
return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new
IntPtr
(item), IntPtr.Zero) > 0;
1001
SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new
IntPtr
(1), new
IntPtr
(item));
1005
SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new
IntPtr
(item), IntPtr.Zero);
1020
return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new
IntPtr
(_item), new
IntPtr
(0)) != NativeMethods.LB_ERR;
1049
return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new
IntPtr
(_item), IntPtr.Zero) >= 0;
1066
Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new
IntPtr
(_item), ref itemRect);
1135
Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new
IntPtr
(1), new
IntPtr
(_item));
1140
Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new
IntPtr
(_item), IntPtr.Zero);
1156
new
IntPtr
(NativeMethods.Util.MAKELONG(
1170
Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new
IntPtr
(_item), IntPtr.Zero);
1175
IntPtr wParam = new
IntPtr
(NativeMethods.Util.MAKELONG(id, NativeMethods.LBN_SELCHANGE));
1194
return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new
IntPtr
(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (11)
1242
return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new
IntPtr
(item), new
IntPtr
(flags));
1259
return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new
IntPtr
(-1), NativeMethods.Util.MAKELPARAM(-1, -1));
1276
if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMRECT, new
IntPtr
(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType())))
1352
return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new
IntPtr
(item), IntPtr.Zero);
1376
IntPtr partialVisible = (partialOK) ? IntPtr.Zero : new
IntPtr
(1);
1378
return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new
IntPtr
(item), partialVisible) != 0;
1497
if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETSUBITEMRECT, new
IntPtr
(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType())))
1798
if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMPOSITION, new
IntPtr
(item), new IntPtr(location), Marshal.SizeOf(pt.GetType())))
1816
return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new
IntPtr
(item), new
IntPtr
(stateMask));
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (3)
309
XSendMessage.XSendGetIndex(_hwnd, NativeMethods.LVM_HITTEST, new
IntPtr
(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType()));
340
bool lresult = XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new
IntPtr
(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
497
bool 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)
244
return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new
IntPtr
(groupID), IntPtr.Zero) != 0;
395
bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new
IntPtr
(ii.iGroup), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6)));
705
new
IntPtr
(_groupID), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (1)
77
XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, new
IntPtr
(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewItem.cs (2)
974
IntPtr keyUpLParam = new
IntPtr
(scanCode + (1 << 31) + (1 << 30));
977
Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new
IntPtr
(scanCode));
MS\Internal\AutomationProxies\WindowsMenu.cs (2)
2605
if (!Misc.ReadProcessMemory(hProcess, dwItemData, new IntPtr(&msaaMenuInfo), new
IntPtr
(readSize), out count))
2628
if (Misc.ReadProcessMemory(hProcess, msaaMenuInfo.pszWText, new IntPtr(text), new
IntPtr
(readSize), out count))
MS\Internal\AutomationProxies\WindowsProgressbar.cs (1)
160
int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new
IntPtr
(1), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (2)
401
if (!XSendMessage.XSend(hwnd, NativeMethods.RB_GETRECT, new
IntPtr
(item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero))
435
if (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)
182
Misc.ProxySendMessage(parent, msg, new
IntPtr
(wParam), IntPtr.Zero);
287
Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new
IntPtr
(1), new
IntPtr
(val));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (1)
599
int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new
IntPtr
(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (5)
291
Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new
IntPtr
(horizontalScrollAmount), IntPtr.Zero);
305
return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new
IntPtr
(order), IntPtr.Zero);
491
Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new
IntPtr
(NativeMethods.MK_LBUTTON), center);
578
result = XSendMessage.XSend(_hwnd, NativeMethods.HDM_GETITEMRECT, new
IntPtr
(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero);
737
Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new
IntPtr
(NativeMethods.MK_LBUTTON), center);
MS\Internal\AutomationProxies\WindowsTab.cs (4)
661
result = XSendMessage.XSend(hwnd, NativeMethods.TCM_GETITEMRECT, new
IntPtr
(count - 1), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero);
1011
Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new
IntPtr
(_item), IntPtr.Zero);
1280
if (!XSendMessage.XSend(_hwnd, NativeMethods.TCM_GETITEMRECT, new
IntPtr
(_item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero))
1314
Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new
IntPtr
(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (8)
306
if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new
IntPtr
(tbb.idCommand), IntPtr.Zero) == 0)
435
if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new
IntPtr
(_idCommand), IntPtr.Zero) != 0)
475
return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new
IntPtr
(_idCommand), IntPtr.Zero) != 0;
521
Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new
IntPtr
(_item), IntPtr.Zero);
605
int 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)
657
if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new
IntPtr
(_idCommand), IntPtr.Zero) != 0)
684
if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new
IntPtr
(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
74
if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new
IntPtr
(_idCommand), IntPtr.Zero) == 0)
80
if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new
IntPtr
(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTreeView.cs (11)
413
return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new
IntPtr
(NativeMethods.TVE_EXPAND), treeItem) != 0;
419
return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new
IntPtr
(NativeMethods.TVE_COLLAPSE), treeItem) != 0;
438
if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new
IntPtr
(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0)
444
fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new
IntPtr
(NativeMethods.TVGN_CARET), treeItem) != 0;
525
return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new
IntPtr
(flag), treeItem);
531
return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new
IntPtr
(stateMask));
560
IntPtr partialDisplay = (labelOnly) ? new
IntPtr
(1) : IntPtr.Zero;
650
IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new
IntPtr
(idChild), IntPtr.Zero);
672
return new
IntPtr
(idChild);
1288
int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new
IntPtr
(NativeMethods.TVIS_SELECTED));
1607
if (!Misc.ReadProcessMemory(hProcess, pAddress, new IntPtr(&ent), new
IntPtr
(readSize), out count))
MS\Win32\UnsafeNativeMethods.cs (1)
386
result = new
IntPtr
(iResult);
UIAutomationTypes (3)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (2)
904
public static HandleRef HWND_TOPMOST = new HandleRef(null, new
IntPtr
(-1));
905
public static HandleRef HWND_NOTOPMOST = new HandleRef(null, new
IntPtr
(-2));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsOther.cs (1)
361
public static IntPtr HWND_MESSAGE = new
IntPtr
(-3);