420 references to IntPtr
ComSvcConfig (7)
SafeNativeMethods.cs (7)
30internal static readonly RegistryHandle HKEY_CLASSES_ROOT = new RegistryHandle(new IntPtr(unchecked((int)0x80000000)), false); 31internal static readonly RegistryHandle HKEY_CURRENT_USER = new RegistryHandle(new IntPtr(unchecked((int)0x80000001)), false); 32internal static readonly RegistryHandle HKEY_LOCAL_MACHINE = new RegistryHandle(new IntPtr(unchecked((int)0x80000002)), false); 33internal static readonly RegistryHandle HKEY_USERS = new RegistryHandle(new IntPtr(unchecked((int)0x80000003)), false); 34internal static readonly RegistryHandle HKEY_PERFORMANCE_DATA = new RegistryHandle(new IntPtr(unchecked((int)0x80000004)), false); 35internal static readonly RegistryHandle HKEY_CURRENT_CONFIG = new RegistryHandle(new IntPtr(unchecked((int)0x80000005)), false); 36internal static readonly RegistryHandle HKEY_DYN_DATA = new RegistryHandle(new IntPtr(unchecked((int)0x80000006)), false);
mscorlib (35)
microsoft\win32\registrykey.cs (8)
110internal static readonly IntPtr HKEY_CLASSES_ROOT = new IntPtr(unchecked((int)0x80000000)); 111internal static readonly IntPtr HKEY_CURRENT_USER = new IntPtr(unchecked((int)0x80000001)); 112internal static readonly IntPtr HKEY_LOCAL_MACHINE = new IntPtr(unchecked((int)0x80000002)); 113internal static readonly IntPtr HKEY_USERS = new IntPtr(unchecked((int)0x80000003)); 114internal static readonly IntPtr HKEY_PERFORMANCE_DATA = new IntPtr(unchecked((int)0x80000004)); 115internal static readonly IntPtr HKEY_CURRENT_CONFIG = new IntPtr(unchecked((int)0x80000005)); 116internal static readonly IntPtr HKEY_DYN_DATA = new IntPtr(unchecked((int)0x80000006)); 694int ret = Win32Native.RegConnectRegistry(machineName, new SafeRegistryHandle(new IntPtr((int)hKey), false), out foreignHKey);
microsoft\win32\safehandles\win32safehandles.cs (6)
47get { return handle.IsNull() || handle == new IntPtr(-1); } 59protected SafeHandleMinusOneIsInvalid(bool ownsHandle) : base(new IntPtr(-1), ownsHandle) 73get { return handle == new IntPtr(-1); } 91get { return handle.IsNull() || handle == new IntPtr(-1); } 103protected CriticalHandleMinusOneIsInvalid() : base(new IntPtr(-1)) 109get { return handle == new IntPtr(-1); }
microsoft\win32\win32native.cs (1)
1196internal static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); // WinBase.h
system\deployment\isolationinterop.cs (4)
1509this.ValueSize = (Value != null) ? new IntPtr((Value.Length + 1) * 2) : IntPtr.Zero; 1552cPropertiesToSet = new IntPtr(SetProperties.Length); 1563cPropertiesToTest = new IntPtr(TestProperties.Length); 1773_pStore.Transact(new IntPtr(operations.Length), operations, rgDispositions, rgResults);
system\environment.cs (1)
1016IntPtr r = Win32Native.SendMessageTimeout(new IntPtr(Win32Native.HWND_BROADCAST), Win32Native.WM_SETTINGCHANGE, IntPtr.Zero, "Environment", 0, 1000, IntPtr.Zero);
system\guid.cs (1)
1152Marshal.ThrowExceptionForHR(Win32Native.CoCreateGuid(out guid), new IntPtr(-1));
system\intptr.cs (3)
166return new IntPtr(value); 243return new IntPtr(pointer.ToInt32() + offset); 259return new IntPtr(pointer.ToInt32() - offset);
system\runtime\interopservices\gchandle.cs (2)
272return new IntPtr(((int)m_handle) & ~1); 290m_handle = new IntPtr(((int)m_handle) | 1);
system\runtime\interopservices\windowsruntime\windowsruntimemarshal.cs (1)
1311Marshal.ThrowExceptionForHR(hrCreate, new IntPtr(-1));
system\runtime\remoting\crossappdomainchannel.cs (1)
182return new IntPtr((int)_ContextID);
system\runtime\remoting\realproxy.cs (1)
97private static IntPtr _defaultStubValue = new IntPtr(-1);
system\security\safesecurityhandles.cs (1)
35get { return handle == IntPtr.Zero || handle == new IntPtr(-1); }
system\stubhelpers.cs (3)
556Marshal.ThrowExceptionForHR(hrCreate, new IntPtr(-1)); 581Marshal.ThrowExceptionForHR(hrCreate, new IntPtr(-1)); 1447Marshal.ThrowExceptionForHR(hrCreate, new IntPtr(-1));
system\threading\overlapped.cs (2)
315public Overlapped(int offsetLo, int offsetHi, int hEvent, IAsyncResult ar) : this(offsetLo, offsetHi, new IntPtr(hEvent), ar) 341set { m_overlappedData.UserHandle = new IntPtr(value); }
PresentationBuildTasks (1)
BuildTasks\Microsoft\Build\Tasks\Windows\GetWinFXPath.cs (1)
208IntPtr NullIntPtr = new IntPtr(0);
PresentationCore (7)
Core\CSharp\System\Windows\Interop\HwndAppCommandInputProvider.cs (1)
92return handled ? new IntPtr(1) : IntPtr.Zero ;
Core\CSharp\System\Windows\Interop\HwndStylusInputProvider.cs (2)
62UnsafeNativeMethods.SetProp(new HandleRef(this, sourceHandle), "MicrosoftTabletPenServiceProperty", new HandleRef(null, new IntPtr(MultiTouchEnabledFlag))); 181result = new IntPtr(0x0001); // tell UIHub the flick has already been handled.
Core\CSharp\System\Windows\Interop\HwndTarget.cs (2)
119private static readonly IntPtr Handled = new IntPtr(0x1); 1621return new IntPtr(Marshal.GetHRForException(e));
Shared\MS\Internal\SecurityHelper.cs (2)
926return Marshal.GetExceptionForHR(hr, new IntPtr(-1)); 940Marshal.ThrowExceptionForHR(hr, new IntPtr(-1));
PresentationFramework (20)
src\Framework\Microsoft\Win32\CommonDialog.cs (1)
279return new IntPtr(1);
src\Framework\System\Windows\Application.cs (1)
2403refInt = new IntPtr(1);
src\Framework\System\Windows\Documents\ImmComposition.cs (3)
1494IntPtr lret = new IntPtr(requestSize); 1708return new IntPtr(1); 1944lret = UnsafeNativeMethods.SendMessage(hwndDefIme, s_MsImeMouseMessage, new IntPtr(wParam), himc);
src\Framework\System\Windows\Shell\WindowChromeWorker.cs (6)
664IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1)); 728retVal = new IntPtr((int) (WVR.REDRAW)); 785return new IntPtr((int)HT.CLIENT); 792return new IntPtr((int)_GetHTFromResizeGripDirection(direction)); 818return new IntPtr((int)ht); 1007NativeMethods.SetWindowLongPtr(_hwnd, GWL.STYLE, new IntPtr((int)dwNewStyle));
src\Framework\System\Windows\Standard\NativeMethods.cs (7)
1682handle = new IntPtr(dwCookie); 3169ret = new IntPtr(NativeMethodsSetLastError.GetWindowLong(hwnd, (int)nIndex)); 3442return new IntPtr(SetClassLongPtr32(hwnd, nIndex, dwNewLong.ToInt32())); 3487if (!_SetProcessWorkingSetSize(hProcess, new IntPtr(dwMinimumWorkingSetSize), new IntPtr(dwMaximumWorkingSetSize))) 3505return new IntPtr(NativeMethodsSetLastError.SetWindowLong(hwnd, (int)nIndex, dwNewLong.ToInt32())); 3746if (!_UnregisterClassAtom(new IntPtr(atom), hinstance))
src\Framework\System\Windows\SystemCommands.cs (1)
40NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero);
src\Shared\MS\Internal\SecurityHelper.cs (1)
926return Marshal.GetExceptionForHR(hr, new IntPtr(-1));
System (11)
compmod\microsoft\win32\NativeMethods.cs (1)
60public static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
compmod\microsoft\win32\UnsafeNativeMethods.cs (1)
195private static IntPtr GetCurrentProcessToken() { return new IntPtr(-4); }
compmod\system\codedom\compiler\Executor.cs (1)
338return WindowsIdentity.Impersonate(new IntPtr(0));
net\System\Net\_SafeNetHandles.cs (2)
371SetHandle(new IntPtr(1)); 1361SetHandle(new IntPtr(0)); // make this handle valid
parent\parent\parent\InternalApis\NDP_FX\inc\ZLibNative.cs (1)
443Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1));
security\system\security\cryptography\x509\x509certificate2.cs (2)
617ptr = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CRYPTOAPI_BLOB)))); 1401ptr = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CRYPT_KEY_PROV_INFO))));
security\system\security\cryptography\x509\x509utils.cs (3)
271SafeLocalAllocHandle pb = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(managed.Length)); 318SafeLocalAllocHandle pb = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(arr.Length)); 329SafeLocalAllocHandle pb = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(arr.Length));
System.Activities.Presentation (7)
Microsoft.Tools.Common\Microsoft\Tools\Common\Win32Interop.cs (2)
59windowStyle = new IntPtr(windowStyle.ToInt32() | Win32Interop.WS_CLIPSIBLINGS | Win32Interop.WS_CLIPCHILDREN); 75return new IntPtr(SetWindowLong32(hWnd, nIndex, dwNewLong.ToInt32()));
System.Activities.Presentation\System\Activities\Presentation\View\WindowExtensionMethods.cs (5)
20exStyle = new IntPtr(exStyle.ToInt32() | Win32Interop.WS_EX_CONTEXTHELP); 38style = new IntPtr(intValue); 70exStyle = new IntPtr(exStyle.ToInt32() | Win32Interop.WS_EX_DLGMODALFRAME); 78Win32Interop.SendMessage(hwnd, Win32Interop.WM_SETICON, new IntPtr(Win32Interop.ICON_SMALL), IntPtr.Zero); 79Win32Interop.SendMessage(hwnd, Win32Interop.WM_SETICON, new IntPtr(Win32Interop.ICON_BIG), IntPtr.Zero);
System.Core (3)
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (2)
300SafeMemoryMappedFileHandle handle = CreateCore(new SafeFileHandle(new IntPtr(-1), true), mapName, inheritability, 368handle = CreateOrOpenCore(new SafeFileHandle(new IntPtr(-1), true), mapName, inheritability,
System\Security\Cryptography\CapiNative.cs (1)
1027SafeLocalAllocHandle pb = CapiNative.LocalAlloc(CapiNative.LMEM_FIXED, new IntPtr(arr.Length));
System.Data (24)
cdf\src\NetFx40\Tools\Microsoft.Tools.Common\Microsoft\Tools\Common\Win32Interop.cs (2)
59windowStyle = new IntPtr(windowStyle.ToInt32() | Win32Interop.WS_CLIPSIBLINGS | Win32Interop.WS_CLIPCHILDREN); 75return new IntPtr(SetWindowLong32(hWnd, nIndex, dwNewLong.ToInt32()));
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\WindowExtensionMethods.cs (5)
20exStyle = new IntPtr(exStyle.ToInt32() | Win32Interop.WS_EX_CONTEXTHELP); 38style = new IntPtr(intValue); 70exStyle = new IntPtr(exStyle.ToInt32() | Win32Interop.WS_EX_DLGMODALFRAME); 78Win32Interop.SendMessage(hwnd, Win32Interop.WM_SETICON, new IntPtr(Win32Interop.ICON_SMALL), IntPtr.Zero); 79Win32Interop.SendMessage(hwnd, Win32Interop.WM_SETICON, new IntPtr(Win32Interop.ICON_BIG), IntPtr.Zero);
fx\src\data\System\Data\Common\AdapterUtil.cs (3)
1854static internal readonly IntPtr PtrZero = new IntPtr(0); // IntPtr.Zero 1856static internal readonly IntPtr InvalidPtr = new IntPtr(-1); // use for INVALID_HANDLE 1857static internal readonly IntPtr RecordsUnaffected = new IntPtr(-1);
fx\src\data\System\Data\Odbc\Odbc32.cs (5)
271static internal readonly IntPtr SQL_AUTOCOMMIT_ON = new IntPtr(1); 639static internal readonly IntPtr SQL_OV_ODBC3 = new IntPtr(3); 643static internal readonly IntPtr SQL_CP_OFF = new IntPtr(0); //Connection Pooling disabled 644static internal readonly IntPtr SQL_CP_ONE_PER_DRIVER = new IntPtr(1); //One pool per driver 645static internal readonly IntPtr SQL_CP_ONE_PER_HENV = new IntPtr(2); //One pool per environment
fx\src\data\System\Data\Odbc\OdbcStatementHandle.cs (3)
28_value = new IntPtr(value); 33_value = new IntPtr(checked((int)value)); 170new IntPtr(cb),
fx\src\data\System\Data\OleDb\OleDbDataReader.cs (5)
112_rowHandleFetchCount = new IntPtr(1); 1350_rowHandleFetchCount = new IntPtr(1); 1354_rowHandleFetchCount = new IntPtr((int) maxRows); 1356_rowHandleFetchCount = new IntPtr(20); 1362_rowHandleFetchCount = new IntPtr(20);
fx\src\data\System\Data\OleDb\OleDbParameter.cs (1)
376bindings.ParamSize = new IntPtr(size);
System.Drawing (4)
commonui\System\Drawing\Advanced\Gdiplus.cs (2)
4832return IntLoadIcon(hInst, new IntPtr(iconId)); // on 32bits it'll be the same size, wider on 64bits 4841return IntLoadIconWithScaleDown(hInst, new IntPtr(iconId), cx, cy, ref phico); // on 32bits it'll be the same size, wider on 64bits
commonui\System\Drawing\Icon.cs (2)
906srcPtr = new IntPtr(sourceData.Scan0.ToInt32() + offsetSrc); 907destPtr = new IntPtr(targetData.Scan0.ToInt32() + offsetDest);
System.Management (1)
wmiutil.cs (1)
53if (IntPtr.Zero != pErrorInfo && new IntPtr(-1) != pErrorInfo)
System.Net (2)
net\PeerToPeer\Collaboration\CollaborationHelperFunctions.cs (2)
150SafeCertStore certHandle = UnsafeCollabNativeMethods.CertOpenStore(new IntPtr(/*CERT_STORE_PROV_PKCS7*/ 5), 199SafeCertStore certHandle = UnsafeCollabNativeMethods.CertOpenStore(new IntPtr(/*CERT_STORE_PROV_MEMORY*/ 2),
System.Security (22)
system\security\cryptography\pkcs\envelopedpkcs7.cs (11)
411SafeLocalAllocHandle ceei = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_ENVELOPED_ENCODE_INFO)))); 610SafeLocalAllocHandle pvAuxInfo = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_RC2_AUX_INFO)))); 649encryptParam.rgpRecipients = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(totalSize)); 667encryptParam.rgCertEncoded = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(certificates.Count * Marshal.SizeOf(typeof(CAPI.CRYPTOAPI_BLOB)))); 710encryptParam.rgszObjId[index] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(objId.Length + 1)); 825encryptParam.rgszObjId[index] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(objId.Length + 1)); 845encryptParam.rgszKeyWrapObjId[cKeyAgree] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(objId.Length + 1)); 869encryptParam.rgEphemeralIdentifier[cKeyAgree] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER)))); 874encryptParam.rgszEphemeralObjId[cKeyAgree] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(objId.Length + 1)); 898encryptParam.prgpEncryptedKey[cKeyAgree] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(IntPtr)))); 901encryptParam.rgpEncryptedKey[cKeyAgree] = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_RECIPIENT_ENCRYPTED_KEY_ENCODE_INFO))));
system\security\cryptography\pkcs\pkcs9attribute.cs (1)
127SafeLocalAllocHandle pbSigningTime = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(Int64))));
system\security\cryptography\pkcs\pkcsmisc.cs (1)
321SafeLocalAllocHandle pKeyInfo = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CERT_PUBLIC_KEY_INFO))));
system\security\cryptography\pkcs\pkcsutils.cs (4)
77SafeLocalAllocHandle pPeex = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.PROV_ENUMALGS_EX)))); 959certBlob = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(certificates.Count * Marshal.SizeOf(typeof(CAPI.CRYPTOAPI_BLOB)))); 1073new IntPtr(Marshal.SizeOf(typeof(CAPI.CRYPT_KEY_PROV_INFO)))); 1081new IntPtr( Marshal.SizeOf(typeof(CAPI.CRYPT_ALGORITHM_IDENTIFIER))));
system\security\cryptography\pkcs\signedpkcs7.cs (2)
303SafeLocalAllocHandle pSignerEncodeInfo = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_SIGNER_ENCODE_INFO)))); 376SafeLocalAllocHandle pSignerEncodeInfo = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_SIGNER_ENCODE_INFO))));
system\security\cryptography\pkcs\signerinfo.cs (2)
303SafeLocalAllocHandle pSignerEncodeInfo = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CMSG_SIGNER_ENCODE_INFO)))); 608SafeLocalAllocHandle pNewAttr = CAPI.LocalAlloc(CAPI.LPTR, new IntPtr(Marshal.SizeOf(typeof(CAPI.CRYPT_ATTRIBUTE))));
system\security\cryptography\x509\x509utils.cs (1)
130SafeLocalAllocHandle pb = CAPI.LocalAlloc(CAPI.LMEM_FIXED, new IntPtr(arr.Length));
System.ServiceModel (9)
System\ServiceModel\Channels\SelfSignedCertificate.cs (1)
105using (CertificateStoreHandle store = CertOpenStore(new IntPtr(CERT_STORE_PROV_MEMORY),
System\ServiceModel\Channels\UnsafeNativeMethods.cs (1)
1110private static IntPtr GetCurrentProcessToken() { return new IntPtr(-4); }
System\ServiceModel\ComIntegration\SafeNativeMethods.cs (7)
568internal static readonly RegistryHandle HKEY_CLASSES_ROOT = new RegistryHandle(new IntPtr(unchecked((int)0x80000000)), false); 569internal static readonly RegistryHandle HKEY_CURRENT_USER = new RegistryHandle(new IntPtr(unchecked((int)0x80000001)), false); 570internal static readonly RegistryHandle HKEY_LOCAL_MACHINE = new RegistryHandle(new IntPtr(unchecked((int)0x80000002)), false); 571internal static readonly RegistryHandle HKEY_USERS = new RegistryHandle(new IntPtr(unchecked((int)0x80000003)), false); 572internal static readonly RegistryHandle HKEY_PERFORMANCE_DATA = new RegistryHandle(new IntPtr(unchecked((int)0x80000004)), false); 573internal static readonly RegistryHandle HKEY_CURRENT_CONFIG = new RegistryHandle(new IntPtr(unchecked((int)0x80000005)), false); 574internal static readonly RegistryHandle HKEY_DYN_DATA = new RegistryHandle(new IntPtr(unchecked((int)0x80000006)), false);
System.Transactions (1)
System\Transactions\Oletx\HandleTable.cs (1)
22return new IntPtr(handle);
System.Web (6)
Hosting\IISUnsafeMethods.cs (1)
22static internal readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
Hosting\IPipelineRuntime.cs (2)
355new IntPtr(-1), 373new IntPtr(-1),
HttpApplication.cs (1)
2013new IntPtr(moduleIndex),
UnsafeNativeMethods.cs (1)
25static internal readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
Util\altserialization.cs (1)
251value = new IntPtr(reader.ReadInt32());
System.Windows.Forms (29)
parent\parent\parent\public\Internal\NDP\Inc\IsolationInterop.cs (5)
1524this.ValueSize = (Value != null) ? new IntPtr((Value.Length + 1) * 2) : IntPtr.Zero; 1567cPropertiesToSet = new IntPtr(SetProperties.Length); 1578cPropertiesToTest = new IntPtr(TestProperties.Length); 1789_pStore.Transact(new IntPtr(operations.Length), operations, rgDispositions, rgResults); 1800_pStore.Transact(new IntPtr(operations.Length), operations, rgDispositions, rgResults);
winforms\Managed\System\WinForms\Control.cs (2)
11121UnsafeNativeMethods.UiaReturnRawElementProvider(new HandleRef(this, handle), new IntPtr(0), new IntPtr(0), null);
winforms\Managed\System\WinForms\DataGrid.cs (3)
1322ToolTipProvider.RemoveToolTip(new IntPtr(i)); 1337ToolTipProvider.AddToolTip(SR.GetString(SR.DataGridCaptionBackButtonToolTip), new IntPtr(0), backButton); 1338ToolTipProvider.AddToolTip(SR.GetString(SR.DataGridCaptionDetailsButtonToolTip), new IntPtr(1), detailsButton);
winforms\Managed\System\WinForms\DataGridRow.cs (2)
35private IntPtr tooltipID = new IntPtr(-1); 632tooltipID = new IntPtr(-1);
winforms\Managed\System\WinForms\Form.cs (1)
7260UnsafeNativeMethods.PostMessage(new HandleRef(formMdiParent, formMdiParent.Handle), NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_KEYMENU), m.WParam);
winforms\Managed\System\WinForms\ImageList.cs (2)
648srcPtr = new IntPtr(sourceData.Scan0.ToInt32() + offsetSrc); 649destPtr = new IntPtr(targetData.Scan0.ToInt32() + offsetDest);
winforms\Managed\System\WinForms\ListView.cs (1)
5676m.Result = new IntPtr(1);
winforms\Managed\System\WinForms\NativeMethods.cs (3)
671public static HandleRef HWND_TOPMOST = new HandleRef(null, new IntPtr(-1)); 673public static HandleRef HWND_NOTOPMOST = new HandleRef(null, new IntPtr(-2)); 675public static HandleRef HWND_MESSAGE = new HandleRef(null, new IntPtr(-3));
winforms\Managed\System\WinForms\NativeWindow.cs (6)
371if (emptySlotNumber == -1 && (hashBuckets[bucketNumber].handle == new IntPtr(-1)) && (hashBuckets[bucketNumber].hash_coll < 0)) 377(hashBuckets[bucketNumber].handle == new IntPtr(-1) && ((hashBuckets[bucketNumber].hash_coll & unchecked(0x80000000)) == 0))) { 903if ((oldb.handle != IntPtr.Zero) && (oldb.handle != new IntPtr(-1))) { 913if ((newBuckets[bucketNumber].handle == IntPtr.Zero) || (newBuckets[bucketNumber].handle == new IntPtr(-1))) { 1084if (b.handle != IntPtr.Zero && b.handle != new IntPtr(-1)) { 1235hashBuckets[bn].handle = new IntPtr(-1);
winforms\Managed\System\WinForms\PropertyGrid.cs (1)
5400fileId = new IntPtr(rnd.Next());
winforms\Managed\System\WinForms\StatusBar.cs (1)
1656internal IntPtr id = new IntPtr(-1);
winforms\Managed\System\WinForms\UnsafeNativeMethods.cs (2)
8211contextCreationSucceeded = (hActCtx != new IntPtr(-1)); 8289private static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
System.Workflow.Activities (4)
Common\NativeMethods.cs (2)
234IntPtr success = SendMessage(hWndHeader, HDM_GETITEM, new IntPtr(index), hdi); 240IntPtr success = SendMessage(hWndHeader, HDM_SETITEM, new IntPtr(index), hdi);
Rules\Design\Dialogs\ConditionBrowserDialog.cs (1)
147NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
Rules\Design\Dialogs\RuleSetBrowserDialog.cs (1)
130NativeMethods.SendMessage(previewBox.Handle, NativeMethods.WM_SETREDRAW, new IntPtr(1), IntPtr.Zero);
System.Workflow.ComponentModel (10)
AuthoringOM\Design\DesignerWidgets.cs (8)
2263msg.Result = new IntPtr(1); 2318IntPtr activateValue = (this.activate) ? new IntPtr(1) : new IntPtr(0); 2330IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_SETMAXTIPWIDTH, IntPtr.Zero, new IntPtr(tipWidth)); 2335IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_SETDELAYTIME, new IntPtr(time), new IntPtr(delay)); 2344IntPtr lresult = NativeMethods.SendMessage(Handle, NativeMethods.TTM_SETTITLE, new IntPtr((int)ToolTipIcon.None), titleStr); 2398toolInfo.text = new IntPtr(-1);
Shared\NativeMethods.cs (2)
248IntPtr success = SendMessage(hWndHeader, HDM_GETITEM, new IntPtr(index), hdi); 254IntPtr success = SendMessage(hWndHeader, HDM_SETITEM, new IntPtr(index), hdi);
UIAutomationClient (8)
MS\Internal\Automation\HwndProxyElementProvider.cs (1)
143if (Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETTEXT, new IntPtr(ilen + 1), str) == IntPtr.Zero)
MS\Internal\Automation\Input.cs (2)
71ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 ); 88ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 );
MS\Internal\Automation\Misc.cs (1)
444result = new IntPtr(iResult);
MS\Win32\UnsafeNativeMethods.cs (3)
32public static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); 277public static readonly IntPtr HTTRANSPARENT = new IntPtr(-1); 278public static readonly IntPtr HTCLIENT = new IntPtr(1);
System\Windows\Automation\Automation.cs (1)
201if ( HwndProxyElementProvider.IsWindowPatternWindow( NativeMethods.HWND.Cast( new IntPtr( (int)val ) ) ) )
UIAutomationClientsideProviders (183)
MS\Internal\AutomationProxies\Accessible.cs (1)
177IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject));
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (1)
135ReadFrom(ptr, new IntPtr(maxLength * sizeof (char)));
MS\Internal\AutomationProxies\CommonXSendMessage.cs (89)
112rmem.WriteTo(lParam, new IntPtr(cbSize)); 131rmem.ReadFrom(new IntPtr((byte*)rmem.Address.ToPointer() + cbSize), new IntPtr(pchRes), new IntPtr(maxLength * sizeof(char))); 242rmem.WriteTo(ptrStructure, new IntPtr(cbSize)); 254rmem.ReadFrom(ptrStructure, new IntPtr(cbSize)); 289rmem.WriteTo(ptrStructure, new IntPtr(cbSize)); 292IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam)); 301rmem.ReadFrom(ptrStructure, new IntPtr(cbSize)); 344rmem1.WriteTo(ptrStructure1, new IntPtr(cbSize1)); 345rmem2.WriteTo(ptrStructure2, new IntPtr(cbSize2)); 357rmem1.ReadFrom(ptrStructure1, new IntPtr(cbSize1)); 358rmem2.ReadFrom(ptrStructure2, new IntPtr(cbSize2)); 386rmem.WriteTo(ptrStructure, new IntPtr(cbSize)); 392rmem.ReadFrom(ptrStructure, new IntPtr(cbSize)); 446return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType())); 452return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 458return XSend(hwnd, NativeMethods.LVM_SETITEMSTATE, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 514new IntPtr(group.iGroupID), new IntPtr(&group), Marshal.SizeOf(group.GetType())); 521new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 528new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 547new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 558new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 569new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 592new IntPtr(group.iGroupID), new IntPtr(pGroup), Marshal.SizeOf(group.GetType())); 603new IntPtr(group.iGroupID), new IntPtr(&group32), Marshal.SizeOf(group32.GetType())); 614new IntPtr(group.iGroupID), new IntPtr(&group64), Marshal.SizeOf(group64.GetType())); 639return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszHeader), item.cchHeader); 651return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszHeader), item32.cchHeader); 663return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszHeader), item64.cchHeader); 698return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true); 716return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true); 734return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item64.iGroupID), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), textAddress, size, true); 760return XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 767bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 780bool result = XSend(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 801return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 807return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), 816return GetTextWithinStructure(hwnd, NativeMethods.TCM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 842return XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 849bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 862bool result = XSend(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 883return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 890hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item32), 898return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1010hitTestItem = new IntPtr(hitTestInfo32.hItem); 1077return XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(pItem), Marshal.SizeOf(item.GetType()), ErrorValue.Zero); 1084bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), ErrorValue.Zero); 1097bool result = XSend(hwnd, NativeMethods.TB_GETBUTTON, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), ErrorValue.Zero); 1129IntPtr wParam = new IntPtr(maxTextLength); 1194remoteMem.WriteTo(localRectStart, new IntPtr(cMem)); 1196if (Misc.ProxySendMessageInt(hwnd, msg, new IntPtr(index), remoteMem.Address) != 0) 1198remoteMem.ReadFrom(localRectStart, new IntPtr(cMem)); 1265if (Misc.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero) 1360XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1375if (Misc.ReadProcessMemory(hProcess, group.pszHeader, copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1408XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1423if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1456XSend(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(group.iGroupID), new IntPtr(&group), group.cbSize, ErrorValue.NoCheck); 1471if (Misc.ReadProcessMemory(hProcess, new IntPtr(group.pszHeader), copyTo, new IntPtr(NativeMethods.MAX_PATH), out count)) 1588nativeItem.pszText = new IntPtr(item.pszText); 1591nativeItem.lParam = new IntPtr(item.lParam); 1633nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 1677nativeItem.pszText = new IntPtr(item.pszText); 1678nativeItem.hbm = new IntPtr(item.hbm); 1681nativeItem.lParam = new IntPtr(item.lParam); 1685nativeItem.pvFilter = new IntPtr(item.pvFilter); 1733nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 1782nativeItem.pszText = new IntPtr(item.pszText); 1785nativeItem.lParam = new IntPtr(item.lParam); 1836nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 1888nativeItem.pszText = new IntPtr(item.pszText); 1891nativeItem.lParam = new IntPtr(item.lParam); 1895nativeItem.puColumns = new IntPtr(item.puColumns); 1953nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 1999nativeItem.pszHeader = new IntPtr(item.pszHeader); 2001nativeItem.pszFooter = new IntPtr(item.pszFooter); 2080nativeItem.pszHeader = new IntPtr(item.pszHeader); 2082nativeItem.pszFooter = new IntPtr(item.pszFooter); 2296nativeItem.iString = new IntPtr(item.iString); 2388nativeItem.hItem = new IntPtr(item.hItem); 2391nativeItem.pszText = new IntPtr(item.pszText); 2396nativeItem.lParam = new IntPtr(item.lParam); 2447nativeItem.lParam = new IntPtr(unchecked((int)item.lParam)); 2474nativeHitTestInfo.hItem = new IntPtr(hitTestInfo.hItem); 2538nativeItem.hwnd = new IntPtr(item.hwnd); 2541nativeItem.hinst = new IntPtr(item.hinst); 2542nativeItem.pszText = new IntPtr(item.pszText); 2543nativeItem.lParam = new IntPtr(item.lParam); 2586nativeItem.lParam = new IntPtr(unchecked((int)item.lParam));
MS\Internal\AutomationProxies\Input.cs (3)
126mi.union.mouseInput.dwExtraInfo = new IntPtr( 0 ); 149ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 ); 171ki.union.keyboardInput.dwExtraInfo = new IntPtr( 0 );
MS\Internal\AutomationProxies\WindowsButton.cs (4)
514Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, new IntPtr(NativeMethods.SC_TASKLIST), IntPtr.Zero); 528Misc.ProxySendMessage(_hwnd, NativeMethods.BM_SETSTATE, new IntPtr(1), IntPtr.Zero, true); 577return Misc.InTheShellProcess(_hwnd) && UnsafeNativeMethods.GetProp(_hwnd, "StartButtonTag") == new IntPtr(304); 722IntPtr selectedRadiobutton = new IntPtr(0);
MS\Internal\AutomationProxies\WindowsComboBox.cs (5)
408IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.CBN_EDITUPDATE)); 592Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 597Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 720int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 738return Misc.GetUnsafeText(hwnd, NativeMethods.CB_GETLBTEXT, new IntPtr(index), len);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (1)
165if (XSendMessage.XSend(hwnd, WM_GETCONTROLNAME, new IntPtr(Misc.MaxLengthNameProperty), ref winFormsID, Misc.MaxLengthNameProperty))
MS\Internal\AutomationProxies\WindowsListBox.cs (19)
618return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 741int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 756string text = Misc.GetUnsafeText(_hwnd, NativeMethods.LB_GETTEXT, new IntPtr(_item), iTextLen); 954Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 1000return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 1009SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(item)); 1013SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1028return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCARETINDEX, new IntPtr(_item), new IntPtr(0)) != NativeMethods.LB_ERR; 1057return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1074Misc.ProxySendMessage(_hwnd, NativeMethods.LB_GETITEMRECT, new IntPtr(_item), ref itemRect); 1143Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, new IntPtr(1), new IntPtr(_item)); 1148Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1164new IntPtr(NativeMethods.Util.MAKELONG( 1178Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1183IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.LBN_SELCHANGE)); 1202return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (11)
1250return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETNEXTITEM, new IntPtr(item), new IntPtr(flags)); 1267return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_APPROXIMATEVIEWRECT, new IntPtr(-1), NativeMethods.Util.MAKELPARAM(-1, -1)); 1284if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1360return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1384IntPtr partialVisible = (partialOK) ? IntPtr.Zero : new IntPtr (1); 1386return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ENSUREVISIBLE, new IntPtr(item), partialVisible) != 0; 1505if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETSUBITEMRECT, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(itemRectangle.GetType()))) 1806if (XSendMessage.XSend(hwnd, NativeMethods.LVM_GETITEMPOSITION, new IntPtr(item), new IntPtr(location), Marshal.SizeOf(pt.GetType()))) 1824return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMSTATE, new IntPtr(item), new IntPtr(stateMask));
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (3)
316XSendMessage.XSendGetIndex(_hwnd, NativeMethods.LVM_HITTEST, new IntPtr(-1), new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 347bool lresult = XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(groupIndex), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 504bool 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)
253return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 405bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(ii.iGroup), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 717new IntPtr(_groupID), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (1)
79XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, new IntPtr(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewItem.cs (2)
984IntPtr keyUpLParam = new IntPtr (scanCode + (1 << 31) + (1 << 30)); 987Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode));
MS\Internal\AutomationProxies\WindowsMenu.cs (2)
2617if (!Misc.ReadProcessMemory(hProcess, dwItemData, new IntPtr(&msaaMenuInfo), new IntPtr(readSize), out count)) 2640if (Misc.ReadProcessMemory(hProcess, msaaMenuInfo.pszWText, new IntPtr(text), new IntPtr(readSize), out count))
MS\Internal\AutomationProxies\WindowsProgressbar.cs (1)
172int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (2)
416if (!XSendMessage.XSend(hwnd, NativeMethods.RB_GETRECT, new IntPtr(item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 450if (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)
195Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 300Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val));
MS\Internal\AutomationProxies\WindowsStatusBar.cs (1)
610int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (5)
300Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 314return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 500Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center); 587result = XSendMessage.XSend(_hwnd, NativeMethods.HDM_GETITEMRECT, new IntPtr(index), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 746Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, new IntPtr(NativeMethods.MK_LBUTTON), center);
MS\Internal\AutomationProxies\WindowsTab.cs (4)
659result = XSendMessage.XSend(hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(count - 1), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero); 1009Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1278if (!XSendMessage.XSend(_hwnd, NativeMethods.TCM_GETITEMRECT, new IntPtr(_item), new IntPtr(&rectW32), Marshal.SizeOf(rectW32.GetType()), XSendMessage.ErrorValue.Zero)) 1312Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (8)
313if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 443if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 483return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) != 0; 529Misc.ProxySendMessage(_hwnd, NativeMethods.TB_SETHOTITEM, new IntPtr(_item), IntPtr.Zero); 613int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 658|| Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 665if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0) 692if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONCHECKED, new IntPtr(_idCommand), IntPtr.Zero) == 0)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (2)
80if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONENABLED, new IntPtr(_idCommand), IntPtr.Zero) == 0) 86if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(_idCommand), IntPtr.Zero) != 0)
MS\Internal\AutomationProxies\WindowsTreeView.cs (11)
422return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_EXPAND), treeItem) != 0; 428return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_EXPAND, new IntPtr(NativeMethods.TVE_COLLAPSE), treeItem) != 0; 447if (Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET | NativeMethods.TVSI_NOSINGLEEXPAND), treeItem) != 0) 453fRet = Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_SELECTITEM, new IntPtr(NativeMethods.TVGN_CARET), treeItem) != 0; 534return Misc.ProxySendMessage(hwnd, NativeMethods.TVM_GETNEXTITEM, new IntPtr(flag), treeItem); 540return Misc.ProxySendMessageInt(hwnd, NativeMethods.TVM_GETITEMSTATE, treeItem, new IntPtr(stateMask)); 569IntPtr partialDisplay = (labelOnly) ? new IntPtr (1) : IntPtr.Zero; 659IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 681return new IntPtr(idChild); 1297int selected = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TVM_GETITEMSTATE, _hItem, new IntPtr(NativeMethods.TVIS_SELECTED)); 1616if (!Misc.ReadProcessMemory(hProcess, pAddress, new IntPtr(&ent), new IntPtr(readSize), out count))
MS\Win32\UnsafeNativeMethods.cs (1)
394result = new IntPtr(iResult);
WindowsBase (18)
Base\MS\Internal\Interop\ErrorCodes.cs (1)
427Exception e = Marshal.GetExceptionForHR((int)_value, new IntPtr(-1));
Base\MS\Internal\IO\Packaging\CompoundFile\NativeCompoundFileAPIs.cs (1)
137new IntPtr(0), // Pointer to SNB struct, not marshalled, must be null.
Base\System\Windows\SplashScreen.cs (1)
377if (UnsafeNativeMethods.IntUnregisterClass(new IntPtr(_wndClass), _hInstance) != 0)
parent\parent\InternalApis\NDP_FX\inc\ZLibNative.cs (1)
443Marshal.ThrowExceptionForHR(hresult, new IntPtr(-1));
Shared\MS\Internal\SecurityHelper.cs (2)
926return Marshal.GetExceptionForHR(hr, new IntPtr(-1)); 940Marshal.ThrowExceptionForHR(hr, new IntPtr(-1));
Shared\MS\Win32\HwndSubclass.cs (1)
365retval = CriticalDetach(force) ? new IntPtr(1) : IntPtr.Zero ;
Shared\MS\Win32\HwndWrapper.cs (2)
370IntPtr lHeap = (IntPtr)GC.GetTotalMemory((wParam == new IntPtr(1) )? true : false); 445new IntPtr(classAtom), //* this function is defined as taking a type lpClassName - but this can be an atom. 2 Low Bytes are the atom*/
Shared\MS\Win32\NativeMethodsCLR.cs (2)
903public static HandleRef HWND_TOPMOST = new HandleRef(null, new IntPtr(-1)); 904public static HandleRef HWND_NOTOPMOST = new HandleRef(null, new IntPtr(-2));
Shared\MS\Win32\NativeMethodsOther.cs (1)
445public static IntPtr HWND_MESSAGE = new IntPtr(-3);
Shared\MS\Win32\UnsafeNativeMethodsOther.cs (6)
663result = new IntPtr(tempResult); 686result = new IntPtr(tempResult); 710retVal = new IntPtr(tempRetVal); 743result = new IntPtr(tempResult); 780result = new IntPtr(iResult); 1227internal static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1);
WsatConfig (2)
Configuration\CertificateManager.cs (1)
31SafeRegistryKey hive = new SafeRegistryKey(new IntPtr((int)Microsoft.Win32.RegistryHive.LocalMachine), false);
Configuration\QfeChecker.cs (1)
64using (SafeRegistryKey hive = new SafeRegistryKey(new IntPtr((int)Microsoft.Win32.RegistryHive.LocalMachine), false))
WsatUI (6)
Configuration\CertificateManager.cs (2)
31SafeRegistryKey hive = new SafeRegistryKey(new IntPtr((int)Microsoft.Win32.RegistryHive.LocalMachine), false); 79new SafeRegistryKey(new IntPtr((int)Microsoft.Win32.RegistryHive.LocalMachine), false),
Configuration\QfeChecker.cs (1)
64using (SafeRegistryKey hive = new SafeRegistryKey(new IntPtr((int)Microsoft.Win32.RegistryHive.LocalMachine), false))
MMCUI\WSATPropertySheet.cs (3)
42static IntPtr PSNRET_NOERROR = new IntPtr(0); 339result = new IntPtr(intResult); 354result = new IntPtr(intResult);