503 instantiations of 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 (8)
AuthenticationManager.cs (1)
137IntPtr infoptr = new IntPtr(&authInfo);
NativeInterop\HttpServerSessionHandle.cs (1)
22SetHandle(new IntPtr(1));
NativeInterop\UrlGroup.cs (5)
63SetProperty(HTTP_SERVER_PROPERTY.HttpServerQosProperty, new IntPtr(&qosSettings), (uint)QosInfoSize); 74SetProperty(HTTP_SERVER_PROPERTY.HttpServerDelegationProperty, new IntPtr(&propertyInfo), (uint)RequestPropertyInfoSize); 84SetProperty(HTTP_SERVER_PROPERTY.HttpServerDelegationProperty, new IntPtr(&propertyInfo), (uint)RequestPropertyInfoSize, throwOnError); 117var infoptr = new IntPtr(&info); 133var infoptr = new IntPtr(&info);
TimeoutManager.cs (1)
222var infoptr = new IntPtr(&timeoutinfo);
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
DelegateTests.cs (1)
330Marshal.Copy(new IntPtr(pSecurityDescriptor.Value), securityDescriptorBytes, 0, length);
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 (7)
ManifestUtil\EmbeddedManifestReader.cs (1)
14private static readonly IntPtr s_id1 = new IntPtr(1);
ManifestUtil\mansign2.cs (4)
422IntPtr pIssuerKeyHash = new IntPtr(); 536publicKeyBlob.pbData = new IntPtr(pbPublicKeyBlob); 537IntPtr pPublicKeyToken = new IntPtr(); 877IntPtr pvLicense = new IntPtr(pbLicense);
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 (3)
DiaSymReader\Utilities\InteropUtilities.cs (1)
20private static readonly IntPtr s_ignoreIErrorInfo = new IntPtr(-1);
DiaSymReader\Writer\SymUnmanagedWriterImpl.cs (1)
370Marshal.GetNativeVariantForObject(value, new IntPtr(&variant));
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 (2)
Debugger\Engine\DkmClrValue.cs (2)
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.Rebuild (1)
CompilationOptionsReader.cs (1)
277Marshal.Copy(new IntPtr(contentPtr), content, 0, length);
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.ML.Data (14)
DataLoadSave\Binary\BinarySaver.cs (1)
557Marshal.Copy(new IntPtr(&header), headerBytes, 0, Marshal.SizeOf(typeof(Header)));
DataLoadSave\Binary\UnsafeTypeOps.cs (12)
58func(new IntPtr(pArray)); 70func(new IntPtr(pArray)); 82func(new IntPtr(pArray)); 94func(new IntPtr(pArray)); 106func(new IntPtr(pArray)); 118func(new IntPtr(pArray)); 130func(new IntPtr(pArray)); 142func(new IntPtr(pArray)); 154func(new IntPtr(pArray)); 166func(new IntPtr(pArray)); 178func(new IntPtr(pArray)); 195func(new IntPtr(pArray));
DataLoadSave\Transpose\TransposeSaver.cs (1)
179Marshal.Copy(new IntPtr(&header), headerBytes, 0, Marshal.SizeOf(typeof(Header)));
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 (17)
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (2)
527Marshal.StructureToPtr(packetProperties[i], new IntPtr(pElement), false); 559Marshal.DestroyStructure(new IntPtr(pElement), typeof(MS.Win32.Recognizer.PACKET_PROPERTY));
MS\Internal\Text\TextInterface\DWriteUtil.cs (1)
39System.Runtime.InteropServices.Marshal.ThrowExceptionForHR(hr, new System.IntPtr(-1));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\CharacterBuffer.cs (3)
221return new IntPtr(((char*)gcHandle.AddrOfPinnedObject().ToPointer()) + offset); 320return new IntPtr(((char*)gcHandle.AddrOfPinnedObject().ToPointer()) + offset); 429return new IntPtr(_unsafeString + offset);
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 (3)
44UnsafeNativeMethods.SetProp(new HandleRef(this, sourceHandle), "MicrosoftTabletPenServiceProperty", new HandleRef(null, new IntPtr(MultiTouchEnabledFlag))); 129result = new IntPtr(flags); 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));
System\Windows\Media\GlyphTypeface.cs (1)
1280Marshal.Copy(new IntPtr(pMilPathGeometry), data, 0, checked((int)size));
System\Windows\Media\Imaging\BitmapSource.cs (1)
1833Marshal.Copy(managedArray, y * rectRowSize, new IntPtr(rowPtr), rectRowSize);
System\Windows\Media\Imaging\WriteableBitmap.cs (1)
527adjustedBuffer = new IntPtr(((long)buffer) + (long)offsetInBytes);
PresentationFramework (30)
Microsoft\Win32\CommonDialog.cs (1)
213return new IntPtr(1);
MS\Internal\IO\Packaging\UnsafeIndexingFilterStream.cs (3)
94IntPtr pBytesRead = new IntPtr(&bytesRead); 104_oleStream.Read(new IntPtr(bufferPointer), count, pBytesRead); 135IntPtr positionAddress = new IntPtr(&position);
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (1)
516____return_value__ = FindAdapter(new IntPtr(thisPtr))._Current;
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (2)
264____return_value__ = FindAdapter(new IntPtr(thisPtr)).GetAt(index); 285____return_value__ = FindAdapter(new IntPtr(thisPtr)).IndexOf(Marshaler<T>.FromAbi(value), out __index);
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 (4)
1331IntPtr lret = new IntPtr(requestSize); 1375Marshal.Copy(surrounding.ToCharArray(), 0, new IntPtr((void*)p), surrounding.Length); 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 (2)
36NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero); 90NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
System\Windows\Window.cs (2)
2251UnsafeNativeMethods.UnsafeSendMessage(Handle, WindowMessage.WM_CLOSE, new IntPtr(), new IntPtr());
PresentationUI (2)
MS\Internal\Documents\PeoplePickerWrapper.cs (2)
419IntPtr nameOffset = new IntPtr(_ptrToDsObjectNames.ToInt64() + dsObject.offsetName); 450IntPtr offset = new IntPtr(_ptrToDsObjectNames.ToInt64() +
ReachFramework (7)
MS\Internal\Printing\Configuration\WinSpoolPrinterCapabilities.cs (1)
557IntPtr strAddr = new IntPtr(baseAddr.ToInt64() + offset);
PrintConfig\PTProvider.cs (6)
630stream.Seek(0, 1 /* STREAM_SEEK_CUR */, new IntPtr(&iStreamPosition)); 660dst.Write(src, (int)byteCount, new IntPtr(&totalBytesWritten)); 681dst.Write(data, bytesToWrite, new IntPtr(&bytesWritten)); 714src.Read(dst, (int)byteCount, new IntPtr(&totalBytesRead)); 735src.Read(data, bytesToRead, new IntPtr(&bytesRead)); 759stream.Seek(0, 1 /* STREAM_SEEK_CUR */, new IntPtr(&iStreamPosition));
Replay (1)
src\Compilers\Core\CommandLine\NativeMethods.cs (1)
55internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1);
System.Data.Odbc (9)
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 (3)
15_value = new IntPtr(value); 20_value = new IntPtr(value); 168new IntPtr(cb),
System.Diagnostics.Process (1)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.ParseMapModules.cs (1)
76module.BaseAddress = new IntPtr((void*)parsedLine.StartAddress);
System.Drawing.Common.Tests (2)
System\Drawing\Imaging\BitmapDataTests.cs (2)
67Scan0 = new IntPtr(value) 69Assert.Equal(new IntPtr(value), bd.Scan0);
System.Formats.Nrbf (2)
System\Formats\Nrbf\ClassWithIdRecord.cs (1)
67MemberPrimitiveTypedRecord<IntPtr> => Create(new IntPtr(reader.ReadInt64())),
System\Formats\Nrbf\SystemClassWithMembersAndTypesRecord.cs (1)
66(PrimitiveType.Int64, "System.IntPtr", "value") => Create(new IntPtr(reader.ReadInt64())),
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.Ping (1)
System\Net\NetworkInformation\Ping.RawSocket.cs (1)
470Marshal.Copy(new IntPtr(&icmpHeader), result, offset, icmpHeaderSize);
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 (23)
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\CriticalHandleMinusOneIsInvalid.cs (2)
13: base(new IntPtr(-1)) 17public override bool IsInvalid => handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\CriticalHandleZeroOrMinusOneIsInvalid.cs (1)
17public override bool IsInvalid => handle == IntPtr.Zero || handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.Unix.cs (1)
53SetHandle(new IntPtr(-1));
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeHandleMinusOneIsInvalid.cs (2)
12protected SafeHandleMinusOneIsInvalid(bool ownsHandle) : base(new IntPtr(-1), ownsHandle) 16public override bool IsInvalid => handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeHandleZeroOrMinusOneIsInvalid.cs (1)
16public override bool IsInvalid => handle == IntPtr.Zero || handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\System\Threading\Overlapped.cs (2)
33: this(offsetLo, offsetHi, new IntPtr(hEvent), ar) 59set => EventHandleIntPtr = new IntPtr(value);
src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (1)
28private static IntPtr InvalidHandleValue => new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (1)
15protected static readonly IntPtr InvalidHandle = new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.FullGlobalizationData.cs (1)
84regionPtr = new IntPtr(regionInAscii);
src\System\Reflection\RuntimeAssembly.cs (1)
734Marshal.ThrowExceptionForHR(tokenMaybe, new IntPtr(-1));
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (2)
114AsAnyMarshaler marshaler = new AsAnyMarshaler(new IntPtr(&nativeArrayMarshalerState)); 181AsAnyMarshaler marshaler = new AsAnyMarshaler(new IntPtr(&nativeArrayMarshalerState));
src\System\Runtime\Loader\AssemblyLoadContext.CoreCLR.cs (2)
78LoadFromStream(_nativeAssemblyLoadContext, new IntPtr(ptrAssembly), arrAssembly.Length, 79new IntPtr(ptrSymbols), arrSymbols.Length, ObjectHandleOnStack.Create(ref loadedAssembly));
src\System\RuntimeHandles.cs (3)
2122Marshal.ThrowExceptionForHR(offsetMaybe, new IntPtr(-1)); 2140Marshal.ThrowExceptionForHR(offsetMaybe, new IntPtr(-1)); 2158Marshal.ThrowExceptionForHR(callConvMaybe, new IntPtr(-1));
src\System\StubHelpers.cs (3)
375return new IntPtr(pNative); 963IntPtr pNativeHomeAddr = new IntPtr(&pNativeHome); 1170new IntPtr(&pNativeHome));
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 (307)
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 (177)
88IntPtr remoteTextArea = new IntPtr((byte*)rmem.Address.ToPointer() + cbSize); 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)); 408return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 415new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), 423return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 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())); 465return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 472bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 484bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 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); 680textAddress = new IntPtr(&item.pszHeader); 685textAddress = new IntPtr(&item.pszSubsetTitle); 689return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item.iGroupID), new IntPtr(&item), Marshal.SizeOf(item.GetType()), textAddress, size, true); 698textAddress = new IntPtr(&item32.pszHeader); 703textAddress = new IntPtr(&item32.pszSubsetTitle); 707return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETGROUPINFO, new IntPtr(item32.iGroupID), new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), textAddress, size, true); 716textAddress = new IntPtr(&item64.pszHeader); 721textAddress = new IntPtr(&item64.pszSubsetTitle); 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), 799new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), 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), 882Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), item32.cchTextMax, 889return GetTextWithinStructure(hwnd, NativeMethods.HDM_GETITEMW, new IntPtr(index), new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 915return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 922bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 935bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 956return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 962return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 968return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 989if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo), 998if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo32), 1001hitTestItem = new IntPtr(hitTestInfo32.hItem); 1007if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo64), 1010hitTestItem = new IntPtr(hitTestInfo64.hItem); 1027return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1034hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), 1035Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), item32.cchTextMax, 1042return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 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); 1125hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item), 1126Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), maxTextLength, true); 1133hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item32), 1134Marshal.SizeOf(item32.GetType()), new IntPtr(&item32.pszText), maxTextLength, 1142hwnd, NativeMethods.TTM_GETTEXT, wParam, new IntPtr(&item64), 1143Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), maxTextLength, true); 1183IntPtr localRectStart = new IntPtr(&rectW32.left); 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) 2511hItem = new IntPtr(hitTestInfo64.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\Misc.cs (1)
581VirtualAlloc(new IntPtr((byte *)memAddr.ToPointer() + cbSize - pageSize), new UIntPtr(pageSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_NOACCESS);
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\WindowsHyperlink.cs (4)
211bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 276return XSendMessage.XSend(_hwnd, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM)); 395return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 492bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType()));
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 (16)
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; 1420result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1429result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 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 (6)
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 (7)
240return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 386while (XSendMessage.XSend (hwnd, NativeMethods.LVM_GETNEXTITEMINDEX, new IntPtr(&ii), flags, Marshal.SizeOf(ii.GetType()))) 393bool lresult = XSendMessage.XSend(hwnd, NativeMethods.LVM_GETGROUPINFOBYINDEX, new IntPtr(ii.iGroup), new IntPtr(&groupInfo), Marshal.SizeOf(typeof(NativeMethods.LVGROUP_V6))); 466XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPMETRICS, IntPtr.Zero, new IntPtr(&(metric.cbSize)), metric.cbSize, XSendMessage.ErrorValue.NoCheck); 703new IntPtr(_groupID), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (2)
77XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPRECT, new IntPtr(0), new IntPtr(&rect), Marshal.SizeOf(rect.GetType()));
MS\Internal\AutomationProxies\WindowsListViewItem.cs (4)
133if (XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETITEMINDEXRECT, new IntPtr(&ii), new IntPtr(&itemRectangle), Marshal.SizeOf(ii.GetType()), Marshal.SizeOf(itemRectangle.GetType()))) 969IntPtr keyUpLParam = new IntPtr (scanCode + (1 << 31) + (1 << 30)); 972Misc.ProxySendMessage(hwndEdit, NativeMethods.WM_KEYDOWN, key, new IntPtr(scanCode));
MS\Internal\AutomationProxies\WindowsMenu.cs (4)
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 (5)
206return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 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 (5)
178Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 283Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_SETPOS, new IntPtr(1), new IntPtr(val)); 460XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 472XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck);
MS\Internal\AutomationProxies\WindowsStatusBar.cs (1)
596int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsSysHeader.cs (7)
161index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 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 (7)
276index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType())); 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 (14)
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)); 552IntPtr rectangle = new IntPtr (&(rc.left)); 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)); 1596IntPtr pAddress = new IntPtr((long)address + (image * readSize)); 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);
16878 references to IntPtr
csc (16)
src\Compilers\Core\CommandLine\NativeMethods.cs (14)
29internal IntPtr lpReserved2; 30internal IntPtr hStdInput; 31internal IntPtr hStdOutput; 32internal IntPtr hStdError; 38public IntPtr hProcess; 39public IntPtr hThread; 54internal static readonly IntPtr NullPtr = IntPtr.Zero; 55internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1); 69internal static extern bool CloseHandle(IntPtr hObject); 80IntPtr lpProcessAttributes, 81IntPtr lpThreadAttributes, 85IntPtr lpEnvironment, 92internal static extern IntPtr GetCommandLine();
src\Compilers\Shared\BuildClient.cs (2)
356IntPtr ptr = NativeMethods.GetCommandLine(); 357if (ptr == IntPtr.Zero)
dotnet-svcutil-lib (1)
FrameworkFork\System.ServiceModel\System\ServiceModel\Security\SecurityUtils.cs (1)
860return certificate != null && certificate.Handle != IntPtr.Zero;
IIS.Tests (5)
Utilities\TestServer.cs (5)
144private int Main(IntPtr argc, IntPtr argv) 190private delegate int hostfxr_main_fn(IntPtr argc, IntPtr argv); 208private static partial IntPtr LoadLibrary([MarshalAs(UnmanagedType.LPWStr)] string lpFileName);
Infrastructure.Common (6)
SafeKeychainHandle.cs (6)
25private static extern int SecKeychainCreate(string pathName, int passphraseLength, byte[] passphraseUtf8, bool promptUser, IntPtr initialAccessNull, out SafeKeychainHandle keychain); 31private static extern void CFRelease(IntPtr ptr); 34: base(IntPtr.Zero, ownsHandle: true) 42SetHandle(IntPtr.Zero); 46public override bool IsInvalid => handle == IntPtr.Zero; 53int osStatus = SecKeychainCreate(pathName, utf8Passphrase.Length, utf8Passphrase, false, IntPtr.Zero, out keychain);
InMemory.FunctionalTests (1)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Cryptography.Internal (49)
Cng\BCryptBuffer.cs (1)
15public IntPtr pvBuffer; // Pointer to buffer
Cng\BCryptUtil.cs (1)
21hAlgorithm: IntPtr.Zero,
SafeHandles\BCryptAlgorithmHandle.cs (2)
32int ntstatus = UnsafeNativeMethods.BCryptCreateHash(this, out retVal, IntPtr.Zero, 0, pbKey, cbKey, dwFlags: 0); 55int ntstatus = UnsafeNativeMethods.BCryptGenerateSymmetricKey(this, out retVal, IntPtr.Zero, 0, pbSecret, cbSecret, 0);
SafeHandles\BCryptHashHandle.cs (1)
21int ntstatus = UnsafeNativeMethods.BCryptDuplicateHash(this, out duplicateHandle, IntPtr.Zero, 0, 0);
SafeHandles\NCryptDescriptorHandle.cs (1)
24pMemPara: IntPtr.Zero,
SafeHandles\SafeLibraryHandle.cs (11)
28IntPtr pfnProc = UnsafeNativeMethods.GetProcAddress(this, lpProcName); 29return (pfnProc != IntPtr.Zero); 68Arguments: IntPtr.Zero /* unused */); 90IntPtr pfnProc = UnsafeNativeMethods.GetProcAddress(this, lpProcName); 91if (pfnProc == IntPtr.Zero) 113SafeLibraryHandle handle = UnsafeNativeMethods.LoadLibraryEx(filename, IntPtr.Zero, LOAD_LIBRARY_SEARCH_SYSTEM32); 144IntPtr Arguments 159IntPtr hModule); 172out IntPtr phModule); 177internal static partial IntPtr GetProcAddress( 194IntPtr hFile,
SafeHandles\SecureLocalAllocHandle.cs (5)
16private readonly IntPtr _cb; 18private SecureLocalAllocHandle(IntPtr cb) 23public IntPtr Length 34public static SecureLocalAllocHandle Allocate(IntPtr cb) 44private void AllocateImpl(IntPtr cb)
UnsafeBufferUtil.cs (5)
78public static void BlockCopy(LocalAllocHandle from, LocalAllocHandle to, IntPtr length) 80if (length == IntPtr.Zero) 91if (sizeof(IntPtr) == 4) 185public static void SecureZeroMemory(byte* buffer, IntPtr length) 187if (sizeof(IntPtr) == 4)
UnsafeNativeMethods.cs (22)
40IntPtr hAlgorithm, 53IntPtr pbHashObject, 107IntPtr hHash); 120IntPtr hKey); 132IntPtr pbHashObject, 178IntPtr pbKeyObject, 192IntPtr hAlgorithm, 281IntPtr szDataDescr, 283IntPtr pvReserved, 284IntPtr pPromptStruct, 311IntPtr ppszDataDescr, 313IntPtr pvReserved, 314IntPtr pPromptStruct, 359IntPtr hDescriptor); 382IntPtr pMemPara, 398IntPtr pMemPara, 399IntPtr hWnd, 411IntPtr phDescriptor, 415IntPtr pMemPara, 416IntPtr hWnd, 432IntPtr pMemPara, 433IntPtr hWnd,
Microsoft.AspNetCore.Cryptography.Internal.Tests (12)
Cng\BCRYPT_AUTHENTICATED_CIPHER_MODE_INFO_Tests.cs (8)
20Assert.Equal(IntPtr.Zero, (IntPtr)cipherModeInfo.pbNonce); 22Assert.Equal(IntPtr.Zero, (IntPtr)cipherModeInfo.pbAuthData); 24Assert.Equal(IntPtr.Zero, (IntPtr)cipherModeInfo.pbTag); 26Assert.Equal(IntPtr.Zero, (IntPtr)cipherModeInfo.pbMacContext);
SafeHandles\SecureLocalAllocHandleTests.cs (1)
17var controlHandle = SecureLocalAllocHandle.Allocate((IntPtr)cbExpected);
UnsafeBufferUtilTests.cs (3)
54UnsafeBufferUtil.BlockCopy(from: controlHandle, to: testHandle, length: (IntPtr)cbExpected); 149UnsafeBufferUtil.SecureZeroMemory((byte*)&x, length: (IntPtr)sizeof(long)); 157return SecureLocalAllocHandle.Allocate((IntPtr)cb);
Microsoft.AspNetCore.Cryptography.KeyDerivation (3)
PBKDF2\Win8Pbkdf2Provider.cs (3)
161pBuffers[0].pvBuffer = (IntPtr)(&iterCount); 165pBuffers[1].pvBuffer = (IntPtr)pbSalt; 171pBuffers[2].pvBuffer = (IntPtr)pszHashAlgorithm;
Microsoft.AspNetCore.DataProtection (22)
Cng\DpapiSecretSerializerHelper.cs (16)
90szDataDescr: IntPtr.Zero, 92pvReserved: IntPtr.Zero, 93pPromptStruct: IntPtr.Zero, 104Marshal.Copy((IntPtr)dataOut.pbData, retVal, 0, dataLength); 113Marshal.FreeHGlobal((IntPtr)dataOut.pbData); 157pMemPara: IntPtr.Zero, 158hWnd: IntPtr.Zero, 233ppszDataDescr: IntPtr.Zero, 235pvReserved: IntPtr.Zero, 236pPromptStruct: IntPtr.Zero, 254Marshal.FreeHGlobal((IntPtr)dataOut.pbData); 280phDescriptor: IntPtr.Zero, 284pMemPara: IntPtr.Zero, 285hWnd: IntPtr.Zero, 345pMemPara: IntPtr.Zero, 346hWnd: IntPtr.Zero,
Repositories\RegistryXmlRepository.cs (1)
84var registryView = IntPtr.Size == 4 ? RegistryView.Registry32 : RegistryView.Registry64;
Secret.cs (2)
134var handle = SecureLocalAllocHandle.Allocate((IntPtr)checked((int)cbPlaintext)); 150var encryptedMemoryHandle = SecureLocalAllocHandle.Allocate((IntPtr)numTotalBytesToAllocate);
SP800_108\Win8SP800_108_CTR_HMACSHA512Provider.cs (3)
36pBuffers[0].pvBuffer = (IntPtr)pbLabel; 40pBuffers[1].pvBuffer = (IntPtr)pbContext; 44pBuffers[2].pvBuffer = (IntPtr)pszHashAlgorithm;
Microsoft.AspNetCore.DataProtection.Tests (22)
Cng\CngAuthenticatedEncryptorBaseTests.cs (22)
19.Setup(o => o.DecryptHook(It.IsAny<IntPtr>(), 2, It.IsAny<IntPtr>(), 4)) 20.Returns((IntPtr pbCiphertext, uint cbCiphertext, IntPtr pbAdditionalAuthenticatedData, uint cbAdditionalAuthenticatedData) => 44.Setup(o => o.DecryptHook(It.IsAny<IntPtr>(), 2, It.IsAny<IntPtr>(), 0)) 45.Returns((IntPtr pbCiphertext, uint cbCiphertext, IntPtr pbAdditionalAuthenticatedData, uint cbAdditionalAuthenticatedData) => 49Assert.NotEqual(IntPtr.Zero, pbAdditionalAuthenticatedData); // CNG will complain if this pointer is zero 69.Setup(o => o.DecryptHook(It.IsAny<IntPtr>(), 0, It.IsAny<IntPtr>(), 4)) 70.Returns((IntPtr pbCiphertext, uint cbCiphertext, IntPtr pbAdditionalAuthenticatedData, uint cbAdditionalAuthenticatedData) => 73Assert.NotEqual(IntPtr.Zero, pbCiphertext); // CNG will complain if this pointer is zero 91public abstract byte[] DecryptHook(IntPtr pbCiphertext, uint cbCiphertext, IntPtr pbAdditionalAuthenticatedData, uint cbAdditionalAuthenticatedData); 95return DecryptHook((IntPtr)pbCiphertext, cbCiphertext, (IntPtr)pbAdditionalAuthenticatedData, cbAdditionalAuthenticatedData); 98public abstract byte[] EncryptHook(IntPtr pbPlaintext, uint cbPlaintext, IntPtr pbAdditionalAuthenticatedData, uint cbAdditionalAuthenticatedData, uint cbPreBuffer, uint cbPostBuffer); 102return EncryptHook((IntPtr)pbPlaintext, cbPlaintext, (IntPtr)pbAdditionalAuthenticatedData, cbAdditionalAuthenticatedData, cbPreBuffer, cbPostBuffer);
Microsoft.AspNetCore.Http.Extensions (4)
src\Shared\ParameterBindingMethodCache.cs (4)
665else if (type == typeof(IntPtr)) 667method = typeof(IntPtr).GetMethod( 668nameof(IntPtr.TryParse), 670new[] { typeof(string), typeof(NumberStyles), typeof(IFormatProvider), typeof(IntPtr).MakeByRefType() });
Microsoft.AspNetCore.Http.Extensions.Tests (3)
ParameterBindingMethodCacheTests.cs (1)
22[InlineData(typeof(IntPtr))]
RequestDelegateFactoryTests.cs (2)
319new object[] { (Action<HttpContext, IntPtr[]>)Store, new[] { "-42" },new[] { new IntPtr(-42) } }, 370new object[] { (Action<HttpContext, IntPtr>)Store, "-42", new IntPtr(-42) },
Microsoft.AspNetCore.InternalTesting (6)
DumpCollector\DumpCollector.Windows.cs (6)
23if (!NativeMethods.MiniDumpWriteDump(process.Handle, (uint)process.Id, stream.SafeFileHandle, NativeMethods.MINIDUMP_TYPE.MiniDumpWithFullMemory, ref exceptionInfo, IntPtr.Zero, IntPtr.Zero)) 35public static extern bool MiniDumpWriteDump(IntPtr hProcess, uint ProcessId, SafeFileHandle hFile, MINIDUMP_TYPE DumpType, ref MINIDUMP_EXCEPTION_INFORMATION ExceptionParam, IntPtr UserStreamParam, IntPtr CallbackParam); 42public IntPtr ExceptionPointers;
Microsoft.AspNetCore.Mvc.Abstractions (4)
src\Shared\ParameterBindingMethodCache.cs (4)
665else if (type == typeof(IntPtr)) 667method = typeof(IntPtr).GetMethod( 668nameof(IntPtr.TryParse), 670new[] { typeof(string), typeof(NumberStyles), typeof(IFormatProvider), typeof(IntPtr).MakeByRefType() });
Microsoft.AspNetCore.OpenApi (4)
src\Shared\ParameterBindingMethodCache.cs (4)
665else if (type == typeof(IntPtr)) 667method = typeof(IntPtr).GetMethod( 668nameof(IntPtr.TryParse), 670new[] { typeof(string), typeof(NumberStyles), typeof(IFormatProvider), typeof(IntPtr).MakeByRefType() });
Microsoft.AspNetCore.Routing (2)
Matching\ILEmitTrieFactory.cs (1)
55return (IntPtr.Size == 8) &&
Matching\JumpTableBuilder.cs (1)
68var threshold = IntPtr.Size == 8 ? 100 : 50;
Microsoft.AspNetCore.Routing.Tests (1)
Matching\ILEmitTrieFactoryTest.cs (1)
13var is64Bit = IntPtr.Size == 8;
Microsoft.AspNetCore.Server.HttpSys (65)
AuthenticationManager.cs (1)
137IntPtr infoptr = new IntPtr(&authInfo);
NativeInterop\HttpApi.cs (11)
17internal static partial uint HttpReceiveRequestEntityBody(SafeHandle requestQueueHandle, ulong requestId, uint flags, IntPtr pEntityBuffer, uint entityBufferLength, out uint bytesReturned, SafeNativeOverlapped pOverlapped); 26internal static unsafe partial uint HttpSendHttpResponse(SafeHandle requestQueueHandle, ulong requestId, uint flags, Windows.Win32.Networking.HttpServer.HTTP_RESPONSE_V2* pHttpResponse, Windows.Win32.Networking.HttpServer.HTTP_CACHE_POLICY* pCachePolicy, uint* pBytesSent, IntPtr pReserved1, uint Reserved2, SafeNativeOverlapped pOverlapped, IntPtr pLogData); 32internal static unsafe partial uint HttpSendResponseEntityBody(SafeHandle requestQueueHandle, ulong requestId, uint flags, ushort entityChunkCount, Windows.Win32.Networking.HttpServer.HTTP_DATA_CHUNK* pEntityChunks, uint* pBytesSent, IntPtr pReserved1, uint Reserved2, SafeNativeOverlapped pOverlapped, IntPtr pLogData); 38void* qualifier, uint qualifierSize, void* output, uint outputSize, IntPtr bytesReturned, IntPtr overlapped); 41void* input, uint inputSize, IntPtr overlapped); 56void* qualifier, uint qualifierSize, void* output, uint outputSize, IntPtr bytesReturned, IntPtr overlapped) 62void* input, uint inputSize, IntPtr overlapped)
NativeInterop\SafeLibraryHandle.cs (8)
26IntPtr pfnProc = UnsafeNativeMethods.GetProcAddress(this, lpProcName); 27return (pfnProc != IntPtr.Zero); 35IntPtr pfnProc = UnsafeNativeMethods.GetProcAddress(this, lpProcName); 36if (pfnProc == IntPtr.Zero) 58SafeLibraryHandle handle = UnsafeNativeMethods.LoadLibraryEx(filename, IntPtr.Zero, LOAD_LIBRARY_SEARCH_SYSTEM32); 78internal static partial bool FreeLibrary(IntPtr hModule); 82internal static partial IntPtr GetProcAddress( 90IntPtr hFile,
NativeInterop\SafeNativeOverlapped.cs (7)
18: base(IntPtr.Zero, true) 23: base(IntPtr.Zero, true) 25SetHandle((IntPtr)handle); 31get { return handle == IntPtr.Zero; } 38IntPtr oldHandle = Interlocked.Exchange(ref handle, IntPtr.Zero); 41if (oldHandle != IntPtr.Zero && !HasShutdownStarted)
NativeInterop\UrlGroup.cs (4)
87internal unsafe void SetProperty(HTTP_SERVER_PROPERTY property, IntPtr info, uint infosize, bool throwOnError = true) 89Debug.Assert(info != IntPtr.Zero, "SetUrlGroupProperty called with invalid pointer"); 117var infoptr = new IntPtr(&info); 133var infoptr = new IntPtr(&info);
RequestProcessing\ClientCertLoader.cs (1)
279Marshal.Copy((IntPtr)pClientCertInfo->pCertEncoded, certEncoded, 0, certEncoded.Length);
RequestProcessing\RequestContext.cs (8)
256bytesReturned: (IntPtr)bytesReturned, 257overlapped: IntPtr.Zero); 290bytesReturned: (IntPtr)bytesReturned, 291overlapped: IntPtr.Zero); 328bytesReturned: IntPtr.Zero, 329IntPtr.Zero); 333return Marshal.PtrToStructure<HTTP_REQUEST_PROPERTY_SNI>((IntPtr)pBuffer); 352(uint)sizeof(HTTP_REQUEST_PROPERTY_STREAM_ERROR), IntPtr.Zero);
RequestProcessing\RequestStreamAsyncResult.cs (2)
14private readonly IntPtr _pinnedBuffer; 46internal IntPtr PinnedBuffer
RequestProcessing\Response.cs (4)
332IntPtr.Zero, 335IntPtr.Zero); 350IntPtr.Zero, 353IntPtr.Zero);
RequestProcessing\ResponseBody.cs (4)
364IntPtr.Zero, 367IntPtr.Zero); 687IntPtr.Zero, 690IntPtr.Zero);
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
src\Shared\HttpSys\NativeInterop\CookedUrl.cs (4)
23return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pFullUrl.Value, _nativeCookedUrl.FullUrlLength / 2); 32return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pHost.Value, _nativeCookedUrl.HostLength / 2); 41return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pAbsPath.Value, _nativeCookedUrl.AbsPathLength / 2); 50return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pQueryString.Value, _nativeCookedUrl.QueryStringLength / 2);
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (8)
30private IntPtr _originalBufferAddress; 186_originalBufferAddress = (IntPtr)_nativeRequest; 278return Marshal.PtrToStringAnsi((IntPtr)NativeRequest->pRawUrl.Value, NativeRequest->RawUrlLength); 742return GetRequestInfo((IntPtr)_nativeRequest, (HTTP_REQUEST_V2*)_nativeRequest); 754private IReadOnlyDictionary<int, ReadOnlyMemory<byte>> GetRequestInfo(IntPtr baseAddress, HTTP_REQUEST_V2* nativeRequest) 785return GetClientCertificate((IntPtr)_nativeRequest, (HTTP_REQUEST_V2*)_nativeRequest); 798private X509Certificate2? GetClientCertificate(IntPtr baseAddress, HTTP_REQUEST_V2* nativeRequest) 821Marshal.Copy((IntPtr)clientCert, certEncoded, 0, certEncoded.Length);
TimeoutManager.cs (1)
222var infoptr = new IntPtr(&timeoutinfo);
ValidationHelper.cs (1)
37else if (objectValue is IntPtr ptr)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
HttpsTests.cs (1)
218tlsCopy = Marshal.PtrToStructure<HTTP_SSL_PROTOCOL_INFO>((IntPtr)handle.Pointer);
Microsoft.AspNetCore.Server.IIS (104)
Core\IISConfigurationData.cs (14)
13public IntPtr pNativeApplication; 27public IntPtr pNativeApplication; 28public IntPtr pwzFullApplicationPath; 29public IntPtr pwzVirtualApplicationPath; 33public IntPtr pwzBindings; 41native.pwzFullApplicationPath = managed.pwzFullApplicationPath is null ? IntPtr.Zero : Marshal.StringToBSTR(managed.pwzFullApplicationPath); 42native.pwzVirtualApplicationPath = managed.pwzVirtualApplicationPath is null ? IntPtr.Zero : Marshal.StringToBSTR(managed.pwzVirtualApplicationPath); 46native.pwzBindings = managed.pwzBindings is null ? IntPtr.Zero : Marshal.StringToBSTR(managed.pwzBindings); 53if (native.pwzFullApplicationPath != IntPtr.Zero) 57if (native.pwzVirtualApplicationPath != IntPtr.Zero) 61if (native.pwzBindings != IntPtr.Zero) 72pwzFullApplicationPath = native.pwzFullApplicationPath == IntPtr.Zero ? string.Empty : Marshal.PtrToStringBSTR(native.pwzFullApplicationPath), 73pwzVirtualApplicationPath = native.pwzVirtualApplicationPath == IntPtr.Zero ? string.Empty : Marshal.PtrToStringBSTR(native.pwzVirtualApplicationPath), 77pwzBindings = native.pwzBindings == IntPtr.Zero ? string.Empty : Marshal.PtrToStringBSTR(native.pwzBindings),
Core\IISHttpContext.cs (5)
317NativeMethods.HttpSetManagedContext(_requestNativeHandle, (IntPtr)_thisHandle); 431IntPtr.Zero); 433return statusCode == NativeMethods.HR_OK ? Marshal.PtrToStructure<HTTP_REQUEST_PROPERTY_SNI>((IntPtr)pBuffer) : default; 846NativeMethods.HttpGetAuthenticationInformation(_requestNativeHandle, out var authenticationType, out var token); 848if (token != IntPtr.Zero && authenticationType != null)
Core\IISHttpContext.FeatureCollection.cs (1)
395Marshal.Copy((IntPtr)NativeRequest->pSslInfo->pClientCertInfo->pCertEncoded, rawCertificateCopy, 0, rawCertificateCopy.Length);
Core\IISHttpServer.cs (8)
104(IntPtr)_httpServerHandle, 105(IntPtr)_httpServerHandle); 148private static NativeMethods.REQUEST_NOTIFICATION_STATUS HandleRequest(IntPtr pInProcessHandler, IntPtr pvRequestContext) 180private static int HandleShutdown(IntPtr pvRequestContext) 204private static void OnDisconnect(IntPtr pvManagedHttpContext) 226private static NativeMethods.REQUEST_NOTIFICATION_STATUS OnAsyncCompletion(IntPtr pvManagedHttpContext, int hr, int bytes) 251private static void OnRequestsDrained(IntPtr serverContext)
Core\IISNativeApplication.cs (8)
48delegate* unmanaged<IntPtr, IntPtr, NativeMethods.REQUEST_NOTIFICATION_STATUS> requestCallback, 49delegate* unmanaged<IntPtr, int> shutdownCallback, 50delegate* unmanaged<IntPtr, void> disconnectCallback, 51delegate* unmanaged<IntPtr, int, int, NativeMethods.REQUEST_NOTIFICATION_STATUS> asyncCallback, 52delegate* unmanaged<IntPtr, void> requestsDrainedHandler, 53IntPtr pvRequestContext, 54IntPtr pvShutdownContext)
Core\IO\WebSocketsAsyncIOEngine.Read.cs (4)
15public static NativeMethods.REQUEST_NOTIFICATION_STATUS ReadCallback(IntPtr httpContext, IntPtr completionInfo, IntPtr completionContext) 51(IntPtr)_thisHandle,
Core\IO\WebSocketsAsyncIOEngine.Write.cs (4)
14private static NativeMethods.REQUEST_NOTIFICATION_STATUS WriteCallback(IntPtr httpContext, IntPtr completionInfo, IntPtr completionContext) 37return NativeMethods.HttpWebsocketsWriteBytes(requestHandler, dataChunks, chunkCount, &WriteCallback, (IntPtr)_thisHandle, out completionExpected);
Core\NativeSafeHandle.cs (4)
13public override bool IsInvalid => handle == IntPtr.Zero; 16public NativeSafeHandle(IntPtr handle) : base(IntPtr.Zero, ownsHandle: true) 23handle = IntPtr.Zero;
NativeMethods.cs (43)
25public static partial bool CloseHandle(IntPtr handle); 28private static partial IntPtr GetModuleHandle([MarshalAs(UnmanagedType.LPWStr)] string lpModuleName); 32return GetModuleHandle(AspNetCoreModuleDll) != IntPtr.Zero; 53delegate* unmanaged<IntPtr, IntPtr, REQUEST_NOTIFICATION_STATUS> requestCallback, 54delegate* unmanaged<IntPtr, int> shutdownCallback, 55delegate* unmanaged<IntPtr, void> disconnectCallback, 56delegate* unmanaged<IntPtr, int, int, REQUEST_NOTIFICATION_STATUS> asyncCallback, 57delegate* unmanaged<IntPtr, void> requestsDrainedHandler, 58IntPtr pvRequestContext, 59IntPtr pvShutdownContext); 86private static partial void http_get_completion_info(IntPtr pCompletionInfo, out int cbBytes, out int hr); 89private static partial int http_set_managed_context(NativeSafeHandle pInProcessHandler, IntPtr pvManagedContext); 104IntPtr overlapped); 123delegate* unmanaged<IntPtr, IntPtr, IntPtr, REQUEST_NOTIFICATION_STATUS> pfnCompletionCallback, 124IntPtr pvCompletionContext, 133delegate* unmanaged<IntPtr, IntPtr, IntPtr, REQUEST_NOTIFICATION_STATUS> pfnCompletionCallback, 134IntPtr pvCompletionContext, 165private static partial int http_get_authentication_information(NativeSafeHandle pInProcessHandler, [MarshalAs(UnmanagedType.BStr)] out string authType, out IntPtr token); 181delegate* unmanaged<IntPtr, IntPtr, REQUEST_NOTIFICATION_STATUS> requestCallback, 182delegate* unmanaged<IntPtr, int> shutdownCallback, 183delegate* unmanaged<IntPtr, void> disconnectCallback, 184delegate* unmanaged<IntPtr, int, int, REQUEST_NOTIFICATION_STATUS> asyncCallback, 185delegate* unmanaged<IntPtr, void> requestsDrainedHandler, 186IntPtr pvRequestContext, 187IntPtr pvShutdownContext) 232public static void HttpGetCompletionInfo(IntPtr pCompletionInfo, out int cbBytes, out int hr) 237public static void HttpSetManagedContext(NativeSafeHandle pInProcessHandler, IntPtr pvManagedContext) 248public static unsafe int HttpQueryRequestProperty(ulong requestId, HTTP_REQUEST_PROPERTY propertyId, void* qualifier, uint qualifierSize, void* output, uint outputSize, uint* bytesReturned, IntPtr overlapped) 267delegate* unmanaged<IntPtr, IntPtr, IntPtr, REQUEST_NOTIFICATION_STATUS> pfnCompletionCallback, 268IntPtr pvCompletionContext, out int dwBytesReceived, 278delegate* unmanaged<IntPtr, IntPtr, IntPtr, REQUEST_NOTIFICATION_STATUS> pfnCompletionCallback, 279IntPtr pvCompletionContext, 324public static void HttpGetAuthenticationInformation(NativeSafeHandle pInProcessHandler, out string authType, out IntPtr token)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
src\Shared\HttpSys\NativeInterop\CookedUrl.cs (4)
23return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pFullUrl.Value, _nativeCookedUrl.FullUrlLength / 2); 32return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pHost.Value, _nativeCookedUrl.HostLength / 2); 41return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pAbsPath.Value, _nativeCookedUrl.AbsPathLength / 2); 50return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pQueryString.Value, _nativeCookedUrl.QueryStringLength / 2);
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (8)
30private IntPtr _originalBufferAddress; 186_originalBufferAddress = (IntPtr)_nativeRequest; 278return Marshal.PtrToStringAnsi((IntPtr)NativeRequest->pRawUrl.Value, NativeRequest->RawUrlLength); 742return GetRequestInfo((IntPtr)_nativeRequest, (HTTP_REQUEST_V2*)_nativeRequest); 754private IReadOnlyDictionary<int, ReadOnlyMemory<byte>> GetRequestInfo(IntPtr baseAddress, HTTP_REQUEST_V2* nativeRequest) 785return GetClientCertificate((IntPtr)_nativeRequest, (HTTP_REQUEST_V2*)_nativeRequest); 798private X509Certificate2? GetClientCertificate(IntPtr baseAddress, HTTP_REQUEST_V2* nativeRequest) 821Marshal.Copy((IntPtr)clientCert, certEncoded, 0, certEncoded.Length);
Microsoft.AspNetCore.Server.IISIntegration (2)
IISMiddleware.cs (1)
178var handle = new IntPtr(hexHandle);
NativeMethods.cs (1)
14public static partial bool CloseHandle(IntPtr handle);
Microsoft.AspNetCore.Server.IntegrationTesting.IIS (24)
IISExpressDeployer.cs (11)
448internal delegate bool EnumWindowProc(IntPtr hwnd, IntPtr lParam); 450internal static partial uint GetWindowThreadProcessId(IntPtr hwnd, out uint lpdwProcessId); 453internal static partial bool PostMessage([MarshalUsing(typeof(HandleRefMarshaller))] HandleRef hWnd, uint Msg, IntPtr wParam, IntPtr lParam); 456internal static partial bool EnumWindows(EnumWindowProc callback, IntPtr lParam); 458internal static partial int GetClassName(IntPtr hWnd, [Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.U2)] char[] lpClassName, int nMaxCount); 472public IntPtr ToUnmanaged() => _handle.Handle; 520if (!WindowsNativeMethods.PostMessage(hWnd, 0x12, IntPtr.Zero, IntPtr.Zero)) 530}, IntPtr.Zero);
ProcessTracker.cs (13)
13private static readonly IntPtr _jobHandle = IntiailizeProcessTracker(); 15private static IntPtr IntiailizeProcessTracker() 20return IntPtr.Zero; 24var jobHandle = CreateJobObject(IntPtr.Zero, name: $"ProcessTracker{Environment.ProcessId}"); 35var extendedInfoPtr = Marshal.AllocHGlobal(length); 56if (_jobHandle != IntPtr.Zero) 67private static partial IntPtr CreateJobObject(IntPtr lpJobAttributes, string name); 71private static partial bool SetInformationJobObject(IntPtr job, JobObjectInfoType infoType, 72IntPtr lpJobObjectInfo, uint cbJobObjectInfoLength); 76private static partial bool AssignProcessToJobObject(IntPtr job, IntPtr process);
Microsoft.AspNetCore.Server.Kestrel.Core (82)
Internal\Http\HttpHeaders.Generated.cs (77)
7533if (((ReadUnalignedLittleEndian_ushort(ref nameStart) & 0xdfdfu) == 0x4956u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)2) & 0xdfu) == 0x41u)) 7562if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfffu) == 0x5441503au) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)4) & 0xdfu) == 0x48u)) 7568else if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfdfu) == 0x474e4152u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)4) & 0xdfu) == 0x45u)) 7577if ((firstTerm6 == 0x45434341u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x5450u)) 7583else if ((firstTerm6 == 0x4b4f4f43u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4549u)) 7589else if ((firstTerm6 == 0x45505845u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x5443u)) 7595else if ((firstTerm6 == 0x4749524fu) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4e49u)) 7601else if ((firstTerm6 == 0x47415250u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x414du)) 7609if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfffu) == 0x54454d3au) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4f48u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)6) & 0xdfu) == 0x44u)) 7615else if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfffu) == 0x4843533au) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4d45u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)6) & 0xdfu) == 0x45u)) 7621else if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfdfu) == 0x47474142u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4741u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)6) & 0xdfu) == 0x45u)) 7627else if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfdfu) == 0x45464552u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4552u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)6) & 0xdfu) == 0x52u)) 7633else if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfdfu) == 0x52475055u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4441u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)6) & 0xdfu) == 0x45u)) 7639else if (((ReadUnalignedLittleEndian_uint(ref nameStart) & 0xdfdfdfdfu) == 0x4e524157u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ushort)))) & 0xdfdfu) == 0x4e49u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)6) & 0xdfu) == 0x47u)) 7667if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfffuL) == 0x4f434f544f52503auL) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)8) & 0xdfu) == 0x4cu)) 7673else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x54414c534e415254uL) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)8) & 0xdfu) == 0x45u)) 7681if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x495443454e4e4f43uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x4e4fu)) 7687else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfffdfdfdfdfuL) == 0x4547412d52455355uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x544eu)) 7693else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfffuL) == 0x49524f485455413auL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x5954u)) 7699else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfffdfdfdfdfuL) == 0x494c412d5045454buL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x4556u)) 7705else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xffdfdfdfdfdfdfdfuL) == 0x2d54534555514552uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x4449u)) 7711else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x4154534543415254uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x4554u)) 7719if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x5241504543415254uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(ushort)))) & 0xdfdfu) == 0x4e45u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)10) & 0xdfu) == 0x54u)) 7727if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xffdfdfdfdfdfdfdfuL) == 0x2d544e45544e4f43uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x45505954u)) 7733else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfffdfdfdfdfuL) == 0x4d49542d43505247uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x54554f45u)) 7739else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfffdfdfdfuL) == 0x57524f462d58414duL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x53445241u)) 7747if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x5a49524f48545541uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x4f495441u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)12) & 0xdfu) == 0x4eu)) 7753else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfffdfdfdfdfdfuL) == 0x4f432d4548434143uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x4f52544eu) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)12) & 0xdfu) == 0x4cu)) 7759else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfffdfdfdfdfuL) == 0x434e452d43505247uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x4e49444fu) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)12) & 0xdfu) == 0x47u)) 7765else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xffdfdfdfdfffdfdfuL) == 0x2d454e4f4e2d4649uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x4354414du) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)12) & 0xdfu) == 0x48u)) 7773if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfffdfdfdfdfdfdfuL) == 0x432d545045434341uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x53524148u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(6 * sizeof(ushort)))) & 0xdfdfu) == 0x5445u)) 7779else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xffdfdfdfdfdfdfdfuL) == 0x2d544e45544e4f43uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x474e454cu) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(6 * sizeof(ushort)))) & 0xdfdfu) == 0x4854u)) 7796if ((firstTerm15 == 0x452d545045434341uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x444f434eu) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(6 * sizeof(ushort)))) & 0xdfdfu) == 0x4e49u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)14) & 0xdfu) == 0x47u)) 7802else if ((firstTerm15 == 0x4c2d545045434341uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x55474e41u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(6 * sizeof(ushort)))) & 0xdfdfu) == 0x4741u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)14) & 0xdfu) == 0x45u)) 7810if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfffdfdfuL) == 0x4649444f4d2d4649uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfdfdfffdfdfdfuL) == 0x434e49532d444549uL) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)16) & 0xdfu) == 0x45u)) 7816else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x524546534e415254uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfdfdfdfdfdfffuL) == 0x4e49444f434e452duL) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)16) & 0xdfu) == 0x47u)) 7824if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfdfdfdfuL) == 0x54414c4552524f43uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfdfdfffdfdfdfuL) == 0x544e4f432d4e4f49uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(8 * sizeof(ushort)))) & 0xdfdfu) == 0x5845u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)18) & 0xdfu) == 0x54u)) 7830else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfdfdfffdfdfuL) == 0x444f4d4e552d4649uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfffdfdfdfdfdfuL) == 0x49532d4445494649uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(8 * sizeof(ushort)))) & 0xdfdfu) == 0x434eu) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)18) & 0xdfu) == 0x45u)) 7836else if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfffdfdfdfdfdfuL) == 0x55412d59584f5250uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfdfdfdfdfdfdfuL) == 0x54415a49524f4854uL) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(8 * sizeof(ushort)))) & 0xdfdfu) == 0x4f49u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)18) & 0xdfu) == 0x4eu)) 7844if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfdfdfffdfdfdfdfuL) == 0x4343412d43505247uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfdfdfffdfdfdfuL) == 0x4f434e452d545045uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(4 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x474e4944u)) 7852if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xffdfdfdfdfdfdfdfuL) == 0x2d45444152475055uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfdfdfdfdfdfdfdfuL) == 0x4552554345534e49uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ulong)))) & 0xdfdfdfdfdfdfdfffuL) == 0x545345555145522duL) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)24) & 0xdfu) == 0x53u)) 7860if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfffdfdfdfdfdfdfuL) == 0x432d535345434341uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfffdfdfdfdfdfdfuL) == 0x522d4c4f52544e4fuL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ulong)))) & 0xdfffdfdfdfdfdfdfuL) == 0x4d2d545345555145uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(6 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x4f485445u) && ((Unsafe.AddByteOffset(ref nameStart, (IntPtr)28) & 0xdfu) == 0x44u)) 7868if (((ReadUnalignedLittleEndian_ulong(ref nameStart) & 0xdfffdfdfdfdfdfdfuL) == 0x432d535345434341uL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)sizeof(ulong))) & 0xdfffdfdfdfdfdfdfuL) == 0x522d4c4f52544e4fuL) && ((ReadUnalignedLittleEndian_ulong(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(2 * sizeof(ulong)))) & 0xdfffdfdfdfdfdfdfuL) == 0x482d545345555145uL) && ((ReadUnalignedLittleEndian_uint(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(6 * sizeof(uint)))) & 0xdfdfdfdfu) == 0x45444145u) && ((ReadUnalignedLittleEndian_ushort(ref Unsafe.AddByteOffset(ref nameStart, (IntPtr)(14 * sizeof(ushort)))) & 0xdfdfu) == 0x5352u))
Internal\Infrastructure\KestrelEventSource.cs (5)
403DataPointer = (IntPtr)arg1Ptr, 408DataPointer = (IntPtr)arg2Ptr, 413DataPointer = (IntPtr)arg3Ptr, 418DataPointer = (IntPtr)arg4Ptr, 423DataPointer = (IntPtr)arg5Ptr,
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (2)
SocketTransportOptions.cs (1)
136new SafeSocketHandle((IntPtr)fileHandle.FileHandle, ownsHandle: false)
src\Shared\Buffers.MemoryPool\DiagnosticPoolBlock.cs (1)
152return new MemoryHandle(((IntPtr)_memoryHandle.Value.Pointer + byteOffset).ToPointer(), default, this);
Microsoft.AspNetCore.Shared.Tests (12)
src\Shared\HttpSys\NativeInterop\CookedUrl.cs (4)
23return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pFullUrl.Value, _nativeCookedUrl.FullUrlLength / 2); 32return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pHost.Value, _nativeCookedUrl.HostLength / 2); 41return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pAbsPath.Value, _nativeCookedUrl.AbsPathLength / 2); 50return Marshal.PtrToStringUni((IntPtr)_nativeCookedUrl.pQueryString.Value, _nativeCookedUrl.QueryStringLength / 2);
src\Shared\HttpSys\RequestProcessing\NativeRequestContext.cs (8)
30private IntPtr _originalBufferAddress; 186_originalBufferAddress = (IntPtr)_nativeRequest; 278return Marshal.PtrToStringAnsi((IntPtr)NativeRequest->pRawUrl.Value, NativeRequest->RawUrlLength); 742return GetRequestInfo((IntPtr)_nativeRequest, (HTTP_REQUEST_V2*)_nativeRequest); 754private IReadOnlyDictionary<int, ReadOnlyMemory<byte>> GetRequestInfo(IntPtr baseAddress, HTTP_REQUEST_V2* nativeRequest) 785return GetClientCertificate((IntPtr)_nativeRequest, (HTTP_REQUEST_V2*)_nativeRequest); 798private X509Certificate2? GetClientCertificate(IntPtr baseAddress, HTTP_REQUEST_V2* nativeRequest) 821Marshal.Copy((IntPtr)clientCert, certEncoded, 0, certEncoded.Length);
Microsoft.Build (25)
BackEnd\Components\Communications\NodeLauncher.cs (2)
179if (processInfo.hProcess != IntPtr.Zero && processInfo.hProcess != NativeMethods.InvalidHandle) 184if (processInfo.hThread != IntPtr.Zero && processInfo.hThread != NativeMethods.InvalidHandle)
BackEnd\Node\NativeMethods.cs (11)
20internal static readonly IntPtr NullPtr = IntPtr.Zero; 25internal static readonly IntPtr InvalidHandle = new IntPtr(-1); 60IntPtr lpEnvironment, 148internal IntPtr lpReserved2; 153internal IntPtr hStdInput; 158internal IntPtr hStdOutput; 163internal IntPtr hStdError; 187public IntPtr lpSecurityDescriptor; 206public IntPtr hProcess; 211public IntPtr hThread;
BuildCheck\Checks\UntrustedLocationCheck.cs (2)
71return SHGetKnownFolderPath(new Guid("374DE290-123F-4565-9164-39C4925E467B"), 0, IntPtr.Zero); 95IntPtr hToken);
InprocTrackingNativeMethods.cs (6)
153private static readonly Lazy<string> fileTrackerDllName = new Lazy<string>(() => RuntimeInformation.ProcessArchitecture == Architecture.Arm64 ? "FileTrackerA4.dll" : (IntPtr.Size == sizeof(Int32)) ? "FileTracker32.dll" : "FileTracker64.dll"); 188private static extern IntPtr GetProcAddress(SafeHandle moduleHandle, String procName); 236IntPtr entryPoint = GetProcAddress(s_fileTrackerDllHandle, entryPointName); 238if (IntPtr.Zero == entryPoint) 283: base(IntPtr.Zero, true) 291{ return IntPtr.Zero == handle; }
Logging\InProcessConsoleConfiguration.cs (2)
31IntPtr stdOut = NativeMethodsShared.GetStdHandle(NativeMethodsShared.STD_OUTPUT_HANDLE); 81IntPtr stdHandle = NativeMethodsShared.GetStdHandle(NativeMethodsShared.STD_OUTPUT_HANDLE);
WindowsNative.cs (1)
278internal static extern bool FindClose(IntPtr findFileHandle);
XMakeAttributes.cs (1)
446currentArchitecture = (IntPtr.Size == sizeof(Int64)) ? MSBuildArchitectureValues.x64 : MSBuildArchitectureValues.x86;
Microsoft.Build.Engine.OM.UnitTests (1)
WindowsNative.cs (1)
278internal static extern bool FindClose(IntPtr findFileHandle);
Microsoft.Build.Engine.UnitTests (3)
BackEnd\TargetUpToDateChecker_Tests.cs (2)
1044NativeMethodsShared.FILE_SHARE_READ, IntPtr.Zero, NativeMethodsShared.OPEN_EXISTING, 1046IntPtr.Zero))
ConsoleLogger_Tests.cs (1)
2460IntPtr stdHandle = NativeMethodsShared.GetStdHandle(NativeMethodsShared.STD_OUTPUT_HANDLE);
Microsoft.Build.Framework (42)
ArraySortHelper.cs (5)
615if (typeof(T) == typeof(IntPtr)) 649if (typeof(T) == typeof(IntPtr)) 1172if (typeof(TKey) == typeof(IntPtr)) 1206if (typeof(TKey) == typeof(IntPtr)) 1302(IntPtr)(int)((value * 0x07C4ACDDu) >> 27));
EnvironmentUtilities.cs (1)
16public static bool Is64BitProcess => Marshal.SizeOf<IntPtr>() == 8;
NativeMethods.cs (33)
65internal static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 67internal static IntPtr NullIntPtr = new IntPtr(0); 68internal static IntPtr InvalidHandle = new IntPtr(-1); 165public IntPtr GroupInfo; 252internal IntPtr lpMinimumApplicationAddress; 253internal IntPtr lpMaximumApplicationAddress; 254internal IntPtr dwActiveProcessorMask; 355public IntPtr PebBaseAddress; 408public IntPtr lpSecurityDescriptor; 522if (!GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP.RelationProcessorCore, IntPtr.Zero, ref len) && 530if (GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP.RelationProcessorCore, (IntPtr)bufferPtr, ref len)) 975internal static extern bool GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP RelationshipType, IntPtr Buffer, ref uint ReturnedLength); 1230IntPtr.Zero, 1233IntPtr.Zero); 1525int fullPathLength = GetFullPathWin32(path, MAX_PATH, buffer, IntPtr.Zero); 1531fullPathLength = GetFullPathWin32(path, fullPathLength, newBuffer, IntPtr.Zero); 1541private static unsafe int GetFullPathWin32(string target, int bufferLength, char* buffer, IntPtr mustBeZero) 1603IntPtr outputStream = GetStdHandle((int)handleType); 1648IntPtr stdOut = GetStdHandle((int)handleType); 1683internal static extern bool FreeLibrary([In] IntPtr module); 1687internal static extern IntPtr GetProcAddress(IntPtr module, string procName); 1691internal static extern IntPtr LoadLibrary(string fileName); 1705internal static extern IntPtr GetStdHandle(int nStdHandle); 1709internal static extern uint GetFileType(IntPtr hFile); 1712internal static extern bool GetConsoleMode(IntPtr hConsoleHandle, out uint lpMode); 1715internal static extern bool SetConsoleMode(IntPtr hConsoleHandle, uint dwMode); 1748internal static extern unsafe int GetFullPathName(string target, int bufferLength, char* buffer, IntPtr mustBeZero); 1777internal static extern bool ReadFile(SafeFileHandle hFile, byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead, IntPtr lpOverlapped); 1786public static extern int CoWaitForMultipleHandles(COWAIT_FLAGS dwFlags, int dwTimeout, int cHandles, [MarshalAs(UnmanagedType.LPArray)] IntPtr[] pHandles, out int pdwIndex); 1801IntPtr lpSecurityAttributes, 1804IntPtr hTemplateFile); 1817internal static extern bool CloseHandle(IntPtr hObject);
SegmentedArrayHelper.cs (1)
92return (2 * IntPtr.Size) + (elementSize * segmentSize);
VisualStudioLocationHelper.cs (2)
98var result = GetSetupConfiguration(out query, IntPtr.Zero); 112IntPtr reserved);
Microsoft.Build.Tasks.CodeAnalysis (15)
RCWForCurrentContext.cs (1)
40IntPtr iunknownPtr = Marshal.GetIUnknownForObject(rcw);
src\Compilers\Core\CommandLine\NativeMethods.cs (14)
29internal IntPtr lpReserved2; 30internal IntPtr hStdInput; 31internal IntPtr hStdOutput; 32internal IntPtr hStdError; 38public IntPtr hProcess; 39public IntPtr hThread; 54internal static readonly IntPtr NullPtr = IntPtr.Zero; 55internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1); 69internal static extern bool CloseHandle(IntPtr hObject); 80IntPtr lpProcessAttributes, 81IntPtr lpThreadAttributes, 85IntPtr lpEnvironment, 92internal static extern IntPtr GetCommandLine();
Microsoft.Build.Tasks.Core (203)
BootstrapperUtil\NativeMethods.cs (4)
14internal static extern IntPtr BeginUpdateResourceW(String fileName, bool deleteExistingResource); 17internal static extern bool UpdateResourceW(IntPtr hUpdate, IntPtr lpType, String lpName, short wLanguage, byte[] data, int cbData); 20internal static extern bool EndUpdateResource(IntPtr hUpdate, bool fDiscard);
BootstrapperUtil\ResourceUpdater.cs (9)
46IntPtr hUpdate = IntPtr.Zero; 51while (IntPtr.Zero == hUpdate && Marshal.GetHRForLastWin32Error() == ERROR_SHARING_VIOLATION && beginUpdateRetries > 0) // If it equals 0x80070020 (ERROR_SHARING_VIOLATION), sleep & retry 60if (IntPtr.Zero == hUpdate) 69if (hUpdate != IntPtr.Zero) 75if (!NativeMethods.UpdateResourceW(hUpdate, (IntPtr)resource.Type, resource.Name, 0, data, data.Length)) 87if (!NativeMethods.UpdateResourceW(hUpdate, (IntPtr)42, "COUNT", 0, countArray, countArray.Length)) 109if (!NativeMethods.UpdateResourceW(hUpdate, (IntPtr)42, dataName, 0, fileContent, fileLength)) 119if (!NativeMethods.UpdateResourceW(hUpdate, (IntPtr)42, keyName, 0, data, data.Length))
Copy.cs (3)
604var successFlags = new IntPtr[DestinationFiles.Length]; 627if (successFlags[i] != (IntPtr)0) 679successFlags[fileIndex] = (IntPtr)1;
Interop.cs (2)
31void QueryCustomPolicy([In][MarshalAs(UnmanagedType.LPWStr)] string pwszUrl, [In][ComAliasName("UrlMonTypeLib.GUID")] ref GUID guidKey, [Out] IntPtr ppPolicy, out int pcbPolicy, [In] ref byte pContext, [In] int cbContext, [In] int dwReserved); 48void GetWindow([Out][ComAliasName("UrlMonTypeLib.wireHWND")] IntPtr phwnd);
IVbcHostObject5.cs (2)
23int CompileAsync(out IntPtr buildSucceededEvent, out IntPtr buildFailedEvent);
ManifestUtil\ComImporter.cs (5)
48if (NativeMethods.SfcIsFileProtected(IntPtr.Zero, path) != 0) 65IntPtr typeLibAttrPtr = IntPtr.Zero; 89IntPtr tinfoAttrPtr = IntPtr.Zero;
ManifestUtil\EmbeddedManifestReader.cs (14)
14private static readonly IntPtr s_id1 = new IntPtr(1); 19IntPtr hModule = IntPtr.Zero; 22hModule = NativeMethods.LoadLibraryExW(path, IntPtr.Zero, NativeMethods.LOAD_LIBRARY_AS_DATAFILE); 23if (hModule == IntPtr.Zero) 28NativeMethods.EnumResourceNames(hModule, NativeMethods.RT_MANIFEST, callback, IntPtr.Zero); 32if (hModule != IntPtr.Zero) 39private bool EnumResNameCallback(IntPtr hModule, IntPtr pType, IntPtr pName, IntPtr param) 45IntPtr hResInfo = NativeMethods.FindResource(hModule, pName, NativeMethods.RT_MANIFEST); 46if (hResInfo == IntPtr.Zero) 50IntPtr hResource = NativeMethods.LoadResource(hModule, hResInfo);
ManifestUtil\mansign2.cs (43)
94internal IntPtr pbData; 103internal IntPtr pwszHash; // Hash. 104internal IntPtr pwszDescription; // Description. 105internal IntPtr pwszDescriptionUrl; // Description URL. 106internal IntPtr pChainContext; // Signer's chain context. 116internal IntPtr pChainContext; // Timestamper's chain context. 124IntPtr GetProcessHeap(); 130[In] IntPtr hHeap, 132[In] IntPtr lpMem); 162[In] IntPtr pCertContext, 163[In, Out] ref IntPtr ppwszPublicKeyHash); 170[In, Out] ref IntPtr ppwszPublicKeyToken); 176[In, Out] ref IntPtr ppwszPublicKeyToken); 188internal IntPtr pbEncoded; // BYTE* 189internal IntPtr pTimeStamp; // PCRYPT_TIMESTAMP_INFO->_CRYPT_TIMESTAMP_INFO* 196internal IntPtr pbData; 202internal IntPtr pszTSAPolicyId; 206internal IntPtr rgExtension; 221[In, Out] ref IntPtr ppTsContext, 222[In, Out] ref IntPtr ppTsSigner, 223[In, Out] ref IntPtr phStore); 227internal static extern bool CertFreeCertificateContext(IntPtr pCertContext); 231internal static extern bool CertCloseStore(IntPtr pCertContext, int dwFlags); 235internal static extern void CryptMemFree(IntPtr pv); 422IntPtr pIssuerKeyHash = new IntPtr(); 537IntPtr pPublicKeyToken = new IntPtr(); 756IntPtr ppTsContext = IntPtr.Zero; 757IntPtr ppTsSigner = IntPtr.Zero; 758IntPtr phStore = IntPtr.Zero; 792pszTSAPolicyId = IntPtr.Zero, 798para.Nonce.pbData = (IntPtr)pbNonce; 823if (ppTsContext != IntPtr.Zero) 828if (ppTsSigner != IntPtr.Zero) 833if (phStore != IntPtr.Zero) 877IntPtr pvLicense = new IntPtr(pbLicense); 1259if (signerInfo.pChainContext != IntPtr.Zero) 1265if (signerInfo.pwszHash != IntPtr.Zero) 1269if (signerInfo.pwszDescription != IntPtr.Zero) 1273if (signerInfo.pwszDescriptionUrl != IntPtr.Zero) 1380if (timestamperInfo.pChainContext != IntPtr.Zero)
ManifestUtil\NativeMethods.cs (23)
14public static readonly IntPtr RT_MANIFEST = new IntPtr(24); 16public static extern IntPtr LoadLibraryExW(string strFileName, IntPtr hFile, UInt32 ulFlags); 20public static extern bool FreeLibrary(IntPtr hModule); 22public static extern IntPtr FindResource(IntPtr hModule, IntPtr pName, IntPtr pType); 24public static extern IntPtr LoadResource(IntPtr hModule, IntPtr hResource); 26public static extern uint SizeofResource(IntPtr hModule, IntPtr hResource); 28public static extern IntPtr LockResource(IntPtr hGlobal); 30public static extern int EnumResourceNames(IntPtr hModule, IntPtr pType, EnumResNameProc enumFunc, IntPtr param); 31public delegate bool EnumResNameProc(IntPtr hModule, IntPtr pType, IntPtr pName, IntPtr param); 43public static extern int SfcIsFileProtected(IntPtr RpcHandle, string ProtFileName);
ManifestUtil\SecurityUtil.cs (4)
682IntPtr hModule = IntPtr.Zero; 729hModule = NativeMethods.LoadLibraryExW(Path.Combine(clrDllDir, "clr.dll"), IntPtr.Zero, NativeMethods.LOAD_LIBRARY_AS_DATAFILE); 755if (hModule != IntPtr.Zero)
NativeMethods.cs (92)
39void GetTypeAttr(out IntPtr ppTypeAttr); 41void GetFuncDesc(int index, out IntPtr ppFuncDesc); 42void GetVarDesc(int index, out IntPtr ppVarDesc); 44void GetRefTypeOfImplType(int index, out IntPtr href); 47void Invoke([MarshalAs(UnmanagedType.IUnknown)] Object pvInstance, int memid, Int16 wFlags, ref System.Runtime.InteropServices.ComTypes.DISPPARAMS pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, out int puArgErr); 49void GetDllEntry(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, IntPtr pBstrDllName, IntPtr pBstrName, IntPtr pwOrdinal); 50void GetRefTypeInfo(IntPtr hRef, out IFixedTypeInfo ppTI); 51void AddressOfMember(int memid, System.Runtime.InteropServices.ComTypes.INVOKEKIND invKind, out IntPtr ppv); 56void ReleaseTypeAttr(IntPtr pTypeAttr); 58void ReleaseFuncDesc(IntPtr pFuncDesc); 60void ReleaseVarDesc(IntPtr pVarDesc); 105object OpenScopeOnMemory([In] IntPtr pData, [In] UInt32 cbData, [In] UInt32 dwOpenFlags, [In] ref Guid riid); 117void CountEnum(IntPtr iRef, ref UInt32 ulCount); 243int GetCustomAttributeByName(UInt32 mdTokenObj, [MarshalAs(UnmanagedType.LPWStr)] string szName, out IntPtr ppData, out uint pDataSize); 272void GetAssemblyProps(UInt32 mdAsm, out IntPtr pPublicKeyPtr, out UInt32 ucbPublicKeyPtr, out UInt32 uHashAlg, [MarshalAs(UnmanagedType.LPArray)] char[] strName, UInt32 cchNameIn, out UInt32 cchNameRequired, IntPtr amdInfo, out UInt32 dwFlags); 273void GetAssemblyRefProps(UInt32 mdAsmRef, out IntPtr ppbPublicKeyOrToken, out UInt32 pcbPublicKeyOrToken, [MarshalAs(UnmanagedType.LPArray)] char[] strName, UInt32 cchNameIn, out UInt32 pchNameOut, IntPtr amdInfo, out IntPtr ppbHashValue, out UInt32 pcbHashValue, out UInt32 pdwAssemblyRefFlags); 274void GetFileProps([In] UInt32 mdFile, [MarshalAs(UnmanagedType.LPArray)] char[] strName, UInt32 cchName, out UInt32 cchNameRequired, out IntPtr bHashData, out UInt32 cchHashBytes, out UInt32 dwFileFlags); 277void EnumAssemblyRefs([In, Out] ref IntPtr phEnum, [MarshalAs(UnmanagedType.LPArray), Out] UInt32[] asmRefs, UInt32 asmRefCount, out UInt32 iFetched); 278void EnumFiles([In, Out] ref IntPtr phEnum, [MarshalAs(UnmanagedType.LPArray), Out] UInt32[] fileRefs, UInt32 fileRefCount, out UInt32 iFetched); 287void CloseEnum([In] IntPtr phEnum); 331public IntPtr rpLocale; 333public IntPtr rpProcessors; 335public IntPtr rOses; 405IntPtr pvProperty, 411IntPtr pvProperty, 429IntPtr pvReserved, 431out IntPtr ppv); 458IntPtr pvReserved, 507internal IntPtr lpReserved2; 508internal IntPtr hStdInput; 509internal IntPtr hStdOutput; 510internal IntPtr hStdError; 516public IntPtr hProcess; 517public IntPtr hThread; 529internal static readonly IntPtr NullPtr = IntPtr.Zero; 530internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1); 783internal IntPtr pbData; 799private static extern bool CreateHardLink(string newFileName, string exitingFileName, IntPtr securityAttributes); 809hardLinkCreated = CreateHardLink(newFileName, exitingFileName, IntPtr.Zero /* reserved, must be NULL */); 919internal static extern IntPtr CreateFile(string lpFileName, uint dwDesiredAccess, FileShare dwShareMode, 920IntPtr lpSecurityAttributes, FileMode dwCreationDisposition, uint dwFlagsAndAttributes, IntPtr hTemplateFile); 926internal static extern uint GetFileType(IntPtr hFile); 933internal static extern bool CloseHandle(IntPtr hObject); 939internal static extern IntPtr CreateFileMapping(IntPtr hFile, IntPtr lpFileMappingAttributes, uint flProtect, 946internal static extern IntPtr MapViewOfFile(IntPtr hFileMapping, uint dwDesiredAccess, uint dwFileOffsetHigh, uint dwFileOffsetLow, IntPtr dwNumberOfBytesToMap); 953internal static extern bool UnmapViewOfFile(IntPtr lpBaseAddress); 963IntPtr lpProcessAttributes, 964IntPtr lpThreadAttributes, 968IntPtr lpEnvironment, 977internal static extern IntPtr ImageNtHeader(IntPtr imageBase); 983internal static extern IntPtr ImageRvaToVa(IntPtr ntHeaders, IntPtr imageBase, uint Rva, out IntPtr LastRvaSection); 1011IntPtr pUnkReserved, 1014IntPtr pvReserved); 1023IntPtr pvReserved); 1042internal static extern IntPtr PFXImportCertStore([In] IntPtr blob, [In] string password, [In] CryptFlags flags); 1049internal static extern bool CertCloseStore([In] IntPtr CertStore, CertStoreClose Flags); 1055internal static extern IntPtr CertEnumCertificatesInStore([In] IntPtr CertStore, [In] IntPtr PrevCertContext); 1062internal static extern bool CryptAcquireCertificatePrivateKey([In] IntPtr CertContext, [In] uint flags, [In] IntPtr reserved, [In, Out] ref IntPtr CryptProv, [In, Out] ref KeySpec KeySpec, [In, Out, MarshalAs(UnmanagedType.Bool)] ref bool CallerFreeProv); 1069internal static extern bool CryptGetUserKey([In] IntPtr CryptProv, [In] KeySpec KeySpec, [In, Out] ref IntPtr Key); 1076internal static extern bool CryptExportKey([In] IntPtr Key, [In] IntPtr ExpKey, [In] BlobType type, [In] uint Flags, [In] IntPtr Data, [In, Out] ref uint DataLen); 1083internal static extern bool CryptDestroyKey(IntPtr hKey); 1090internal static extern bool CryptReleaseContext([In] IntPtr Prov, [In] uint Flags); 1097internal static extern bool CertFreeCertificateContext(IntPtr CertContext); 1202internal static unsafe int CorSigUncompressData(IntPtr data, out int uncompressedDataLength) 1305IntPtr.Zero); 1312IntPtr.Zero, 1315IntPtr.Zero); 1366int hr = _assemblyEnum.GetNextAssembly((IntPtr)0, out IAssemblyName fusionName, 0);
WindowsNative.cs (1)
278internal static extern bool FindClose(IntPtr findFileHandle);
XMakeAttributes.cs (1)
446currentArchitecture = (IntPtr.Size == sizeof(Int64)) ? MSBuildArchitectureValues.x64 : MSBuildArchitectureValues.x86;
Microsoft.Build.Tasks.UnitTests (40)
AddToWin32Manifest_Tests.cs (19)
148public static extern IntPtr LoadLibrary(string lpFileName, IntPtr hReservedNull, LoadLibraryFlags dwFlags); 151public static extern IntPtr FindResource(IntPtr hModule, string lpName, string lpType); 154public static extern IntPtr LoadResource(IntPtr hModule, IntPtr hResInfo); 157public static extern IntPtr LockResource(IntPtr hResData); 160public static extern uint SizeofResource(IntPtr hModule, IntPtr hResInfo); 164IntPtr hModule = LoadLibrary(assembly, IntPtr.Zero, LoadLibraryFlags.LOAD_LIBRARY_AS_DATAFILE); 167if (hModule != IntPtr.Zero) 169IntPtr hResource = FindResource(hModule, lpName, lpType); 170if (hResource != IntPtr.Zero) 173IntPtr resData = LoadResource(hModule, hResource); 174if (resData != IntPtr.Zero) 177IntPtr ipMemorySource = LockResource(resData);
MockUnmanagedMemoryHelper.cs (19)
18private List<IntPtr> _allocatedHandles; 22private IntPtr _mainAllocationHandle = IntPtr.Zero; 25private Dictionary<IntPtr, List<IntPtr>> _dependentAllocations = new Dictionary<IntPtr, List<IntPtr>>(); 32_allocatedHandles = new List<IntPtr>(); 40public IntPtr AllocateHandle(int cb) 42IntPtr handle = Marshal.AllocHGlobal(cb); 45if (_mainAllocationHandle != IntPtr.Zero) 49_dependentAllocations.Add(_mainAllocationHandle, new List<IntPtr>()); 66public void FreeHandle(IntPtr handle) 68Assert.True(_allocatedHandles.Exists(new Predicate<IntPtr>( 69delegate (IntPtr ptr) { return ptr == handle; }))); 88public void EnterSubAllocationScope(IntPtr mainAllocation) 90Assert.Equal(IntPtr.Zero, _mainAllocationHandle); 100Assert.NotEqual(IntPtr.Zero, _mainAllocationHandle); 102_mainAllocationHandle = IntPtr.Zero;
NativeMethodsShared_Tests.cs (2)
37IntPtr kernel32Dll = NativeMethodsShared.LoadLibrary("kernel32.dll"); 40IntPtr processHandle = NativeMethodsShared.NullIntPtr;
Microsoft.Build.UnGAC (2)
NativeMethods.cs (1)
18uint UninstallAssembly(uint dwFlags, [MarshalAs(UnmanagedType.LPWStr)] string pszAssemblyName, IntPtr pRefData, ref ulong pulDisposition);
Program.cs (1)
51hresult = assemblyCache.UninstallAssembly(dwFlags: 0, pszAssemblyName: assembly, pRefData: IntPtr.Zero, pulDisposition: 0);
Microsoft.Build.Utilities.Core (1)
WindowsNative.cs (1)
278internal static extern bool FindClose(IntPtr findFileHandle);
Microsoft.Build.Utilities.UnitTests (13)
NativeMethods.cs (11)
20internal static readonly IntPtr NullPtr = IntPtr.Zero; 25internal static readonly IntPtr InvalidHandle = new IntPtr(-1); 60IntPtr lpEnvironment, 148internal IntPtr lpReserved2; 153internal IntPtr hStdInput; 158internal IntPtr hStdOutput; 163internal IntPtr hStdError; 187public IntPtr lpSecurityDescriptor; 206public IntPtr hProcess; 211public IntPtr hThread;
NativeMethodsShared_Tests.cs (2)
37IntPtr kernel32Dll = NativeMethodsShared.LoadLibrary("kernel32.dll"); 40IntPtr processHandle = NativeMethodsShared.NullIntPtr;
Microsoft.CodeAnalysis (66)
CodeAnalysisEventSource.Common.cs (3)
125DataPointer = (IntPtr)ptr, 134DataPointer = (IntPtr)ptr, 143DataPointer = (IntPtr)ptr,
CodeGen\MetadataConstant.cs (1)
34Debug.Assert(value == null || value is string || value is DateTime || value is decimal || value.GetType().GetTypeInfo().IsEnum || (value.GetType().GetTypeInfo().IsPrimitive && !(value is IntPtr) && !(value is UIntPtr)));
DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (2)
219protected override IntPtr LoadUnmanagedDll(string unmanagedDllName) 227return IntPtr.Zero;
DiaSymReader\SymUnmanagedFactory.cs (8)
69private static extern IntPtr LoadLibrary(string path); 72private static extern bool FreeLibrary(IntPtr hModule); 75private static extern IntPtr GetProcAddress(IntPtr hModule, string procedureName); 120var moduleHandle = LoadLibrary(Path.Combine(dir, DiaSymReaderModuleName)); 121if (moduleHandle == IntPtr.Zero) 129var createAddress = GetProcAddress(moduleHandle, factoryName); 130if (createAddress == IntPtr.Zero)
DiaSymReader\Utilities\ComMemoryStream.cs (2)
129Marshal.Copy(_chunks[chunkIndex], chunkOffset, (IntPtr)(pv + destinationIndex), bytesToCopy); 226Marshal.Copy((IntPtr)(pv + bytesWritten), _chunks[chunkIndex], chunkOffset, bytesToCopy);
DiaSymReader\Utilities\InteropUtilities.cs (1)
20private static readonly IntPtr s_ignoreIErrorInfo = new IntPtr(-1);
DiaSymReader\Utilities\IUnsafeComStream.cs (1)
16/// the Read and Write methods take an <see cref="IntPtr"/> instead of a byte[] to avoid the
InternalUtilities\ReadOnlyUnmanagedMemoryStream.cs (2)
14private readonly IntPtr _data; 18public ReadOnlyUnmanagedMemoryStream(object memoryOwner, IntPtr data, int length)
Interop\IClrMetaHost.cs (2)
35[In] IntPtr processHandle); 40[In] IntPtr reserved1);
Interop\IClrRuntimeInfo.cs (3)
31[In] IntPtr processHandle); 39IntPtr LoadLibrary( 42IntPtr GetProcAddress(
Interop\IClrStrongName.cs (20)
33[In] IntPtr pbBlob, 55[In] IntPtr hFile, 67[In] IntPtr pbMemory); 75[In] IntPtr pbBase, 82[In] IntPtr pbKeyBlob, 84out IntPtr ppbPublicKeyBlob, 97out IntPtr ppbKeyBlob, 104out IntPtr ppbKeyBlob, 109[In] IntPtr pbKeyBlob, 115[In] IntPtr pbKeyBlob, 123[In] IntPtr pbKeyBlob, 125out IntPtr ppbSignatureBlob, 130[In] IntPtr pbPublicKeyBlob, 143out IntPtr ptr); 147[In] IntPtr pbBase, 153out IntPtr ppbStrongNameToken, 158out IntPtr ppbStrongNameToken, 160out IntPtr ppbPublicKeyBlob, 164[In] IntPtr pbPublicKeyBlob, 166out IntPtr ppbStrongNameToken,
MetadataReader\PEModule.cs (6)
42private readonly IntPtr _metadataPointerOpt; 145internal PEModule(ModuleMetadata owner, PEReader peReader, IntPtr metadataOpt, int metadataSizeOpt, bool includeEmbeddedInteropTypes, bool ignoreAssemblyRefs) 149Debug.Assert((peReader == null) ^ (metadataOpt == IntPtr.Zero && metadataSizeOpt == 0)); 150Debug.Assert(metadataOpt == IntPtr.Zero || metadataSizeOpt > 0); 182using (var stream = new ReadOnlyUnmanagedMemoryStream(_peReader, (IntPtr)block.Pointer, block.Length)) 241if (_metadataPointerOpt != IntPtr.Zero)
MetadataReference\ModuleMetadata.cs (4)
35_module = new PEModule(this, peReader: peReader, metadataOpt: IntPtr.Zero, metadataSizeOpt: 0, includeEmbeddedInteropTypes: false, ignoreAssemblyRefs: false); 40IntPtr metadata, 113internal static ModuleMetadata CreateFromMetadata(IntPtr metadata, int size, bool includeEmbeddedInteropTypes, bool ignoreAssemblyRefs = false) 115Debug.Assert(metadata != IntPtr.Zero);
SpecialType.cs (1)
131/// Indicates that the type is <see cref="IntPtr" />.
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(IntPtr)) 651if (typeof(T) == typeof(IntPtr)) 1168if (typeof(TKey) == typeof(IntPtr)) 1202if (typeof(TKey) == typeof(IntPtr))
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
126return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
StrongName\DesktopStrongNameProvider.cs (3)
212IntPtr keyBlob; 230strongName.StrongNameSignatureGeneration(filePath, keyName, IntPtr.Zero, 0, null, pcbSignatureBlob: out _); 251strongName.StrongNameSignatureGeneration(filePath, null, (IntPtr)pinned, keyPair.Length, null, pcbSignatureBlob: out _);
Symbols\INamedTypeSymbol.cs (1)
195/// either <see cref="System.IntPtr"/> or <see cref="System.UIntPtr"/>.
Symbols\TypedConstantValue.cs (1)
25Debug.Assert(value == null || value is string || value.GetType().GetTypeInfo().IsEnum || (value.GetType().GetTypeInfo().IsPrimitive && !(value is System.IntPtr) && !(value is System.UIntPtr)) || value is ITypeSymbol);
Microsoft.CodeAnalysis.CodeStyle (6)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(IntPtr)) 651if (typeof(T) == typeof(IntPtr)) 1168if (typeof(TKey) == typeof(IntPtr)) 1202if (typeof(TKey) == typeof(IntPtr))
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
126return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
505Marshal.Copy((IntPtr)valuePtr, bytes, 0, bytes.Length);
Microsoft.CodeAnalysis.Collections.Package (5)
Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(IntPtr)) 651if (typeof(T) == typeof(IntPtr)) 1168if (typeof(TKey) == typeof(IntPtr)) 1202if (typeof(TKey) == typeof(IntPtr))
Internal\SegmentedArrayHelper.cs (1)
126return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
Microsoft.CodeAnalysis.CSharp (1)
Symbols\NamedTypeSymbol.cs (1)
1700/// either <see cref="System.IntPtr"/> or <see cref="System.UIntPtr"/>.
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
509/// Returns whether or not <see cref="IntPtr"/> and <see cref="UIntPtr"/> are exactly identical to <see
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
98return GenerateMemberAccess(nameof(IntPtr.Zero));
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (7)
CommandLineTests.cs (7)
7760private static extern IntPtr LoadLibraryEx(string lpFileName, IntPtr hFile, uint dwFlags); 7762private static extern bool FreeLibrary([In] IntPtr hFile); 7828IntPtr lib = LoadLibraryEx(Path.Combine(dir.Path, outputFileName), IntPtr.Zero, 0x00000002); 7829if (lib == IntPtr.Zero) 7842IntPtr manifestResourcePointer = Win32Res.GetResource(lib, resourceId, resourceType, out manifestSize);
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (46)
CodeGen\CodeGenReadonlyStructTests.cs (1)
1258var isx86 = (IntPtr.Size == 4);
CodeGen\UnsafeTests.cs (19)
7049bool isx86 = (IntPtr.Size == 4); 8069bool isx86 = (IntPtr.Size == 4); 8682bool isx86 = (IntPtr.Size == 4); 8783bool isx86 = (IntPtr.Size == 4); 8884bool isx86 = (IntPtr.Size == 4); 8919bool isx86 = (IntPtr.Size == 4); 9007bool isx86 = (IntPtr.Size == 4); 9054bool isx86 = (IntPtr.Size == 4); 9155bool isx86 = (IntPtr.Size == 4); 9198bool isx86 = (IntPtr.Size == 4); 9268bool isx86 = (IntPtr.Size == 4); 9369bool isx86 = (IntPtr.Size == 4); 9470bool isx86 = (IntPtr.Size == 4); 9505bool isx86 = (IntPtr.Size == 4); 9540bool isx86 = (IntPtr.Size == 4); 9597bool isx86 = (IntPtr.Size == 4); 9654bool isx86 = (IntPtr.Size == 4); 9700bool isx86 = (IntPtr.Size == 4); 10452bool isx86 = (IntPtr.Size == 4);
Emit\EmitMetadataTests.cs (1)
2406Marshal.Copy((IntPtr)relocBlock.Pointer, relocBytes, 0, relocBytes.Length);
Emit\ResourceTests.cs (25)
27private static extern IntPtr LoadLibraryEx(string lpFileName, IntPtr hFile, uint dwFlags); 29private static extern bool FreeLibrary([In] IntPtr hFile); 53IntPtr lib = IntPtr.Zero; 58lib = LoadLibraryEx(exe.Path, IntPtr.Zero, 0x00000002); 59if (lib == IntPtr.Zero) 66IntPtr versionRsrc = Win32Res.GetResource(lib, "#1", "#16", out size); 70IntPtr mftRsrc = Win32Res.GetResource(lib, "#1", "#24", out mftSize); 75if (lib != IntPtr.Zero) 144IntPtr lib = IntPtr.Zero; 148lib = LoadLibraryEx(exe.Path, IntPtr.Zero, 0x00000002); 149if (lib == IntPtr.Zero) 157IntPtr versionRsrc = Win32Res.GetResource(lib, "#1", "#16", out size); 161IntPtr stringTable = Win32Res.GetResource(lib, "#1", "#6", out stringTableSize); 165IntPtr elevenRsrc = Win32Res.GetResource(lib, "#1", "#11", out elevenSize); 169IntPtr wevtRsrc = Win32Res.GetResource(lib, "#1", "WEVT_TEMPLATE", out wevtSize); 174if (lib != IntPtr.Zero) 844IntPtr lib = IntPtr.Zero; 847lib = LoadLibraryEx(exeFile.Path, IntPtr.Zero, 0x00000002); 848Assert.True(lib != IntPtr.Zero, String.Format("LoadLibrary failed with HResult: {0:X}", +Marshal.GetLastWin32Error())); 854IntPtr versionRsrc = Win32Res.GetResource(lib, "#1", "#16", out size); 859if (lib != IntPtr.Zero)
Microsoft.CodeAnalysis.CSharp.Emit2.UnitTests (91)
Emit\NumericIntPtrTests.cs (91)
1335int size = IntPtr.Size; 2262CompileAndVerify(comp, expectedOutput: IncludeExpectedOutput(IntPtr.Size == 4 ? "System.OverflowException" : "1152921504606846975"), verify: Verification.FailsPEVerify); 2300CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(IntPtr.Size == 4 ? "-1" : "1152921504606846975")); 2388constantConversion(sourceType, destinationType, sourceValue, useChecked: true, checkedError, IntPtr.Size == 4 ? checked32 : checked64); 2389constantConversion(sourceType, destinationType, sourceValue, useChecked: false, uncheckedError, IntPtr.Size == 4 ? unchecked32 : unchecked64); 6041object result = (IntPtr.Size == 4) ? 6293expectedResult: $"-2147483647, 0, 1, 2147483647, {(IntPtr.Size == 4 ? "-2147483648" : "2147483648")}", 6329expectedResult: $"1, 2147483648, 4294967295, {(IntPtr.Size == 4 ? "0" : "4294967296")}", 6365expectedResult: $"{(IntPtr.Size == 4 ? "2147483647" : "-2147483649")}, -2147483648, -1, 0, 2147483646", 6401expectedResult: $"{(IntPtr.Size == 4 ? uint.MaxValue.ToString() : ulong.MaxValue.ToString())}, 0, 4294967294", 6438expectedResult: $"-2147483647, 0, 1, 2147483647, {(IntPtr.Size == 4 ? "System.OverflowException" : "2147483648")}", 6474expectedResult: $"1, 2147483648, 4294967295, {(IntPtr.Size == 4 ? "System.OverflowException" : "4294967296")}", 6510expectedResult: $"{(IntPtr.Size == 4 ? "System.OverflowException" : "-2147483649")}, -2147483648, -1, 0, 2147483646", 6667expectedResult: $"-2147483647, 0, 1, 2147483647, {(IntPtr.Size == 4 ? "-2147483648" : "2147483648")}", 6705expectedResult: $"1, 2147483648, 4294967295, {(IntPtr.Size == 4 ? "0" : "4294967296")}", 6743expectedResult: $"{(IntPtr.Size == 4 ? "2147483647" : "-2147483649")}, -2147483648, -1, 0, 2147483646", 6781expectedResult: $"{(IntPtr.Size == 4 ? uint.MaxValue.ToString() : ulong.MaxValue.ToString())}, 0, 4294967294", 8763unaryOperatorCheckedOverflow("System.IntPtr", "-", intMinValue, IntPtr.Size == 4 ? "-2147483648" : "2147483648", IntPtr.Size == 4 ? "System.OverflowException" : "2147483648"); 8774unaryOperatorNotConstant("System.UIntPtr", "~", "0", IntPtr.Size == 4 ? uintMaxValue : ulongMaxValue); 8775unaryOperatorNotConstant("System.UIntPtr", "~", uintMaxValue, IntPtr.Size == 4 ? "0" : "18446744069414584320"); 8777binaryOperatorCheckedOverflow("System.IntPtr", "+", "System.IntPtr", intMinValue, "System.IntPtr", "-1", IntPtr.Size == 4 ? "2147483647" : "-2147483649", IntPtr.Size == 4 ? "System.OverflowException" : "-2147483649"); 8779binaryOperatorCheckedOverflow("System.IntPtr", "+", "System.IntPtr", "1", "System.IntPtr", intMaxValue, IntPtr.Size == 4 ? "-2147483648" : "2147483648", IntPtr.Size == 4 ? "System.OverflowException" : "2147483648"); 8781binaryOperatorCheckedOverflow("System.UIntPtr", "+", "System.UIntPtr", "1", "System.UIntPtr", uintMaxValue, IntPtr.Size == 4 ? "0" : "4294967296", IntPtr.Size == 4 ? "System.OverflowException" : "4294967296"); 8784binaryOperatorCheckedOverflow("System.IntPtr", "-", "System.IntPtr", intMinValue, "System.IntPtr", "1", IntPtr.Size == 4 ? "2147483647" : "-2147483649", IntPtr.Size == 4 ? "System.OverflowException" : "-2147483649"); 8787binaryOperatorCheckedOverflow("System.IntPtr", "-", "System.IntPtr", "-2", "System.IntPtr", intMaxValue, IntPtr.Size == 4 ? "2147483647" : "-2147483649", IntPtr.Size == 4 ? "System.OverflowException" : "-2147483649"); 8788binaryOperatorCheckedOverflow("System.UIntPtr", "-", "System.UIntPtr", "0", "System.UIntPtr", "1", IntPtr.Size == 4 ? uintMaxValue : ulongMaxValue, "System.OverflowException"); 8791binaryOperatorCheckedOverflow("System.IntPtr", "*", "System.IntPtr", intMinValue, "System.IntPtr", "2", IntPtr.Size == 4 ? "0" : "-4294967296", IntPtr.Size == 4 ? "System.OverflowException" : "-4294967296"); 8792binaryOperatorCheckedOverflow("System.IntPtr", "*", "System.IntPtr", intMinValue, "System.IntPtr", "-1", IntPtr.Size == 4 ? "-2147483648" : "2147483648", IntPtr.Size == 4 ? "System.OverflowException" : "2147483648"); 8794binaryOperatorCheckedOverflow("System.IntPtr", "*", "System.IntPtr", "2", "System.IntPtr", intMaxValue, IntPtr.Size == 4 ? "-2" : "4294967294", IntPtr.Size == 4 ? "System.OverflowException" : "4294967294"); 8795binaryOperatorCheckedOverflow("System.UIntPtr", "*", "System.UIntPtr", uintMaxValue, "System.UIntPtr", "2", IntPtr.Size == 4 ? "4294967294" : "8589934590", IntPtr.Size == 4 ? "System.OverflowException" : "8589934590"); 8799binaryOperatorCheckedOverflow("System.IntPtr", "/", "System.IntPtr", intMinValue, "System.IntPtr", "-1", IntPtr.Size == 4 ? "System.OverflowException" : "2147483648", IntPtr.Size == 4 ? "System.OverflowException" : "2147483648"); 8809binaryOperatorCheckedOverflow("System.IntPtr", "%", "System.IntPtr", intMinValue, "System.IntPtr", "-1", IntPtr.Size == 4 ? "System.OverflowException" : "0", IntPtr.Size == 4 ? "System.OverflowException" : "0"); 8860binaryOperatorNotConstant("System.IntPtr", "<<", "System.IntPtr", intMinValue, "int", "1", IntPtr.Size == 4 ? "0" : "-4294967296"); 8862binaryOperatorNotConstant("System.IntPtr", "<<", "System.IntPtr", "-1", "int", "32", IntPtr.Size == 4 ? "-1" : "-4294967296"); 8864binaryOperatorNotConstant("System.UIntPtr", "<<", "System.UIntPtr", uintMaxValue, "int", "1", IntPtr.Size == 4 ? "4294967294" : "8589934590"); 8866binaryOperatorNotConstant("System.UIntPtr", "<<", "System.UIntPtr", "1", "int", "32", IntPtr.Size == 4 ? "1" : "4294967296"); 9128CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(IntPtr.Size == 4 ? "System.OverflowException" : "4294967337")).VerifyDiagnostics( 9146CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(IntPtr.Size == 4 ? "41" : "4294967337")).VerifyDiagnostics(); 9195CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(IntPtr.Size == 4 ? "System.OverflowException" : "2147483648")).VerifyDiagnostics( 9213CompileAndVerify(comp, verify: Verification.FailsPEVerify, expectedOutput: IncludeExpectedOutput(IntPtr.Size == 4 ? "-2147483648" : "2147483648")).VerifyDiagnostics(); 9259{(IntPtr.Size == 4 ? "System.OverflowException" : "2147483648")} 9261{(IntPtr.Size == 4 ? "System.OverflowException" : "0")}")); 9282var expectedValue = IntPtr.Size == 4 ? "fffffffffffffffe" : "fffffffe"; 9306var expectedValue = IntPtr.Size == 4 ? "fffffffe" : "1fffffffe"; 9389convert(fromType: "nint", toType: "nuint", "int.MinValue", IntPtr.Size == 4 ? "2147483648" : "18446744071562067968", null, "System.OverflowException", "conv.ovf.u"); 9393convert(fromType: "nuint", toType: "nint", "uint.MaxValue", IntPtr.Size == 4 ? "-1" : "4294967295", null, IntPtr.Size == 4 ? "System.OverflowException" : "4294967295", "conv.ovf.i.un"); 9395string nintMinValue = IntPtr.Size == 4 ? int.MinValue.ToString() : long.MinValue.ToString(); 9396string nintMaxValue = IntPtr.Size == 4 ? int.MaxValue.ToString() : long.MaxValue.ToString(); 9397string nuintMaxValue = IntPtr.Size == 4 ? uint.MaxValue.ToString() : ulong.MaxValue.ToString(); 9399convert(fromType: "nint", toType: "ulong", nintMinValue, IntPtr.Size == 4 ? "18446744071562067968" : "9223372036854775808", "conv.i8", "System.OverflowException", "conv.ovf.u8"); 9400convert(fromType: "nint", toType: "ulong", nintMaxValue, IntPtr.Size == 4 ? "2147483647" : "9223372036854775807", "conv.i8", IntPtr.Size == 4 ? "2147483647" : "9223372036854775807", "conv.ovf.u8"); 9401convert(fromType: "nint", toType: "nuint", nintMinValue, IntPtr.Size == 4 ? "2147483648" : "9223372036854775808", null, "System.OverflowException", "conv.ovf.u"); 9402convert(fromType: "nint", toType: "nuint", nintMaxValue, IntPtr.Size == 4 ? "2147483647" : "9223372036854775807", null, IntPtr.Size == 4 ? "2147483647" : "9223372036854775807", "conv.ovf.u"); 9404convert(fromType: "nuint", toType: "long", nuintMaxValue, IntPtr.Size == 4 ? "4294967295" : "-1", "conv.u8", IntPtr.Size == 4 ? "4294967295" : "System.OverflowException", "conv.ovf.i8.un"); 9518{(IntPtr.Size == 4 ? "4294967254" : "18446744073709551574")} 9520{(IntPtr.Size == 4 ? "4294967254" : "18446744073709551574")} 9528{(IntPtr.Size == 4 ? "2147483648" : "18446744071562067968")} 9530{(IntPtr.Size == 4 ? "2147483648" : "18446744071562067968")} 9532{(IntPtr.Size == 4 ? "-1" : "4294967295")} 9534{(IntPtr.Size == 4 ? "System.OverflowException" : "4294967295")} 9721convert(baseType: null, fromType: "E", toType: "nuint", "int.MinValue", IntPtr.Size == 4 ? "2147483648" : "18446744071562067968", "conv.i", "System.OverflowException", "conv.ovf.u"); 9732convert(baseType: "sbyte", fromType: "E", toType: "nuint", "sbyte.MinValue", IntPtr.Size == 4 ? "4294967168" : "18446744073709551488", "conv.i", "System.OverflowException", "conv.ovf.u"); 9752convert(baseType: "short", fromType: "E", toType: "nuint", "short.MinValue", IntPtr.Size == 4 ? "4294934528" : "18446744073709518848", "conv.i", "System.OverflowException", "conv.ovf.u"); 9772convert(baseType: "int", fromType: "E", toType: "nuint", "int.MinValue", IntPtr.Size == 4 ? "2147483648" : "18446744071562067968", "conv.i", "System.OverflowException", "conv.ovf.u"); 9781convert(baseType: "uint", fromType: "E", toType: "nint", "uint.MaxValue", IntPtr.Size == 4 ? "-1" : "4294967295", "conv.u", IntPtr.Size == 4 ? "System.OverflowException" : "4294967295", "conv.ovf.i.un"); 9790convert(baseType: "long", fromType: "E", toType: "nint", "long.MinValue", IntPtr.Size == 4 ? "0" : "-9223372036854775808", "conv.i", IntPtr.Size == 4 ? "System.OverflowException" : "-9223372036854775808", "conv.ovf.i"); 9791convert(baseType: "long", fromType: "E", toType: "nint", "long.MaxValue", IntPtr.Size == 4 ? "-1" : "9223372036854775807", "conv.i", IntPtr.Size == 4 ? "System.OverflowException" : "9223372036854775807", "conv.ovf.i"); 9792convert(baseType: "long", fromType: "E", toType: "nuint", "long.MinValue", IntPtr.Size == 4 ? "0" : "9223372036854775808", "conv.u", "System.OverflowException", "conv.ovf.u"); 9793convert(baseType: "long", fromType: "E", toType: "nuint", "long.MaxValue", IntPtr.Size == 4 ? "4294967295" : "9223372036854775807", "conv.u", IntPtr.Size == 4 ? "System.OverflowException" : "9223372036854775807", "conv.ovf.u"); 9802convert(baseType: "ulong", fromType: "E", toType: "nuint", "ulong.MaxValue", IntPtr.Size == 4 ? "4294967295" : "18446744073709551615", "conv.u", IntPtr.Size == 4 ? "System.OverflowException" : "18446744073709551615", "conv.ovf.u.un");
Microsoft.CodeAnalysis.CSharp.EndToEnd.UnitTests (11)
EndToEndTests.cs (11)
125int numberFluentCalls = (IntPtr.Size, ExecutionConditionUtil.Configuration) switch 131_ => throw new Exception($"Unexpected configuration {IntPtr.Size * 8}-bit {ExecutionConditionUtil.Configuration}") 182int numberFluentCalls = (IntPtr.Size, ExecutionConditionUtil.Configuration, RuntimeUtilities.IsDesktopRuntime, RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) switch 191_ => throw new Exception($"Unexpected configuration {IntPtr.Size * 8}-bit {ExecutionConditionUtil.Configuration}, Desktop: {RuntimeUtilities.IsDesktopRuntime}") 221throw new Exception($"Depth: {i}, Bytes: {IntPtr.Size}, Config: {ExecutionConditionUtil.Configuration}, Desktop: {RuntimeUtilities.IsDesktopRuntime}", e); 263int nestingLevel = (IntPtr.Size, ExecutionConditionUtil.Configuration) switch 270_ => throw new Exception($"Unexpected configuration {IntPtr.Size * 8}-bit {ExecutionConditionUtil.Configuration}") 415int nestingLevel = (IntPtr.Size, ExecutionConditionUtil.Configuration) switch 421_ => throw new Exception($"Unexpected configuration {IntPtr.Size * 8}-bit {ExecutionConditionUtil.Configuration}") 550int n = (IntPtr.Size, ExecutionConditionUtil.Configuration) switch 556_ => throw new Exception($"Unexpected configuration {IntPtr.Size * 8}-bit {ExecutionConditionUtil.Configuration}")
Microsoft.CodeAnalysis.CSharp.Features (1)
src\Analyzers\CSharp\CodeFixes\ReplaceDefaultLiteral\CSharpReplaceDefaultLiteralCodeFixProvider.cs (1)
98return GenerateMemberAccess(nameof(IntPtr.Zero));
Microsoft.CodeAnalysis.CSharp.Semantic.UnitTests (92)
Semantics\NativeIntegerTests.cs (91)
4346int size = IntPtr.Size; 6397CompileAndVerify(comp, expectedOutput: IntPtr.Size == 4 ? "System.OverflowException" : "1152921504606846975"); 6434CompileAndVerify(comp, expectedOutput: IntPtr.Size == 4 ? "-1" : "1152921504606846975"); 6525constantConversion(sourceType, destinationType, sourceValue, useChecked: true, checkedError, IntPtr.Size == 4 ? checked32 : checked64); 6526constantConversion(sourceType, destinationType, sourceValue, useChecked: false, uncheckedError, IntPtr.Size == 4 ? unchecked32 : unchecked64); 9530object result = (IntPtr.Size == 4) ? 9770expectedResult: $"-2147483647, 0, 1, 2147483647, {(IntPtr.Size == 4 ? "-2147483648" : "2147483648")}", 9806expectedResult: $"1, 2147483648, 4294967295, {(IntPtr.Size == 4 ? "0" : "4294967296")}", 9844expectedResult: $"{(IntPtr.Size == 4 ? "2147483647" : "-2147483649")}, -2147483648, -1, 0, 2147483646", 9880expectedResult: $"{(IntPtr.Size == 4 ? uint.MaxValue.ToString() : ulong.MaxValue.ToString())}, 0, 4294967294", 9919expectedResult: $"-2147483647, 0, 1, 2147483647, {(IntPtr.Size == 4 ? "System.OverflowException" : "2147483648")}", 9955expectedResult: $"1, 2147483648, 4294967295, {(IntPtr.Size == 4 ? "System.OverflowException" : "4294967296")}", 9993expectedResult: $"{(IntPtr.Size == 4 ? "System.OverflowException" : "-2147483649")}, -2147483648, -1, 0, 2147483646", 10145expectedResult: $"-2147483647, 0, 1, 2147483647, {(IntPtr.Size == 4 ? "-2147483648" : "2147483648")}", 10183expectedResult: $"1, 2147483648, 4294967295, {(IntPtr.Size == 4 ? "0" : "4294967296")}", 10221expectedResult: $"{(IntPtr.Size == 4 ? "2147483647" : "-2147483649")}, -2147483648, -1, 0, 2147483646", 10259expectedResult: $"{(IntPtr.Size == 4 ? uint.MaxValue.ToString() : ulong.MaxValue.ToString())}, 0, 4294967294", 13013unaryOperatorCheckedOverflow("nint", "-", intMinValue, IntPtr.Size == 4 ? "-2147483648" : "2147483648", IntPtr.Size == 4 ? "System.OverflowException" : "2147483648"); 13024unaryOperatorNotConstant("nuint", "~", "0", IntPtr.Size == 4 ? uintMaxValue : ulongMaxValue); 13025unaryOperatorNotConstant("nuint", "~", uintMaxValue, IntPtr.Size == 4 ? "0" : "18446744069414584320"); 13027binaryOperatorCheckedOverflow("nint", "+", "nint", intMinValue, "nint", "-1", IntPtr.Size == 4 ? "2147483647" : "-2147483649", IntPtr.Size == 4 ? "System.OverflowException" : "-2147483649"); 13029binaryOperatorCheckedOverflow("nint", "+", "nint", "1", "nint", intMaxValue, IntPtr.Size == 4 ? "-2147483648" : "2147483648", IntPtr.Size == 4 ? "System.OverflowException" : "2147483648"); 13031binaryOperatorCheckedOverflow("nuint", "+", "nuint", "1", "nuint", uintMaxValue, IntPtr.Size == 4 ? "0" : "4294967296", IntPtr.Size == 4 ? "System.OverflowException" : "4294967296"); 13034binaryOperatorCheckedOverflow("nint", "-", "nint", intMinValue, "nint", "1", IntPtr.Size == 4 ? "2147483647" : "-2147483649", IntPtr.Size == 4 ? "System.OverflowException" : "-2147483649"); 13037binaryOperatorCheckedOverflow("nint", "-", "nint", "-2", "nint", intMaxValue, IntPtr.Size == 4 ? "2147483647" : "-2147483649", IntPtr.Size == 4 ? "System.OverflowException" : "-2147483649"); 13038binaryOperatorCheckedOverflow("nuint", "-", "nuint", "0", "nuint", "1", IntPtr.Size == 4 ? uintMaxValue : ulongMaxValue, "System.OverflowException"); 13041binaryOperatorCheckedOverflow("nint", "*", "nint", intMinValue, "nint", "2", IntPtr.Size == 4 ? "0" : "-4294967296", IntPtr.Size == 4 ? "System.OverflowException" : "-4294967296"); 13042binaryOperatorCheckedOverflow("nint", "*", "nint", intMinValue, "nint", "-1", IntPtr.Size == 4 ? "-2147483648" : "2147483648", IntPtr.Size == 4 ? "System.OverflowException" : "2147483648"); 13044binaryOperatorCheckedOverflow("nint", "*", "nint", "2", "nint", intMaxValue, IntPtr.Size == 4 ? "-2" : "4294967294", IntPtr.Size == 4 ? "System.OverflowException" : "4294967294"); 13045binaryOperatorCheckedOverflow("nuint", "*", "nuint", uintMaxValue, "nuint", "2", IntPtr.Size == 4 ? "4294967294" : "8589934590", IntPtr.Size == 4 ? "System.OverflowException" : "8589934590"); 13049binaryOperatorCheckedOverflow("nint", "/", "nint", intMinValue, "nint", "-1", IntPtr.Size == 4 ? "System.OverflowException" : "2147483648", IntPtr.Size == 4 ? "System.OverflowException" : "2147483648"); 13059binaryOperatorCheckedOverflow("nint", "%", "nint", intMinValue, "nint", "-1", IntPtr.Size == 4 ? "System.OverflowException" : "0", IntPtr.Size == 4 ? "System.OverflowException" : "0"); 13110binaryOperatorNotConstant("nint", "<<", "nint", intMinValue, "int", "1", IntPtr.Size == 4 ? "0" : "-4294967296"); 13112binaryOperatorNotConstant("nint", "<<", "nint", "-1", "int", "32", IntPtr.Size == 4 ? "-1" : "-4294967296"); 13114binaryOperatorNotConstant("nuint", "<<", "nuint", uintMaxValue, "int", "1", IntPtr.Size == 4 ? "4294967294" : "8589934590"); 13116binaryOperatorNotConstant("nuint", "<<", "nuint", "1", "int", "32", IntPtr.Size == 4 ? "1" : "4294967296"); 13372CompileAndVerify(comp, expectedOutput: IntPtr.Size == 4 ? "System.OverflowException" : "4294967337").VerifyDiagnostics( 13389CompileAndVerify(comp, expectedOutput: IntPtr.Size == 4 ? "41" : "4294967337").VerifyDiagnostics(); 13437CompileAndVerify(comp, expectedOutput: IntPtr.Size == 4 ? "System.OverflowException" : "2147483648").VerifyDiagnostics( 13454CompileAndVerify(comp, expectedOutput: IntPtr.Size == 4 ? "-2147483648" : "2147483648").VerifyDiagnostics(); 13499{(IntPtr.Size == 4 ? "System.OverflowException" : "2147483648")} 13501{(IntPtr.Size == 4 ? "System.OverflowException" : "0")}"); 13522var expectedValue = IntPtr.Size == 4 ? "fffffffffffffffe" : "fffffffe"; 13546var expectedValue = IntPtr.Size == 4 ? "fffffffe" : "1fffffffe"; 13754convert(fromType: "nint", toType: "nuint", "int.MinValue", IntPtr.Size == 4 ? "2147483648" : "18446744071562067968", null, "System.OverflowException", "conv.ovf.u"); 13758convert(fromType: "nuint", toType: "nint", "uint.MaxValue", IntPtr.Size == 4 ? "-1" : "4294967295", null, IntPtr.Size == 4 ? "System.OverflowException" : "4294967295", "conv.ovf.i.un"); 13760string nintMinValue = IntPtr.Size == 4 ? int.MinValue.ToString() : long.MinValue.ToString(); 13761string nintMaxValue = IntPtr.Size == 4 ? int.MaxValue.ToString() : long.MaxValue.ToString(); 13762string nuintMaxValue = IntPtr.Size == 4 ? uint.MaxValue.ToString() : ulong.MaxValue.ToString(); 13764convert(fromType: "nint", toType: "ulong", nintMinValue, IntPtr.Size == 4 ? "18446744071562067968" : "9223372036854775808", "conv.i8", "System.OverflowException", "conv.ovf.u8"); 13765convert(fromType: "nint", toType: "ulong", nintMaxValue, IntPtr.Size == 4 ? "2147483647" : "9223372036854775807", "conv.i8", IntPtr.Size == 4 ? "2147483647" : "9223372036854775807", "conv.ovf.u8"); 13766convert(fromType: "nint", toType: "nuint", nintMinValue, IntPtr.Size == 4 ? "2147483648" : "9223372036854775808", null, "System.OverflowException", "conv.ovf.u"); 13767convert(fromType: "nint", toType: "nuint", nintMaxValue, IntPtr.Size == 4 ? "2147483647" : "9223372036854775807", null, IntPtr.Size == 4 ? "2147483647" : "9223372036854775807", "conv.ovf.u"); 13769convert(fromType: "nuint", toType: "long", nuintMaxValue, IntPtr.Size == 4 ? "4294967295" : "-1", "conv.u8", IntPtr.Size == 4 ? "4294967295" : "System.OverflowException", "conv.ovf.i8.un"); 13881{(IntPtr.Size == 4 ? "4294967254" : "18446744073709551574")} 13883{(IntPtr.Size == 4 ? "4294967254" : "18446744073709551574")} 13891{(IntPtr.Size == 4 ? "2147483648" : "18446744071562067968")} 13893{(IntPtr.Size == 4 ? "2147483648" : "18446744071562067968")} 13895{(IntPtr.Size == 4 ? "-1" : "4294967295")} 13897{(IntPtr.Size == 4 ? "System.OverflowException" : "4294967295")} 14084convert(baseType: null, fromType: "E", toType: "nuint", "int.MinValue", IntPtr.Size == 4 ? "2147483648" : "18446744071562067968", "conv.i", "System.OverflowException", "conv.ovf.u"); 14092convert(baseType: "sbyte", fromType: "E", toType: "nuint", "sbyte.MinValue", IntPtr.Size == 4 ? "4294967168" : "18446744073709551488", "conv.i", "System.OverflowException", "conv.ovf.u"); 14106convert(baseType: "short", fromType: "E", toType: "nuint", "short.MinValue", IntPtr.Size == 4 ? "4294934528" : "18446744073709518848", "conv.i", "System.OverflowException", "conv.ovf.u"); 14120convert(baseType: "int", fromType: "E", toType: "nuint", "int.MinValue", IntPtr.Size == 4 ? "2147483648" : "18446744071562067968", "conv.i", "System.OverflowException", "conv.ovf.u"); 14126convert(baseType: "uint", fromType: "E", toType: "nint", "uint.MaxValue", IntPtr.Size == 4 ? "-1" : "4294967295", "conv.u", IntPtr.Size == 4 ? "System.OverflowException" : "4294967295", "conv.ovf.i.un"); 14132convert(baseType: "long", fromType: "E", toType: "nint", "long.MinValue", IntPtr.Size == 4 ? "0" : "-9223372036854775808", "conv.i", IntPtr.Size == 4 ? "System.OverflowException" : "-9223372036854775808", "conv.ovf.i"); 14133convert(baseType: "long", fromType: "E", toType: "nint", "long.MaxValue", IntPtr.Size == 4 ? "-1" : "9223372036854775807", "conv.i", IntPtr.Size == 4 ? "System.OverflowException" : "9223372036854775807", "conv.ovf.i"); 14134convert(baseType: "long", fromType: "E", toType: "nuint", "long.MinValue", IntPtr.Size == 4 ? "0" : "9223372036854775808", "conv.u", "System.OverflowException", "conv.ovf.u"); 14135convert(baseType: "long", fromType: "E", toType: "nuint", "long.MaxValue", IntPtr.Size == 4 ? "4294967295" : "9223372036854775807", "conv.u", IntPtr.Size == 4 ? "System.OverflowException" : "9223372036854775807", "conv.ovf.u"); 14141convert(baseType: "ulong", fromType: "E", toType: "nuint", "ulong.MaxValue", IntPtr.Size == 4 ? "4294967295" : "18446744073709551615", "conv.u", IntPtr.Size == 4 ? "System.OverflowException" : "18446744073709551615", "conv.ovf.u.un");
Semantics\UnsafeTests.cs (1)
618var expectedOutput = IntPtr.Size.ToString();
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Compilation\CompilationAPITests.cs (1)
2235using (var mdModule = ModuleMetadata.CreateFromMetadata((IntPtr)ptr, h.MetadataSize))
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Extensions\SemanticModelExtensions.cs (1)
509/// Returns whether or not <see cref="IntPtr"/> and <see cref="UIntPtr"/> are exactly identical to <see
Microsoft.CodeAnalysis.EditorFeatures (10)
Preview\DifferenceViewerPreview.cs (3)
107public int QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText) 118public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
Preview\DifferenceViewerPreview.NavigationalCommandTarget.cs (3)
20public int QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText) 31public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
Utilities\NativeMethods.cs (4)
14public static readonly IntPtr HWND_BROADCAST = new IntPtr(0xFFFF); 19public static extern bool PostMessage(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam);
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (41)
BlindAggregatorFactory.cs (28)
18public static unsafe IntPtr CreateWrapper() 19=> (IntPtr)BlindAggregator.CreateInstance(); 21public static unsafe void SetInnerObject(IntPtr wrapperUnknown, IntPtr innerUnknown, IntPtr managedObjectGCHandlePtr) 33private IntPtr _vfPtr; // Pointer to the virtual function table 35private IntPtr _innerUnknown; // CCW for the managed object supporting aggregation 36private IntPtr _gcHandle; // The GC Handle to the managed object (the non aggregated object) 53_innerUnknown = IntPtr.Zero; 54_gcHandle = IntPtr.Zero; 57public void SetInnerObject(IntPtr innerUnknown, IntPtr gcHandle) 68if (_gcHandle != IntPtr.Zero) 71_gcHandle = IntPtr.Zero; 75private unsafe delegate int QueryInterfaceDelegateType(BlindAggregator* pThis, [In] ref Guid riid, out IntPtr pvObject); 78private unsafe delegate int GetGCHandlePtrDelegateType(BlindAggregator* pThis, out IntPtr pResult); 89private IntPtr _queryInterfacePtr; 90private IntPtr _addRefPtr; 91private IntPtr _releasePtr; 92private IntPtr _getGCHandlePtr; 107public readonly IntPtr VTablePtr; 111var ptr = Marshal.AllocCoTaskMem(sizeof(VTable)); 124public static IntPtr AddressOfVTable { get { return s_instance.VTablePtr; } } 139private static unsafe int QueryInterface(BlindAggregator* pThis, [In] ref Guid riid, out IntPtr pvObject) 144pvObject = (IntPtr)pThis; 149pvObject = IntPtr.Zero; 168Marshal.FreeCoTaskMem((IntPtr)pThis); 174private static unsafe int GetGCHandlePtr(BlindAggregator* pThis, out IntPtr pResult)
StubLocalRegistry.cs (13)
14int ILocalRegistry.CreateInstance(Guid clsid, object punkOuter, ref Guid riid, uint dwFlags, out IntPtr ppvObj) 24int ILocalRegistry.GetClassObjectOfClsid(ref Guid clsid, uint dwFlags, IntPtr lpReserved, ref Guid riid, out IntPtr ppvClassObject) 29int ILocalRegistry2.CreateInstance(Guid clsid, object punkOuter, ref Guid riid, uint dwFlags, out IntPtr ppvObj) 39int ILocalRegistry2.GetClassObjectOfClsid(ref Guid clsid, uint dwFlags, IntPtr lpReserved, ref Guid riid, IntPtr ppvClassObject) 49int ILocalRegistry3.CreateInstance(Guid clsid, object punkOuter, ref Guid riid, uint dwFlags, out IntPtr ppvObj) 59int ILocalRegistry3.GetClassObjectOfClsid(ref Guid clsid, uint dwFlags, IntPtr lpReserved, ref Guid riid, IntPtr ppvClassObject) 69int ILocalRegistry3.CreateManagedInstance(string codeBase, string assemblyName, string typeName, ref Guid riid, out IntPtr ppvObj) 74int ILocalRegistry3.GetClassObjectOfManagedClass(string codeBase, string assemblyName, string typeName, ref Guid riid, out IntPtr ppvClassObject) 101int ILocalRegistry5.CreateAggregatedManagedInstance(string codeBase, string AssemblyName, string TypeName, IntPtr pUnkOuter, ref Guid riid, out IntPtr ppvObj)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (10)
DkmUtilities.cs (6)
26internal unsafe delegate IntPtr GetMetadataBytesPtrFunction(AssemblyIdentity assemblyIdentity, out uint uSize); 63IntPtr ptr; 111IntPtr ptr; 147IntPtr ptr; 174private static unsafe bool TryGetMetadataBlock(IntPtr ptr, uint size, out MetadataBlock block) 193private static bool TryGetMetadataBlock(ImmutableArray<MetadataBlock> previousMetadataBlocks, int index, IntPtr ptr, uint size, out MetadataBlock block)
MetadataBlock.cs (3)
15internal readonly struct MetadataBlock(ModuleId moduleId, Guid generationId, IntPtr pointer, int size) : IEquatable<MetadataBlock> 30internal readonly IntPtr Pointer = pointer; 38internal MetadataBlock(Guid moduleId, Guid generationId, IntPtr pointer, int size)
PDB\MethodDebugInfo.Native.cs (1)
58private static readonly IntPtr s_ignoreIErrorInfo = new IntPtr(-1);
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
src\Compilers\Core\Portable\SpecialType.cs (1)
131/// Indicates that the type is <see cref="IntPtr" />.
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (4)
src\ExpressionEvaluator\Core\Source\ResultProvider\Expansion\NativeViewExpansion.cs (1)
55var name = "(IUnknown*)0x" + string.Format(IntPtr.Size == 4 ? "{0:x8}" : "{0:x16}", comObject.NativeComPointer);
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.Values.cs (3)
121if (IntPtr.Size == 8) 123var intPtr = ((IntPtr)value.HostObjectValue).ToInt64(); 128var intPtr = ((IntPtr)value.HostObjectValue).ToInt32();
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (14)
Debugger\Engine\DkmClrModuleInstance.cs (7)
79int IMetadataImport.GetFieldProps(int mb, out int mdTypeDef, StringBuilder szField, int cchField, out int pchField, out FieldAttributes pdwAttr, out EmbeddedBlobPointer ppvSigBlob, out int pcbSigBlob, out int pdwCPlusTypeFlab, out IntPtr ppValue, out int pcchValue) 120void IMetadataImport.CloseEnum(IntPtr hEnum) 295int IMetadataImport.GetFieldMarshal(int tk, out IntPtr ppvNativeType, out int pcbNativeType) 305int IMetadataImport.GetPermissionSetProps(uint pm, out uint pdwAction, out IntPtr ppvPermission, out int pcbPermission) 385int IMetadataImport.GetMemberProps(uint mb, out uint pClass, StringBuilder szMember, uint cchMember, out uint pchMember, out uint pdwAttr, out IntPtr ppvSigBlob, out uint pcbSigBlob, out uint pulCodeRVA, out uint pdwImplFlags, out uint pdwCPlusTypeFlag, out IntPtr ppValue, out uint pcchValue) 415int IMetadataImport.GetNativeCallConvFromSig(IntPtr pvSig, uint cbSig, out uint pCallConv)
Debugger\Engine\DkmClrValue.cs (3)
96var intPtr = Environment.Is64BitProcess ? new IntPtr((long)RawValue) : new IntPtr((int)RawValue); 756private static unsafe object Dereference(IntPtr ptr, Type elementType) 764if (ptr == IntPtr.Zero)
src\ExpressionEvaluator\Core\Source\ResultProvider\Expansion\NativeViewExpansion.cs (1)
55var name = "(IUnknown*)0x" + string.Format(IntPtr.Size == 4 ? "{0:x8}" : "{0:x16}", comObject.NativeComPointer);
src\ExpressionEvaluator\Core\Source\ResultProvider\Formatter.Values.cs (3)
121if (IntPtr.Size == 8) 123var intPtr = ((IntPtr)value.HostObjectValue).ToInt64(); 128var intPtr = ((IntPtr)value.HostObjectValue).ToInt32();
Microsoft.CodeAnalysis.Features (7)
EditAndContinue\DebuggingSession.cs (1)
399var moduleMetadata = ModuleMetadata.CreateFromMetadata((IntPtr)metadataReader.MetadataPointer, metadataReader.MetadataLength);
SemanticSearch\AbstractSemanticSearchService.cs (2)
53protected override IntPtr LoadUnmanagedDll(string unmanagedDllName) 54=> IntPtr.Zero;
SymbolSearch\Windows\NativePatching.cs (4)
21public IntPtr cbBuf; // SIZE_T, so different size on x86/x64 38public IntPtr pBuf; 39public IntPtr cbBuf; // SIZE_T, so different size on x86/x64 59private static extern bool DeltaFree(IntPtr memory);
Microsoft.CodeAnalysis.InteractiveHost (5)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(IntPtr)) 651if (typeof(T) == typeof(IntPtr)) 1168if (typeof(TKey) == typeof(IntPtr)) 1202if (typeof(TKey) == typeof(IntPtr))
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
126return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Services\BrokeredServiceBase.cs (2)
202static extern IntPtr AddDllDirectory(string directory); 204if (AddDllDirectory(loadDir) == IntPtr.Zero)
Microsoft.CodeAnalysis.Scripting (11)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\ClrGlobalAssemblyCache.cs (3)
69private static extern int CreateAssemblyEnum(out IAssemblyEnum ppEnum, FusionAssemblyIdentity.IApplicationContext pAppCtx, FusionAssemblyIdentity.IAssemblyName pName, ASM_CACHE dwFlags, IntPtr pvReserved); 143int hr = CreateAssemblyEnum(out enumerator, applicationContext, partialNameFilter, ASM_CACHE.GAC, IntPtr.Zero); 251var result = Marshal.PtrToStringUni((IntPtr)info.pszCurrentAssemblyPathBuf, (int)info.cchBuf - 1);
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (6)
115private static int CreateAssemblyNameObject(out IAssemblyName ppEnum, string szAssemblyName, uint dwFlags, IntPtr pvReserved) 124private static extern int RealCreateAssemblyNameObject(out IAssemblyName ppEnum, [MarshalAs(UnmanagedType.LPWStr)] string szAssemblyName, uint dwFlags, IntPtr pvReserved); 154return Marshal.PtrToStringUni((IntPtr)p, (int)characterCountIncludingTerminator - 1); 197return Marshal.PtrToStringUni((IntPtr)p, (data.Length / 2) - 1); 437Marshal.ThrowExceptionForHR(CreateAssemblyNameObject(out result, null, 0, IntPtr.Zero)); 509int hr = CreateAssemblyNameObject(out result, displayName, CANOF.PARSE_DISPLAY_NAME, IntPtr.Zero);
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCache.cs (1)
37public static readonly ImmutableArray<ProcessorArchitecture> CurrentArchitectures = (IntPtr.Size == 4)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCacheLocation.cs (1)
65return Marshal.PtrToStringUni((IntPtr)p);
Microsoft.CodeAnalysis.Test.Utilities (30)
Assert\ConditionalFactAttribute.cs (3)
168public static bool IsBitness64 => IntPtr.Size == 8; 193public override bool ShouldSkip => IntPtr.Size != 4; 200public override bool ShouldSkip => IntPtr.Size != 8;
CompilationVerifier.EmitOutput.cs (1)
47Marshal.Copy((IntPtr)mdReader.MetadataPointer, bytes, 0, length);
FX\PinnedBlob.cs (3)
17public IntPtr Pointer; 32this.Pointer = (IntPtr)_handle.Pointer; 38Pointer = IntPtr.Zero;
Platform\Custom\SigningTestHelpers.cs (1)
69strongName.StrongNameKeyInstall(keyName, (IntPtr)p, keyBlob.Length);
Win32Res.cs (22)
21private static extern IntPtr FindResource(IntPtr hModule, string lpName, string lpType); 23private static extern IntPtr LoadResource(IntPtr hModule, IntPtr hResInfo); 25private static extern IntPtr LockResource(IntPtr hResData); 27private static extern uint SizeofResource(IntPtr hModule, IntPtr hResInfo); 29public static IntPtr GetResource(IntPtr lib, string resourceId, string resourceType, out uint size) 31IntPtr hrsrc = FindResource(lib, resourceId, resourceType); 32if (hrsrc == IntPtr.Zero) 36IntPtr resource = LoadResource(lib, hrsrc); 37if (resource == IntPtr.Zero) 40IntPtr manifest = LockResource(resource); 41if (resource == IntPtr.Zero) 47private static string GetManifestString(IntPtr ptr, int offset, int length, Encoding encoding) 50Marshal.Copy((IntPtr)(ptr.ToInt64() + offset), fullmanif, 0, length); 54private static string GetDecodedManifest(IntPtr mfRsrc, uint rsrcSize) 88public static string ManifestResourceToXml(IntPtr mftRsrc, uint size) 161public static string VersionResourceToXml(IntPtr versionRsrc)
Microsoft.CodeAnalysis.Threading.Package (5)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(IntPtr)) 651if (typeof(T) == typeof(IntPtr)) 1168if (typeof(TKey) == typeof(IntPtr)) 1202if (typeof(TKey) == typeof(IntPtr))
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
126return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
Microsoft.CodeAnalysis.UnitTests (101)
Collections\SegmentedArrayTests.cs (61)
25yield return new object[] { SegmentedArray<IntPtr>.TestAccessor.SegmentSize / 2 }; 26yield return new object[] { SegmentedArray<IntPtr>.TestAccessor.SegmentSize }; 27yield return new object[] { SegmentedArray<IntPtr>.TestAccessor.SegmentSize * 2 }; 32private static void ResetToSequence(SegmentedArray<IntPtr> array) 36array[i] = (IntPtr)i; 43var data = default(SegmentedArray<IntPtr>); 53Assert.Throws<NullReferenceException>(() => ((IReadOnlyList<IntPtr>)data)[0]); 54Assert.Throws<NullReferenceException>(() => ((IList<IntPtr>)data)[0]); 55Assert.Throws<NullReferenceException>(() => ((IList<IntPtr>)data)[0] = IntPtr.Zero); 57Assert.Throws<NullReferenceException>(() => ((IList)data)[0] = IntPtr.Zero); 60Assert.Equal(0, ((ICollection<IntPtr>)data).Count); 61Assert.Equal(0, ((IReadOnlyCollection<IntPtr>)data).Count); 64Assert.Throws<NullReferenceException>(() => data.CopyTo(Array.Empty<IntPtr>(), 0)); 65Assert.Throws<NullReferenceException>(() => ((ICollection<IntPtr>)data).CopyTo(Array.Empty<IntPtr>(), 0)); 73var enumerator3 = ((IEnumerable<IntPtr>)data).GetEnumerator(); 76Assert.Throws<NotSupportedException>(() => ((IList)data).Add(IntPtr.Zero)); 77Assert.Throws<NotSupportedException>(() => ((ICollection<IntPtr>)data).Add(IntPtr.Zero)); 78Assert.Throws<NotSupportedException>(() => ((ICollection<IntPtr>)data).Clear()); 79Assert.Throws<NotSupportedException>(() => ((IList)data).Insert(0, IntPtr.Zero)); 80Assert.Throws<NotSupportedException>(() => ((IList<IntPtr>)data).Insert(0, IntPtr.Zero)); 81Assert.Throws<NotSupportedException>(() => ((IList)data).Remove(IntPtr.Zero)); 82Assert.Throws<NotSupportedException>(() => ((ICollection<IntPtr>)data).Remove(IntPtr.Zero)); 84Assert.Throws<NotSupportedException>(() => ((IList<IntPtr>)data).RemoveAt(0)); 87Assert.Throws<NullReferenceException>(() => ((IList)data).Contains(IntPtr.Zero)); 88Assert.Throws<NullReferenceException>(() => ((ICollection<IntPtr>)data).Contains(IntPtr.Zero)); 89Assert.Throws<NullReferenceException>(() => ((IList)data).IndexOf(IntPtr.Zero)); 90Assert.Throws<NullReferenceException>(() => ((IList<IntPtr>)data).IndexOf(IntPtr.Zero)); 106var data = new SegmentedArray<IntPtr>(length); 114Assert.Equal(SegmentedArray<IntPtr>.TestAccessor.SegmentSize, items[i].Length); 115Assert.True(items[i].Length <= SegmentedArray<IntPtr>.TestAccessor.SegmentSize); 123var data = new SegmentedArray<IntPtr>(length); 132Assert.Equal(length, ((ICollection<IntPtr>)data).Count); 133Assert.Equal(length, ((IReadOnlyCollection<IntPtr>)data).Count); 140var data = new SegmentedArray<IntPtr>(length); 145data[i] = (IntPtr)i; 150Assert.Equal((IntPtr)i, data[i]); 156Assert.Equal((IntPtr)i, data[i]); 157value = IntPtr.Add(value, 1); 159Assert.Equal((IntPtr)(i + 1), value); 160Assert.Equal((IntPtr)(i + 1), data[i]); 166Assert.Equal((IntPtr)i, ((IReadOnlyList<IntPtr>)data)[i]); 167data[i] = IntPtr.Add(data[i], 1); 168Assert.Equal((IntPtr)(i + 1), ((IReadOnlyList<IntPtr>)data)[i]); 174Assert.Equal((IntPtr)i, ((IList<IntPtr>)data)[i]); 175((IList<IntPtr>)data)[i] = IntPtr.Add(data[i], 1); 176Assert.Equal((IntPtr)(i + 1), ((IList<IntPtr>)data)[i]); 182Assert.Equal((IntPtr)i, ((IList)data)[i]); 183((IList)data)[i] = IntPtr.Add(data[i], 1); 184Assert.Equal((IntPtr)(i + 1), ((IList)data)[i]);
Emit\EmitBaselineTests.cs (1)
31var mdModule = ModuleMetadata.CreateFromMetadata((IntPtr)mdBytesPointer, mdBytes.Length);
MetadataReferences\AssemblyIdentityTests.cs (2)
383int hr = FusionAssemblyIdentityComparer.DefaultModelCompareAssemblyIdentity(displayPkt, false, displayPk, false, out equivalent, out result, IntPtr.Zero); 389hr = FusionAssemblyIdentityComparer.DefaultModelCompareAssemblyIdentity(displayPk, false, displayPkt, false, out equivalent, out result, IntPtr.Zero);
MetadataReferences\AssemblyPortabilityPolicyTests.cs (3)
390Assert.NotEqual(IntPtr.Zero, policy.ConfigCookie); 392Assert.Equal(IntPtr.Zero, policy.ConfigCookie); 394Assert.Equal(IntPtr.Zero, policy.ConfigCookie);
MetadataReferences\FusionAssemblyIdentityComparer.cs (4)
41IntPtr asmConfigCookie = policy == null ? IntPtr.Zero : policy.ConfigCookie; 81IntPtr asmConfigCookie) 103IntPtr asmConfigCookie,
MetadataReferences\FusionAssemblyPortabilityPolicy.cs (9)
28private IntPtr _assemblyConfigCookie; 31private FusionAssemblyPortabilityPolicy(IntPtr asmConfigCookie, ImmutableArray<byte> fileHash) 48IntPtr asmConfigCookie; 56internal IntPtr ConfigCookie 62private static extern void CreateAssemblyConfigCookie([MarshalAs(UnmanagedType.LPWStr)] string configPath, out IntPtr assemblyConfig); 65private static extern int DestroyAssemblyConfigCookie(IntPtr assemblyConfig); 75IntPtr ptr = Interlocked.Exchange(ref _assemblyConfigCookie, IntPtr.Zero); 76if (ptr != IntPtr.Zero)
MetadataReferences\ModuleMetadataTests.cs (13)
23Assert.Throws<ArgumentNullException>(() => ModuleMetadata.CreateFromMetadata(IntPtr.Zero, 0)); 24Assert.Throws<ArgumentOutOfRangeException>(() => { fixed (byte* ptr = new byte[] { 1, 2, 3 }) ModuleMetadata.CreateFromMetadata((IntPtr)ptr, 0); }); 25Assert.Throws<ArgumentOutOfRangeException>(() => { fixed (byte* ptr = new byte[] { 1, 2, 3 }) ModuleMetadata.CreateFromMetadata((IntPtr)ptr, -1); }); 29var metadata = ModuleMetadata.CreateFromMetadata((IntPtr)ptr, 3); 42var metadata = ModuleMetadata.CreateFromMetadata((IntPtr)ptr, h.MetadataSize); 55ModuleMetadata.CreateFromMetadata((IntPtr)ptr, h.MetadataSize); 68var metadata = ModuleMetadata.CreateFromMetadata((IntPtr)stream.PositionPointer, (int)stream.Length, stream.Dispose); 82ModuleMetadata.CreateFromMetadata((IntPtr)stream.PositionPointer, (int)stream.Length, stream.Dispose); 89Assert.Throws<ArgumentNullException>(() => ModuleMetadata.CreateFromImage(IntPtr.Zero, 0)); 90Assert.Throws<ArgumentOutOfRangeException>(() => { fixed (byte* ptr = new byte[] { 1, 2, 3 }) ModuleMetadata.CreateFromImage((IntPtr)ptr, 0); }); 91Assert.Throws<ArgumentOutOfRangeException>(() => { fixed (byte* ptr = new byte[] { 1, 2, 3 }) ModuleMetadata.CreateFromImage((IntPtr)ptr, -1); }); 218var metadata = ModuleMetadata.CreateFromMetadata((IntPtr)stream.PositionPointer, (int)stream.Length, stream.Dispose); 276var metadata = ModuleMetadata.CreateFromMetadata((IntPtr)stream.PositionPointer, (int)stream.Length);
src\Compilers\Shared\GlobalAssemblyCacheHelpers\FusionAssemblyIdentity.cs (6)
115private static int CreateAssemblyNameObject(out IAssemblyName ppEnum, string szAssemblyName, uint dwFlags, IntPtr pvReserved) 124private static extern int RealCreateAssemblyNameObject(out IAssemblyName ppEnum, [MarshalAs(UnmanagedType.LPWStr)] string szAssemblyName, uint dwFlags, IntPtr pvReserved); 154return Marshal.PtrToStringUni((IntPtr)p, (int)characterCountIncludingTerminator - 1); 197return Marshal.PtrToStringUni((IntPtr)p, (data.Length / 2) - 1); 437Marshal.ThrowExceptionForHR(CreateAssemblyNameObject(out result, null, 0, IntPtr.Zero)); 509int hr = CreateAssemblyNameObject(out result, displayName, CANOF.PARSE_DISPLAY_NAME, IntPtr.Zero);
Win32Res.cs (2)
149rsrcInXml = Win32Res.VersionResourceToXml((IntPtr)p); 167Marshal.Copy((IntPtr)p, threeWords, 0, 3);
Microsoft.CodeAnalysis.Workspaces (25)
Serialization\SerializerService_Reference.cs (1)
468(IntPtr)unmanagedStream.PositionPointer, (int)unmanagedStream.Length, unmanagedStream.Dispose);
src\Compilers\Core\Portable\CodeAnalysisEventSource.Common.cs (3)
125DataPointer = (IntPtr)ptr, 134DataPointer = (IntPtr)ptr, 143DataPointer = (IntPtr)ptr,
src\Compilers\Core\Portable\DiagnosticAnalyzer\AnalyzerAssemblyLoader.Core.cs (2)
219protected override IntPtr LoadUnmanagedDll(string unmanagedDllName) 227return IntPtr.Zero;
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(IntPtr)) 651if (typeof(T) == typeof(IntPtr)) 1168if (typeof(TKey) == typeof(IntPtr)) 1202if (typeof(TKey) == typeof(IntPtr))
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
126return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\Core\Serialization\ObjectWriter.cs (1)
505Marshal.Copy((IntPtr)valuePtr, bytes, 0, bytes.Length);
Storage\SQLite\Interop\SafeSqliteBlobHandle.cs (4)
19: base(invalidHandleValue: IntPtr.Zero, ownsHandle: true) 30SetHandle(IntPtr.Zero); 36public override bool IsInvalid => handle == IntPtr.Zero; 48SetHandle(IntPtr.Zero);
Storage\SQLite\Interop\SafeSqliteHandle.cs (4)
18: base(invalidHandleValue: IntPtr.Zero, ownsHandle: true) 29SetHandle(IntPtr.Zero); 33public override bool IsInvalid => handle == IntPtr.Zero; 43SetHandle(IntPtr.Zero);
Storage\SQLite\Interop\SafeSqliteStatementHandle.cs (4)
19: base(invalidHandleValue: IntPtr.Zero, ownsHandle: true) 30SetHandle(IntPtr.Zero); 36public override bool IsInvalid => handle == IntPtr.Zero; 48SetHandle(IntPtr.Zero);
TemporaryStorage\TemporaryStorageService.DirectMemoryAccessStreamReader.cs (1)
69Marshal.Copy((IntPtr)_position, buffer, index, count);
Microsoft.CodeAnalysis.Workspaces.MSBuild (6)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCacheLocation.cs (1)
65return Marshal.PtrToStringUni((IntPtr)p);
src\Workspaces\MSBuild\BuildHost\Rpc\Contracts\MonoMSBuildDiscovery.cs (5)
42private static extern IntPtr Unix_realpath(string path, IntPtr buffer); 46private static extern void Unix_free(IntPtr ptr); 59var ptr = Unix_realpath(path, IntPtr.Zero);
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (12)
Rpc\Contracts\MonoMSBuildDiscovery.cs (5)
42private static extern IntPtr Unix_realpath(string path, IntPtr buffer); 46private static extern void Unix_free(IntPtr ptr); 59var ptr = Unix_realpath(path, IntPtr.Zero);
src\Compilers\Core\Portable\InternalUtilities\ReadOnlyUnmanagedMemoryStream.cs (2)
14private readonly IntPtr _data; 18public ReadOnlyUnmanagedMemoryStream(object memoryOwner, IntPtr data, int length)
src\Dependencies\Collections\Internal\ArraySortHelper.cs (4)
617if (typeof(T) == typeof(IntPtr)) 651if (typeof(T) == typeof(IntPtr)) 1168if (typeof(TKey) == typeof(IntPtr)) 1202if (typeof(TKey) == typeof(IntPtr))
src\Dependencies\Collections\Internal\SegmentedArrayHelper.cs (1)
126return (2 * IntPtr.Size + 8) + (elementSize * segmentSize);
Microsoft.CodeAnalysis.XunitHook (1)
XunitDisposeHook.cs (1)
38var functionPointer = method.MethodHandle.GetFunctionPointer();
Microsoft.CSharp (1)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (1)
143new PredefinedTypeInfo(PredefinedType.PT_INTPTR, typeof(IntPtr), "System.IntPtr", FUNDTYPE.FT_STRUCT),
Microsoft.Data.Analysis (1)
DataFrameColumns\StringDataFrameColumn.cs (1)
21public static int MaxCapacity = ArrayUtility.ArrayMaxSize / Unsafe.SizeOf<IntPtr>(); // Max Size in bytes / size of pointer (8 bytes on x64)
Microsoft.DotNet.Build.Tasks.Feed (2)
src\common\NativeMethods.cs (2)
17internal static partial bool CreateHardLink(string newFileName, string exitingFileName, IntPtr securityAttributes); 36hardLinkCreated = CreateHardLink(newFileName, exitingFileName, IntPtr.Zero /* reserved, must be NULL */);
Microsoft.DotNet.RemoteExecutor (6)
MiniDump.cs (6)
31if (MiniDumpWriteDump(process.SafeHandle, process.Id, fs.SafeFileHandle, MiniDumpType, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero) == 0) 44IntPtr ExceptionParam, 45IntPtr UserStreamParam, 46IntPtr CallbackParam);
Microsoft.DotNet.SignCheckLibrary (31)
Interop\WinCrypt.cs (21)
175IntPtr pvObject, 182ref IntPtr phCertStore, 183ref IntPtr phMsg, 184ref IntPtr ppvContext); 188IntPtr hCryptMsg, 191IntPtr pvData, 196IntPtr hCryptMsg, 220IntPtr hAdditionalStore, 221[Out] out IntPtr ppTsContext, 222[Out] out IntPtr ppTSSigner, 223[Out] out IntPtr phStore); 226internal static extern void CryptMemFree([In] IntPtr pv); 230internal static extern bool CertFreeCertificateContext([In] IntPtr pCertContext); 234internal static extern bool CertCloseStore([In] IntPtr hCertStore, [In] uint dwFlags); 243public IntPtr pbData; 275public IntPtr pCertInfo; 279public IntPtr hCertStore; 295public IntPtr pbEncoded; 299public IntPtr pTimeStamp; 311public IntPtr pvAccuracy; 316public IntPtr rgExtension;
Interop\WinTrust.cs (3)
15public static extern uint WinVerifyTrust(IntPtr hWnd, IntPtr pgActionID, IntPtr pWinTrustData);
Interop\WinTrustData.cs (5)
13public IntPtr pPolicyCallbackData; 14public IntPtr pSIPClientData; 18public IntPtr pFile; // We're not interested in other union members 20public IntPtr hWVTStateData; 21public IntPtr pwszURLReference;
Interop\WinTrustFileInfo.cs (2)
15public IntPtr hFile; 16public IntPtr pgKnownSubject;
Microsoft.DotNet.XUnitAssert.Tests (1)
Sdk\ArgumentFormatterTests.cs (1)
218 { typeof(IntPtr), "typeof(nint)" },
Microsoft.Extensions.Caching.Hybrid.Tests (1)
HybridCacheEventSourceTests.cs (1)
226log.WriteLine($".NET {Environment.Version} on {Environment.OSVersion}, {IntPtr.Size * 8}-bit");
Microsoft.Extensions.Caching.Memory (2)
MemoryCache.cs (2)
288if (IntPtr.Size == 4) 309if (IntPtr.Size == 4)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (23)
Windows\Interop\JobObjectInfo.cs (9)
194var processHandle = UnsafeNativeMethods.GetCurrentProcess(); 200out var realProcessHandle, 331public static extern IntPtr GetCurrentProcess(); 348IntPtr hSourceProcessHandle, 349IntPtr hSourceHandle, 350IntPtr hTargetProcessHandle, 351out IntPtr lpTargetHandle, 367IntPtr processHandle, 379public static extern bool CloseHandle(IntPtr handle);
Windows\Network\WindowsTcpStateInfo.cs (14)
20internal delegate uint GetTcpTableDelegate(IntPtr pTcpTable, ref uint pdwSize, bool bOrder); 103private static IntPtr RetryCalling(GetTcpTableDelegate getTcpTableDelegate) 108var tcpTable = IntPtr.Zero; 154var tcpTable = RetryCalling(_getTcpTable); 159var rowPtr = IntPtr.Add(tcpTable, offset); 163rowPtr = IntPtr.Add(rowPtr, Marshal.SizeOf<MIB_TCPROW>()); 179var tcpTable = RetryCalling(_getTcp6Table); 184var rowPtr = IntPtr.Add(tcpTable, offset); 188rowPtr = IntPtr.Add(rowPtr, Marshal.SizeOf<MIB_TCP6ROW>()); 213public static extern uint GetTcpTable(IntPtr pTcpTable, ref uint pdwSize, bool bOrder); 224public static extern uint GetTcp6Table(IntPtr pTcpTable, ref uint pdwSize, bool bOrder);
Microsoft.Extensions.Diagnostics.ResourceMonitoring.Tests (18)
Windows\Tcp6TableInfoTests.cs (9)
37public static uint FakeGetTcp6TableWithUnsuccessfulStatusAllTheTime(IntPtr pTcp6Table, ref uint pdwSize, bool bOrder) 42public static uint FakeGetTcp6TableWithInsufficientBufferAndInvalidParameter(IntPtr pTcp6Table, ref uint pdwSize, bool bOrder) 53public static uint FakeGetTcp6TableWithFakeInformation(IntPtr pTcp6Table, ref uint pdwSize, bool bOrder) 125var fakePtr = IntPtr.Add(pTcp6Table, offset); 130fakePtr = IntPtr.Add(fakePtr, Marshal.SizeOf<MIB_TCP6ROW>()); 217var fakePtr = IntPtr.Add(pTcp6Table, offset); 222fakePtr = IntPtr.Add(fakePtr, Marshal.SizeOf<MIB_TCP6ROW>());
Windows\TcpTableInfoTests.cs (9)
30public static uint FakeGetTcpTableWithUnsuccessfulStatusAllTheTime(IntPtr pTcpTable, ref uint pdwSize, bool bOrder) 35public static uint FakeGetTcpTableWithInsufficientBufferAndInvalidParameter(IntPtr pTcpTable, ref uint pdwSize, bool bOrder) 46public static unsafe uint FakeGetTcpTableWithFakeInformation(IntPtr pTcpTable, ref uint pdwSize, bool bOrder) 91var fakePtr = IntPtr.Add(pTcpTable, offset); 96fakePtr = IntPtr.Add(fakePtr, sizeof(MIB_TCPROW)); 160var fakePtr = IntPtr.Add(pTcpTable, offset); 165fakePtr = IntPtr.Add(fakePtr, sizeof(MIB_TCPROW));
Microsoft.Extensions.Hosting.WindowsServices (2)
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.CloseHandle.cs (1)
13internal static partial bool CloseHandle(IntPtr handle);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.CreateToolhelp32Snapshot.cs (1)
30internal IntPtr th32DefaultHeapID;
Microsoft.Extensions.Logging.Console (5)
ConsoleLoggerProvider.cs (1)
90var stdOutHandle = Interop.Kernel32.GetStdHandle(Interop.Kernel32.STD_OUTPUT_HANDLE);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.GetConsoleMode.cs (3)
13internal static partial bool GetConsoleMode(IntPtr handle, out int mode); 15internal static bool IsGetConsoleModeCallSuccessful(IntPtr handle) 22internal static partial bool SetConsoleMode(IntPtr handle, int mode);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.GetStdHandle.cs (1)
15internal static partial IntPtr GetStdHandle(int nStdHandle); // param is NOT a handle, but it returns one!
Microsoft.Extensions.Logging.EventSource (2)
LoggingEventSource.cs (2)
571eventData.DataPointer = (IntPtr)pinnedString; 577eventData.DataPointer = (IntPtr)Unsafe.AsPointer(ref value);
Microsoft.ML.Core (2)
Data\ModelHeader.cs (2)
311Marshal.Copy((IntPtr)pheader, bytes, 0, Size); 378Marshal.Copy(bytes, 0, (IntPtr)pheader, Size);
Microsoft.ML.Data (15)
DataLoadSave\Binary\BinaryLoader.cs (1)
1041Marshal.Copy(headerBytes, 0, (IntPtr)(&header), Header.HeaderSize);
DataLoadSave\Binary\UnsafeTypeOps.cs (13)
21public abstract void Apply(ReadOnlySpan<T> array, Action<IntPtr> func); 55public override unsafe void Apply(ReadOnlySpan<sbyte> array, Action<IntPtr> func) 67public override unsafe void Apply(ReadOnlySpan<Byte> array, Action<IntPtr> func) 79public override unsafe void Apply(ReadOnlySpan<short> array, Action<IntPtr> func) 91public override unsafe void Apply(ReadOnlySpan<UInt16> array, Action<IntPtr> func) 103public override unsafe void Apply(ReadOnlySpan<int> array, Action<IntPtr> func) 115public override unsafe void Apply(ReadOnlySpan<UInt32> array, Action<IntPtr> func) 127public override unsafe void Apply(ReadOnlySpan<long> array, Action<IntPtr> func) 139public override unsafe void Apply(ReadOnlySpan<UInt64> array, Action<IntPtr> func) 151public override unsafe void Apply(ReadOnlySpan<Single> array, Action<IntPtr> func) 163public override unsafe void Apply(ReadOnlySpan<Double> array, Action<IntPtr> func) 175public override unsafe void Apply(ReadOnlySpan<TimeSpan> array, Action<IntPtr> func) 192public override unsafe void Apply(ReadOnlySpan<DataViewRowId> array, Action<IntPtr> func)
DataLoadSave\Transpose\TransposeLoader.cs (1)
569Marshal.Copy(headerBytes, 0, (IntPtr)(&header), Header.HeaderSize);
Microsoft.ML.FastTree (8)
Dataset\DenseIntArray.cs (7)
137public abstract void Callback(Action<IntPtr> callback); 430public override unsafe void Callback(Action<IntPtr> callback) 434callback((IntPtr)pData); 616public override unsafe void Callback(Action<IntPtr> callback) 620callback((IntPtr)pData); 705public override unsafe void Callback(Action<IntPtr> callback) 709callback((IntPtr)pData);
Training\TreeLearners\LeastSquaresRegressionTreeLearner.cs (1)
162_sizeOfReservedMemory += (long)IntPtr.Size * TrainData.NumFlocks;
Microsoft.ML.LightGbm (21)
Parallel\IParallel.cs (1)
29IntPtr reducer);
WrappedLightGbmBooster.cs (1)
95return LightGbmInterfaceUtils.GetString((IntPtr)ptr);
WrappedLightGbmDataset.cs (6)
70(IntPtr)ptrValues, (IntPtr)ptrIndices, numCol, sampleNonZeroCntPerColumn, numSampleRow, numTotalRow, 0, 159LightGbmInterfaceUtils.Check(WrappedLightGbmInterface.DatasetSetField(_handle, "label", (IntPtr)ptr, labels.Length, 181LightGbmInterfaceUtils.Check(WrappedLightGbmInterface.DatasetSetField(_handle, "weight", (IntPtr)ptr, weights.Length, 192LightGbmInterfaceUtils.Check(WrappedLightGbmInterface.DatasetSetField(_handle, "group", (IntPtr)ptr, groups.Length, 204LightGbmInterfaceUtils.Check(WrappedLightGbmInterface.DatasetSetField(_handle, "init_score", (IntPtr)ptr, initScores.Length,
WrappedLightGbmInterface.cs (13)
44ref IntPtr ret); 48IntPtr arr, 51IntPtr src, 56IntPtr ret, 64public static extern IntPtr GetLastError(); 85public static extern int DatasetCreateFromSampledColumn(IntPtr sampleValuePerColumn, 86IntPtr sampleIndicesPerColumn, 145private static extern int DatasetFree(IntPtr handle); 151IntPtr array, 185private static extern int BoosterFree(IntPtr handle); 217public static extern unsafe int BoosterPredictForMat(SafeBoosterHandle handle, IntPtr data, CApiDType dataType, int nRow, int nCol, int isRowMajor, 241var charPtr = WrappedLightGbmInterface.GetLastError(); 289public static string GetString(IntPtr src)
Microsoft.ML.Mkl.Components (1)
SymSgdClassificationTrainer.cs (1)
933private static extern IntPtr ErrorMessage(int status);
Microsoft.ML.Recommender (2)
SafeTrainingAndModelBuffer.cs (2)
398Marshal.Copy((IntPtr)_pMFModel->P, p, 0, p.Length); 399Marshal.Copy((IntPtr)_pMFModel->Q, q, 0, q.Length);
Microsoft.ML.TensorFlow (15)
TensorflowTransform.cs (3)
364if (graph == IntPtr.Zero) 513if (Session?.graph != IntPtr.Zero) 518if (Session != null && Session != IntPtr.Zero)
TensorflowUtils.cs (12)
521private readonly IntPtr[] _outputValues; 522private readonly IntPtr[] _inputValues; 524private readonly IntPtr[] _operations; 529internal Runner(Session session, TF_Output[] inputs = null, TF_Output[] outputs = null, IntPtr[] operations = null) 534_operations = operations ?? new IntPtr[0]; 535_inputValues = new IntPtr[_inputs.Length]; 537_outputValues = new IntPtr[_outputs.Length]; 547_operations = operations?.Select(x => c_api.TF_GraphOperationByName(session.graph, x)).ToArray() ?? new IntPtr[0]; 548_inputValues = new IntPtr[_inputs.Length]; 550_outputValues = new IntPtr[_outputs.Length]; 586if (_session == IntPtr.Zero) 595_operations.Length, IntPtr.Zero, _status.Handle);
Microsoft.ML.TestFrameworkCommon (43)
Attributes\AttributeHelpers.cs (1)
41private static extern IntPtr gnu_get_libc_version();
Utility\Kernel32.cs (4)
10public static extern IntPtr LoadLibrary(string fileName); 13public static extern IntPtr GetProcAddress(IntPtr module, string procName); 16public static extern int FreeLibrary(IntPtr module);
Utility\Libdl.cs (4)
14public static extern IntPtr dlopen(string fileName, int flags); 17public static extern IntPtr dlsym(IntPtr handle, string name); 20public static extern int dlclose(IntPtr handle);
Utility\LibraryLoader.cs (30)
18public IntPtr LoadNativeLibrary(string name) 29public IntPtr LoadNativeLibrary(string[] names) 40public IntPtr LoadNativeLibrary(string name, PathResolver pathResolver) 47IntPtr ret = LoadWithResolver(name, pathResolver); 49if (ret == IntPtr.Zero) 64public IntPtr LoadNativeLibrary(string[] names, PathResolver pathResolver) 71IntPtr ret = IntPtr.Zero; 75if (ret != IntPtr.Zero) 81if (ret == IntPtr.Zero) 89private IntPtr LoadWithResolver(string name, PathResolver pathResolver) 101IntPtr ret = CoreLoadNativeLibrary(loadTarget); 102if (ret != IntPtr.Zero) 109return IntPtr.Zero; 119public IntPtr LoadFunctionPointer(IntPtr handle, string functionName) 133public void FreeNativeLibrary(IntPtr handle) 135if (handle == IntPtr.Zero) 149protected abstract IntPtr CoreLoadNativeLibrary(string name); 155protected abstract void CoreFreeNativeLibrary(IntPtr handle); 163protected abstract IntPtr CoreLoadFunctionPointer(IntPtr handle, string functionName); 185protected override void CoreFreeNativeLibrary(IntPtr handle) 190protected override IntPtr CoreLoadFunctionPointer(IntPtr handle, string functionName) 195protected override IntPtr CoreLoadNativeLibrary(string name) 203protected override void CoreFreeNativeLibrary(IntPtr handle) 208protected override IntPtr CoreLoadFunctionPointer(IntPtr handle, string functionName) 213protected override IntPtr CoreLoadNativeLibrary(string name)
Utility\NativeLibrary.cs (4)
68public IntPtr Handle { get; } 138IntPtr functionPtr = _loader.LoadFunctionPointer(Handle, name); 139if (functionPtr == IntPtr.Zero) 152public IntPtr LoadFunction(string name)
Microsoft.ML.Tests (2)
TrainerEstimators\TreeEstimators.cs (2)
537WrappedLightGbmInterface.BoosterPredictForMat(gbmNative.Handle, (IntPtr)data, WrappedLightGbmInterface.CApiDType.Float32, 539WrappedLightGbmInterface.BoosterPredictForMat(gbmNative.Handle, (IntPtr)data, WrappedLightGbmInterface.CApiDType.Float32,
Microsoft.ML.TimeSeries (21)
FftUtils.cs (21)
171private static extern int CreateDescriptor(out IntPtr desc, ConfigValue precision, ConfigValue domain, int dimension, int length); 175private static extern int CommitDescriptor(IntPtr desc); 179private static extern int FreeDescriptor(ref IntPtr desc); 183private static extern int SetValue(IntPtr desc, ConfigParam configParam, ConfigValue configValue); 187private static extern int ComputeForward(IntPtr desc, [In] double[] inputRe, [In] double[] inputIm, [Out] double[] outputRe, [Out] double[] outputIm); 191private static extern int ComputeBackward(IntPtr desc, [In] double[] inputRe, [In] double[] inputIm, [Out] double[] outputRe, [Out] double[] outputIm); 195private static extern int ComputeForward(IntPtr desc, [In] float[] inputRe, [In] float[] inputIm, [Out] float[] outputRe, [Out] float[] outputIm); 199private static extern int ComputeBackward(IntPtr desc, [In] float[] inputRe, [In] float[] inputIm, [Out] float[] outputRe, [Out] float[] outputIm); 203private static extern IntPtr ErrorMessage(int status); 230IntPtr descriptor = default(IntPtr); 251if (descriptor != IntPtr.Zero) 275IntPtr descriptor = default(IntPtr); 297if (descriptor != IntPtr.Zero) 332IntPtr descriptor = default(IntPtr); 353if (descriptor != IntPtr.Zero) 377IntPtr descriptor = default(IntPtr); 399if (descriptor != IntPtr.Zero)
Microsoft.ML.TorchSharp (2)
Utils\MethodTable.cs (2)
147return BaseSize > (uint)(3 * sizeof(IntPtr)); 159return (int)((BaseSize - (uint)(3 * sizeof(IntPtr))) / (uint)(2 * sizeof(int)));
Microsoft.ML.Transforms (1)
Text\LdaSingleBox.cs (1)
59private static extern void DestroyEngine(IntPtr engine);
Microsoft.ML.Vision (14)
DnnRetrainTransform.cs (5)
314IntPtr[] ops = null; 385if (tensor.Length > 0 && tensor[0] != IntPtr.Zero) 391if (tensor.Length > 1 && tensor[1] != IntPtr.Zero) 607if (graph == IntPtr.Zero) 740if (_session != null && _session != IntPtr.Zero)
ImageClassificationTrainer.cs (9)
625new Runner(_session, operations: new IntPtr[] { tf.global_variables_initializer() }).Run(); 768var handle = c_api.TF_AllocateTensor(TF_DataType.TF_STRING, Array.Empty<long>(), 0, ((ulong)size + 8)); 770IntPtr tensor = c_api.TF_TensorData(handle); 992IntPtr featureBufferPtr = featureBufferHandle.AddrOfPinnedObject(); 994IntPtr labelBufferPtr = labelBufferHandle.AddrOfPinnedObject(); 1085IntPtr featureBufferPtr, IntPtr labelBufferPtr, Action<Tensor[], ImageClassificationMetrics> metricsAggregator) 1510if (_session?.graph != IntPtr.Zero) 1515if (_session != null && _session != IntPtr.Zero)
Microsoft.VisualStudio.LanguageServices (174)
CodeMarkers\ManagedCodeMarkers.cs (2)
69public static extern IntPtr GetModuleHandle([MarshalAs(UnmanagedType.LPWStr)] string lpModuleName); 134_shouldUseTestDll = NativeMethods.GetModuleHandle(ProductDllName) == IntPtr.Zero;
ColorSchemes\ColorSchemeApplier.Settings.cs (2)
82NativeMethods.PostMessage(NativeMethods.HWND_BROADCAST, NativeMethods.WM_SYSCOLORCHANGE, wparam: IntPtr.Zero, lparam: IntPtr.Zero);
DebuggerIntelliSense\AbstractDebuggerIntelliSenseContext.cs (1)
268Marshal.ThrowExceptionForHR(frame[0].QueryViewInterface(typeof(IVsTextView).GUID, out var frameTextView));
DebuggerIntelliSense\DebuggerIntellisenseFilter.cs (4)
88public override int Exec(ref Guid pguidCmdGroup, uint commandId, uint executeInformation, IntPtr pvaIn, IntPtr pvaOut) 103protected override int ExecuteVisualStudio2000(ref Guid pguidCmdGroup, uint commandId, uint executeInformation, IntPtr pvaIn, IntPtr pvaOut)
DocumentOutline\DocumentOutlineView.xaml.cs (3)
86int IOleCommandTarget.QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText) 135int IOleCommandTarget.Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
EditorConfigSettings\SettingsEditorFactory.cs (9)
46IntPtr punkDocDataExisting, 47out IntPtr ppunkDocView, 48out IntPtr ppunkDocData, 54ppunkDocView = IntPtr.Zero; 55ppunkDocData = IntPtr.Zero; 85if (punkDocDataExisting == IntPtr.Zero) 90_ = localRegistry.CreateInstance(typeof(VsTextBufferClass).GUID, null, ref textLinesGuid, 1 /*CLSCTX_INPROC_SERVER*/, out var ptr); 168public object? GetDocumentView(uint grfCreate, string pszPhysicalView, IVsHierarchy pHier, IntPtr punkDocData, uint itemid) 171public string? GetEditorCaption(string pszMkDocument, string pszPhysicalView, IVsHierarchy pHier, IntPtr punkDocData, out Guid pguidCmdUI)
EditorConfigSettings\SettingsEditorPane.cs (6)
318public int get_DocView(out IntPtr ppUnkDocView) 330public int FReserved1(uint dwReserved, uint message, IntPtr wParam, IntPtr lParam) => S_OK; 336public int FContinueMessageLoop(uint uReason, IntPtr pvLoopData, MSG[] pMsgPeeked) => S_OK; 339public IntPtr HwndGetWindow(uint dwWhich, uint dwReserved) => IntPtr.Zero;
Extensions\VisualStudioWorkspaceImplExtensions.cs (3)
24private static bool TryGetImageListAndIndex(this IVsHierarchy hierarchy, IVsImageService2 imageService, uint itemId, out IntPtr imageList, out ushort index) 53if (ErrorHandler.Succeeded(imageListData.GetHIMAGELIST(out var imageListInt))) 67public static bool TryGetImageListAndIndex(this VisualStudioWorkspaceImpl workspace, IVsImageService2 imageService, DocumentId id, out IntPtr imageList, out ushort index)
FindReferences\VisualStudioDefinitionsAndReferencesFactory.cs (2)
120out _, out _, out var bufferPtr, out _) != VSConstants.S_OK) 145if (bufferPtr != IntPtr.Zero)
Implementation\AbstractCodePageEditorFactory.cs (6)
26IntPtr punkDocDataExisting, 27out IntPtr ppunkDocView, 28out IntPtr ppunkDocData, 33if (punkDocDataExisting != IntPtr.Zero) 35ppunkDocView = IntPtr.Zero; 36ppunkDocData = IntPtr.Zero;
Implementation\AbstractEditorFactory.cs (10)
63IntPtr punkDocDataExisting, 64out IntPtr ppunkDocView, 65out IntPtr ppunkDocData, 72ppunkDocView = IntPtr.Zero; 73ppunkDocData = IntPtr.Zero; 83if (punkDocDataExisting != IntPtr.Zero) 178public object GetDocumentView(uint grfCreate, string pszPhysicalView, IVsHierarchy pHier, IntPtr punkDocData, uint itemid) 184public string GetEditorCaption(string pszMkDocument, string pszPhysicalView, IVsHierarchy pHier, IntPtr punkDocData, out Guid pguidCmdUI) 262out IntPtr ppunkDocView, 266ppunkDocView = IntPtr.Zero;
Implementation\AbstractOleCommandTarget.Execute.cs (4)
15public virtual int Exec(ref Guid pguidCmdGroup, uint commandId, uint executeInformation, IntPtr pvaIn, IntPtr pvaOut) 49protected virtual int ExecuteVisualStudio2000(ref Guid pguidCmdGroup, uint commandId, uint executeInformation, IntPtr pvaIn, IntPtr pvaOut)
Implementation\AbstractOleCommandTarget.Query.cs (2)
15public int QueryStatus(ref Guid pguidCmdGroup, uint commandCount, OLECMD[] prgCmds, IntPtr commandText) 32private int QueryVisualStudio2014Status(ref Guid pguidCmdGroup, uint commandCount, OLECMD[] prgCmds, IntPtr commandText)
Interactive\VsResetInteractive.cs (8)
68var hierarchyPointer = default(IntPtr); 69var selectionContainerPointer = default(IntPtr); 82if (hierarchyPointer != IntPtr.Zero) 98IntPtr hierarchyPointer, 275private static void SafeRelease(IntPtr pointer) 277if (pointer != IntPtr.Zero)
Interop\IComWrapperFixed.cs (4)
20/// <returns>An <see cref="IntPtr"/> which can be passed to <see cref="GCHandle.FromIntPtr(IntPtr)"/> to obtain 25/// when it was actually being implemented as <see cref="IntPtr"/> for callers within the current process. This 29IntPtr GCHandlePtr { get; }
Interop\WeakComHandle.cs (11)
34private readonly IntPtr _pUnkOfInnerUnknownWhenAlive; 41_pUnkOfInnerUnknownWhenAlive = IntPtr.Zero; 44var pUnk = IntPtr.Zero; 54if (pUnk != IntPtr.Zero) 65var pUnk = IntPtr.Zero; 73if (pUnk != IntPtr.Zero) 87var pUnk = IntPtr.Zero; 116if (pUnk != IntPtr.Zero)
Interop\WrapperPolicy.cs (1)
33var ptr = Marshal.GetIUnknownForObject(managedObject);
KeybindingReset\KeybindingResetDetector.cs (4)
324var hr = _oleCommandTarget.QueryStatus(s_resharperCommandGroup, (uint)cmds.Length, cmds, IntPtr.Zero); 392public int QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText) 401public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
LanguageService\AbstractLanguageService`2.IVsContainedLanguageFactory.cs (2)
33if (webServiceProvider.QueryService(ref webFileCtxServiceGuid, ref webFileCtxServiceGuid, out var service) >= 0) 42if (service != IntPtr.Zero)
LanguageService\AbstractLanguageService`2.VsCodeWindowManager.cs (3)
236int IVsDocOutlineProvider.GetOutline(out IntPtr phwnd, out IOleCommandTarget? pCmdTarget) 243private void GetOutline(out IntPtr phwnd) 276int IVsDocOutlineProvider.ReleaseOutline(IntPtr hwnd, IOleCommandTarget pCmdTarget)
Library\AbstractLibraryManager.cs (2)
16private readonly IntPtr _imageListPtr; 33public IntPtr ImageListPtr
Library\AbstractLibraryManager_IOleCommandTarget.cs (3)
18int IOleCommandTarget.Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut) 28int IOleCommandTarget.QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText)
Library\AbstractLibraryManager_IVsLibrary2.cs (3)
27int IVsLibrary2.GetGuid(out IntPtr ppguidLib) 29ppguidLib = IntPtr.Zero; 51int IVsLibrary2.GetSeparatorString(IntPtr pszSeparator)
Library\AbstractLibraryManager_IVsLibraryMgr.cs (1)
42int IVsLibraryMgr.GetNameAt(uint nLibIndex, IntPtr pszName)
NavigationBar\NavigationBarClient.cs (4)
91int IVsDropdownBarClient.GetComboAttributes(int iCombo, out uint pcEntries, out uint puEntryType, out IntPtr phImageList) 96phImageList = IntPtr.Zero; 262int IVsDropdownBarClient3.GetEntryImage(int iCombo, int iIndex, out int piImageIndex, out IntPtr phImageList) 265phImageList = IntPtr.Zero;
Preview\PreviewEngine.cs (1)
274var newTextPtr = Marshal.StringToHGlobalAuto(newText);
PreviewPane\PreviewPane.xaml.cs (3)
354int IOleCommandTarget.QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText) 365int IOleCommandTarget.Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
ProjectSystem\Interop\IIntPtrReturningVsInvisibleEditorManager.cs (1)
28out IntPtr ppEditor);
ProjectSystem\InvisibleEditor.cs (6)
53Marshal.ThrowExceptionForHR(invisibleEditorManager.RegisterInvisibleEditor(filePath, vsProject, 0, null, out var invisibleEditorPtr)); 86var docDataPtrViaTextBufferProvider = IntPtr.Zero; 88var hr = invisibleEditor.GetDocData(fEnsureWritable: needsSave ? 1 : 0, riid: typeof(IVsTextLines).GUID, ppDocData: out var docDataPtrViaTextLines); 108if (docDataPtrViaTextBufferProvider != IntPtr.Zero) 111if (docDataPtrViaTextLines != IntPtr.Zero)
ProjectSystem\Legacy\AbstractLegacyProject_IVsHierarchyEvents.cs (1)
41int IVsHierarchyEvents.OnInvalidateIcon(IntPtr hicon)
ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.cs (4)
208var metadata = ModuleMetadata.CreateFromMetadata((IntPtr)stream.PositionPointer, (int)stream.Length, stream.Dispose); 289if (!TryGetFileMappingFromMetadataImporter(fullPath, out var info, out var pImage, out var length)) 294Debug.Assert(pImage != IntPtr.Zero, "Base address should not be zero if GetFileFlatMapping call succeeded."); 302bool TryGetFileMappingFromMetadataImporter(string fullPath, [NotNullWhen(true)] out IMetaDataInfo? info, out IntPtr pImage, out long length)
ProjectSystem\MetadataReferences\VisualStudioMetadataReferenceManager.NativeMethods.cs (1)
26int GetFileMapping(out IntPtr ppvData, out long pcbData, out CorFileMapping pdwMappingType);
ProjectSystem\VisualStudioWorkspaceImpl.cs (1)
63private static readonly IntPtr s_docDataExisting_Unknown = new(-1);
ProjectSystem\VisualStudioWorkspaceImpl.OpenFileTracker.cs (1)
443int IVsHierarchyEvents.OnInvalidateIcon(IntPtr hicon)
Snippets\AbstractSnippetInfoService.cs (9)
182var pSnippetInfo = new IntPtr[1]; 220private static VsExpansion ConvertToVsExpansionAndFree(IntPtr expansionPtr) 233private static void ConvertToStringAndFree(ref IntPtr ptr, ref string? str) 235if (ptr != IntPtr.Zero) 239ptr = IntPtr.Zero; 249public IntPtr PathPtr; 250public IntPtr TitlePtr; 251public IntPtr ShortcutPtr; 252public IntPtr DescriptionPtr;
Snippets\IVsExpansionSessionInternal.cs (1)
33int GetSnippetNode([MarshalAs(UnmanagedType.BStr)] string? bstrNode, out IntPtr pNode);
Snippets\SnippetExpansionClient.cs (1)
351if (session.GetSnippetNode(null, out var pNode) != VSConstants.S_OK)
src\Compilers\Shared\GlobalAssemblyCacheHelpers\GlobalAssemblyCacheLocation.cs (1)
65return Marshal.PtrToStringUni((IntPtr)p);
StackTraceExplorer\StackTraceExplorerCommandHandler.cs (3)
42public int OnBroadcastMessage(uint msg, IntPtr wParam, IntPtr lParam) 53if (wParam == IntPtr.Zero)
StackTraceExplorer\StackTraceExplorerToolWindow.cs (2)
171int IOleCommandTarget.Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
Utilities\ClipboardHelpers.cs (7)
31private static extern IntPtr GlobalLock(HandleRef handle); 98ptd = IntPtr.Zero, 104private static unsafe string? ReadStringFromHandle(IntPtr handle, bool unicode) 107IntPtr ptr; 130private static IntPtr Win32GlobalLock(HandleRef handle) 132var win32Pointer = GlobalLock(handle); 134if (win32Pointer == IntPtr.Zero)
Utilities\IVsShellExtensions.cs (4)
30public static bool TryGetPropertyValue(this IVsShell shell, __VSSPROPID id, out IntPtr value) 34value = (IntPtr.Size == 4) ? (IntPtr)(int)objValue : (IntPtr)(long)objValue;
Utilities\VisualStudioCommandHandlerHelpers.cs (7)
41var selectionHierarchy = IntPtr.Zero; 42var selectionContainer = IntPtr.Zero; 50if (selectionHierarchy != IntPtr.Zero) 64if (selectionHierarchy != IntPtr.Zero) 69if (selectionContainer != IntPtr.Zero)
Venus\ContainedLanguage.IVsContainedLanguageCodeSupport.cs (10)
107IntPtr ppbstrEventHandlerNames, 108IntPtr ppbstrMemberIDs) 169public int GetMembers(string pszClassName, uint dwFlags, out int pcMembers, IntPtr ppbstrDisplayNames, IntPtr ppbstrMemberIDs) 238protected static void CreateBSTRArray(IntPtr dest, IEnumerable<string> source) 240if (dest != IntPtr.Zero) 242var current = Marshal.AllocCoTaskMem(source.Count() * IntPtr.Size); 247current = IntPtr.Add(current, IntPtr.Size);
Venus\IVsContainedLanguageCodeSupport.cs (4)
49IntPtr ppbstrDisplayNames, 50IntPtr ppbstrMemberIDs); 82IntPtr ppbstrEventHandlerNames, 83IntPtr ppbstrMemberIDs);
Venus\IVsContainedLanguageStaticEventBinding.cs (3)
25IntPtr ppbstrEventNames, 26IntPtr ppbstrDisplayNames, 27IntPtr ppbstrMemberIDs);
Workspace\VisualStudioAddMetadataReferenceCodeActionOperationFactoryWorkspaceService.cs (3)
67if (ErrorHandler.Succeeded(uiHierarchy.QueryStatusCommand((uint)VSConstants.VSITEMID.Root, VSConstants.VSStd2K, 1, command, IntPtr.Zero))) 71uiHierarchy.ExecCommand((uint)VSConstants.VSITEMID.Root, VSConstants.VSStd2K, (uint)VSConstants.VSStd2KCmdID.ADDREFERENCE, 0, IntPtr.Zero, IntPtr.Zero);
Microsoft.VisualStudio.LanguageServices.CSharp (17)
ProjectSystemShim\CSharpProjectShim.cs (2)
33private readonly IntPtr _warningNumberArrayPointer; 90foreach (var @class in _startupClasses)
ProjectSystemShim\CSharpProjectShim.ICSCompilerConfig.cs (2)
56public void GetOption(CompilerOptions optionID, IntPtr variant) 65public IntPtr GetWarnNumbers(out int count)
ProjectSystemShim\CSharpProjectShim.ICSharpProjectSite.cs (3)
26private IntPtr[]? _startupClasses = null; 122public int GetValidStartupClasses(IntPtr[] classNames, ref int count) 157foreach (var @class in _startupClasses)
ProjectSystemShim\CSharpProjectShim.IServiceProvider.cs (1)
15public int QueryService(ref Guid guidService, ref Guid riid, out IntPtr ppvObject)
ProjectSystemShim\HACK_VariantStructure.cs (2)
32private readonly IntPtr _padding4; // this will be aligned to the IntPtr-sized address 43return Marshal.GetObjectForNativeVariant((IntPtr)(&localCopy));
ProjectSystemShim\Interop\ICSCompilerConfig.cs (2)
44void GetOption(CompilerOptions optionID, IntPtr variant); 55IntPtr GetWarnNumbers(out int count);
ProjectSystemShim\Interop\ICSharpProjectSite.cs (1)
93int GetValidStartupClasses([Out, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.SysUInt, SizeParamIndex = 1)] IntPtr[] ppszClassNames, ref int picount);
SemanticSearch\SemanticSearchToolWindowImpl.cs (4)
299IntPtr.Zero, 454public int QueryStatus(ref Guid pguidCmdGroup, uint cCmds, OLECMD[] prgCmds, IntPtr pCmdText) 457public int Exec(ref Guid pguidCmdGroup, uint nCmdID, uint nCmdexecopt, IntPtr pvaIn, IntPtr pvaOut)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
ProjectSystemShim\CSharpHelpers.cs (2)
70Assert.Equal(sizeof(HACK_VariantStructure), 8 + 2 * IntPtr.Size); 74Marshal.GetNativeVariantForObject(value, (IntPtr)(&variant));
Microsoft.Win32.Registry (1)
artifacts\obj\Microsoft.Win32.Registry\Debug\net10.0\Microsoft.Win32.Registry.notsupported.cs (1)
120public SafeRegistryHandle(System.IntPtr preexistingHandle, bool ownsHandle) : base (default(bool)) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Registry); }
Microsoft.Win32.SystemEvents (4)
artifacts\obj\Microsoft.Win32.SystemEvents\Debug\net10.0\Microsoft.Win32.SystemEvents.notsupported.cs (4)
78public static System.IntPtr CreateTimer(int interval) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemEvents); } 80public static void KillTimer(System.IntPtr timerId) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemEvents); } 84public TimerElapsedEventArgs(System.IntPtr timerId) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemEvents); } 85public System.IntPtr TimerId { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemEvents); } }
MSBuild (3)
MSBuildLoadContext.cs (1)
109protected override IntPtr LoadUnmanagedDll(string unmanagedDllName)
WindowsNative.cs (1)
278internal static extern bool FindClose(IntPtr findFileHandle);
XMakeAttributes.cs (1)
446currentArchitecture = (IntPtr.Size == sizeof(Int64)) ? MSBuildArchitectureValues.x64 : MSBuildArchitectureValues.x86;
MSBuildTaskHost (33)
Concurrent\ConcurrentDictionary.cs (1)
87return IntPtr.Size == 8;
NativeMethods.cs (31)
65internal static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 67internal static IntPtr NullIntPtr = new IntPtr(0); 68internal static IntPtr InvalidHandle = new IntPtr(-1); 165public IntPtr GroupInfo; 252internal IntPtr lpMinimumApplicationAddress; 253internal IntPtr lpMaximumApplicationAddress; 254internal IntPtr dwActiveProcessorMask; 355public IntPtr PebBaseAddress; 408public IntPtr lpSecurityDescriptor; 522if (!GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP.RelationProcessorCore, IntPtr.Zero, ref len) && 530if (GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP.RelationProcessorCore, (IntPtr)bufferPtr, ref len)) 975internal static extern bool GetLogicalProcessorInformationEx(LOGICAL_PROCESSOR_RELATIONSHIP RelationshipType, IntPtr Buffer, ref uint ReturnedLength); 1230IntPtr.Zero, 1233IntPtr.Zero); 1525int fullPathLength = GetFullPathWin32(path, MAX_PATH, buffer, IntPtr.Zero); 1531fullPathLength = GetFullPathWin32(path, fullPathLength, newBuffer, IntPtr.Zero); 1541private static unsafe int GetFullPathWin32(string target, int bufferLength, char* buffer, IntPtr mustBeZero) 1683internal static extern bool FreeLibrary([In] IntPtr module); 1687internal static extern IntPtr GetProcAddress(IntPtr module, string procName); 1691internal static extern IntPtr LoadLibrary(string fileName); 1705internal static extern IntPtr GetStdHandle(int nStdHandle); 1709internal static extern uint GetFileType(IntPtr hFile); 1712internal static extern bool GetConsoleMode(IntPtr hConsoleHandle, out uint lpMode); 1715internal static extern bool SetConsoleMode(IntPtr hConsoleHandle, uint dwMode); 1748internal static extern unsafe int GetFullPathName(string target, int bufferLength, char* buffer, IntPtr mustBeZero); 1777internal static extern bool ReadFile(SafeFileHandle hFile, byte[] lpBuffer, uint nNumberOfBytesToRead, out uint lpNumberOfBytesRead, IntPtr lpOverlapped); 1786public static extern int CoWaitForMultipleHandles(COWAIT_FLAGS dwFlags, int dwTimeout, int cHandles, [MarshalAs(UnmanagedType.LPArray)] IntPtr[] pHandles, out int pdwIndex); 1801IntPtr lpSecurityAttributes, 1804IntPtr hTemplateFile); 1817internal static extern bool CloseHandle(IntPtr hObject);
XMakeAttributes.cs (1)
450string currentArchitecture = (IntPtr.Size == sizeof(Int64)) ? MSBuildArchitectureValues.x64 : MSBuildArchitectureValues.x86;
mscorlib (1)
src\libraries\shims\mscorlib\ref\mscorlib.cs (1)
304[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IntPtr))]
netstandard (1)
netstandard.cs (1)
880[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IntPtr))]
PrepareTests (2)
MinimizeUtil.cs (2)
281var success = CreateHardLink(fileName, existingFileName, IntPtr.Zero); 299static extern bool CreateHardLink(string lpFileName, string lpExistingFileName, IntPtr lpSecurityAttributes);
PresentationCore (1357)
MS\Internal\AppModel\CookieHandler.cs (2)
106if (UnsafeNativeMethods.InternetGetCookieEx(uriString, null, null, ref size, 0, IntPtr.Zero)) 113if (UnsafeNativeMethods.InternetGetCookieEx(uriString, null, sb, ref size, 0, IntPtr.Zero))
MS\Internal\Automation\AutomationPatternInfo.cs (1)
15internal delegate object WrapObject( AutomationPeer peer, object iface, IntPtr hwnd );
MS\Internal\Automation\ElementUtil.cs (2)
127internal static Rect GetScreenRect( IntPtr hwnd, UIElement el ) 148internal static Visual GetElementFromPoint( IntPtr hwnd, Visual root, Point pointScreen )
MS\Internal\Classification.cs (9)
174internal IntPtr CombiningCharsIndexes; // Two dimentional array of base char classes, 178internal IntPtr CombiningMarkIndexes; // Combining mark classes array, with length = length 181internal IntPtr CombinationChars; // Two dimentional array of combined characters 193internal IntPtr UnicodeClasses; 194internal IntPtr CharacterAttributes; 195internal IntPtr Mirroring; 411private static readonly IntPtr _unicodeClassTable; 412private static readonly IntPtr _charAttributeTable; 413private static readonly IntPtr _mirroredCharTable;
MS\Internal\DpiUtil\DpiUtil.cs (9)
34internal static DpiAwarenessContextHandle GetDpiAwarenessContext(IntPtr hWnd) 50internal static PROCESS_DPI_AWARENESS GetProcessDpiAwareness(IntPtr hWnd) 56/// Equivalent to <see cref="GetProcessDpiAwareness(IntPtr)"/> 60/// <remarks>See remarks for <see cref="GetProcessDpiAwareness(IntPtr)"/></remarks> 61internal static DpiAwarenessContextValue GetProcessDpiAwarenessContextValue(IntPtr hWnd) 126internal static DpiScale2 GetWindowDpi(IntPtr hWnd, bool fallbackToNearestMonitorHeuristic) 136/// <param name="fallbackToNearestMonitorHeuristic">The semantics of this parameter are identical to that in <see cref="GetWindowDpi(IntPtr, bool)"/></param> 138internal static HwndDpiInfo GetExtendedDpiInfoForWindow(IntPtr hWnd, bool fallbackToNearestMonitorHeuristic) 151internal static HwndDpiInfo GetExtendedDpiInfoForWindow(IntPtr hWnd)
MS\Internal\DpiUtil\DpiUtil+DpiAwarenessContextHelper.cs (3)
42internal static DpiAwarenessContextHandle GetDpiAwarenessContext(IntPtr hWnd) 65private static DpiAwarenessContextHandle GetProcessDpiAwarenessContext(IntPtr hWnd) 99private static DpiAwarenessContextHandle GetWindowDpiAwarenessContext(IntPtr hWnd)
MS\Internal\DpiUtil\DpiUtil+DpiAwarenessScope.cs (6)
31hWnd: IntPtr.Zero) 50hWnd: IntPtr.Zero) 69DpiAwarenessContextValue dpiAwarenessContextEnumValue, bool updateIfThreadInMixedHostingMode, IntPtr hWnd) 90IntPtr hWnd) 108(hWnd == IntPtr.Zero || !this.IsWindowUnawareOrSystemAware(hWnd))) 167private bool IsWindowUnawareOrSystemAware(IntPtr hWnd)
MS\Internal\DpiUtil\DpiUtil+HwndDpiInfo.cs (5)
27internal HwndDpiInfo(IntPtr hWnd, bool fallbackToNearestMonitorHeuristic) : base( 45ContainingMonitorScreenRect = NearestMonitorInfoFromWindow(IntPtr.Zero).rcMonitor; 52private static NativeMethods.MONITORINFOEX NearestMonitorInfoFromWindow(IntPtr hwnd) 54IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(null, hwnd), NativeMethods.MONITOR_DEFAULTTONEAREST); 55if (hMonitor == IntPtr.Zero)
MS\Internal\DpiUtil\DpiUtil+ProcessDpiAwarenessHelper.cs (3)
62internal static PROCESS_DPI_AWARENESS GetProcessDpiAwareness(IntPtr hWnd) 87private static PROCESS_DPI_AWARENESS GetProcessDpiAwarenessFromWindow(IntPtr hWnd) 90if (hWnd != IntPtr.Zero)
MS\Internal\DpiUtil\DpiUtil+SystemDpiHelper.cs (4)
103HandleRef hWndDesktop = new HandleRef(IntPtr.Zero, IntPtr.Zero); 104HandleRef hDC = new HandleRef(IntPtr.Zero, UnsafeNativeMethods.GetDC(hWndDesktop)); 105if (hDC.Handle == IntPtr.Zero)
MS\Internal\DpiUtil\DpiUtil+WindowDpiScaleHelper.cs (7)
42internal static DpiScale2 GetWindowDpi(IntPtr hWnd, bool fallbackToNearestMonitorHeuristic) 78private static DpiScale2 GetDpiForWindow(IntPtr hWnd) 80uint dpi = SafeNativeMethods.GetDpiForWindow(new HandleRef(IntPtr.Zero, hWnd)); 89private static DpiScale2 GetDpiForWindowFromNearestMonitor(IntPtr hWnd) 91IntPtr hMon = 92SafeNativeMethods.MonitorFromWindow(new HandleRef(IntPtr.Zero, hWnd), NativeMethods.MONITOR_DEFAULTTONEAREST); 95int hr = (int)UnsafeNativeMethods.GetDpiForMonitor(new HandleRef(IntPtr.Zero, hMon), MONITOR_DPI_TYPE.MDT_EFFECTIVE_DPI, out dpiX, out dpiY);
MS\Internal\FontCache\FontCacheUtil.cs (7)
75Marshal.Copy((IntPtr)_pointer, b, 0, Size); 349HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 352IntPtr dc = MS.Win32.UnsafeNativeMethods.GetDC(desktopWnd); 355if (dc == IntPtr.Zero) 823IntPtr.Zero 851_viewHandle = UnsafeNativeMethods.MapViewOfFileEx(_mappingHandle, UnsafeNativeMethods.FILE_MAP_READ, 0, 0, IntPtr.Zero, IntPtr.Zero);
MS\Internal\FontFace\FontDriver.cs (1)
250Marshal.Copy((IntPtr)fontData, fontCopy, 0, fileSize);
MS\Internal\Ink\GestureRecognizer\NativeRecognizer.cs (24)
324IntPtr hModule = MS.Win32.UnsafeNativeMethods.LoadLibrary(path); 328if ( hModule != IntPtr.Zero ) 331new HandleRef(null, hModule), "GetAlternateList") != IntPtr.Zero ? 335return hModule != IntPtr.Zero ? true : false; 401IntPtr packets = IntPtr.Zero; 407if (packets == IntPtr.Zero) 438out IntPtr packets, 444packets = IntPtr.Zero; 547private void ReleaseResourcesinPacketDescription(MS.Win32.Recognizer.PACKET_DESCRIPTION pd, IntPtr packets) 549if ( pd.pPacketProperties != IntPtr.Zero ) 564pd.pPacketProperties = IntPtr.Zero; 567if ( pd.pguidButtons != IntPtr.Zero ) 570pd.pguidButtons = IntPtr.Zero; 573if ( packets != IntPtr.Zero ) 576packets = IntPtr.Zero; 593IntPtr[] pRecoAlternates = new IntPtr[IRAS_DefaultCount]; 632if (pRecoAlternates[i] != IntPtr.Zero) 635pRecoAlternates[i] = IntPtr.Zero; 652IntPtr ptr = IntPtr.Zero; 666Debug.Assert(!(bestResultColumnCount != 0 && pRecoLattice->pLatticeColumns == IntPtr.Zero), "Invalid results!"); 667if ( bestResultColumnCount > 0 && pRecoLattice->pLatticeColumns != IntPtr.Zero )
MS\Internal\Interop\NativePointerCriticalHandle.cs (5)
11public NativePointerCriticalHandle(IntPtr nativePointer) 12: base(IntPtr.Zero) 17public override bool IsInvalid => handle == IntPtr.Zero; 26: base((IntPtr)nativePointer) 34handle = IntPtr.Zero;
MS\Internal\Shaping\TypefaceMap.cs (1)
92IntPtr ptext = characterBufferReference.CharacterBuffer.PinAndGetCharacterPointer(characterBufferReference.OffsetToFirstChar, out gcHandle);
MS\Internal\Text\TextInterface\DWriteInterfaces.cs (2)
36/*[In, MarshalAs(UnmanagedType.Interface)]*/ IntPtr factory, 39/*[Out, MarshalAs(UnmanagedType.Interface)]*/ IntPtr* fontFileEnumerator
MS\Internal\Text\TextInterface\DWriteLoader.cs (7)
11private static IntPtr _dwrite; 20if (_dwrite == IntPtr.Zero) 33if (_dwrite != IntPtr.Zero) 37_dwrite = IntPtr.Zero; 51private static IntPtr LoadDWriteLibraryAndGetProcAddress(out delegate* unmanaged<int, void*, void*, int> DWriteCreateFactory) 53IntPtr hDWriteLibrary = NativeLibrary.Load("dwrite.dll", typeof(DWriteLoader).Assembly, DllImportSearchPath.System32); 55if (hDWriteLibrary != IntPtr.Zero)
MS\Internal\Text\TextInterface\Factory.cs (5)
61IntPtr pIDWriteFontFileLoaderMirror = Marshal.GetComInterfaceForObject( 81IntPtr pIDWriteFontCollectionLoaderMirror = Marshal.GetComInterfaceForObject( 300IntPtr pIDWriteFontCollectionLoaderMirror = Marshal.GetComInterfaceForObject( 353IntPtr pIDWriteFontCollectionLoaderMirror = Marshal.GetComInterfaceForObject( 365IntPtr pIDWriteFontFileLoaderMirror = Marshal.GetComInterfaceForObject(
MS\Internal\Text\TextInterface\FontCollectionLoader.cs (4)
44public int CreateEnumeratorFromKey(IntPtr factory, [In] void* collectionKey, [In, MarshalAs(UnmanagedType.U4)] uint collectionKeySize, IntPtr* fontFileEnumerator) 55*fontFileEnumerator = IntPtr.Zero; 68IntPtr pIDWriteFontFileEnumeratorMirror = Marshal.GetComInterfaceForObject(
MS\Internal\TextFormatting\FullTextBreakpoint.cs (10)
17private IntPtr _ploline; // native object representing this break 18private IntPtr _penaltyResource; // unsafe handle to the internal factors used to determines penalty of the break. By default, the lifetime of this resource is managed by _ploline. 38IntPtr penaltyRestriction, 61TextFormatterContext context = settings.Formatter.AcquireContext(fullText, IntPtr.Zero); 63IntPtr previousBreakRecord = IntPtr.Zero; 195if(_ploline != IntPtr.Zero) 198_ploline = IntPtr.Zero; 199_penaltyResource = IntPtr.Zero; 231internal override IntPtr GetTextPenaltyResource()
MS\Internal\TextFormatting\FullTextLine.cs (21)
36private IntPtr _ploline; // actual LS line 37private IntPtr _ploc; // actual LS context 143if (_ploline != System.IntPtr.Zero) 147_ploline = System.IntPtr.Zero; 167_ploline = IntPtr.Zero; 215TextFormatterContext context = _metrics._formatter.AcquireContext(fullText, IntPtr.Zero); 230IntPtr ploline; 236IntPtr.Zero, // single-line formatting does not require break record 267IntPtr.Zero, // single-line formatting does not require break record 581if (_ploline != System.IntPtr.Zero) 853if(_ploline == IntPtr.Zero) 988if (_ploline == IntPtr.Zero) 1136if (_ploline == System.IntPtr.Zero) 1229if (_ploline == IntPtr.Zero) 1506if (_ploline == IntPtr.Zero) 2118if (_ploline != System.IntPtr.Zero) 2186return _metrics.GetTextLineBreak(IntPtr.Zero); 2441Debug.Assert(_ploline != IntPtr.Zero); 2454(System.IntPtr)plsqsubl, 2494Debug.Assert(_ploline != IntPtr.Zero); 2511(System.IntPtr)plsqsubl,
MS\Internal\TextFormatting\LineServices.cs (179)
37IntPtr pols, 43IntPtr pols, 50IntPtr pols, 53IntPtr pstyle, 61ref IntPtr lsplsrun 65IntPtr pols, 73IntPtr pols, 86IntPtr pols, 93IntPtr pols, 108IntPtr pols, 117IntPtr pols, 125IntPtr pols, 133IntPtr pols, 145IntPtr pols, 154IntPtr pols, 163IntPtr pols, 166ref IntPtr lsplsrun, 169ref IntPtr lsplsrunAddedChar, 176IntPtr pols, 188IntPtr pols, 200IntPtr pols, 201IntPtr* plsplsruns, 218IntPtr pols, 219IntPtr *plsplsruns, 236IntPtr pols, 258IntPtr pols, 282IntPtr pols, 296IntPtr pols, 308IntPtr pols, 320IntPtr pols, 332IntPtr pols, 351IntPtr pols, // Line Layout context 357IntPtr pols, // Line Layout context 370IntPtr pols, // Line Layout context 679public IntPtr szParaSeparator; 680public IntPtr szLineSeparator; 681public IntPtr szHidden; 682public IntPtr szNbsp; 683public IntPtr szObjectTerminator; 684public IntPtr szObjectReplacement; 713public IntPtr plsTbd; 753public IntPtr pfnCreateILSObj; 754public IntPtr pfnDestroyILSObj; 755public IntPtr pfnSetDoc; 756public IntPtr pfnCreateLNObj; 757public IntPtr pfnDestroyLNObj; 758public IntPtr pfnFmt; 759public IntPtr pfnFmtResume; 760public IntPtr pfnGetModWidthPrecedingChar; 761public IntPtr pfnGetModWidthFollowingChar; 762public IntPtr pfnTruncate; 763public IntPtr pfnFindPrevBreakOppInside; 764public IntPtr pfnFindNextBreakOppInside; 765public IntPtr pfnFindBreakOppBeforeCpTruncate; 766public IntPtr pfnFindBreakOppAfterCpTruncate; 767public IntPtr pfnCreateStartOppInside; 768public IntPtr pfnProposeBreakAfter; 769public IntPtr pfnProposeBreakBefore; 770public IntPtr pfnCreateBreakOppAfter; 771public IntPtr pfnCreateStartOppBefore; 772public IntPtr pfnCreateDobjFragment; 773public IntPtr pfnForceBreak; 774public IntPtr pfnCreateBreakRecord; 775public IntPtr pfnSetBreak; 776public IntPtr pfnDestroyStartOpp; 777public IntPtr pfnDestroyBreakOpp; 778public IntPtr pfnDuplicateBreakRecord; 779public IntPtr pfnDestroyBreakRecord; 780public IntPtr pfnGetSpecialEffectsFromDobj; 781public IntPtr pfnGetSpecialEffectsFromDobjFragment; 782public IntPtr pfnGetSubmissionInfoFromDobj; 783public IntPtr pfnGetSublinesFromDobj; 784public IntPtr pfnGetSubmissionInfoFromDobjFragment; 785public IntPtr pfnGetSubsFromDobjFragment; 786public IntPtr pfnFExpandWithPrecedingChar; 787public IntPtr pfnFExpandWithFollowingChar; 788public IntPtr pfnCalcPresentation; 789public IntPtr pfnQueryPointPcp; 790public IntPtr pfnQueryCpPpoint; 791public IntPtr pfnEnum; 792public IntPtr pfnDisplay; 793public IntPtr pfnDestroyDobj; 794public IntPtr pfnDestroyDobjFragment; 817public IntPtr plsimethods; // array of installed objects LSIMETHODS 874public IntPtr pols; // Opaque client object 877public IntPtr pfnNewPtr; 878public IntPtr pfnDisposePtr; 879public IntPtr pfnReallocPtr; 882public IntPtr pfnFetchRun; 884public IntPtr pfnGetNumericSeparators; 885public IntPtr pfnCheckForDigit; 888public IntPtr pfnFetchTabs; 889public IntPtr pfnReleaseTabsBuffer; 890public IntPtr pfnGetBreakThroughTab; 891public IntPtr pfnGetPosTabProps; 892public IntPtr pfnFGetLastLineJustification; 893public IntPtr pfnCheckParaBoundaries; 895public IntPtr pfnCheckRunKernability; 896public IntPtr pfnGetRunCharKerning; 900public IntPtr pfnGetBorderInfo; 901public IntPtr pfnReleaseRun; 902public IntPtr pfnReleaseRunBuffer; 906public IntPtr pfnGetHyphenInfo; 909public IntPtr pfnDrawBorder; 910public IntPtr pfnFInterruptUnderline; 911public IntPtr pfnFInterruptShade; 912public IntPtr pfnFInterruptBorder; 913public IntPtr pfnShadeRectangle; 915public IntPtr pfnDrawSplatLine; 917public IntPtr pfnGetGlyphs; 920public IntPtr pfnReleaseGlyphBuffers; 921public IntPtr pfnGetGlyphExpansionInfo; 922public IntPtr pfnGetGlyphExpansionInkInfo; 923public IntPtr pfnGetGlyphRunInk; 924public IntPtr pfnGetEms; 925public IntPtr pfnPunctStartLine; 926public IntPtr pfnModWidthOnRun; 927public IntPtr pfnModWidthSpace; 928public IntPtr pfnCompOnRun; 929public IntPtr pfnCompWidthSpace; 930public IntPtr pfnExpOnRun; 931public IntPtr pfnExpWidthSpace; 932public IntPtr pfnGetModWidthClasses; 933public IntPtr pfnGetBreakingClasses; 934public IntPtr pfnFTruncateBefore; 935public IntPtr pfnCanBreakBeforeChar; 936public IntPtr pfnCanBreakAfterChar; 937public IntPtr pfnFHangingPunct; 938public IntPtr pfnGetSnapGrid; 939public IntPtr pfnDrawEffects; 940public IntPtr pfnFCancelHangingPunct; 941public IntPtr pfnModifyCompAtLastChar; 947public IntPtr pfnGetCharAlignmentStartLine; 948public IntPtr pfnGetCharAlignmentEndLine; 949public IntPtr pfnGetGlyphAlignmentStartLine; 950public IntPtr pfnGetGlyphAlignmentEndLine; 951public IntPtr pfnGetPriorityForGoodTypography; 955public IntPtr pfnEnumPen; 959public IntPtr pfnAssertFailedPtr; 1007public IntPtr pbreakrecobj; 1163public IntPtr plsrun; 1187public IntPtr plsCellDetails; // client-defined structure 1210public IntPtr* plinepenaltyArray; // array of unsafe handle to TSLINEPENALITYINFO struct, each per each break 1212public IntPtr* pplolineArray; // array of unsafe handle to Loline struct, each per each break 1411out IntPtr ploc 1416IntPtr ploc 1421IntPtr ploc, 1426IntPtr pInputBreakRec, 1428out IntPtr pploline, 1435IntPtr ploline, 1442IntPtr ploline, 1443out IntPtr pbreakrec 1448IntPtr pBreakRec, 1455IntPtr pBreakRec, 1456out IntPtr pBreakRecClone 1461IntPtr ploline 1466IntPtr ploc, 1472IntPtr ploc, 1480IntPtr ploc, 1488IntPtr ploline, 1496IntPtr ploline, 1504IntPtr ploline, 1507IntPtr pSubLineInfo, // passing raw pinned pointer for out array 1514IntPtr ploline, 1517IntPtr pSubLineInfo, // passing raw pinned pointer for out array 1524IntPtr ploc, // Line Services context 1526IntPtr previousBreakRecord, 1527IntPtr ploparabreak, 1528IntPtr ptslinevariantRestriction, 1535IntPtr ploc, // Line Services context 1538IntPtr previousParaBreakRecord, 1539ref IntPtr pploparabreak, 1546IntPtr ploparabreak, 1553IntPtr ploc, // Line Services context 1571IntPtr ploc, // Line Services context 1572out IntPtr penaltyModuleHandle 1577IntPtr penaltyModuleHandle 1582IntPtr penaltyModuleHandle, 1583out IntPtr penaltyModuleInternalHandle
MS\Internal\TextFormatting\LineServicesCallbacks.cs (38)
60IntPtr pols, // Line Layout context 63IntPtr pstyle, // current demanded style 71ref IntPtr lsplsrun // [out] fetched run 215lsplsrun = (IntPtr)plsrun; 268IntPtr pols, // Line Layout context 356IntPtr pols, // Line Layout context 401System.IntPtr pols, // Line Layout context 448IntPtr pols, // Line Layout context 540IntPtr pols, // Line Layout context 572IntPtr pols, // Line Layout context 575ref IntPtr lsplsrun, // [out] Marker run 578ref IntPtr lsplsrunAddedChar, // [out] Added character run 632lsplsrun = (IntPtr)plsrun; 649IntPtr pols, // Line Layout context 713IntPtr pols, // Line Layout context 787IntPtr pols, // Line Layout context 827IntPtr pols, // Line Layout context 864IntPtr pols, // Line Layout context 906IntPtr pols, // Line Layout context 971IntPtr pols, // Line Layout context 1409IntPtr pols, // Line Layout context 1481IntPtr pols, // Line Layout context 1576IntPtr pols, // Line Layout context 1577IntPtr* plsplsruns, // array of plsruns 1667IntPtr pols, // Line Layout context 1668IntPtr* plsplsruns, // array of plsruns 1752IntPtr* plsplsruns, 1770IntPtr pols, // Line Layout context 1859IntPtr pols, // Line Layout context 1909IntPtr pols, // Line Layout context 2013IntPtr pols, // Line Layout context 2138IntPtr pols, // Line Layout context 2282System.IntPtr pols, // Line Layout context 2311Marshal.StructureToPtr(inlineInit, (System.IntPtr)objectInfo, false); 2333System.IntPtr pols, // Line Layout context 2427System.IntPtr pols, // Line Layout context 2582IntPtr pols, // ls context 2700IntPtr pols, // pointer to context
MS\Internal\TextFormatting\LineServicesRun.cs (2)
103IntPtr controlChar 128IntPtr controlChar,
MS\Internal\TextFormatting\TextFormatterImp.cs (2)
501IntPtr ploc 515if (ploc == IntPtr.Zero)
MS\Internal\TextFormatting\TextMetrics.cs (5)
285internal TextLineBreak GetTextLineBreak(IntPtr ploline) 287IntPtr pbreakrec = IntPtr.Zero; 289if (ploline != IntPtr.Zero) 308return (pbreakrec != IntPtr.Zero) ? new TextLineBreak(null, pbreakrec) : null;
MS\Internal\TextFormatting\TextPenaltyModule.cs (7)
16private IntPtr _ploPenaltyModule; // Pointer to LS penalty module 23internal TextPenaltyModule(IntPtr ploc) 25IntPtr ploPenaltyModule; 57if (_ploPenaltyModule != IntPtr.Zero) 60_ploPenaltyModule = IntPtr.Zero; 72internal IntPtr DangerousGetHandle() 79IntPtr penaltyModuleInternalHandle;
MS\Internal\TextFormatting\TextStore.cs (6)
2390internal static IntPtr PwchParaSeparator; 2391internal static IntPtr PwchLineSeparator; 2392internal static IntPtr PwchNbsp; 2393internal static IntPtr PwchHidden; 2394internal static IntPtr PwchObjectTerminator; 2395internal static IntPtr PwchObjectReplacement;
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\InputPane.cs (1)
74private InputPane(IntPtr? hwnd)
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\InputPaneRcw.cs (3)
24IntPtr hstring = IntPtr.Zero; 59IInputPane2 GetForWindow([In] IntPtr appWindow, [In] ref Guid riid);
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\NativeMethods.cs (4)
21out IntPtr hstring); 24internal static extern int WindowsDeleteString(IntPtr hstring); 27internal static extern unsafe int RoGetActivationFactory(IntPtr runtimeClassId, ref Guid iid, [MarshalAs(UnmanagedType.Interface)] out object factory); 30internal static extern unsafe int RoActivateInstance(IntPtr runtimeClassId, [MarshalAs(UnmanagedType.Interface)] out object instance);
MS\Internal\WindowsRuntime\Windows\UI\ViewManagement\UISettingsRcw.cs (3)
19IntPtr hstring = IntPtr.Zero; 39void GetIids(out uint iidCount, out IntPtr iids);
MS\Win32\UnsafeNativeMethodsPenimc.cs (17)
75private static IntPtr _pimcActCtxCookie; 82internal static extern IntPtr RegisterDllForSxSCOM(); 100if (_pimcActCtxCookie == IntPtr.Zero) 106if ((_pimcActCtxCookie = RegisterDllForSxSCOM()) == IntPtr.Zero) 118if (_pimcActCtxCookie != IntPtr.Zero) 122_pimcActCtxCookie = IntPtr.Zero; 491IntPtr commHandle, 492IntPtr handleReset, 497out IntPtr pPackets); 516IntPtr[] commHandles, 517IntPtr handleReset, 523out IntPtr pPackets); 540IntPtr commHandle, 556internal static extern bool CreateResetEvent(out IntPtr handle); 565internal static extern bool DestroyResetEvent(IntPtr handle); 574internal static extern bool RaiseResetEvent(IntPtr handle); 625private static extern bool DeactivateActCtx(int flags, IntPtr activationCtxCookie);
MS\Win32\UnsafeNativeMethodsPointer.cs (16)
333internal IntPtr device; 335internal IntPtr monitor; 383internal IntPtr sourceDevice; 384internal IntPtr hwndTarget; 528internal static extern bool GetPointerDeviceCursors([In] IntPtr device, [In, Out] ref UInt32 cursorCount, [In, Out] POINTER_DEVICE_CURSOR_INFO[] cursors); 546internal static extern bool GetPointerDeviceProperties([In] IntPtr device, [In, Out] ref UInt32 propertyCount, [In, Out] POINTER_DEVICE_PROPERTY[] pointerProperties); 552internal static extern bool GetPointerDeviceRects([In] IntPtr device, [In, Out] ref RECT pointerDeviceRect, [In, Out] ref RECT displayRect); 587internal delegate void INTERACTION_CONTEXT_OUTPUT_CALLBACK(IntPtr clientData, ref INTERACTION_CONTEXT_OUTPUT output); 594internal static extern void CreateInteractionContext([Out] out IntPtr interactionContext); 601internal static extern void DestroyInteractionContext([In] IntPtr interactionContext); 610internal static extern void SetInteractionConfigurationInteractionContext([In] IntPtr interactionContext, [In] UInt32 configurationCount, [In] INTERACTION_CONTEXT_CONFIGURATION[] configuration); 619internal static extern void RegisterOutputCallbackInteractionContext([In] IntPtr interactionContext, [In] INTERACTION_CONTEXT_OUTPUT_CALLBACK outputCallback, [In, Optional] IntPtr clientData); 628internal static extern void SetPropertyInteractionContext([In] IntPtr interactionContext, [In] INTERACTION_CONTEXT_PROPERTY contextProperty, [In] UInt32 value); 637internal static extern void BufferPointerPacketsInteractionContext([In] IntPtr interactionContext, [In] UInt32 entriesCount, [In] POINTER_INFO[] pointerInfo); 644internal static extern void ProcessBufferedPacketsInteractionContext([In] IntPtr interactionContext);
MS\Win32\UnsafeNativeMethodsTablet.cs (25)
20internal static extern int DestroyRecognizer([In] IntPtr hRec); 26internal static extern int DestroyContext([In] IntPtr hRecContext); 29internal static extern int AddStroke([In] ContextSafeHandle hRecContext, [In] ref PACKET_DESCRIPTION packetDesc, [In] uint cbPackets, [In] IntPtr pByte, [In, MarshalAs(UnmanagedType.LPStruct)] NativeMethods.XFORM xForm); 41internal static extern int GetAlternateList([In] ContextSafeHandle hRecContext, [In, Out] ref RECO_RANGE recoRange, [In, Out] ref uint cAlts, [In, Out] IntPtr[] recAtls, [In] ALT_BREAKS breaks); 44internal static extern int DestroyAlternate([In] IntPtr hRecAtls); 47internal static extern int GetString([In] IntPtr hRecAtls, [Out] out RECO_RANGE recoRange, [In, Out]ref uint size, [In, Out] StringBuilder recoString); 50internal static extern int GetConfidenceLevel([In] IntPtr hRecAtls, [Out] out RECO_RANGE recoRange, [Out] out RecognitionConfidence confidenceLevel); 56internal static extern int GetLatticePtr([In] ContextSafeHandle hRecContext, [In] ref IntPtr pRecoLattice); 73: base(IntPtr.Zero, ownHandle) 84return IsClosed || handle == IntPtr.Zero; 90Debug.Assert(handle != IntPtr.Zero); 108: base(IntPtr.Zero, ownHandle) 119return IsClosed || handle == IntPtr.Zero; 130Debug.Assert(handle != IntPtr.Zero); 193public IntPtr pPacketProperties; 195public IntPtr pguidButtons; 260public IntPtr pPropertyValue; 273public IntPtr apProps; 293public IntPtr pData; 315public IntPtr pStrokes; 317public IntPtr pLatticeElements; 335public IntPtr pLatticeColumns; 337public IntPtr pGuidProperties; 339public IntPtr pulBestResultColumns; 340public IntPtr pulBestResultIndexes;
src\Microsoft.DotNet.Wpf\src\Common\Graphics\exports.cs (54)
96Debug.Assert((cbData == 0) || ((Int64)(IntPtr)pbFrom) % 4 == 0); 97Debug.Assert((cbData == 0) || ((Int64)(IntPtr)pbTo) % 4 == 0); 114IntPtr pChannel, 121IntPtr pSourceChannel, 123IntPtr pTargetChannel, 129IntPtr pTransport, 130IntPtr hChannel, 131out IntPtr channelHandle); 135IntPtr channelHandle); 139IntPtr channelHandle); 143IntPtr channelHandle); 147IntPtr pConnection); 150internal static extern int MilChannel_GetMarshalType(IntPtr channelHandle, out ChannelMarshalType marshalType); 157IntPtr pChannel); 161IntPtr pChannel, 169IntPtr pChannel, 176IntPtr pChannel); 182IntPtr pChannel, 190IntPtr pChannel); 194IntPtr pChannel, 201IntPtr pChannel, 202IntPtr hwnd, 208IntPtr pChannel, 210IntPtr[] handles, 218IntPtr pChannel, 220/* size_t */ IntPtr messageSize, 226IntPtr pChannel, 325private IntPtr _hChannel; 331private IntPtr _pConnection; 338public Channel(Channel referenceChannel, bool isOutOfBandChannel, IntPtr pConnection, bool isSynchronous) 340IntPtr referenceChannelHandle = IntPtr.Zero; 364if (_hChannel == IntPtr.Zero) 385if (_hChannel == IntPtr.Zero) 407if (_hChannel == IntPtr.Zero) 427if (_hChannel != IntPtr.Zero) 435if (_hChannel != IntPtr.Zero) 439_hChannel = IntPtr.Zero; 463Invariant.Assert(_hChannel != IntPtr.Zero); 522Invariant.Assert(_hChannel != IntPtr.Zero); 552Invariant.Assert(_hChannel != IntPtr.Zero); 585Invariant.Assert(_hChannel != IntPtr.Zero); 646if (_hChannel == IntPtr.Zero) 682if (_hChannel == IntPtr.Zero) 718if (_hChannel == IntPtr.Zero) 745if (_hChannel == IntPtr.Zero) 769Invariant.Assert(_hChannel != IntPtr.Zero); 788Invariant.Assert(_hChannel != IntPtr.Zero); 810internal void SetNotificationWindow(IntPtr hwnd, WindowMessage message) 812Invariant.Assert(_hChannel != IntPtr.Zero); 855Invariant.Assert(_hChannel != IntPtr.Zero); 866(IntPtr)sizeof(MilMessage.Message), 2171IntPtr hWnd, 2288IntPtr pRenderTarget,
src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_exports.cs (1)
144IntPtr /* IMILMedia */ THIS_PTR
src\Microsoft.DotNet.Wpf\src\Common\Graphics\wgx_render.cs (6)
662private IntPtr Pattern; 663private IntPtr Mask; 670private IntPtr Desc; 672private IntPtr Data; 726internal IntPtr m_pMedia; 775Exception exceptionForHR = Marshal.GetExceptionForHR(hr, (IntPtr)(-1));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\CharacterBuffer.cs (4)
39public abstract IntPtr PinAndGetCharacterPointer(int offset, out GCHandle gcHandle); 218public override unsafe IntPtr PinAndGetCharacterPointer(int offset, out GCHandle gcHandle) 317public override unsafe IntPtr PinAndGetCharacterPointer(int offset, out GCHandle gcHandle) 426public override IntPtr PinAndGetCharacterPointer(int offset, out GCHandle gcHandle)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\MimeTypeMapper.cs (1)
86IntPtr.Zero,
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SafeSecurityHelper.cs (1)
51int retval = MS.Internal.WindowsBase.NativeMethodsSetLastError.MapWindowPoints(hwnd , new HandleRef(null, IntPtr.Zero), ref rcWindowCoords, 2);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\LoadLibraryHelper.cs (6)
29var hModule = IntPtr.Zero; 34hModule != IntPtr.Zero) 39UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, hModule), AddDllDirectoryName) != IntPtr.Zero; 70internal static IntPtr SecureLoadLibraryEx(string lpFileName, IntPtr hFile, UnsafeNativeMethods.LoadLibraryFlags dwFlags)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCompiler.cs (3)
27public static extern int SHGetFolderPath(IntPtr hwndOwner, int nFolder, IntPtr hToken, int dwFlags, StringBuilder lpszPath); 34IntPtr Buffer, // buffer with data to sniff -
System\Windows\Automation\Peers\AutomationPeer.cs (10)
211public HostedWindowWrapper(IntPtr hwnd) 218_hwnd = IntPtr.Zero; 221internal static HostedWindowWrapper CreateInternal(IntPtr hwnd) 230internal IntPtr Handle 238private IntPtr _hwnd; 462if (_parent != null && _hwnd != IntPtr.Zero) return this; 464if((connectedPeer._hwnd) != IntPtr.Zero) 508if(peer._hwnd == IntPtr.Zero) 2150internal IntPtr Hwnd 2506private IntPtr _hwnd;
System\Windows\Automation\Peers\GenericRootAutomationPeer.cs (4)
37IntPtr hwnd = this.Hwnd; 38if(hwnd != IntPtr.Zero) 64IntPtr hwnd = this.Hwnd; 65if(hwnd != IntPtr.Zero)
System\Windows\Automation\Peers\UIElementAutomationPeer.cs (1)
75internal static AutomationPeer GetRootAutomationPeer(Visual rootVisual, IntPtr hwnd)
System\Windows\DpiChangedEventArgs.cs (1)
44internal HwndDpiChangedEventArgs(double oldDpiX, double oldDpiY, double newDpiX, double newDpiY, IntPtr lParam) : base(false)
System\Windows\DragDrop.cs (7)
446internal static void RegisterDropTarget(IntPtr windowHandle) 448if (windowHandle != IntPtr.Zero) 467internal static void RevokeDropTarget(IntPtr windowHandle) 469if (windowHandle != IntPtr.Zero) 889public OleDropTarget(IntPtr handle) 891if (handle == IntPtr.Zero) 1434private IntPtr _windowHandle;
System\Windows\Input\AccessKeyManager.cs (4)
464IntPtr hwnd = MS.Win32.UnsafeNativeMethods.GetActiveWindow(); 465if (hwnd != IntPtr.Zero) 473IntPtr hwnd = MS.Win32.UnsafeNativeMethods.GetActiveWindow(); 474if (hwnd != IntPtr.Zero)
System\Windows\Input\Cursor.cs (5)
166_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 243_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 289_cursorHandle = UnsafeNativeMethods.LoadImageCursor(IntPtr.Zero, 312_cursorHandle = SafeNativeMethods.LoadCursor(new HandleRef(this,IntPtr.Zero), (IntPtr)(CursorTypes[(int)cursorType]));
System\Windows\Input\DefaultTextStore.cs (2)
79public void GetWnd(out IntPtr hwnd) 81hwnd = IntPtr.Zero;
System\Windows\Input\InputElement.cs (2)
274if(sourceFrom != null && sourceFrom.Handle != IntPtr.Zero && sourceFrom.CompositionTarget != null && 275sourceTo != null && sourceTo.Handle != IntPtr.Zero && sourceTo.CompositionTarget != null)
System\Windows\Input\InputLanguageManager.cs (2)
247IntPtr hkl = SafeNativeMethods.GetKeyboardLayout(0); 248if (hkl == IntPtr.Zero)
System\Windows\Input\InputMethod.cs (40)
535IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 536if (hwnd != IntPtr.Zero) 538IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 571IntPtr hwnd = IntPtr.Zero; 574if (hwnd != IntPtr.Zero) 576IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 768IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 769if (hwnd != IntPtr.Zero) 773IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 816IntPtr hwnd = IntPtr.Zero; 909if (hwnd != IntPtr.Zero) 913IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1026IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 1027if (hwnd != IntPtr.Zero) 1032IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1100IntPtr hwnd = HwndFromInputElement(Keyboard.FocusedElement); 1101if (hwnd != IntPtr.Zero) 1105IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1268IntPtr hkl = SafeNativeMethods.GetKeyboardLayout(0); 1276internal static bool IsImm32Ime(IntPtr hkl) 1278if (hkl == IntPtr.Zero) 1325IntPtr hwnd; 1333if (DefaultImc != IntPtr.Zero) 1343UnsafeNativeMethods.ImmAssociateContext(new HandleRef(this, hwnd), new HandleRef(this, IntPtr.Zero)); 1399private UnsafeNativeMethods.ConversionModeFlags Imm32ConversionModeToTSFConversionMode(IntPtr hwnd) 1402if (hwnd != IntPtr.Zero) 1406IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1484IntPtr hkl = SafeNativeMethods.GetKeyboardLayout(0); 1522UnsafeNativeMethods.ImmConfigureIME(new HandleRef(this, hkl), new HandleRef(this, HwndFromInputElement(element)), NativeMethods.IME_CONFIG_GENERAL, IntPtr.Zero); 1537IntPtr hkl = SafeNativeMethods.GetKeyboardLayout(0); 1589private static IntPtr HwndFromInputElement(IInputElement element) 1591IntPtr hwnd = (IntPtr)0; 1733private IntPtr DefaultImc 1742IntPtr hwnd = UnsafeNativeMethods.ImmGetDefaultIMEWnd(new HandleRef(this, IntPtr.Zero)); 1743IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1785private static IntPtr _defaultImc;
System\Windows\Input\InputProcessorProfiles.cs (4)
112IntPtr[] hklList = null; 117hklList = new IntPtr[count]; 145IntPtr langids; 156short langid = Marshal.PtrToStructure<short>((IntPtr)((Int64)langids + sizeof(short) * i));
System\Windows\Input\MouseDevice.cs (8)
891IntPtr.Zero) 1283IntPtr.Zero); 1363IntPtr extraInformation = clearExtraInformation ? IntPtr.Zero : rawMouseInputReport.ExtraInformation; 2104IntPtr hwndHit = IntPtr.Zero ; 2113hwndHit = IntPtr.Zero; 2116if (hwndHit != IntPtr.Zero)
System\Windows\Input\RawKeyboardInputReport.cs (3)
56IntPtr extraInformation) : base(inputSource, InputType.Keyboard, mode, timestamp) 98public IntPtr ExtraInformation => _extraInformation; 120private readonly IntPtr _extraInformation;
System\Windows\Input\RawMouseInputReport.cs (3)
52IntPtr extraInformation) : base(inputSource, InputType.Mouse, mode, timestamp) 89public IntPtr ExtraInformation => _extraInformation; 128private readonly IntPtr _extraInformation;
System\Windows\Input\Stylus\Common\StylusLogic.cs (2)
475internal abstract void HandleMessage(WindowMessage msg, IntPtr wParam, IntPtr lParam);
System\Windows\Input\Stylus\Pointer\PointerInteractionEngine.cs (8)
85private IntPtr _interactionContext = IntPtr.Zero; 161IntPtr interactionContext = IntPtr.Zero; 170if (_interactionContext != IntPtr.Zero) 208if (_interactionContext != IntPtr.Zero) 211_interactionContext = IntPtr.Zero; 269private void Callback(IntPtr clientData, ref UnsafeNativeMethods.INTERACTION_CONTEXT_OUTPUT output)
System\Windows\Input\Stylus\Pointer\PointerLogic.cs (3)
263IntPtr.Zero); 911internal override void HandleMessage(WindowMessage msg, IntPtr wParam, IntPtr lParam)
System\Windows\Input\Stylus\Pointer\PointerTabletDevice.cs (1)
43internal IntPtr Device { get { return _deviceInfo.Device; } }
System\Windows\Input\Stylus\Pointer\PointerTabletDeviceCollection.cs (5)
21private Dictionary<IntPtr, PointerTabletDevice> _tabletDeviceMap = new Dictionary<IntPtr, PointerTabletDevice>(); 38internal PointerTabletDevice GetByDeviceId(IntPtr deviceId) 75Dictionary<IntPtr, PointerTabletDevice> oldTablets = _tabletDeviceMap; 77_tabletDeviceMap = new Dictionary<IntPtr, PointerTabletDevice>();
System\Windows\Input\Stylus\Pointer\PointerTabletDeviceInfo.cs (1)
45internal IntPtr Device { get { return _deviceInfo.device; } }
System\Windows\Input\Stylus\Wisp\PenContext.cs (5)
12internal PenContext(IPimcContext3 pimcContext, IntPtr hwnd, 14int id, IntPtr commHandle, int tabletDeviceId, UInt32 wispContextKey) 55internal IntPtr CommHandle => _commHandle; 511private readonly IntPtr _hwnd; 512private readonly IntPtr _commHandle;
System\Windows\Input\Stylus\Wisp\PenContextInfo.cs (1)
16public IntPtr CommHandle;
System\Windows\Input\Stylus\Wisp\PenContexts.cs (1)
16if(hwndSource == null || IntPtr.Zero == (hwndSource).Handle)
System\Windows\Input\Stylus\Wisp\PenImcRcw.cs (1)
42void CreateContext(IntPtr handle, [MarshalAs(UnmanagedType.Bool)] bool fEnable, uint timeout,
System\Windows\Input\Stylus\Wisp\PenThread.cs (1)
66internal PenContextInfo WorkerCreateContext(IntPtr hwnd, IPimcTablet3 pimcTablet)
System\Windows\Input\Stylus\Wisp\PenThreadWorker.cs (13)
29private IntPtr [] _handles = Array.Empty<IntPtr>(); 40private readonly IntPtr _pimcResetHandle; 161internal WorkerOperationCreateContext(IntPtr hwnd, IPimcTablet3 pimcTablet) 211private IntPtr _hwnd; 470IntPtr resetHandle; 583internal PenContextInfo WorkerCreateContext(IntPtr hwnd, IPimcTablet3 pimcTablet) 772internal void FireEvent(PenContext penContext, int evt, int stylusPointerId, int cPackets, int cbPacket, IntPtr pPackets) 1028_handles = new IntPtr[penContextRefs.Count]; 1035Debug.Assert(pc != null && pc.CommHandle != IntPtr.Zero); 1082_handles = new IntPtr[penContextRefs.Count]; 1089Debug.Assert(pc != null && pc.CommHandle != IntPtr.Zero); 1194IntPtr pPackets;
System\Windows\Input\Stylus\Wisp\WispLogic.cs (14)
570IntPtr.Zero); 647IntPtr hwnd = hwndSource != null ? hwndSource.Handle : IntPtr.Zero; 652if (hwnd != IntPtr.Zero && 654UnsafeNativeMethods.GetParent(new HandleRef(this, hwnd)) == IntPtr.Zero && 1298IntPtr.Zero); 1768actions, (int)pt.X, (int)pt.Y, 0, IntPtr.Zero); 2598internal override void HandleMessage(WindowMessage msg, IntPtr wParam, IntPtr lParam) 2861IntPtr.Zero); 2945IntPtr hwndHit = IntPtr.Zero; 2953if (hwndHit != IntPtr.Zero) 3530internal void OnWindowEnableChanged(IntPtr hwnd, bool disabled)
System\Windows\Input\Stylus\Wisp\WispStylusDevice.cs (3)
1541IntPtr hwndHit = UnsafeNativeMethods.WindowFromPoint((int)ptScreen.X, (int)ptScreen.Y); 1542if (hwndHit != IntPtr.Zero) 1692(int)pt.X, (int)pt.Y, 0, IntPtr.Zero);
System\Windows\Input\Stylus\Wisp\WispTabletDevice.cs (1)
184internal PenContext CreateContext(IntPtr hwnd, PenContexts contexts)
System\Windows\Input\Stylus\Wisp\WispTabletDeviceCollection.cs (1)
656internal PenContext[] CreateContexts(IntPtr hwnd, PenContexts contexts)
System\Windows\InterOp\D3DImage.cs (8)
85public void SetBackBuffer(D3DResourceType backBufferType, IntPtr backBuffer) 122public void SetBackBuffer(D3DResourceType backBufferType, IntPtr backBuffer, bool enableSoftwareFallback) 142if (backBuffer != IntPtr.Zero && backBuffer == _pUserSurfaceUnsafe) 153if (backBuffer != IntPtr.Zero) 643img._pUserSurfaceUnsafe = IntPtr.Zero; 689IntPtr hDuplicate; 690IntPtr hCurrentProc = MS.Win32.UnsafeNativeMethods.GetCurrentProcess(); 901private IntPtr _pUserSurfaceUnsafe;
System\Windows\InterOp\HwndAppCommandInputProvider.cs (8)
35internal IntPtr FilterMessage( IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled ) 40return IntPtr.Zero; 59return handled ? new IntPtr(1) : IntPtr.Zero ; 67private static int GetAppCommand( IntPtr lParam ) 79private static InputType GetDevice(IntPtr lParam)
System\Windows\InterOp\HwndKeyboardInputProvider.cs (38)
60_restoreFocusWindow = IntPtr.Zero; 65IntPtr focus = UnsafeNativeMethods.GetFocus(); 105result = focus != IntPtr.Zero; 154internal IntPtr FilterMessage(IntPtr hwnd, WindowMessage message, IntPtr wParam, IntPtr lParam, ref bool handled) 156IntPtr result = IntPtr.Zero ; 336_restoreFocusWindow = GetImmediateChildFor((IntPtr)wParam, _source.Handle); 344if (_restoreFocusWindow == IntPtr.Zero) 358PossiblyDeactivate((IntPtr)wParam); 399private void OnSetFocus(IntPtr hwnd) 459if (_restoreFocusWindow != IntPtr.Zero) 461IntPtr hwndRestoreFocus = _restoreFocusWindow; 462_restoreFocusWindow = IntPtr.Zero; 492IntPtr focus = UnsafeNativeMethods.GetFocus(); 541internal void ProcessTextInputAction(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled) 574internal static int GetVirtualKey(IntPtr wParam, IntPtr lParam) 633internal static int GetScanCode(IntPtr wParam, IntPtr lParam) 654internal static bool IsExtendedKey(IntPtr lParam) 697private void PossiblyDeactivate(IntPtr hwndFocus) 728private bool IsOurWindow(IntPtr hwnd) 734if(hwnd != IntPtr.Zero) 768private IntPtr GetImmediateChildFor(IntPtr hwnd, IntPtr hwndRoot) 770while (hwnd != IntPtr.Zero) 781IntPtr hwndParent = UnsafeNativeMethods.GetParent(new HandleRef(this, hwnd)); 791return IntPtr.Zero; 795IntPtr hwnd, 830IntPtr extraInformation = IntPtr.Zero; 860private IntPtr _restoreFocusWindow;
System\Windows\InterOp\HwndMouseInputProvider.cs (29)
55IntPtr hwndCapture = SafeNativeMethods.GetCapture(); 124IntPtr capture = SafeNativeMethods.GetCapture(); 314internal IntPtr FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled) 316IntPtr result = IntPtr.Zero ; 668IntPtr hwndCapture = SafeNativeMethods.GetCapture(); 669IntPtr hwndCurrent = _source.Handle; 744if(lParam != IntPtr.Zero || // someone else took capture 883private void PossiblyDeactivate(IntPtr hwndCapture, bool stillActiveIfOverSelf) 907IntPtr hwndToCheck = hwndCapture; 908if(hwndToCheck == IntPtr.Zero) 936hwndToCheck = IntPtr.Zero; 939if(hwndToCheck != IntPtr.Zero) 956hwndToCheck = IntPtr.Zero; 1016private NativeMethods.RECT GetEffectiveClientRect(IntPtr hwnd) 1129private void StartTracking(IntPtr hwnd) 1147private void StopTracking(IntPtr hwnd) 1165private IntPtr MakeLPARAM(int high, int low) 1167return ((IntPtr)((high << 16) | (low & 0xffff))); 1170private bool IsOurWindow(IntPtr hwnd) 1176private bool IsOurWindowImpl(IntPtr hwnd, out HwndSource hwndSource) 1183if(hwnd != IntPtr.Zero) 1217IntPtr hwnd, 1288IntPtr hwndToCheck = SafeNativeMethods.GetCapture(); 1404IntPtr extraInformation = IntPtr.Zero;
System\Windows\InterOp\HwndPanningFeedback.cs (2)
46IntPtr handle = _hwndSource.Handle; 47if (handle != IntPtr.Zero)
System\Windows\InterOp\HwndPointerInputProvider.cs (8)
120private uint GetPointerId(IntPtr wParam) 221IntPtr deviceId = data.Info.sourceDevice; 337private bool UpdateCurrentTabletAndStylus(IntPtr deviceId, uint cursorId) 391IntPtr IStylusInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled) 439return IntPtr.Zero;
System\Windows\InterOp\HwndSource.cs (58)
61IntPtr parent) 121IntPtr parent, 180IntPtr parent) 330if (_hwndWrapper.Handle != IntPtr.Zero) 664public static HwndSource FromHwnd(IntPtr hwnd) 669internal static HwndSource CriticalFromHwnd(IntPtr hwnd) 671if (hwnd == IntPtr.Zero) 744UnsafeNativeMethods.HideCaret(new HandleRef(this, IntPtr.Zero)); 770UnsafeNativeMethods.ShowCaret(new HandleRef(this, IntPtr.Zero)); 833UnsafeNativeMethods.SetWindowPos(new HandleRef(this,_hwndWrapper.Handle), new HandleRef(null,IntPtr.Zero), 856IntPtr hwndRoot = UnsafeNativeMethods.GetAncestor(new HandleRef(this, Handle), NativeMethods.GA_ROOT); 891int style = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(new HandleRef(this, _hwndWrapper.Handle), false)); 892int styleEx = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(new HandleRef(this, _hwndWrapper.Handle), true)); 917public IntPtr Handle 923return IntPtr.Zero; 937IntPtr capture = SafeNativeMethods.GetCapture(); 947return _hwndWrapper.Handle == IntPtr.Zero ; 1155private IntPtr HwndTargetFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1157IntPtr result = IntPtr.Zero ; 1165if (result != IntPtr.Zero) 1175private IntPtr LayoutFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1177IntPtr result = IntPtr.Zero ; 1257if(wParam == IntPtr.Zero) 1270result = IntPtr.Zero; 1315result = IntPtr.Zero; 1327private void Process_WM_WINDOWPOSCHANGING(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam) 1401private void Process_WM_SIZE(UIElement rootUIElement, IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam) 1489private void DisableSizeToContent(UIElement rootUIElement, IntPtr hwnd) 1525IntPtr hwndRoot = IntPtr.Zero; 1539private IntPtr InputFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1541IntPtr result = IntPtr.Zero ; 1619private IntPtr PublicHooksFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1622IntPtr result = IntPtr.Zero ; 2441internal bool IsRepeatedKeyboardMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 2575if (_hwndWrapper.Handle != IntPtr.Zero && _registeredDropTargetCount > 0)
System\Windows\InterOp\HwndSourceHook.cs (4)
9public delegate IntPtr HwndSourceHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled);
System\Windows\InterOp\HwndSourceParameters.cs (2)
178public IntPtr ParentWindow 388private IntPtr _parent;
System\Windows\InterOp\HwndStylusInputProvider.cs (7)
33IntPtr sourceHandle; 68IntPtr IStylusInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled) 70IntPtr result = IntPtr.Zero ;
System\Windows\InterOp\HwndTarget.cs (68)
87/// This is returned by <see cref="HandleMessage(WindowMessage, IntPtr, IntPtr)"/> 90private static readonly IntPtr Handled = new IntPtr(0x1); 93/// This is returned by <see cref="HandleMessage(WindowMessage, IntPtr, IntPtr)"/> 95/// given Window message - i.e., <see cref="HandleMessage(WindowMessage, IntPtr, IntPtr)"/> 98private static readonly IntPtr Unhandled = IntPtr.Zero; 224public HwndTarget(IntPtr hwnd) 357IntPtr hWnd, 404private static DpiScale2 GetDpiScaleForWindow(IntPtr hWnd) 473Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero); 481int style = NativeMethods.IntPtrToInt32((IntPtr)SafeNativeMethods.GetWindowStyle(hWnd, false)); 484IntPtr hwndParent = IntPtr.Zero; 500if (hwndParent != IntPtr.Zero) 504} while (hwndParent != IntPtr.Zero); 507Debug.Assert(normalizedHwnd.Handle != IntPtr.Zero); 514private void AttachToHwnd(IntPtr hwnd) 567IntPtr hwnd 573IntPtr hwnd 861private bool HandleDpiChangedMessage(IntPtr wParam, IntPtr lParam) 936internal IntPtr HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam) 938IntPtr result = Unhandled; 956UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true); 1003UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1103UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1120bool enableRenderTarget = (wparam != IntPtr.Zero); 1244UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1281UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero , true); 1315UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true); 1337UnsafeNativeMethods.InvalidateRect(_hWnd.MakeHandleRef(this), IntPtr.Zero, true); 1373&& !UnsafeNativeMethods.GetLayeredWindowAttributes(_hWnd.MakeHandleRef(this), IntPtr.Zero, IntPtr.Zero, IntPtr.Zero) 1402internal static AutomationPeer EnsureAutomationPeer(Visual root, IntPtr handle) 1431private static IntPtr CriticalHandleWMGetobject(IntPtr wparam, IntPtr lparam, Visual root, IntPtr handle) 1439return IntPtr.Zero; 1445return IntPtr.Zero; 1753new HandleRef(null, IntPtr.Zero), // HWND_TOP 1775new HandleRef(null, IntPtr.Zero), // HWND_TOP 1780UnsafeNativeMethods.InvalidateRect(new HandleRef(this, _hWnd), IntPtr.Zero, true); 1816private void OnWindowPosChanging(IntPtr lParam) 1823private void OnWindowPosChanged(IntPtr lParam) 1830private void UpdateWindowPos(IntPtr lParam) 1894IntPtr hwndParent = UnsafeNativeMethods.GetParent(new HandleRef(null, windowPos.hwnd)); 1895if(hwndParent != IntPtr.Zero) 2200UnsafeNativeMethods.UpdateLayeredWindow(_hWnd.h, IntPtr.Zero, null, null, IntPtr.Zero, null, 0, ref blend, NativeMethods.ULW_ALPHA); 2279UnsafeNativeMethods.PostMessage(new HandleRef(this, _hWnd), s_updateWindowSettings, IntPtr.Zero, IntPtr.Zero); 2520private IntPtr _hPowerNotify; 2547IntPtr.Zero, 2560if (_hPowerNotify != IntPtr.Zero) 2563_hPowerNotify = IntPtr.Zero; 2606private IntPtr NotificationFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 2608IntPtr retInt = IntPtr.Zero;
System\Windows\InterOp\Imaging.cs (9)
28IntPtr bitmap, 29IntPtr palette, 46IntPtr bitmap, 47IntPtr palette, 52if (bitmap == IntPtr.Zero) 70IntPtr icon, 75if (icon == IntPtr.Zero) 96IntPtr section, 104if (section == IntPtr.Zero)
System\Windows\InterOp\IStylusInputProvider.cs (4)
20IntPtr FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, ref bool handled);
System\Windows\InterOp\IWin32Window.cs (1)
14IntPtr Handle
System\Windows\Media\ByteStreamGeometryContext.cs (2)
493Marshal.Copy(_chunkList[currentChunk], bufferOffset, (IntPtr)pbData, cbDataForThisChunk); 497Marshal.Copy((IntPtr)pbData, _chunkList[currentChunk], bufferOffset, cbDataForThisChunk);
System\Windows\Media\ChannelManager.cs (4)
109if (_pSyncConnection != IntPtr.Zero) 112_pSyncConnection = IntPtr.Zero; 123if (_pSyncConnection == IntPtr.Zero) 251private IntPtr _pSyncConnection;
System\Windows\Media\ColorContext.cs (5)
335internal delegate int GetColorContextsDelegate(ref uint numContexts, IntPtr[] colorContextPtrs); 367IntPtr[] colorContextPtrs = new IntPtr[numContexts]; 547HRESULT.Check(UnsafeNativeMethodsMilCoreApi.Mscms.GetStandardColorSpaceProfile(IntPtr.Zero, dwProfileID, buffer, out bufferSize)); 565HRESULT.Check(UnsafeNativeMethodsMilCoreApi.Mscms.GetColorDirectory(IntPtr.Zero, buffer, out bufferSize));
System\Windows\Media\ColorContextHelper.cs (1)
28internal SafeProfileHandle(IntPtr profile)
System\Windows\Media\ColorTransformHelper.cs (5)
27internal ColorTransformHandle(IntPtr profile) 67IntPtr[] handles = new IntPtr[2]; 106internal void TranslateColors(IntPtr paInputColors, UInt32 numColors, UInt32 inputColorType, IntPtr paOutputColors, UInt32 outputColorType)
System\Windows\Media\Composition.cs (1)
195IntPtr pChannel
System\Windows\Media\EventProxy.cs (4)
29Debug.Assert(((IntPtr)pEPD.m_handle) != IntPtr.Zero, "If this asserts fires: Why is it firing? It might be legal in future."); 104Debug.Assert(((IntPtr)epd.m_handle) != IntPtr.Zero, "Stream is disposed.");
System\Windows\Media\FactoryMaker.cs (11)
25if (s_pFactory == IntPtr.Zero) 73if (s_pImagingFactory != IntPtr.Zero) 78s_pFactory = IntPtr.Zero; 79s_pImagingFactory = IntPtr.Zero; 96internal IntPtr FactoryPtr 100Debug.Assert(s_pFactory != IntPtr.Zero); 105internal IntPtr ImagingFactoryPtr 109if (s_pImagingFactory == IntPtr.Zero) 116Debug.Assert(s_pImagingFactory != IntPtr.Zero); 121private static IntPtr s_pFactory; 122private static IntPtr s_pImagingFactory;
System\Windows\Media\GlyphTypeface.cs (1)
1609internal unsafe IntPtr GetDWriteFontAddRef
System\Windows\Media\ImageSourceConverter.cs (4)
217IntPtr addr = (IntPtr)pByte; 219if (addr == IntPtr.Zero) 289public IntPtr pInfo;
System\Windows\Media\Imaging\BitmapDecoder.cs (26)
566IntPtr /* IWICBitmapSource */ thumbnail = IntPtr.Zero; 581if (thumbnail != IntPtr.Zero) 627IntPtr /* IWICMetadataQueryReader */ metadata = IntPtr.Zero; 641if (metadata != IntPtr.Zero) 720IntPtr /* IWICBitmapSource */ preview = IntPtr.Zero; 735if (preview != IntPtr.Zero) 935private int GetColorContexts(ref uint numContexts, IntPtr[] colorContextPtrs) 999IntPtr decoder = IntPtr.Zero; 1097IntPtr comStream = IntPtr.Zero; 1162Debug.Assert(decoder != IntPtr.Zero); 1494private static IntPtr GetIStreamFromStream(ref System.IO.Stream bitmapStream) 1496IntPtr comStream = IntPtr.Zero; 1504IntPtr bufferPtr = IntPtr.Zero; 1509bufferPtr = (IntPtr) memoryStream.PositionPointer; 1513if (bufferPtr != IntPtr.Zero) 1522if (comStream == IntPtr.Zero) 1532IntPtr memoryStream = StreamAsIStream.IStreamMemoryFrom(comStream); 1534if (memoryStream != IntPtr.Zero) 1549if (comStream == IntPtr.Zero)
System\Windows\Media\Imaging\BitmapDownload.cs (1)
131hTemplateFile: IntPtr.Zero
System\Windows\Media\Imaging\BitmapEncoder.cs (9)
20internal IntPtr dwHint; 22internal IntPtr pstrName; //this is string array 34pstrName = IntPtr.Zero; 341IntPtr comStream = IntPtr.Zero; 638IntPtr[] colorContextPtrs = new IntPtr[1] { colorContext.ColorContextHandle.DangerousGetHandle() }; 663IntPtr[] colorContextPtrs = new IntPtr[count];
System\Windows\Media\Imaging\BitmapFrameDecode.cs (9)
212private int GetColorContexts(ref uint numContexts, IntPtr[] colorContextPtrs) 565IntPtr /* IWICBitmapSource */ thumbnail = IntPtr.Zero; 583if (thumbnail != IntPtr.Zero) 626IntPtr /* IWICMetadataQueryReader */ metadata = IntPtr.Zero; 642if (metadata != IntPtr.Zero) 690IntPtr frameDecode = IntPtr.Zero;
System\Windows\Media\Imaging\BitmapMetadata.cs (55)
46out IntPtr /* IWICMetadataReader */ ppIMetadataReader 51out IntPtr /* IEnumUnknown */ pIEnumMetadata 80out IntPtr /* IWICMetadataReader */ ppIMetadataReader 85out IntPtr /* IEnumUnknown */ pIEnumMetadata 90IntPtr /* IWICMetadataBlockReader */ pIBlockReader 96out IntPtr /* IWICMetadataWriter */ ppIMetadataWriter 101IntPtr /* IWICMetadataWriter */ pIMetadataWriter 107IntPtr /* IWICMetadataWriter */ pIMetadataWriter 150IntPtr pIMetadataWriter = IntPtr.Zero; 162pIMetadataWriter = IntPtr.Zero; 168if (pIMetadataWriter != IntPtr.Zero) 203out IntPtr /* IWICMetadataReader */ pIMetadataReader 208pIMetadataReader = IntPtr.Zero; 226out IntPtr /* IEnumUnknown */ pIEnumMetadata 245IntPtr /* IWICMetadataBlockReader */ pIBlockReader 248Invariant.Assert(pIBlockReader != IntPtr.Zero); 270IntPtr pIMetadataWriter = IntPtr.Zero; 299pIMetadataWriter = IntPtr.Zero; 306if (pIMetadataWriter != IntPtr.Zero) 327out IntPtr /* IWICMetadataWriter */ pIMetadataWriter 332pIMetadataWriter = IntPtr.Zero; 350IntPtr /* IWICMetadataWriter */ pIMetadataWriter 353if (pIMetadataWriter == IntPtr.Zero) 378IntPtr /* IWICMetadataWriter */ pIMetadataWriter 386if (pIMetadataWriter == IntPtr.Zero) 452out IntPtr /* IUnknown ** */ rgelt, 466ref IntPtr /* IEnumString ** */ ppEnum 496out IntPtr /* IUnknown ** */ rgelt, 503rgelt = IntPtr.Zero; 510rgelt = IntPtr.Zero; 563ref IntPtr /* IEnumUnknown ** */ ppEnum 566ppEnum = IntPtr.Zero; 638IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 673IntPtr /* IWICMetadataBlockWriter */ blockWriter = IntPtr.Zero; 674IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 697queryWriter = IntPtr.Zero; 703if (blockWriter != IntPtr.Zero) 708if (queryWriter != IntPtr.Zero) 722IntPtr /* IWICMetadataBlockWriter */ blockWriter = IntPtr.Zero; 723IntPtr /* IWICMetadataQueryWriter */ queryWriter = IntPtr.Zero; 746queryWriter = IntPtr.Zero; 752if (blockWriter != IntPtr.Zero) 757if (queryWriter != IntPtr.Zero) 772IntPtr queryWriter = IntPtr.Zero; 798queryWriter = IntPtr.Zero; 809if (queryWriter != IntPtr.Zero) 1190IntPtr.Zero
System\Windows\Media\Imaging\BitmapMetadataEnumerator.cs (4)
56IntPtr ppStr = IntPtr.Zero; 87if (ppStr != IntPtr.Zero) 90ppStr = IntPtr.Zero;
System\Windows\Media\Imaging\BitmapPalette.cs (2)
285(IntPtr)paletteColorArrayPinned, 318(IntPtr)paletteColorArrayPinned,
System\Windows\Media\Imaging\BitmapSource.cs (17)
77IntPtr buffer, 382public virtual void CopyPixels(Int32Rect sourceRect, IntPtr buffer, int bufferSize, int stride) 582IntPtr wicSource = IntPtr.Zero; 681internal void CriticalCopyPixels(Int32Rect sourceRect, IntPtr buffer, uint bufferSize, int stride) 683if (buffer == IntPtr.Zero) 792(IntPtr)pixelArray 834new SafeMILHandle(IntPtr.Zero), 1053IntPtr wicFactory = factoryMaker.ImagingFactoryPtr; 1643IntPtr /* IWICPalette */ pIPalette 1650IntPtr prc, 1653IntPtr pvPixels 1748int IWICBitmapSource.GetPalette(IntPtr /* IWICPalette */ pIPalette) 1768int IWICBitmapSource.CopyPixels(IntPtr prc, int cbStride, int cbPixels, IntPtr pvPixels) 1775if (pvPixels == IntPtr.Zero) 1785if (prc == IntPtr.Zero)
System\Windows\Media\Imaging\BitmapSourceSafeMILHandle.cs (6)
38internal BitmapSourceSafeMILHandle(IntPtr handle) : base() 48internal BitmapSourceSafeMILHandle(IntPtr handle, SafeMILHandle copyMemoryPressureFrom) 65private static long ComputeEstimatedSize(IntPtr bitmapObject) 69if (bitmapObject != IntPtr.Zero) 71IntPtr wicBitmap; 86Debug.Assert(wicBitmap != IntPtr.Zero);
System\Windows\Media\Imaging\BitmapVisualManager.cs (2)
95IntPtr pIRenderTargetBitmap = IntPtr.Zero;
System\Windows\Media\Imaging\CachedBitmap.cs (2)
47IntPtr buffer, 338IntPtr buffer,
System\Windows\Media\Imaging\CroppedBitmap.cs (1)
96IntPtr wicFactory = factoryMaker.ImagingFactoryPtr;
System\Windows\Media\Imaging\FormatConvertedBitmap.cs (1)
96IntPtr wicFactory = factoryMaker.ImagingFactoryPtr;
System\Windows\Media\Imaging\InteropBitmapSource.cs (5)
33internal InteropBitmap(IntPtr hbitmap, IntPtr hpalette, Int32Rect sourceRect, BitmapSizeOptions sizeOptions, WICBitmapAlphaChannelOption alphaOptions) 65internal InteropBitmap(IntPtr hicon, Int32Rect sourceRect, BitmapSizeOptions sizeOptions) 100IntPtr section, 347IntPtr wicFactory = factoryMaker.ImagingFactoryPtr;
System\Windows\Media\Imaging\PropVariant.cs (35)
59internal IntPtr pElems; 81[FieldOffset(8)] internal IntPtr pclsidVal; //this is for GUID ID pointer 82[FieldOffset(8)] internal IntPtr pszVal; //this is for ansi string pointer 83[FieldOffset(8)] internal IntPtr pwszVal; //this is for Unicode string pointer 84[FieldOffset(8)] internal IntPtr punkVal; //this is for punkVal (interface pointer) 126ca.pElems = IntPtr.Zero; 133IntPtr destPtr = IntPtr.Zero; 148destPtr = IntPtr.Zero; 152if (destPtr != IntPtr.Zero) 165ca.pElems = IntPtr.Zero; 171IntPtr destPtr = IntPtr.Zero; 175sizeIntPtr = sizeof(IntPtr); 182IntPtr pString = IntPtr.Zero; 201destPtr = IntPtr.Zero; 205if (destPtr != IntPtr.Zero) 209IntPtr pString = Marshal.ReadIntPtr(destPtr, i*sizeIntPtr); 399IntPtr punkTemp = IntPtr.Zero; 431if (ca.pElems != IntPtr.Zero) 437IntPtr punkPtr = ca.pElems; 441sizeIntPtr = sizeof(IntPtr); 452IntPtr strPtr = ca.pElems; 456sizeIntPtr = sizeof(IntPtr); 594sizeIntPtr = sizeof(IntPtr); 599IntPtr ptr = Marshal.ReadIntPtr(ca.pElems, i*sizeIntPtr); 611sizeIntPtr = sizeof(IntPtr); 616IntPtr ptr = Marshal.ReadIntPtr(ca.pElems, i*sizeIntPtr); 690IntPtr queryHandle = IntPtr.Zero; 704queryHandle = IntPtr.Zero; 718queryHandle = IntPtr.Zero; 728if (queryHandle != IntPtr.Zero)
System\Windows\Media\Imaging\TransformedBitmap.cs (1)
169IntPtr wicFactory = factoryMaker.ImagingFactoryPtr;
System\Windows\Media\Imaging\UnknownBitmapDecoder.cs (1)
27MS.Win32.PresentationCore.UnsafeNativeMethods.WICCodec.CoInitialize(IntPtr.Zero);
System\Windows\Media\Imaging\WriteableBitmap.cs (11)
266if (_backBuffer == IntPtr.Zero) 268IntPtr tempBackBufferPointer = IntPtr.Zero; 344IntPtr sourceBuffer, 418IntPtr buffer, 788IntPtr sourceBuffer, 826if (sourceBuffer == IntPtr.Zero) 1291IntPtr hDuplicate; 1292IntPtr hCurrentProc = MS.Win32.UnsafeNativeMethods.GetCurrentProcess(); 1345public IntPtr BackBuffer 1360private IntPtr _backBuffer;
System\Windows\Media\MediaContextNotificationWindow.cs (11)
52hwndNotification = new HwndWrapper(0, NativeMethods.WS_POPUP, 0, 0, 0, 0, 0, "MediaContextNotificationWindow", IntPtr.Zero, null); 127private IntPtr MessageFilter(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 154return IntPtr.Zero; 159IntPtr hwnd 164IntPtr hwnd 175IntPtr user32Module = UnsafeNativeMethods.GetModuleHandle("user32.dll"); 180IntPtr functionAddress = UnsafeNativeMethods.GetProcAddressNoThrow( 184if (functionAddress != IntPtr.Zero)
System\Windows\Media\MediaSystem.cs (3)
234s_pConnection = IntPtr.Zero; 320internal static IntPtr Connection 350private static IntPtr s_pConnection;
System\Windows\Media\PixelFormat.cs (12)
336IntPtr pixelFormatInfo = CreatePixelFormatInfo(); 337Debug.Assert(pixelFormatInfo != IntPtr.Zero); 377if (pixelFormatInfo != IntPtr.Zero) 387internal readonly IntPtr CreatePixelFormatInfo() 389IntPtr componentInfo = IntPtr.Zero; 390IntPtr pixelFormatInfo = IntPtr.Zero; 417if (componentInfo != IntPtr.Zero) 435IntPtr pixelFormatInfo = CreatePixelFormatInfo(); 436Debug.Assert(pixelFormatInfo != IntPtr.Zero); 447if (pixelFormatInfo != IntPtr.Zero)
System\Windows\Media\RenderData.cs (2)
108Marshal.Copy((IntPtr)(&header), this._buffer, _curOffset, sizeof(RecordHeader)); 109Marshal.Copy((IntPtr)pbRecord, this._buffer, _curOffset + sizeof(RecordHeader), cbRecordSize);
System\Windows\Media\Renderer.cs (2)
18IntPtr pRenderTarget, 35IntPtr pRenderTarget,
System\Windows\Media\safemediahandle.cs (1)
23internal SafeMediaHandle(IntPtr handle)
System\Windows\Media\SafeMILHandle.cs (1)
31internal SafeMILHandle(IntPtr handle) : base(true)
System\Windows\Media\SafeReversePInvokeHandle.cs (3)
32internal SafeReversePInvokeWrapper(IntPtr delegatePtr) : base(true) 35IntPtr reversePInvokeWrapper; 43if (handle != IntPtr.Zero)
System\Windows\Media\StreamAsIStream.cs (29)
17internal delegate int Read(ref StreamDescriptor pSD, IntPtr buffer, uint cb, out uint cbRead); 23internal delegate int CopyTo(ref StreamDescriptor pSD, IntPtr pstm, long cb, out long cbRead, out long cbWritten); 29internal delegate int Clone(ref StreamDescriptor pSD, out IntPtr stream); 53Debug.Assert(((IntPtr)pSD.m_handle) != IntPtr.Zero, "If this asserts fires: why is it firing. It might be legal in future."); 153public int Clone(out IntPtr stream) 155stream = IntPtr.Zero; 190public int CopyTo(IntPtr /* IStream */ pstm, long cb, out long cbRead, out long cbWritten) 509Debug.Assert(((IntPtr)sd.m_handle) != IntPtr.Zero, "Stream is disposed."); 514internal static int Clone(ref StreamDescriptor pSD, out IntPtr stream) 524internal static int CopyTo(ref StreamDescriptor pSD, IntPtr pstm, long cb, out long cbRead, out long cbWritten) 534internal static unsafe int Read(ref StreamDescriptor pSD, IntPtr buffer, uint cb, out uint cbRead) 583internal static IntPtr IStreamMemoryFrom(IntPtr comStream) 585IntPtr pIStream = IntPtr.Zero; 591return IntPtr.Zero; 598return IntPtr.Zero; 605internal static IntPtr IStreamFrom(IntPtr memoryBuffer, int bufferSize) 607IntPtr pIStream = IntPtr.Zero; 613return IntPtr.Zero; 620return IntPtr.Zero; 628internal static IntPtr IStreamFrom(System.IO.Stream stream) 632IntPtr pStream = IntPtr.Zero; 666private static extern int /* HRESULT */ MILIStreamWrite(IntPtr pStream, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2)]byte[] buffer, uint cb, out uint cbWritten);
System\Windows\Media\textformatting\TextBreakpoint.cs (1)
68internal abstract IntPtr GetTextPenaltyResource();
System\Windows\Media\textformatting\TextFormatterContext.cs (25)
23private IntPtr _ploc; // Line Services context 32_ploc = IntPtr.Zero; 39if(_ploc == System.IntPtr.Zero) 52contextInfo.pols = IntPtr.Zero; // This will be filled in the un-managed code 110IntPtr ploc = IntPtr.Zero; 111IntPtr ppenaltyModule = IntPtr.Zero; 165Invariant.Assert(_ploc != System.IntPtr.Zero); 241if(_ploc != System.IntPtr.Zero) 244_ploc = IntPtr.Zero; 256Invariant.Assert(_ploc != System.IntPtr.Zero); 279IntPtr previousLineBreakRecord, 280out IntPtr ploline, 286Invariant.Assert(_ploc != System.IntPtr.Zero); 305IntPtr previousLineBreakRecord, 306IntPtr ploparabreak, 307IntPtr ptslinevariantRestriction, 312Invariant.Assert(_ploc != System.IntPtr.Zero); 329IntPtr previousLineBreakRecord, 330ref IntPtr ploparabreak, 334Invariant.Assert(_ploc != System.IntPtr.Zero); 353Invariant.Assert(_ploc != System.IntPtr.Zero); 373Invariant.Assert(_ploc != System.IntPtr.Zero); 481internal IntPtr Ploc
System\Windows\Media\textformatting\TextLineBreak.cs (9)
19private IntPtr _breakRecord; 28IntPtr breakRecord 34if (breakRecord == IntPtr.Zero) 69IntPtr pbreakrec = IntPtr.Zero; 71if (_breakRecord != IntPtr.Zero) 92if (_breakRecord != IntPtr.Zero) 96_breakRecord = IntPtr.Zero; 114internal IntPtr BreakRecord
System\Windows\Media\textformatting\TextParagraphCache.cs (9)
27private IntPtr _ploparabreak; // unmanaged LS resource for parabreak session 48TextFormatterContext context = settings.Formatter.AcquireContext(_fullText, IntPtr.Zero); 52IntPtr ploparabreakValue = IntPtr.Zero; 59IntPtr.Zero, 125IntPtr breakpointRestrictionHandle, 148if(_ploparabreak != IntPtr.Zero) 152_ploparabreak = IntPtr.Zero; 188internal IntPtr Ploparabreak
System\Windows\Media\UnsafeNativeMethodsMilCoreApi.cs (95)
48 out IntPtr ppConnection); 51internal static extern int WgxConnection_Disconnect(IntPtr pTranspManager); 54internal static extern int /* HRESULT */ MILCreateStreamFromStreamDescriptor(ref System.Windows.Media.StreamDescriptor pSD, out IntPtr ppStream); 141IntPtr pMilSlaveGlyphCacheTarget, 149IntPtr pMilSlaveGlyphCacheTarget, 156IntPtr pMilSlaveGlyphCacheTarget 161IntPtr pMilGlyphRunTarget, 168IntPtr pFontFace, 184IntPtr pFcn, 185out IntPtr reversePInvokeWrapper); 189IntPtr reversePInvokeWrapper); 327IntPtr propVar 373ref IntPtr rgElt, 424IntPtr /* BYTE* */ pvPixels); 442out IntPtr /* IWICBitmapSource */ ppIBitmapSource 449IntPtr[] /* IWICColorContext */ ppIColorContext, 456out IntPtr /* IWICBitmapSource */ ppIThumbnail 462out IntPtr /* IWICMetadataQueryReader */ ppIQueryReader 475out IntPtr /* IWICBitmapFrameDecode */ ppIFrameDecode 484out IntPtr /* IWICBitmap */ ppIThumbnail 490out IntPtr /* IWICMetadataQueryReader */ ppIQueryReader 497IntPtr[] /* IWICColorContext */ ppIColorContext, 512internal static extern int Release(IntPtr pIUnkown); 514internal static void ReleaseInterface(ref IntPtr ptr) 516if (ptr != IntPtr.Zero) 520ptr = IntPtr.Zero; 526IntPtr pIUnknown, 528out IntPtr ppvObject); 534out IntPtr ppvObject); 541IntPtr pIWICStream, 542IntPtr pIStream); 546IntPtr pIWICStream, 547IntPtr pbBuffer, 558IntPtr hSection, 601IntPtr[] /* IWICColorContext */ ppIColorContext 609IntPtr /* IStream */ pStream, 650IntPtr /* MILColor* */ pColors, 660internal static extern int /* HRESULT */ InitializeFromPalette(IntPtr /* IWICPalette */ THIS_PTR, 674IntPtr /* MILColor* */ pColors, 686IntPtr pICodecFactory, 687IntPtr /* IStream */ pIStream, 690out IntPtr /* IWICBitmapDecoder */ ppIDecode); 694IntPtr pICodecFactory, 698out IntPtr /* IWICBitmapDecoder */ ppIDecode); 702IntPtr pICodecFactory, 704out IntPtr /* IWICComponentInfo */ ppIComponentInfo); 708IntPtr pICodecFactory, 713IntPtr pICodecFactory, 718IntPtr pICodecFactory, 723IntPtr pICodecFactory, 728IntPtr pICodecFactory, 733IntPtr pICodecFactory, 734out IntPtr /* IWICBitmapStream */ ppIStream); 738IntPtr pICodecFactory, 745IntPtr THIS_PTR, 752IntPtr THIS_PTR, 758IntPtr /* BYTE* */ pvPixels, 763IntPtr THIS_PTR, 772IntPtr THIS_PTR, 773IntPtr hBitmap, 774IntPtr hPalette, 780IntPtr THIS_PTR, 781IntPtr hIcon, 786IntPtr THIS_PTR, 792IntPtr THIS_PTR, 798IntPtr THIS_PTR, 801out IntPtr /* IWICMetadataQueryWriter */ queryWriter 806IntPtr THIS_PTR, 809out IntPtr /* IWICMetadataQueryWriter */ queryWriter 817IntPtr pICodecFactory, 820out IntPtr metadataWriter 825IntPtr pICodecFactory, 826IntPtr pIBlockWriter, 827ref IntPtr ppIQueryWriter 835IntPtr pIBlockReader, 841IntPtr pIBlockReader, 851IntPtr /* IWICPixelFormatInfo */ pIPixelFormatInfo, 857IntPtr /* IWICPixelFormatInfo */ pIPixelFormatInfo, 863IntPtr /* IWICPixelFormatInfo */ pIPixelFormatInfo, 997ref IntPtr ppbData 1010out IntPtr ppICodecFactory 1044IntPtr pICodecFactory, 1049IntPtr reserved); 1058internal static extern ColorTransformHandle /* HTRANSFORM */ CreateMultiProfileTransform(IntPtr[] /* PHPROFILE */ pahProfiles, UInt32 nProfiles, UInt32[] padwIntent, UInt32 nIntents, UInt32 dwFlags, UInt32 indexPreferredCMM); 1061internal static extern bool DeleteColorTransform(IntPtr /* HTRANSFORM */ hColorTransform); 1064internal static extern int /* HRESULT */ TranslateColors(ColorTransformHandle /* HTRANSFORM */ hColorTransform, IntPtr paInputColors, UInt32 nColors, UInt32 ctInput, IntPtr paOutputColors, UInt32 ctOutput); 1070internal static extern bool CloseColorProfile(IntPtr /* HANDLE */ phProfile); 1076internal static extern int /* HRESULT */ GetColorDirectory(IntPtr pMachineName, StringBuilder pBuffer, out uint pdwSize); 1079internal static extern int /* HRESULT */ GetStandardColorSpaceProfile(IntPtr pMachineName, uint dwProfileID, StringBuilder pProfileName, out uint pdwSize); 1089out IntPtr ppIFactory, 1095IntPtr THIS_PTR, 1102IntPtr THIS_PTR, 1113IntPtr THIS_PTR, 1124IntPtr d3dResource,
System\Windows\UIElement.cs (3)
1134HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 1137IntPtr dc = UnsafeNativeMethods.GetDC(desktopWnd); 1140if (dc == IntPtr.Zero)
PresentationFramework (3396)
Microsoft\Win32\CommonDialog.cs (17)
65IntPtr hwndOwner = UnsafeNativeMethods.GetActiveWindow(); 67if (hwndOwner == IntPtr.Zero) 83if (hwndOwner == IntPtr.Zero) 85tempParentHwnd = new HwndWrapper(0, 0, 0, 0, 0, 0, 0, "", IntPtr.Zero, null); 134IntPtr hwndOwner = (new WindowInteropHelper(owner)).Handle; 137if (hwndOwner == IntPtr.Zero) 197protected virtual IntPtr HookProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 215return IntPtr.Zero; 221protected abstract bool RunDialog(IntPtr hwndOwner); 254IntPtr hMonitor = IntPtr.Zero; 257if (_hwndOwnerWindow != IntPtr.Zero) 271if (hMonitor != IntPtr.Zero) 325private IntPtr _hwndOwnerWindow;
Microsoft\Win32\CommonItemDialog.cs (3)
274protected override bool RunDialog(IntPtr hwndOwner) 344IntPtr focusHandle = UnsafeNativeMethods.GetFocus(); 767private IntPtr _hwndFileDialog;
MS\Internal\AppModel\AppSecurityManager.cs (1)
93UnsafeNativeMethods.ShellExecute(new HandleRef(null, IntPtr.Zero), /*hwnd*/
MS\Internal\AppModel\IconHelper.cs (4)
217IntPtr bits = IntPtr.Zero; 219new HandleRef(null, IntPtr.Zero), // A device context. Pass null in if no DIB_PAL_COLORS is used. 227if (colorBitmap.IsInvalid || bits == IntPtr.Zero)
MS\Internal\AppModel\ShellProvider.cs (90)
79public IntPtr hIcon; 97HRESULT Next(uint celt, out IntPtr rgelt, out int pceltFetched); 162IntPtr hwnd, 166out IntPtr ppidl, 170IntPtr hwnd, 177IntPtr pidl, 183object BindToStorage(IntPtr pidl, IBindCtx pbc, [In] ref Guid riid); 193HRESULT CompareIDs(IntPtr lParam, IntPtr pidl1, IntPtr pidl2); 205object CreateViewObject(IntPtr hwndOwner, [In] ref Guid riid); 214IntPtr apidl, 223IntPtr hwndOwner, 225[MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.SysInt, SizeParamIndex = 1)] IntPtr apidl, 236void GetDisplayNameOf(IntPtr pidl, SHGDN uFlags, out IntPtr pName); 241void SetNameOf(IntPtr hwnd, 242IntPtr pidl, 245out IntPtr ppidlOut); 301IntPtr rgKeys, 308IntPtr keyType, 314void GetProperty(IntPtr key, [In, Out] PROPVARIANT pv); 316Guid GetCLSID(IntPtr key); 318FILETIME GetFileTime(IntPtr key); 320int GetInt32(IntPtr key); 323string GetString(IntPtr key); 325uint GetUInt32(IntPtr key); 327ulong GetUInt64(IntPtr key); 330bool GetBool(IntPtr key); 367IntPtr GetIDList(); 368void SetIDList(IntPtr pidl); 382void Resolve(IntPtr hwnd, uint fFlags); 423HRESULT Show(IntPtr parent); 435new HRESULT Show(IntPtr parent); 496new HRESULT Show(IntPtr parent); 563new HRESULT Show(IntPtr parent); 609new HRESULT Show(IntPtr parent); 648void ApplyProperties(IShellItem psi, [MarshalAs(UnmanagedType.Interface)] object pStore, [In] ref IntPtr hwnd, [MarshalAs(UnmanagedType.Interface)] object pSink); 777void AddTab(IntPtr hwnd); 783void DeleteTab(IntPtr hwnd); 789void ActivateTab(IntPtr hwnd); 795void SetActiveAlt(IntPtr hwnd); 807new void AddTab(IntPtr hwnd); 808new void DeleteTab(IntPtr hwnd); 809new void ActivateTab(IntPtr hwnd); 810new void SetActiveAlt(IntPtr hwnd); 825void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 845new void AddTab(IntPtr hwnd); 846new void DeleteTab(IntPtr hwnd); 847new void ActivateTab(IntPtr hwnd); 848new void SetActiveAlt(IntPtr hwnd); 851new void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 856HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 859HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 862HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 865HRESULT UnregisterTab(IntPtr hwndTab); 868HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 871HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 874HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 877HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 880HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 883HRESULT SetOverlayIcon(IntPtr hwnd, NativeMethods.IconHandle hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 886HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 890HRESULT SetThumbnailClip(IntPtr hwnd, NativeMethods.RefRECT prcClip); 906new void AddTab(IntPtr hwnd); 907new void DeleteTab(IntPtr hwnd); 908new void ActivateTab(IntPtr hwnd); 909new void SetActiveAlt(IntPtr hwnd); 912new void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 916[PreserveSig] new HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 917[PreserveSig] new HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 918[PreserveSig] new HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 919[PreserveSig] new HRESULT UnregisterTab(IntPtr hwndTab); 920[PreserveSig] new HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 921[PreserveSig] new HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 922[PreserveSig] new HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 923[PreserveSig] new HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 924[PreserveSig] new HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 925[PreserveSig] new HRESULT SetOverlayIcon(IntPtr hwnd, NativeMethods.IconHandle hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 926[PreserveSig] new HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 927[PreserveSig] new HRESULT SetThumbnailClip(IntPtr hwnd, NativeMethods.RefRECT prcClip); 932HRESULT SetTabProperties(IntPtr hwndTab, STPF stpFlags); 955HRESULT hr = NativeMethods2.SHGetFolderPathEx(ref knownFolder, 0, IntPtr.Zero, pathBuilder, (uint)pathBuilder.Capacity); 1015internal static extern HRESULT SHGetFolderPathEx([In] ref Guid rfid, KF_FLAG dwFlags, [In, Optional] IntPtr hToken, [Out, MarshalAs(UnmanagedType.LPWStr)] StringBuilder pszPath, uint cchPath);
MS\Internal\Controls\ActiveXContainer.cs (6)
94IntPtr UnsafeNativeMethods.IOleInPlaceFrame.GetWindow() 156int UnsafeNativeMethods.IOleInPlaceFrame.InsertMenus(IntPtr hmenuShared, NativeMethods.tagOleMenuGroupWidths lpMenuWidths) 161int UnsafeNativeMethods.IOleInPlaceFrame.SetMenu(IntPtr hmenuShared, IntPtr holemenu, IntPtr hwndActiveObject) 166int UnsafeNativeMethods.IOleInPlaceFrame.RemoveMenus(IntPtr hmenuShared)
MS\Internal\Controls\ActiveXHelper.cs (4)
86IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 87if (hDC != IntPtr.Zero) 105IntPtr hDC = UnsafeNativeMethods.GetDC(NativeMethods.NullHandleRef); 106if (hDC != IntPtr.Zero)
MS\Internal\Controls\ActiveXSite.cs (4)
168IntPtr hwnd; 173if (hwnd != IntPtr.Zero) 205IntPtr UnsafeNativeMethods.IOleInPlaceSite.GetWindow() 261lpFrameInfo.hAccel = IntPtr.Zero;
MS\Internal\Controls\EnumUnknown.cs (6)
37unsafe int UnsafeNativeMethods.IEnumUnknown.Next(int celt, IntPtr rgelt, IntPtr pceltFetched) 39if (pceltFetched != IntPtr.Zero) 59rgelt = (IntPtr)((long)rgelt + (long)sizeof(IntPtr)); 65if (pceltFetched != IntPtr.Zero)
MS\Internal\Documents\ColumnResult.cs (1)
276private readonly IntPtr _columnHandle;
MS\Internal\Documents\DocumentViewerHelper.cs (2)
283IntPtr hwnd = (hwndSource != null) ? hwndSource.Handle : IntPtr.Zero;
MS\Internal\Interop\IndexingFilter.cs (10)
550void GetText([In, Out] ref uint pcwcBuffer, [In] IntPtr pBuffer); 556IntPtr GetValue(); 564IntPtr BindRegion([In] FILTERREGION origPos, [In] ref Guid riid); 667void Read(IntPtr bufferBase, int sizeInBytes, IntPtr refToNumBytesRead); 673void Write(IntPtr bufferBase, int sizeInBytes, IntPtr refToNumBytesWritten); 680void Seek(long offset, int origin, IntPtr refToNewOffsetNullAllowed); 693IntPtr refToNumBytesRead, 694IntPtr refToNumBytesWritten);
MS\Internal\IO\Packaging\EncryptedPackageFilter.cs (3)
80public void GetText(ref uint bufCharacterCount, IntPtr pBuffer) 90public IntPtr GetValue() 101public IntPtr BindRegion([In] FILTERREGION origPos, [In] ref Guid riid)
MS\Internal\IO\Packaging\indexingfiltermarshaler.cs (12)
90internal static void MarshalStringToPtr(string s, ref uint bufCharacterCount, IntPtr p) 176internal static IntPtr MarshalPropVariant(Object obj) 178IntPtr pszVal = IntPtr.Zero; 179IntPtr pNative = IntPtr.Zero; 215Invariant.Assert(pNative != IntPtr.Zero); 222if (pszVal != IntPtr.Zero) 227if (pNative != IntPtr.Zero) 295public void GetText(ref uint bufCharacterCount, IntPtr pBuffer) 310public IntPtr GetValue() 323public IntPtr BindRegion(FILTERREGION origPos, ref Guid riid)
MS\Internal\IO\Packaging\ManagedIStream.cs (8)
41void IStream.Read(Byte[] buffer, Int32 bufferSize, IntPtr bytesReadPtr) 44if (bytesReadPtr != IntPtr.Zero) 59void IStream.Seek(Int64 offset, Int32 origin, IntPtr newPositionPtr) 83if (newPositionPtr != IntPtr.Zero) 143void IStream.Write(Byte[] buffer, Int32 bufferSize, IntPtr bytesWrittenPtr) 146if (bytesWrittenPtr != IntPtr.Zero) 173void IStream.CopyTo(IStream targetStream, Int64 bufferSize, IntPtr buffer, IntPtr bytesWrittenPtr)
MS\Internal\IO\Packaging\PackageFilter.cs (3)
222public void GetText(ref uint bufferCharacterCount, IntPtr pBuffer) 237public IntPtr GetValue() 256public IntPtr BindRegion(FILTERREGION origPos, ref Guid riid)
MS\Internal\IO\Packaging\UnsafeIndexingFilterStream.cs (2)
94IntPtr pBytesRead = new IntPtr(&bytesRead); 135IntPtr positionAddress = new IntPtr(&position);
MS\Internal\IO\Packaging\XpsFilter.cs (4)
100void IFilter.GetText(ref uint bufCharacterCount, IntPtr pBuffer) 109if (pBuffer == IntPtr.Zero) 271IntPtr IFilter.GetValue() 288IntPtr IFilter.BindRegion([In] FILTERREGION origPos, [In] ref Guid riid)
MS\Internal\Printing\NativeMethods.cs (36)
29public IntPtr hwndOwner = IntPtr.Zero; 30public IntPtr hDevMode = IntPtr.Zero; 31public IntPtr hDevNames = IntPtr.Zero; 32public IntPtr hDC = IntPtr.Zero; 38public IntPtr lpPageRanges = IntPtr.Zero; 42public IntPtr hInstance = IntPtr.Zero; 43public IntPtr lpPrintTemplateName = IntPtr.Zero; 44public IntPtr lpCallback = IntPtr.Zero; 46public IntPtr lphPropertyPages = IntPtr.Zero; 55public IntPtr hwndOwner = IntPtr.Zero; 56public IntPtr hDevMode = IntPtr.Zero; 57public IntPtr hDevNames = IntPtr.Zero; 58public IntPtr hDC = IntPtr.Zero; 64public IntPtr lpPageRanges = IntPtr.Zero; 68public IntPtr hInstance = IntPtr.Zero; 69public IntPtr lpPrintTemplateName = IntPtr.Zero; 70public IntPtr lpCallback = IntPtr.Zero; 72public IntPtr lphPropertyPages = IntPtr.Zero;
MS\Internal\Printing\PrintDlgExMarshaler.cs (55)
39IntPtr owner, 45_unmanagedPrintDlgEx = IntPtr.Zero; 65internal IntPtr UnmanagedPrintDlgEx 87if (_unmanagedPrintDlgEx == IntPtr.Zero) 97IntPtr devModeHandle; 150if (_unmanagedPrintDlgEx != IntPtr.Zero) 158if (_ownerHandle == IntPtr.Zero) 187if (_unmanagedPrintDlgEx != IntPtr.Zero) 190_unmanagedPrintDlgEx = IntPtr.Zero; 220IntPtr unmanagedBuffer, 224out IntPtr devModeHandle 227IntPtr devNamesHandle = IntPtr.Zero; 228IntPtr pageRangePtr = IntPtr.Zero; 255(pageRangePtr != IntPtr.Zero)) 269if (devNamesHandle != IntPtr.Zero) 271IntPtr pDevNames = IntPtr.Zero; 282if (pDevNames != IntPtr.Zero) 354IntPtr devModeHandle, 364IntPtr pDevMode = IntPtr.Zero; 375if (pDevMode != IntPtr.Zero) 405IntPtr unmanagedBuffer 438IntPtr 441IntPtr unmanagedBuffer = IntPtr.Zero; 506pdex.lpPageRanges = IntPtr.Zero; 585pdex.lpPageRanges = IntPtr.Zero; 615if (unmanagedBuffer != IntPtr.Zero) 618unmanagedBuffer = IntPtr.Zero; 638IntPtr unmanagedBuffer 641if (unmanagedBuffer == IntPtr.Zero) 646IntPtr devModeHandle = IntPtr.Zero; 647IntPtr devNamesHandle = IntPtr.Zero; 648IntPtr pageRangePtr = IntPtr.Zero; 668if (devModeHandle != IntPtr.Zero) 673if (devNamesHandle != IntPtr.Zero) 678if (pageRangePtr != IntPtr.Zero) 694return IntPtr.Size == sizeof(long); 709IntPtr 714IntPtr hDevNames = IntPtr.Zero; 747IntPtr offsetName = 748checked((IntPtr)((long)hDevNames + (long)baseOffset)); 749IntPtr offsetNull = 750checked((IntPtr)((long)offsetName + (printer.Length * Marshal.SystemDefaultCharSize))); 792IntPtr 815IntPtr hDevMode = Marshal.AllocHGlobal(devModeData.Length); 829IntPtr _unmanagedPrintDlgEx; 832IntPtr _ownerHandle;
MS\Internal\Printing\UnsafeNativeMethods.cs (6)
18IntPtr pdex 25IntPtr 27IntPtr hMem 34IntPtr 36IntPtr hMem 45IntPtr hMem
MS\Internal\Printing\Win32PrintDialog.cs (3)
57IntPtr owner = IntPtr.Zero; 118if (owner == IntPtr.Zero)
MS\Internal\PtsHost\BaseParaClient.cs (4)
38_paraHandle = IntPtr.Zero; 61internal void Arrange(IntPtr pfspara, PTS.FSRECT rcPara, int dvrTopSpace, uint fswdirParent) 64Debug.Assert(_paraHandle == IntPtr.Zero || _paraHandle == pfspara); 252protected IntPtr _paraHandle;
MS\Internal\PtsHost\BaseParagraph.cs (1)
131out IntPtr pfsparaclient);
MS\Internal\PtsHost\CellParaClient.cs (17)
117if(_paraHandle != IntPtr.Zero) 143internal void FormatCellFinite(Size subpageSize, IntPtr breakRecordIn, bool isEmptyOk, uint fswdir, 145out PTS.FSFMTR fsfmtr, out int dvrUsed, out IntPtr breakRecordOut) 147IntPtr pfspara; 149IntPtr pmcsclientOut; 154if(CellParagraph.StructuralCache.DtrList != null && breakRecordIn != IntPtr.Zero) 173bool suppressTopSpace = (breakRecordIn != IntPtr.Zero) ? true : false; 177IntPtr.Zero, 194if (pmcsclientOut != IntPtr.Zero) 200pmcsclientOut = IntPtr.Zero; 214IntPtr pfspara; 216IntPtr pmcsclientOut; 244if (pmcsclientOut != IntPtr.Zero) 250pmcsclientOut = IntPtr.Zero; 266IntPtr pmcsclientOut; 291if (pmcsclientOut != IntPtr.Zero) 297pmcsclientOut = IntPtr.Zero;
MS\Internal\PtsHost\CellParagraph.cs (10)
53IntPtr pfsbrkcellIn, // IN: not NULL if cell broken from previous page/column 54IntPtr pfsFtnRejector, // IN: 59out IntPtr ppfscell, // OUT: cell object 60out IntPtr pfsbrkcellOut, // OUT: break if cell does not fit in dvrAvailable 94ppfscell = IntPtr.Zero; 103if (pfsbrkcellOut != IntPtr.Zero) 106pfsbrkcellOut = IntPtr.Zero; 109ppfscell = IntPtr.Zero; 132out IntPtr ppfscell, // OUT: cell object 185IntPtr subpageBreakRecord, // not NULL if cell broken from previous page/column
MS\Internal\PtsHost\ContainerParagraph.cs (39)
74out IntPtr firstParaName) // OUT: name of the first paragraph in segment 159firstParaName = (_firstChild != null) ? _firstChild.Handle : IntPtr.Zero; 180out IntPtr nextParaName) // OUT: name of the next paragraph in section 255nextParaName = IntPtr.Zero; 281out IntPtr nmpBeforeChange) // OUT: name of paragraph before the change if !fChangeFirst 314nmpBeforeChange = IntPtr.Zero; 425out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 440IntPtr pbrkrecIn, // IN: break record---use if !IntPtr.Zero 443IntPtr footnoteRejector, // IN: 444IntPtr geometry, // IN: pointer to geometry 454out IntPtr pfspara, // OUT: pointer to the para data 455out IntPtr pbrkrecOut, // OUT: pointer to the para break record 458out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 474if (mcs != null && pbrkrecIn != IntPtr.Zero) 507if (pbrkrecIn == IntPtr.Zero) 528(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, 560if (pmcsclientOut != IntPtr.Zero) 564pmcsclientOut = IntPtr.Zero; 575pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 601paraClient.SetChunkInfo(pbrkrecIn == IntPtr.Zero, pbrkrecOut == IntPtr.Zero); 610IntPtr geometry, // IN: pointer to geometry 620out IntPtr pfspara, // OUT: pointer to the para data 623out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 671(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, fInterruptable, 690if (pmcsclientOut != IntPtr.Zero) 694pmcsclientOut = IntPtr.Zero; 699pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 715Debug.Assert(pmcsclientOut == IntPtr.Zero); 716pfspara = IntPtr.Zero; 738IntPtr pfspara, // IN: pointer to the para data 741IntPtr pfsgeom, // IN: pointer to geometry 753out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 801(mcsContainer != null) ? mcsContainer.Handle : IntPtr.Zero, fskclearIn, fInterruptable, 820if (pmcsclientOut != IntPtr.Zero) 824pmcsclientOut = IntPtr.Zero; 829pmcsclientOut = (mcsNew != null) ? mcsNew.Handle : IntPtr.Zero; 845Debug.Assert(pmcsclientOut == IntPtr.Zero); 846pfspara = IntPtr.Zero;
MS\Internal\PtsHost\FigureParaClient.cs (5)
40if (SubpageHandle != IntPtr.Zero) 43SubpageHandle = IntPtr.Zero; 710internal ReadOnlyCollection<ParagraphResult> GetParagraphResultsFromColumn(IntPtr pfstrack, Vector parentOffset, out bool hasTextContent) 722internal TextContentRange GetTextContentRangeFromColumn(IntPtr pfstrack) 755internal IntPtr SubpageHandle
MS\Internal\PtsHost\FigureParagraph.cs (22)
83out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 121IntPtr pfsFigureContent; 126IntPtr pmcsclientOut; 169IntPtr brParaOut; 172CreateSubpageFiniteHelper(PtsContext, IntPtr.Zero, PTS.False, _mainTextSegment.Handle, IntPtr.Zero, PTS.False, PTS.True, 178if(brParaOut != IntPtr.Zero) 195if (pfsFigureContent != IntPtr.Zero) 199if (pmcsclientOut != IntPtr.Zero) 204pmcsclientOut = IntPtr.Zero; 212IntPtr brParaOut; 215CreateSubpageFiniteHelper(PtsContext, IntPtr.Zero, PTS.False, _mainTextSegment.Handle, IntPtr.Zero, PTS.False, PTS.True, 221if(brParaOut != IntPtr.Zero) 239if (pmcsclientOut != IntPtr.Zero) 244pmcsclientOut = IntPtr.Zero; 475IntPtr brParaIn, // IN: break record---use if !NULL 477IntPtr nSeg, // IN: name of the segment to start from-if pointer to break rec is NULL 478IntPtr pFtnRej, // IN: pftnrej 489out IntPtr pSubPage, // OUT: ptr to the subpage 490out IntPtr brParaOut, // OUT: break record of the subpage 493out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom
MS\Internal\PtsHost\FloaterBaseParagraph.cs (8)
78out IntPtr paraClientHandle); // OUT: opaque to PTS paragraph client 121IntPtr pbrkrecIn, // IN: break record---use if !IntPtr.Zero 123IntPtr footnoteRejector, // IN: 133out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 134out IntPtr pbrkrecOut, // OUT: pointer to the floater content break record 152out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 169IntPtr pfsFloatContent, // IN: floater content 183out IntPtr pmcsclientOut); // OUT: MCSCLIENT that floater will return to track
MS\Internal\PtsHost\FloaterParaClient.cs (3)
719internal ReadOnlyCollection<ParagraphResult> GetParagraphResultsFromColumn(IntPtr pfstrack, Vector parentOffset, out bool hasTextContent) 731internal TextContentRange GetTextContentRangeFromColumn(IntPtr pfstrack) 764internal IntPtr SubpageHandle
MS\Internal\PtsHost\FloaterParagraph.cs (46)
78out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 146IntPtr pbrkrecIn, // IN: break record---use if !IntPtr.Zero 148IntPtr footnoteRejector, // IN: 158out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 159out IntPtr pbrkrecOut, // OUT: pointer to the floater content break record 173IntPtr pmcsclientOut; 195pbrkrecOut = IntPtr.Zero; 196pfsFloatContent = IntPtr.Zero; 250Debug.Assert(pmcsclientOut == IntPtr.Zero); 269if (pfsFloatContent != IntPtr.Zero) 272pfsFloatContent = IntPtr.Zero; 274if (pbrkrecOut != IntPtr.Zero) 277pbrkrecOut = IntPtr.Zero; 279if (pmcsclientOut != IntPtr.Zero) 284pmcsclientOut = IntPtr.Zero; 304if (pmcsclientOut != IntPtr.Zero) 309pmcsclientOut = IntPtr.Zero; 337if (pfsFloatContent != IntPtr.Zero) 340pfsFloatContent = IntPtr.Zero; 342if (pbrkrecOut != IntPtr.Zero) 345pbrkrecOut = IntPtr.Zero; 373out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 388IntPtr pmcsclientOut; 405pfsFloatContent = IntPtr.Zero; 447if (pfsFloatContent != IntPtr.Zero) 451if (pmcsclientOut != IntPtr.Zero) 456pmcsclientOut = IntPtr.Zero; 474if (pmcsclientOut != IntPtr.Zero) 479pmcsclientOut = IntPtr.Zero; 495if (pfsFloatContent != IntPtr.Zero) 500Debug.Assert(pmcsclientOut == IntPtr.Zero); 502pfsFloatContent = IntPtr.Zero; 519Debug.Assert(pmcsclientOut == IntPtr.Zero); 522pfsFloatContent = IntPtr.Zero; 540IntPtr pfsFloatContent, // IN: floater content (in UIElementParagraph, this is an alias to the paraClient) 561out IntPtr pmcsclientOut) // OUT: MCSCLIENT that floater will return to track 570pmcsclientOut = IntPtr.Zero; 680IntPtr brParaIn, // IN: break record---use if !NULL 682IntPtr nSeg, // IN: name of the segment to start from-if pointer to break rec is NULL 683IntPtr pFtnRej, // IN: pftnrej 696out IntPtr pSubPage, // OUT: ptr to the subpage 697out IntPtr brParaOut, // OUT: break record of the subpage 700out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom 729IntPtr nSeg, // IN: name of the segment to start from 739out IntPtr ppSubPage, // OUT: ptr to the subpage 742out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom
MS\Internal\PtsHost\FlowDocumentPage.cs (4)
422if (_ptsPage.PageHandle == IntPtr.Zero) 491if (columnDesc.pfstrack != IntPtr.Zero) 529internal TextContentRange GetTextContentRangeFromColumn(IntPtr pfstrack) 564internal ReadOnlyCollection<ParagraphResult> GetParagraphResultsFromColumn(IntPtr pfstrack, Vector parentOffset, out bool hasTextContent)
MS\Internal\PtsHost\ListParagraph.cs (1)
35out IntPtr paraClientHandle)
MS\Internal\PtsHost\PageBreakRecord.cs (5)
32internal PageBreakRecord(PtsContext ptsContext, IntPtr br, int pageNumber) 35Invariant.Assert(br != IntPtr.Zero, "Invalid break record object."); 91internal IntPtr BreakRecord 150_br = IntPtr.Zero; 168private IntPtr _br;
MS\Internal\PtsHost\Pts.cs (637)
652internal IntPtr pfnNewPtr; 653internal IntPtr pfnDisposePtr; 654internal IntPtr pfnReallocPtr; 705internal IntPtr pfsbreakreclineclient; 706internal IntPtr pfslineclient; 713internal IntPtr ptsLinePenaltyInfo; 743internal IntPtr nmp; 746private IntPtr pbrLineIn; 775internal IntPtr pfnGetSectionHorizMargins; 776internal IntPtr pfnFPerformColumnBalancing; 777internal IntPtr pfnCalculateColumnBalancingApproximateHeight; 778internal IntPtr pfnCalculateColumnBalancingStep; 779internal IntPtr pfnGetColumnSectionBreak; 780internal IntPtr pfnFSuppressKeepWithNextAtTopOfPage; 781internal IntPtr pfnFSuppressKeepTogetherAtTopOfPage; 782internal IntPtr pfnFAllowSpaceAfterOverhang; 783internal IntPtr pfnFormatLineWord; 784internal IntPtr pfnGetSuppressedTopSpace; 785internal IntPtr pfnChangeSplatLineHeight; 786internal IntPtr pfnGetDvrAdvanceWord; 787internal IntPtr pfnGetMinDvrAdvance; 788internal IntPtr pfnGetDurTooNarrowForFigure; 789internal IntPtr pfnResolveOverlap; 790internal IntPtr pfnGetOffsetForFlowAroundAndBBox; 791internal IntPtr pfnGetClientGeometryHandle; 792internal IntPtr pfnDuplicateClientGeometryHandle; 793internal IntPtr pfnDestroyClientGeometryHandle; 794internal IntPtr pfnObstacleAddNotification; 795internal IntPtr pfnGetFigureObstaclesForRestart; 796internal IntPtr pfnRepositionFigure; 797internal IntPtr pfnFStopBeforeLr; 798internal IntPtr pfnFStopBeforeLine; 799internal IntPtr pfnFIgnoreCollision; 800internal IntPtr pfnGetNumberOfLinesForColumnBalancing; 801internal IntPtr pfnFCancelPageBreakBefore; 802internal IntPtr pfnChangeVrTopLineForFigure; 803internal IntPtr pfnFApplyWidowOrphanControlInFootnoteResolution; 839internal IntPtr pInstalledObjects; // array of installed objects 840internal IntPtr pfsclient; // client data for this context 841internal IntPtr ptsPenaltyModule; // Penalty module 1000internal IntPtr nmpFigure; 1016internal IntPtr nmpFigure; 1085internal IntPtr fsnmFloater; 1087internal IntPtr pfsFloaterContent; 1159internal IntPtr nmftn; // name of footnote 1220internal IntPtr pfnGetFootnoteInfoWord; 1361internal IntPtr pfslineclient; 1363internal IntPtr pfsbreakreclineclient; // break record needed to format this element 1384internal IntPtr pline; // to be used for QueryLineElements 1398internal IntPtr pfslineclient; 1399internal IntPtr pfsbreakreclineclient; // break record needed to format this line 1419internal IntPtr pfspara; 1420internal IntPtr pfsparaclient; 1421internal IntPtr nmp; 1433internal IntPtr pdcclient; // ptr to drop cap created by client 1503internal IntPtr pfspara; 1504internal IntPtr pfsparaclient; 1505internal IntPtr nmp; 1520internal IntPtr nms; 1524internal IntPtr pfstrack; 1530internal IntPtr nms; 1537internal IntPtr nms; 1593internal IntPtr pfscompcol; 1601internal IntPtr pfsendnotecol; 1643internal IntPtr nms; 1649internal IntPtr pfssection; 1664internal IntPtr pfsfootnotecol; 1748internal IntPtr pfnGetCellFootnoteInfo; 1749internal IntPtr pfnGetCellFootnoteInfoWord; 1834internal IntPtr pfnGetDvrUsedForFloatTable; 1839internal IntPtr pfnGetTablePropertiesWord; 1840internal IntPtr pfnGetRowPropertiesWord; 1841internal IntPtr pfnGetRowWidthWord; 1842internal IntPtr pfnGetNumberFiguresForTableRow; 1843internal IntPtr pfnGetFiguresForTableRow; 1844internal IntPtr pfnFStopBeforeTableRowLr; 1845internal IntPtr pfnFIgnoreCollisionForTableRow; 1846internal IntPtr pfnChangeRowHeightRestriction; 1847internal IntPtr pfnNotifyRowPosition; 1848internal IntPtr pfnNotifyRowBorderAbove; 1849internal IntPtr pfnNotifyTableBreakRec; 1865internal IntPtr fsnmTable; 1873internal IntPtr pfstableProper; 1888internal IntPtr fsnmRow; 1889internal IntPtr pfstablerow; 1924internal IntPtr pfscontext; 1925internal IntPtr pfsclient; 1971IntPtr pfsclient, // IN: client opaque data 1972IntPtr pfsparaclientFigure, // IN: 1973IntPtr nmpFigure, // IN: figure's name 1987IntPtr pfsclient, // IN: client opaque data 1988IntPtr pfsparaclientFigure, // IN: 1989IntPtr nmpFigure, // IN: figure's name 1999IntPtr pfsclient, // IN: client opaque data 2000IntPtr pfsparaclientFigure, // IN: 2001IntPtr nmpFigure, // IN: figure's name 2018IntPtr pfsclient, // IN: client opaque data 2019IntPtr nms, // IN: name of first section on the page 2022IntPtr pfsclient, // IN: client opaque data 2023IntPtr nms, // IN: name of section on page 2030IntPtr pfsclient, // IN: client opaque data 2031IntPtr nmsCur, // IN: name of current section 2033out IntPtr nmsNext); // OUT: name of the next section 2035IntPtr pfsclient, // IN: client opaque data 2036IntPtr nms, // IN: name of section 2044IntPtr pfsclient, // IN: client opaque data 2045IntPtr* rgnms, // IN: array of the section names on the page 2052IntPtr pfsclient, // IN: client opaque data 2053IntPtr nmsSection, // IN: name of section 2054out IntPtr nmSegment); // OUT: name of the main text segment for this section 2056IntPtr pfsclient, // IN: client opaque data 2057IntPtr nms, // IN: name of section 2058IntPtr pfsbrpagePrelim, // IN: ptr to page break record of main page 2065out IntPtr nmsHeader); // OUT: name of header segment 2067IntPtr pfsclient, // IN: client opaque data 2068IntPtr nms, // IN: name of section 2069IntPtr pfsbrpagePrelim, // IN: ptr to page break record of main page 2076out IntPtr nmsFooter); // OUT: name of footer segment 2078IntPtr pfsclient, // IN: client opaque data 2079IntPtr nms, // IN: name of the segment 2082IntPtr pfsclient, // IN: client opaque data 2083IntPtr nms, // IN: name of section 2089IntPtr pfsclient, // IN: client opaque data 2090IntPtr nms, // IN: name of section 2092IntPtr* rgnmSeg, // OUT: array of segment names for segment-defined areas 2096IntPtr pfsclient, // IN: client opaque data 2097IntPtr nms, // IN: name of section 2103IntPtr pfsclient, // IN: client opaque data 2104IntPtr nms, // IN: name of segment 2106out IntPtr nmp); // OUT: name of the first paragraph in segment 2108IntPtr pfsclient, // IN: client opaque data 2109IntPtr nms, // IN: name of segment 2110IntPtr nmpCur, // IN: name of current para 2112out IntPtr nmpNext); // OUT: name of the next paragraph in section 2114IntPtr pfsclient, // IN: client opaque data 2115IntPtr nms, // IN: name of segment 2118out IntPtr nmpBeforeChange); // OUT: name of paragraph before the change if !fChangeFirst 2120IntPtr pfsclient, // IN: client opaque data 2121IntPtr nmp, // IN: name of the paragraph 2125IntPtr pfsclient, // IN: client opaque data 2126IntPtr nmp, // IN: name of paragraph 2129IntPtr pfsclient, // IN: client opaque data 2130IntPtr nmp, // IN: name of paragraph 2131out IntPtr pfsparaclient); // OUT: opaque to PTS paragraph client 2133IntPtr pfsclient, // IN: client opaque data 2134IntPtr pfsparaclientOld, // IN: opaque to PTS old paragraph client 2135IntPtr pfsparaclientNew); // IN: opaque to PTS new paragraph client 2137IntPtr pfsclient, // IN: client opaque data 2138IntPtr pfsparaclient); // IN: opaque to PTS paragraph client 2140IntPtr pfsclient, // IN: client opaque data 2141IntPtr pfsparaclient, // IN: opaque to PTS paragraph client 2142IntPtr nmp, // IN: name of paragraph 2146IntPtr pfsclient, // IN: client opaque data 2147IntPtr nmsSection, // IN: name of section 2148out IntPtr nmsEndnoteSeparator, // OUT: name of the endnote separator segment 2149out IntPtr nmEndnoteContSeparator, // OUT: name of endnote cont separator segment 2150out IntPtr nmsEndnoteContNotice); // OUT: name of the endnote cont notice segment 2152IntPtr pfsclient, // IN: client opaque data 2153IntPtr nmsSection, // IN: name of section 2155out IntPtr nmsEndnotes); // OUT: name of endnote segment 2157IntPtr pfsclient, // IN: client opaque data 2158IntPtr nms, // IN: name of section 2161IntPtr pfsclient, // IN: client opaque data 2162IntPtr nms, // IN: name of section 2168IntPtr pfsclient, // IN: client opaque data 2169IntPtr nmsSection, // IN: name of section 2170out IntPtr nmsFtnSeparator, // OUT: name of the footnote separator segment 2171out IntPtr nmsFtnContSeparator, // OUT: name of the ftn cont separator segment 2172out IntPtr nmsFtnContNotice); // OUT: name of the footnote cont notice segment 2174IntPtr pfsclient, // IN: client opaque data 2175IntPtr nms, // IN: name of section 2178IntPtr pfsclient, // IN: client opaque data 2179IntPtr nms, // IN: name of section 2182IntPtr pfsclient, // IN: client opaque data 2183IntPtr nms, // IN: name of section 2189IntPtr pfsclient, // IN: client opaque data 2190IntPtr nmftn, // IN: name of footnote 2191out IntPtr nmsFootnote); // OUT: name of footnote segment 2193IntPtr pfsclient, // IN: client opaque data 2195IntPtr* rgProposedPresentationOrder, // IN: footnotes in proposed pres order 2196IntPtr* rgProposedRejectionOrder, // IN: footnotes in proposed reject order 2198IntPtr* rgFinalPresentationOrder, // OUT: footnotes in final pres order 2200IntPtr* rgFinalRejectionOrder); // OUT: footnotes in final reject order 2202IntPtr pfsclient, // IN: client opaque data 2203IntPtr nmftn, // IN: name of footnote 2212IntPtr pfsclient, // IN: client opaque data 2213IntPtr pmcsclientIn, // IN: margin collapsing state 2214out IntPtr pmcsclientNew); // OUT: duplicated margin collapsing state 2216IntPtr pfsclient, // IN: client opaque data 2217IntPtr pmcsclient); // IN: margin collapsing state to destroy 2219IntPtr pfsclient, // IN: client opaque data 2220IntPtr pmcsclient1, // IN: first margin collapsing state to compare 2221IntPtr pmcsclient2, // IN: second margin collapsing state to compare 2224IntPtr pfsclient, // IN: client opaque data 2225IntPtr pfsparaclient, // IN: 2226IntPtr nmp, // IN: name of paragraph 2228IntPtr pmcsclient, // IN: pointer to the input margin collapsing state 2232IntPtr pfsclient, // IN: client opaque data 2234IntPtr pobjectinfo); // OUT: initialization information for the specified object 2239IntPtr pfsclient, // IN: client opaque data 2240IntPtr pfsparaclient, // IN: opaque to PTS paragraph client 2241IntPtr nmp, // IN: name of paragraph 2244IntPtr pfsbreakreclineclient, // IN: break record for the first line 2249out IntPtr ppfsparabreakingsession, // OUT: paragraph breaking session 2252IntPtr pfsclient, // IN: client opaque data 2253IntPtr pfsparabreakingsession); // IN: session to destroy 2255IntPtr pfsclient, // IN: client opaque data 2256IntPtr nmp, // IN: name of paragraph 2260IntPtr pfsclient, // IN: client opaque data 2261IntPtr nmp, // IN: name of paragraph 2266IntPtr pfsclient, // IN: client opaque data 2267IntPtr nmp, // IN: name of paragraph 2271IntPtr* rgnmftn, // OUT: array of footnote names in the range 2275IntPtr pfsclient, // IN: client opaque data 2276IntPtr pfsparaclient, // IN: 2277IntPtr nmp, // IN: name of paragraph 2281out IntPtr pfsdropc, // OUT: pointer to drop cap created by client 2289IntPtr pfsclient, // IN: client opaque data 2290IntPtr pfsdropc, // IN: pointer to drop cap 2291IntPtr nmp, // IN: para name 2301IntPtr pfsclient, // IN: client opaque data 2302IntPtr pfsdropc); // IN: pointer to drop cap created by client 2304IntPtr pfsclient, // IN: client opaque data 2305IntPtr pfsparaclient, // IN: 2306IntPtr nmp, // IN: name of paragraph 2309IntPtr pfslineLast, // IN: last formatted line 2311out IntPtr pmcsclientOut); // OUT: margin collapsing state at bottom of text 2313IntPtr pfsclient, // IN: client opaque data 2314IntPtr pfsparaclient, // IN: 2315IntPtr nmp, // IN: name of paragraph 2318IntPtr pbrlineIn, // IN: client's line break record 2331out IntPtr pfsline, // OUT: pointer to line created by client 2333out IntPtr ppbrlineOut, // OUT: client's line break record 2343IntPtr pfsclient, // IN: client opaque data 2344IntPtr pfsparaclient, // IN: 2345IntPtr nmp, // IN: name of paragraph 2348IntPtr pbrlineIn, // IN: client's line break record 2361out IntPtr pfsline, // OUT: pointer to line created by client 2363out IntPtr ppbrlineOut, // OUT: client's line break record 2371IntPtr pfsclient, // IN: client opaque data 2372IntPtr pfsparabreakingsession, // IN: current session 2374IntPtr pbrlineIn, // IN: client's line break record 2384IntPtr lineVariantRestriction, // IN: line variant restriction 2391IntPtr pfsclient, // IN: client opaque data 2392IntPtr pfsparaclient, // IN: 2393IntPtr nmp, // IN: name of paragraph 2396IntPtr pbrlineIn, // IN: client's line break record to start formatting 2410out IntPtr pfsline, // OUT: pointer to line created by client 2411out IntPtr ppbrlineOut, // OUT: client's line break record 2421IntPtr pfsclient, // IN: client opaque data 2422IntPtr pfsline); // IN: pointer to line created by client 2424IntPtr pfsclient, // IN: client opaque data 2425IntPtr pbrlineIn, // IN: client's forced break record to duplicate 2426out IntPtr pbrlineDup); // OUT: duplicated client's forced break record 2428IntPtr pfsclient, // IN: client opaque data 2429IntPtr pbrlineIn); // IN: client's forced break record to duplicate 2431IntPtr pfsclient, // IN: client opaque data 2437IntPtr pfsclient, // IN: client opaque data 2438IntPtr pfsparaclient, // IN: 2439IntPtr pfsline, // IN: pointer to line created by client 2443IntPtr pfsclient, // IN: client opaque data 2444IntPtr pfsparaclient, // IN: 2445IntPtr nmp, // IN: name of paragraph 2450IntPtr pfsclient, // IN: client opaque data 2451IntPtr nmp, // IN: name of paragraph 2456IntPtr pfsclient, // IN: client opaque data 2457IntPtr nmp, // IN: name of paragraph 2460IntPtr pfsclient, // IN: client opaque data 2461IntPtr pfsparaclient, // IN: 2462IntPtr nmp, // IN: name of paragraph 2467IntPtr pfsclient, // IN: client opaque data 2468IntPtr pfsparaclient, // IN: 2469IntPtr nmp, // IN: name of paragraph 2486out IntPtr pmcsclientAfterPara, // OUT: margin collapsing state after parag. 2492IntPtr pfsclient, // IN: client opaque data 2493IntPtr pfsparaclient, // IN: 2494IntPtr nmp, // IN: name of paragraph 2510IntPtr pmcsclientAfterPara, // IN: margin collapsing state after paragraph 2516IntPtr pfsclient, // IN: client opaque data 2520IntPtr pfsclient, // IN: client opaque data 2521IntPtr nmp, // IN: name of paragraph 2525IntPtr pfsclient, // IN: client opaque data 2526IntPtr nmp, // IN: name of paragraph 2529IntPtr* rgnmpObjects, // OUT: array of object names 2536IntPtr pfsclient, // IN: client opaque data 2537IntPtr pfsline, // IN: pointer to line created by client 2538IntPtr nmp, // IN: name of paragraph 2545IntPtr pfsclient, // IN: client opaque data 2546IntPtr pfsline, // IN: pointer to line created by client 2547IntPtr nmp, // IN: name of paragraph 2553IntPtr* rgnmpObjects, // OUT: array of floater names 2559IntPtr pfsclient, // IN: client opaque data 2560IntPtr nmp, // IN: name of text paragraph 2561IntPtr nmpAttachedObject, // IN: name of object 2565IntPtr pfsclient, // IN: client opaque data 2566IntPtr pfsparaclient, // IN: 2567IntPtr pfsparaclientFigure, // IN: 2568IntPtr pfsline, // IN: pointer to line created by client 2569IntPtr nmpFigure, // IN: figure's name 2571IntPtr pfsFmtLineIn, // IN: data needed to reformat the line 2577IntPtr pfsclient, // IN: client opaque data 2578IntPtr nmFloater, // IN: name of the floater 2582IntPtr pfsclient, // IN: client opaque data 2583IntPtr pfsparaclient, // IN: 2584IntPtr pfsbrkFloaterContentIn, // IN: break record---use if !NULL 2586IntPtr nmFloater, // IN: name of floater 2587IntPtr pftnrej, // IN: 2597out IntPtr pfsbrkFloatContentOut, // OUT: opaque for PTS pointer pointer to formatted content 2598out IntPtr pbrkrecpara, // OUT: pointer to the floater content break record 2605IntPtr pfsclient, // IN: client opaque data 2606IntPtr pfsparaclient, // IN: 2607IntPtr nmFloater, // IN: name of floater 2614out IntPtr pfsbrkFloatContentOut, // OUT: opaque for PTS pointer pointer to formatted content 2621IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2622IntPtr pfsparaclient, // IN: 2623IntPtr nmFloater, // IN: name of floater 2636IntPtr pfsparaclient, // IN: 2637IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2638IntPtr nmFloater, // IN: name of floater 2648IntPtr pfsFloaterContent); // IN: opaque for PTS pointer to floater content 2650IntPtr pfsFloaterContentOld, // IN: 2651IntPtr pfsFloaterContentNew, // IN: 2654IntPtr pfsFloaterContent); // IN: opaque for PTS pointer to floater content 2656IntPtr pfsclient, // IN: client context 2657IntPtr pfsbrkFloaterContent, // IN: pointer to break record 2658out IntPtr pfsbrkFloaterContentDup);// OUT pointer to duplicate break record 2660IntPtr pfsclient, // IN: client context 2661IntPtr pfsbrkFloaterContent); // IN: pointer to break record 2663IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2669IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2672IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2679IntPtr pfsFloaterContentOld, // IN: 2680IntPtr pfsFloaterContentNew); // IN: 2682IntPtr pfsclient, // IN: client context 2683IntPtr pfsparaclient, // IN: 2684IntPtr nmFloater, // IN: name of floater 2686IntPtr pmcsclientIn, // IN: input opaque to PTS MCSCLIENT 2687out IntPtr pmcsclientOut); // OUT: MCSCLIENT that floater will return to track 2689IntPtr pfsclient, // IN: client context 2690IntPtr pfsparaclient, // IN: 2691IntPtr nmFloater, // IN: name of floater 2693IntPtr pmcsclientIn, // IN: input opaque to PTS MCSCLIENT 2700IntPtr pfsclient, // IN: client opaque data 2701IntPtr pfsc, // IN: FS context 2702IntPtr pfscbkobj, // IN: callbacks (FSCBKOBJ) 2705out IntPtr pfssobjc); // OUT: object context 2707IntPtr pfssobjc); // IN: object context 2709IntPtr pfssobjc, // IN: object context 2710IntPtr pfsparaclient, // IN: 2711IntPtr pfsobjbrk, // IN: break record---use if !NULL 2713IntPtr nmp, // IN: name of paragraph---use if break record is NULL 2715IntPtr pftnrej, // IN: 2716IntPtr pfsgeom, // IN: pointer to geometry 2721IntPtr pmcsclientIn, // IN: input margin collapsing state 2728out IntPtr pfspara, // OUT: pointer to the para data 2729out IntPtr pbrkrecpara, // OUT: pointer to the para break record 2732out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2737IntPtr pfssobjc, // IN: object context 2738IntPtr pfsparaclient, // IN: 2739IntPtr nmp, // IN: name of paragraph 2741IntPtr pfsgeom, // IN: pointer to geometry 2747IntPtr pmcsclientIn, // IN: input margin collapsing state 2751out IntPtr pfspara, // OUT: pointer to the para data 2754out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2759IntPtr pfspara, // IN: pointer to the para data 2760IntPtr pfsparaclient, // IN: 2761IntPtr nmp, // IN: name of paragraph 2763IntPtr pfsgeom, // IN: pointer to geometry 2769IntPtr pmcsclientIn, // IN: input margin collapsing state 2775out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2780IntPtr pfspara, // IN: pointer to the para data 2781IntPtr pfsparaclient, // IN: 2782IntPtr pfsgeom, // IN: pointer to geometry 2786IntPtr pfsparaclientOld, // IN: 2787IntPtr pfsparaOld, // IN: pointer to the old para data 2788IntPtr pfsparaclientNew, // IN: 2789IntPtr pfsparaNew, // IN: pointer to the new para data 2794IntPtr pfspara); // IN: pointer to the para data 2796IntPtr pfspara); // IN: pointer to the para data 2798IntPtr pfssobjc, // IN: object context 2799IntPtr pfsbrkrecparaOrig, // IN: pointer to the para break record 2800out IntPtr pfsbrkrecparaDup); // OUT: pointer to the duplicate break record 2802IntPtr pfssobjc, // IN: object context 2803IntPtr pfsobjbrk); // OUT: pointer to the para break record 2805IntPtr pfspara, // IN: pointer to the para data 2811IntPtr pfspara, // IN: pointer to the para data 2814IntPtr pfspara, // IN: pointer to the para data 2828IntPtr pfspara, // IN: pointer to the para data 2829IntPtr pfsparaclient, // IN: 2830IntPtr pfsshift, // IN: pointer to the shift data 2834IntPtr pfsparaOld, // IN: pointer to the old para data 2835IntPtr pfsparaNew); // IN: pointer to the new para data 2840IntPtr pfsclient, // IN: 2841IntPtr nmTable, // IN: 2845IntPtr pfsclient, // IN: 2846IntPtr pfsparaclientTable, // IN: 2847IntPtr nmTable, // IN: 2852IntPtr pfsclient, // IN: 2853IntPtr pfsparaclientTable, // IN: 2854IntPtr nmTable, // IN: 2862IntPtr pfsclient, // IN: 2863IntPtr pfsparaclientTable, // IN: 2864IntPtr nmTable, // IN: 2866IntPtr pmcsclientIn, // IN: 2867out IntPtr ppmcsclientOut); // OUT: 2882IntPtr pfsclient, // IN: 2883IntPtr nmTable, // IN: 2886out IntPtr pnmFirstHeaderRow); // OUT: 2888IntPtr pfsclient, // IN: 2889IntPtr nmTable, // IN: 2890IntPtr nmHeaderRow, // IN: 2893out IntPtr pnmNextHeaderRow); // OUT: 2895IntPtr pfsclient, // IN: 2896IntPtr nmTable, // IN: 2899out IntPtr pnmFirstFooterRow); // OUT: 2901IntPtr pfsclient, // IN: 2902IntPtr nmTable, // IN: 2903IntPtr nmFooterRow, // IN: 2906out IntPtr pnmNextFooterRow); // OUT: 2908IntPtr pfsclient, // IN: 2909IntPtr nmTable, // IN: 2911out IntPtr pnmFirstRow); // OUT: 2913IntPtr pfsclient, // IN: 2914IntPtr nmTable, // IN: 2915IntPtr nmRow, // IN: 2917out IntPtr pnmNextRow); // OUT: 2919IntPtr pfsclient, // IN: 2920IntPtr nmTable, // IN: 2926IntPtr pfsclient, // IN: 2927IntPtr nmTable, // IN: 2930out IntPtr pnmRowBeforeChange); // OUT: 2932IntPtr pfsclient, // IN: 2933IntPtr nmTable, // IN: 2934IntPtr nmRow, // IN: 2938IntPtr pfsclient, // IN: 2939IntPtr nmRow, // IN: 2940IntPtr nmCell, // IN: 2944IntPtr pfsclient, // IN: 2945IntPtr nmTable, // IN: 2949IntPtr pfsclient, // IN: 2950IntPtr nmRow, // IN: 2954IntPtr pfsclient, // IN: 2955IntPtr nmRow, // IN: 2957IntPtr* rgnmCell, // IN/OUT: 2960IntPtr pfsclient, // IN: 2961IntPtr pfsparaclient, // IN: 2962IntPtr nmRow, // IN: 2966IntPtr pfsclient, // IN: 2967IntPtr nmRow, // IN: 2969IntPtr* rgnmCell, // IN: 2970IntPtr* rgpfscell, // IN: 2975IntPtr pfsclient, // IN: 2976IntPtr pfsparaclientTable, // IN: table's para client 2977IntPtr pfsbrkcell, // IN: not NULL if cell broken from previous page/column 2978IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 2979IntPtr pfsFtnRejector, // IN: 2985out IntPtr ppfscell, // OUT: cell object 2986out IntPtr pfsbrkcellOut, // OUT: break if cell does not fit in dvrAvailable 2989IntPtr pfsclient, // IN: 2990IntPtr pfsparaclientTable, // IN: table's para client 2991IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 2994out IntPtr ppfscell, // OUT: cell object 2998IntPtr pfscell, // IN/OUT: cell object 2999IntPtr pfsparaclientTable, // IN: table's para client 3000IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 3006IntPtr pfscellOld, 3007IntPtr pfscellNew, 3011IntPtr pfscell); // IN/OUT: cell object 3013IntPtr pfscell, // IN/OUT: cell object 3014IntPtr pfsparaclientTable, // IN: table's para client 3015IntPtr pfsbrkcell, // IN: not NULL if cell broken from previous page/column 3016IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 3021IntPtr pfsCell); // IN: 3023IntPtr pfsclient, // IN: 3024IntPtr pfsbrkcell, // IN: 3025out IntPtr ppfsbrkcellDup); // OUT: 3027IntPtr pfsclient, // IN: 3028IntPtr pfsbrkcell); // IN: 3030IntPtr pfscell, // IN: 3041IntPtr pfscell, // IN: 3046IntPtr pfscellOld, 3047IntPtr pfscellNew); 3068IntPtr pFloaterObjectInfo); // IN: pointer to floater object info 3074IntPtr pTableObjectInfo); // IN: pointer to floater object info 3081out IntPtr pInstalledObjects, // OUT: pointer to installed objects array 3086IntPtr pInstalledObjects); // IN: pointer to installed objects array 3094out IntPtr pfscontext); // OUT: pointer to the FS context 3098IntPtr pfscontext); // IN: pointer to the FS context 3111IntPtr pfscontext, // IN: ptr to FS context 3112IntPtr pfsBRPageStart, // IN: ptr to brk record of prev. page 3113IntPtr fsnmSectStart, // IN: name of the section to start from, if pointer to break rec is NULL 3115out IntPtr ppfsPageOut, // OUT: ptr to page, opaque to client 3116out IntPtr ppfsBRPageOut); // OUT: break record of the page 3120IntPtr pfscontext, // IN: ptr to FS context 3121IntPtr pfspage, // IN: ptr to page to update 3122IntPtr pfsBRPageStart, // IN: ptr to brk record of prev. page 3123IntPtr fsnmSectStart, // IN: name of the section to start from, if pointer to break rec is NULL 3125out IntPtr ppfsBRPageOut); // OUT: break record of the page 3129IntPtr pfscontext, // IN: ptr to FS context 3130IntPtr fsnmsect, // IN: name of the section to start from 3132out IntPtr ppfspage); // OUT: ptr to page, opaque to client 3136IntPtr pfscontext, // IN: ptr to FS context 3137IntPtr pfspage, // IN: ptr to page to update 3138IntPtr fsnmsect, // IN: name of the section to start from 3143IntPtr pfscontext, // IN: ptr to FS context 3144IntPtr pfspage); // IN: ptr to page to clear 3148IntPtr pfscontext, // IN: ptr to FS context 3149IntPtr pfspage); // IN: ptr to page 3161IntPtr pfscontext, // IN: ptr to FS context 3162IntPtr pfsbreakrec); // IN: ptr to page break record 3170IntPtr pfsContext, // IN: ptr to FS context 3171IntPtr pBRSubPageStart, // IN: ptr to brk record of subpage 3173IntPtr nSeg, // IN: name of the segment to start from-if pointer to break rec is NULL 3174IntPtr pFtnRej, // IN: pftnrej 3185IntPtr* rgnSegmentForArea, // IN: array of segment names for colspan areas 3194out IntPtr pSubPage, // OUT: ptr to the subpage 3195out IntPtr pBRSubPageOut, // OUT: break record of the subpage 3198out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom 3203IntPtr pfsContext, // IN: ptr to FS context 3204IntPtr nSeg, // IN: name of the segment to start from 3214IntPtr* rgnSegmentForArea, // IN: array of segment names for colspan areas 3221out IntPtr ppSubPage, // OUT: ptr to the subpage 3224out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom 3230IntPtr pfsContext, // IN: ptr to FS context 3231IntPtr pfsSubpage, // IN: ptr to the subpage 3232IntPtr nmSeg, // IN: name of the segment to start from 3242IntPtr* rgnSegmentForArea, // IN: array of segment names for colspan areas 3251out IntPtr pfsMcsClient, // OUT: margin collapsing state at the bottom 3257IntPtr pfsContext, // IN: ptr to FS context 3258IntPtr pfsSubpageOld, // IN: ptr to the old subpage 3259IntPtr pfsSubpageNew, // IN: ptr to the new subpage 3264IntPtr pfscontext, // IN: ptr to FS context 3265IntPtr pSubpage); // IN: ptr to subpage 3269IntPtr pfsContext, // IN: ptr to FS context 3270IntPtr pSubpage); // IN: ptr to subpage 3274IntPtr pfsContext, // IN: ptr to FS context 3275IntPtr pBreakRecSubPageIn, // IN: ptr to subpage break record 3276out IntPtr ppBreakRecSubPageOut); // OUT: ptr to duplicate break record 3280IntPtr pfscontext, // IN: ptr to FS context 3281IntPtr pfsbreakrec); // IN: ptr to subpage break record 3285IntPtr pfsContext, // IN: ptr to FS context 3286IntPtr pSubpage, // IN: ptr to the subpage 3294IntPtr pfsContext, // IN: ptr to FS context 3295IntPtr pSubpage, // IN: ptr to the subpage 3300IntPtr pfsContext, // IN: ptr to FS context 3301IntPtr pSubpage, // IN: ptr to the subpage 3310IntPtr pfsContext, // IN: ptr to FS context 3311IntPtr pSubpageOld, // IN: ptr to the old subpage 3312IntPtr pfsSubpageNew); // IN: ptr to the new subpage 3319IntPtr pfsContext, // IN: ptr to FS context 3320IntPtr pfsBRSubtackIn, // IN: ptr to brk record of subtrack 3322IntPtr fsnmSegment, // IN: name of the segment to start from - if pointer to break rec is NULL 3324IntPtr pfsFtnRej, // IN: 3325IntPtr pfsGeom, // IN: geometry 3330IntPtr pfsMcsClientIn, // IN: input margin collapsing state 3335out IntPtr ppfsSubtrack, // OUT: ptr to the subtrack 3336out IntPtr pfsBRSubtrackOut, // OUT: break record of the subtrack 3339out IntPtr ppfsMcsClientOut, // OUT: margin collapsing state at the bottom 3345IntPtr pfsContext, // IN: ptr to FS context 3346IntPtr fsnmSegment, // IN: name of the segment to start from 3348IntPtr pfsGeom, // IN: parent geometry 3354IntPtr pfsMcsClientIn, // IN: input margin collapsing state 3358out IntPtr ppfsSubtrack, // OUT: ptr to subtrack 3361out IntPtr ppfsMcsClientOut, // OUT: margin collapsing state at the bottom 3368IntPtr pfsContext, // IN: ptr to FS context 3369IntPtr pfsSubtrack, // IN: ptr to subtrack 3370IntPtr fsnmSegment, // IN: name of the segment to start from 3372IntPtr pfsGeom, // IN: parent geometry 3378IntPtr pfsMcsClientIn, // IN: input margin collapsing state 3384out IntPtr ppfsMcsClientOut, // OUT: margin collapsing state at the bottom 3391IntPtr pfsContext, // IN: ptr to FS context 3392IntPtr pfsSubtrack, // IN: ptr to subtrack 3393IntPtr pfsGeom, // IN: geometry 3399IntPtr pfsContext, // IN: ptr to FS context 3400IntPtr pfsSubtrackOld, // IN: ptr to old subtrack 3401IntPtr pfsSubtrackNew, // IN: ptr to new subtrack 3408IntPtr pfsContext, // IN: ptr to FS context 3409IntPtr pfsSubtrack); // IN: ptr to subtrack 3413IntPtr pfsContext, // IN: ptr to FS context 3414IntPtr pfsSubtrack); // IN: ptr to subtrack 3418IntPtr pfsContext, // IN: ptr to FS context 3419IntPtr pfsBRSubtrackIn, // IN: ptr to brk record of subtrack 3420out IntPtr ppfsBRSubtrackOut); // OUT: ptr to duplicate break record 3424IntPtr pfscontext, // IN: ptr to FS context 3425IntPtr pfsbreakrec); // IN: ptr to subtrack break record 3429IntPtr pfscontext, // IN: ptr to FS context 3430IntPtr pfsSubtrack, // IN: ptr to subtrack 3438IntPtr pfscontext, // IN: ptr to FS context 3439IntPtr pfsSubtrack, // IN: ptr to subtrack 3470IntPtr pfscontext, // IN: ptr to FS context 3471IntPtr pfsSubtrackOld, // IN: ptr to old subtrack 3472IntPtr pfsSubtrackNew); // IN: ptr to new subtrack 3482IntPtr pfsContext, // IN: ptr to FS context 3483IntPtr pfsfloater, // IN: 3594IntPtr pfsContext, // IN: ptr to FS context 3595IntPtr pPage, // IN: ptr to page 3621IntPtr pfsContext, // IN: ptr to FS context 3622IntPtr pPage, // IN: ptr to page 3629IntPtr pfsContext, // IN: ptr to FS context 3630IntPtr pSection, // IN: ptr to section 3635IntPtr pfsContext, // IN: ptr to FS context 3636IntPtr pSection, // IN: ptr to section 3691IntPtr pfsContext, // IN: ptr to FS context 3692IntPtr pTrack, // IN: ptr to track 3697IntPtr pfsContext, // IN: ptr to FS context 3698IntPtr pTrack, // IN: ptr to track 3705IntPtr pfsContext, // IN: ptr to FS context 3706IntPtr pSubPage, // IN: ptr to subpage 3711IntPtr pfsContext, // IN: ptr to FS context 3712IntPtr pSubPage, // IN: ptr to subpage 3737IntPtr pfsContext, // IN: ptr to FS context 3738IntPtr pSubTrack, // IN: ptr to subtrack 3743IntPtr pfsContext, // IN: ptr to FS context 3744IntPtr pSubTrack, // IN: ptr to subtrack 3751IntPtr pfsContext, // IN: ptr to FS context 3752IntPtr pPara, // IN: ptr to text para 3757IntPtr pfsContext, // IN: ptr to FS context 3758IntPtr pPara, // IN: ptr to text para 3765IntPtr pfsContext, // IN: ptr to FS context 3766IntPtr pPara, // IN: ptr to text para 3773IntPtr pfsContext, // IN: ptr to FS context 3774IntPtr pLine, // IN: ptr to line 3790IntPtr pfsContext, // IN: ptr to FS context 3791IntPtr pPara, // IN: ptr to text para 3798 IntPtr pfsContext, /* IN: ptr to FS context */ 3799 IntPtr pPara, /* IN: ptr to figure para */ 3816IntPtr pfscontext, // IN: 3817IntPtr pfstableobj, // IN: 3824IntPtr pfscontext, // IN: 3825IntPtr pfstableProper, // IN: 3830IntPtr pfscontext, // IN: 3831IntPtr pfstableProper, // IN: 3838IntPtr pfscontext, // IN: 3839IntPtr pfstablerow, // IN: 3844IntPtr pfscontext, // IN: 3845IntPtr pfstablerow, // IN: 3848IntPtr* rgpfscell, // OUT:
MS\Internal\PtsHost\PtsCache.cs (21)
89internal static void GetFloaterHandlerInfo(PtsHost ptsHost, IntPtr pobjectinfo) 101internal static void GetTableObjHandlerInfo(PtsHost ptsHost, IntPtr pobjectinfo) 248private void GetFloaterHandlerInfoCore(PtsHost ptsHost, IntPtr pobjectinfo) 267private void GetTableObjHandlerInfoCore(PtsHost ptsHost, IntPtr pobjectinfo) 329Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid."); 331Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid."); 401Invariant.Assert(_contextPool[index].PtsHost.Context != IntPtr.Zero, "PTS Context handle is not valid."); 403Invariant.Assert(_contextPool[index].InstalledObjects != IntPtr.Zero, "Installed Objects handle is not valid."); 421private IntPtr CreatePTSContext(int index, TextFormattingMode textFormattingMode) 424IntPtr installedObjects; 427IntPtr context; 437InitGenericInfo(ptsHost, (IntPtr)(index + 1), installedObjects, installedObjectsCount, ref _contextPool[index].ContextInfo); 448IntPtr ptsPenaltyModule = penaltyModule.DangerousGetHandle(); 475private unsafe void InitGenericInfo(PtsHost ptsHost, IntPtr clientData, IntPtr installedObjects, int installedObjectsCount, ref PTS.FSCONTEXTINFO contextInfo) 600private unsafe void InitInstalledObjectsInfo(PtsHost ptsHost, ref PTS.FSIMETHODS subtrackParaInfo, ref PTS.FSIMETHODS subpageParaInfo, out IntPtr installedObjects, out int installedObjectsCount) 617subtrackParaInfo.pfnGetFootnoteInfoWord = IntPtr.Zero; 680tableobjInit.tableobjcbk.pfnGetDvrUsedForFloatTable = IntPtr.Zero; 710tableobjInit.tablecbkcell.pfnGetCellFootnoteInfo = IntPtr.Zero; 711tableobjInit.tablecbkcell.pfnGetCellFootnoteInfoWord = IntPtr.Zero; 793internal IntPtr InstalledObjects;
MS\Internal\PtsHost\PtsContext.cs (27)
84Invariant.Assert(((IntPtr)_pageBreakRecords[index]) != IntPtr.Zero, "Invalid break record object"); 85PTS.Validate(PTS.FsDestroyPageBreakRecord(_ptsHost.Context, (IntPtr)_pageBreakRecords[index])); 102Invariant.Assert(((IntPtr)_pages[index]) != IntPtr.Zero, "Invalid break record object"); 103PTS.Validate(PTS.FsDestroyPage(_ptsHost.Context, (IntPtr)_pages[index])); 175internal IntPtr CreateHandle(object obj) 195return (IntPtr)handle; 206internal void ReleaseHandle(IntPtr handle) 224internal bool IsValidHandle(IntPtr handle) 243internal object HandleToObject(IntPtr handle) 281internal void OnPageCreated(IntPtr ptsPage) 283Invariant.Assert(ptsPage != IntPtr.Zero, "Invalid page object."); 296internal void OnPageDisposed(IntPtr ptsPage, bool disposing, bool enterContext) 298Invariant.Assert(ptsPage != IntPtr.Zero, "Invalid page object."); 322internal void OnPageBreakRecordCreated(IntPtr br) 324Invariant.Assert(br != IntPtr.Zero, "Invalid break record object."); 336internal void OnPageBreakRecordDisposed(IntPtr br, bool disposing) 338Invariant.Assert(br != IntPtr.Zero, "Invalid break record object."); 378internal IntPtr Context 461IntPtr ptsPage = (IntPtr)args; 471private void OnDestroyPage(IntPtr ptsPage, bool enterContext) 473Invariant.Assert(ptsPage != IntPtr.Zero, "Invalid page object."); 509IntPtr br = (IntPtr)args; 510Invariant.Assert(br != IntPtr.Zero, "Invalid break record object.");
MS\Internal\PtsHost\PtsHelper.cs (14)
123if (trackDesc.pfstrack != IntPtr.Zero) 213bool emptyTrack = (trackDesc.pfstrack == IntPtr.Zero); 316if (trackDesc.pfstrack != IntPtr.Zero) 373if (trackDesc.pfstrack == IntPtr.Zero) { return null; } 448if (trackDesc.pfstrack == IntPtr.Zero) 544IntPtr page, 563IntPtr subpage, 582IntPtr section, 606IntPtr track, 625IntPtr subtrack, 644IntPtr para, 663IntPtr para, 700IntPtr para, 728IntPtr pfstrack)
MS\Internal\PtsHost\PtsHost.cs (546)
36_context = IntPtr.Zero; 61internal IntPtr Context 63get { Invariant.Assert(_context != IntPtr.Zero); return _context; } 64set { Invariant.Assert(_context == IntPtr.Zero); _context = value; } 66private IntPtr _context; 127IntPtr pfsclient, // IN: client opaque data 128IntPtr pfsparaclientFigure, // IN: 129IntPtr nmpFigure, // IN: figure's name 172IntPtr pfsclient, // IN: client opaque data 173IntPtr pfsparaclientFigure, // IN: 174IntPtr nmpFigure, // IN: figure's name 210IntPtr pfsclient, // IN: client opaque data 211IntPtr pfsparaclientFigure, // IN: 212IntPtr nmpFigure, // IN: figure's name 256IntPtr pfsclient, // IN: client opaque data 257IntPtr nms, // IN: name of first section on the page 282IntPtr pfsclient, // IN: client opaque data 283IntPtr nms, // IN: name of section on page 313IntPtr pfsclient, // IN: client opaque data 314IntPtr nmsCur, // IN: name of current section 316out IntPtr nmsNext) // OUT: name of the next section 327fSuccess = 0; nmsNext = IntPtr.Zero; 333fSuccess = 0; nmsNext = IntPtr.Zero; 340IntPtr pfsclient, // IN: client opaque data 341IntPtr nms, // IN: name of section 375IntPtr pfsclient, // IN: client opaque data 376IntPtr* rgnms, // IN: array of the section names on the page 409IntPtr pfsclient, // IN: client opaque data 410IntPtr nmsSection, // IN: name of section 411out IntPtr nmSegment) // OUT: name of the main text segment for this section 422nmSegment = IntPtr.Zero; 428nmSegment = IntPtr.Zero; 436IntPtr pfsclient, // IN: client opaque data 437IntPtr nms, // IN: name of section 438IntPtr pfsbrpagePrelim, // IN: ptr to page break record of main page 445out IntPtr nmsHeader) // OUT: name of header segment 457fHeaderPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirHeader = 0; nmsHeader = IntPtr.Zero; 463fHeaderPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirHeader = 0; nmsHeader = IntPtr.Zero; 471IntPtr pfsclient, // IN: client opaque data 472IntPtr nms, // IN: name of section 473IntPtr pfsbrpagePrelim, // IN: ptr to page break record of main page 480out IntPtr nmsFooter) // OUT: name of footer segment 492fFooterPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirFooter = 0; nmsFooter = IntPtr.Zero; 498fFooterPresent = fHardMargin = dvrMaxHeight = dvrFromEdge = 0; fswdirFooter = 0; nmsFooter = IntPtr.Zero; 505IntPtr pfsclient, // IN: client opaque data 506IntPtr nms, // IN: name of the segment 532IntPtr pfsclient, // IN: client opaque data 533IntPtr nms, // IN: name of section 562IntPtr pfsclient, // IN: client opaque data 563IntPtr nms, // IN: name of section 565IntPtr* rgnmSeg, // OUT: array of segment names for segment-defined areas 574IntPtr pfsclient, // IN: client opaque data 575IntPtr nms, // IN: name of section 587IntPtr pfsclient, // IN: client opaque data 588IntPtr nms, // IN: name of segment 590out IntPtr nmp) // OUT: name of the first paragraph in segment 601fSuccessful = 0; nmp = IntPtr.Zero; 607fSuccessful = 0; nmp = IntPtr.Zero; 614IntPtr pfsclient, // IN: client opaque data 615IntPtr nms, // IN: name of segment 616IntPtr nmpCur, // IN: name of current para 618out IntPtr nmpNext) // OUT: name of the next paragraph in section 631fFound = 0; nmpNext = IntPtr.Zero; 637fFound = 0; nmpNext = IntPtr.Zero; 644IntPtr pfsclient, // IN: client opaque data 645IntPtr nms, // IN: name of segment 648out IntPtr nmpBeforeChange) // OUT: name of paragraph before the change if !fChangeFirst 659fFound = fChangeFirst = 0; nmpBeforeChange = IntPtr.Zero; 665fFound = fChangeFirst = 0; nmpBeforeChange = IntPtr.Zero; 672IntPtr pfsclient, // IN: client opaque data 673IntPtr nmp, // IN: name of the paragraph 701IntPtr pfsclient, // IN: client opaque data 702IntPtr nmp, // IN: name of paragraph 725IntPtr pfsclient, // IN: client opaque data 726IntPtr nmp, // IN: name of paragraph 727out IntPtr pfsparaclient) // OUT: opaque to PTS paragraph client 738pfsparaclient = IntPtr.Zero; 744pfsparaclient = IntPtr.Zero; 751IntPtr pfsclient, // IN: client opaque data 752IntPtr pfsparaclientOld, // IN: opaque to PTS old paragraph client 753IntPtr pfsparaclientNew) // IN: opaque to PTS new paragraph client 777IntPtr pfsclient, // IN: client opaque data 778IntPtr pfsparaclient) // IN: 800IntPtr pfsclient, // IN: client opaque data 801IntPtr pfsparaclient, // IN: opaque to PTS paragraph client 802IntPtr nmp, // IN: name of paragraph 810IntPtr pfsclient, // IN: client opaque data 811IntPtr nmsSection, // IN: name of section 812out IntPtr nmsEndnoteSeparator, // OUT: name of the endnote separator segment 813out IntPtr nmsEndnoteContSeparator, // OUT: name of endnote cont separator segment 814out IntPtr nmsEndnoteContNotice) // OUT: name of the endnote cont notice segment 825nmsEndnoteSeparator = nmsEndnoteContSeparator = nmsEndnoteContNotice = IntPtr.Zero; 831nmsEndnoteSeparator = nmsEndnoteContSeparator = nmsEndnoteContNotice = IntPtr.Zero; 838IntPtr pfsclient, // IN: client opaque data 839IntPtr nmsSection, // IN: name of section 841out IntPtr nmsEndnotes) // OUT: name of endnote segment 852fEndnotesPresent = 0; nmsEndnotes = IntPtr.Zero; 858fEndnotesPresent = 0; nmsEndnotes = IntPtr.Zero; 865IntPtr pfsclient, // IN: client opaque data 866IntPtr nms, // IN: name of section 874IntPtr pfsclient, // IN: client opaque data 875IntPtr nms, // IN: name of section 886IntPtr pfsclient, // IN: client opaque data 887IntPtr nmsSection, // IN: name of section 888out IntPtr nmsFtnSeparator, // OUT: name of the footnote separator segment 889out IntPtr nmsFtnContSeparator, // OUT: name of the ftn cont separator segment 890out IntPtr nmsFtnContNotice) // OUT: name of the footnote cont notice segment 893nmsFtnSeparator = nmsFtnContSeparator = nmsFtnContNotice = IntPtr.Zero; 897IntPtr pfsclient, // IN: client opaque data 898IntPtr nms, // IN: name of section 906IntPtr pfsclient, // IN: client opaque data 907IntPtr nms, // IN: name of section 915IntPtr pfsclient, // IN: client opaque data 916IntPtr nms, // IN: name of section 927IntPtr pfsclient, // IN: client opaque data 928IntPtr nmftn, // IN: name of footnote 929out IntPtr nmsFootnote) // OUT: name of footnote segment 932nmsFootnote = IntPtr.Zero; 936IntPtr pfsclient, // IN: client opaque data 938IntPtr* rgProposedPresentationOrder, // IN: footnotes in proposed pres order 939IntPtr* rgProposedRejectionOrder, // IN: footnotes in proposed reject order 941IntPtr* rgFinalPresentationOrder, // OUT: footnotes in final pres order 943IntPtr* rgFinalRejectionOrder) // OUT: footnotes in final reject order 950IntPtr pfsclient, // IN: client opaque data 951IntPtr nmftn, // IN: name of footnote 962IntPtr pfsclient, // IN: client opaque data 963IntPtr pmcsclientIn, // IN: margin collapsing state 964out IntPtr pmcsclientNew) // OUT: duplicated margin collapsing state 975pmcsclientNew = IntPtr.Zero; 981pmcsclientNew = IntPtr.Zero; 988IntPtr pfsclient, // IN: client opaque data 989IntPtr pmcsclient) // IN: margin collapsing state to destroy 1011IntPtr pfsclient, // IN: client opaque data 1012IntPtr pmcsclient1, // IN: first margin collapsing state to compare 1013IntPtr pmcsclient2, // IN: second margin collapsing state to compare 1017if (pmcsclient1 == IntPtr.Zero || pmcsclient2 == IntPtr.Zero) 1047IntPtr pfsclient, // IN: client opaque data 1048IntPtr pfsparaclient, // IN: 1049IntPtr nmp, // IN: name of paragraph 1051IntPtr pmcsclient, // IN: pointer to the input margin collapsing state 1063if (pmcsclient != IntPtr.Zero) 1085IntPtr pfsclient, // IN: client opaque data 1087IntPtr pObjectInfo) // OUT: initialization information for the specified object 1102pObjectInfo = IntPtr.Zero; 1121IntPtr pfsclient, // IN: client opaque data 1122IntPtr pfsparaclient, // IN: opaque to PTS paragraph client 1123IntPtr nmp, // IN: name of paragraph 1126IntPtr pfsbreakreclineclient, // IN: break record for the first line 1131out IntPtr ppfsparabreakingsession, // OUT: paragraph breaking session 1144if(pfsbreakreclineclient != IntPtr.Zero) 1160ppfsparabreakingsession = IntPtr.Zero; 1168ppfsparabreakingsession = IntPtr.Zero; 1177IntPtr pfsclient, // IN: client opaque data 1178IntPtr pfsparabreakingsession) // IN: session to destroy 1190IntPtr pfsclient, // IN: client opaque data 1191IntPtr nmp, // IN: name of paragraph 1215IntPtr pfsclient, // IN: client opaque data 1216IntPtr nmp, // IN: name of paragraph 1243IntPtr pfsclient, // IN: client opaque data 1244IntPtr nmp, // IN: name of paragraph 1248IntPtr* rgnmftn, // OUT: array of footnote names in the range 1257IntPtr pfsclient, // IN: client opaque data 1258IntPtr pfsparaclient, // IN: 1259IntPtr nmp, // IN: name of paragraph 1263out IntPtr pfsdropc, // OUT: pointer to drop cap created by client 1272pfsdropc = IntPtr.Zero; 1277IntPtr pfsclient, // IN: client opaque data 1278IntPtr pfsdropc, // IN: pointer to drop cap 1279IntPtr nmp, // IN: para name 1294IntPtr pfsclient, // IN: client opaque data 1295IntPtr pfsdropc) // IN: pointer to drop cap created by client 1300internal int FormatBottomText(IntPtr pfsclient, // IN: client opaque data 1301IntPtr pfsparaclient, // IN: 1302IntPtr nmp, // IN: name of paragraph 1305IntPtr pfslineLast, // IN: last formatted line 1307out IntPtr pmcsclientOut) // OUT: margin collapsing state at bottom of text 1324pmcsclientOut = IntPtr.Zero; 1329pmcsclientOut = IntPtr.Zero; 1335pmcsclientOut = IntPtr.Zero; 1342IntPtr pfsclient, // IN: client opaque data 1343IntPtr pfsparaclient, // IN: 1344IntPtr nmp, // IN: name of paragraph 1347IntPtr pbrlineIn, // IN: client's line break record 1360out IntPtr pfsline, // OUT: pointer to line created by client 1362out IntPtr ppbrlineOut, // OUT: client's line break record 1387pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1394pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1402IntPtr pfsclient, // IN: client opaque data 1403IntPtr pfsparaclient, // IN: 1404IntPtr nmp, // IN: name of paragraph 1407IntPtr pbrlineIn, // IN: client's line break record 1420out IntPtr pfsline, // OUT: pointer to line created by client 1422out IntPtr ppbrlineOut, // OUT: client's line break record 1446pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = 0; 1453pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = 0; 1461IntPtr pfsclient, // IN: client opaque data 1462IntPtr pfsparabreakingsession, // IN: current session 1464IntPtr pbrlineIn, // IN: client's line break record 1474IntPtr lineVariantRestriction, // IN: line variant restriction pointer 1489if(pbrlineIn != IntPtr.Zero) 1541rgfslinevariant[breakIndex].pfsbreakreclineclient = IntPtr.Zero; 1581IntPtr pfsclient, // IN: client opaque data 1582IntPtr pfsparaclient, // IN: 1583IntPtr nmp, // IN: name of paragraph 1586IntPtr pbrlineIn, // IN: client's line break record to start formatting 1600out IntPtr pfsline, // OUT: pointer to line created by client 1601out IntPtr ppbrlineOut, // OUT: client's line break record 1626pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1633pfsline = ppbrlineOut = IntPtr.Zero; dcpLine = fForcedBroken = dvrAscent = dvrDescent = urBBox = durBBox = dcpDepend = fReformatNeighborsAsLastLine = 0; 1641IntPtr pfsclient, // IN: client opaque data 1642IntPtr pfsline) // IN: pointer to line created by client 1650IntPtr pfsclient, // IN: client opaque data 1651IntPtr pbrlineIn, // IN: client's forced break record to duplicate 1652out IntPtr pbrlineDup) // OUT: duplicated client's forced break record 1663pbrlineDup = IntPtr.Zero; 1669pbrlineDup = IntPtr.Zero; 1676IntPtr pfsclient, // IN: client opaque data 1677IntPtr pbrlineIn) // IN: client's forced break record to duplicate 1699IntPtr pfsclient, // IN: client opaque data 1709internal int GetDvrSuppressibleBottomSpace(IntPtr pfsclient, // IN: client opaque data 1710IntPtr pfsparaclient, // IN: 1711IntPtr pfsline, // IN: pointer to line created by client 1745IntPtr pfsclient, // IN: client opaque data 1746IntPtr pfsparaclient, // IN: 1747IntPtr nmp, // IN: name of paragraph 1774IntPtr pfsclient, // IN: client opaque data 1775IntPtr nmp, // IN: name of paragraph 1802IntPtr pfsclient, // IN: client opaque data 1803IntPtr nmp, // IN: name of paragraph 1811IntPtr pfsclient, // IN: client opaque data 1812IntPtr pfsparaclient, // IN: 1813IntPtr nmp, // IN: name of paragraph 1840IntPtr pfsclient, // IN: client opaque data 1841IntPtr pfsparaclient, // IN: 1842IntPtr nmp, // IN: name of paragraph 1859out IntPtr pmcsclientAfterPara, // OUT: margin collapsing state after parag. 1869pmcsclientAfterPara = IntPtr.Zero; 1874IntPtr pfsclient, // IN: client opaque data 1875IntPtr pfsparaclient, // IN: 1876IntPtr nmp, // IN: name of paragraph 1892IntPtr pmcsclientAfterPara, // IN: margin collapsing state after paragraph 1903IntPtr pfsclient, // IN: client opaque data 1912IntPtr pfsclient, // IN: client opaque data 1913IntPtr nmp, // IN: name of paragraph 1945IntPtr pfsclient, // IN: client opaque data 1946IntPtr nmp, // IN: name of paragraph 1949IntPtr* rgnmpAttachedObject, // OUT: array of floater names 2003IntPtr pfsclient, // IN: client opaque data 2004IntPtr pfsline, // IN: pointer to line created by client 2005IntPtr nmp, // IN: name of paragraph 2057IntPtr pfsclient, // IN: client opaque data 2058IntPtr pfsline, // IN: pointer to line created by client 2059IntPtr nmp, // IN: name of paragraph 2065IntPtr* rgnmpAttachedObject, // OUT: array of floater names 2114IntPtr pfsclient, // IN: client opaque data 2115IntPtr nmp, // IN: name of text paragraph 2116IntPtr nmpObject, // IN: name of figure 2142IntPtr pfsclient, // IN: client opaque data 2143IntPtr pfsparaclient, // IN: 2144IntPtr pfsparaclientFigure, // IN: 2145IntPtr pfsline, // IN: pointer to line created by client 2146IntPtr nmpFigure, // IN: figure's name 2148IntPtr pfsfmtlinein, // IN: input parameters needed to reformat the line. 2187IntPtr pfsclient, // IN: client opaque data 2188IntPtr nmFloater, // IN: name of the floater 2215IntPtr pfsclient, // IN: client opaque data 2216IntPtr pfsparaclient, // IN: 2217IntPtr pfsbrkFloaterContentIn, // IN: break record---use if !NULL 2219IntPtr nmFloater, // IN: name of floater 2220IntPtr pftnrej, // IN: 2230out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 2231out IntPtr pbrkrecpara, // OUT: pointer to the floater content break record 2252fsfmtr = new PTS.FSFMTR(); pfsFloatContent = pbrkrecpara = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2258fsfmtr = new PTS.FSFMTR(); pfsFloatContent = pbrkrecpara = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2265IntPtr pfsclient, // IN: client opaque data 2266IntPtr pfsparaclient, // IN: 2267IntPtr nmFloater, // IN: name of floater 2274out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 2295pfsFloatContent = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2302pfsFloatContent = IntPtr.Zero; durFloaterWidth = dvrFloaterHeight = cPolygons = cVertices = 0; fsbbox = new PTS.FSBBOX(); 2309IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2310IntPtr pfsparaclient, // IN: 2311IntPtr nmFloater, // IN: name of floater 2353IntPtr pfsparaclient, // IN: 2354IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2355IntPtr nmFloater, // IN: name of floater 2391IntPtr pfsFloaterContent) // IN: opaque for PTS pointer to floater content 2406IntPtr pfsFloaterContentOld, // IN: 2407IntPtr pfsFloaterContentNew, // IN: 2447IntPtr pfsFloaterContent) // IN: opaque for PTS pointer to floater content 2461IntPtr pfsclient, // IN: client context 2462IntPtr pfsbrkFloaterContent, // IN: pointer to break record 2463out IntPtr pfsbrkFloaterContentDup) // OUT pointer to duplicate break record 2478IntPtr pfsclient, // IN: client context 2479IntPtr pfsbrkFloaterContent) // IN: pointer to break record 2494IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2526IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2541IntPtr pfsFloaterContent, // IN: opaque for PTS pointer to floater content 2554IntPtr pfsFloaterContentOld, // IN: 2555IntPtr pfsFloaterContentNew) // IN: 2570IntPtr pfsclient, // IN: client context 2571IntPtr pfsparaclient, // IN: 2572IntPtr nmFloater, // IN: name of floater 2574IntPtr pmcsclientIn, // IN: input opaque to PTS MCSCLIENT 2575out IntPtr pmcsclientOut) // OUT: MCSCLIENT that floater will return to track 2583if (pmcsclientIn != IntPtr.Zero) 2592pmcsclientOut = IntPtr.Zero; 2598pmcsclientOut = IntPtr.Zero; 2605IntPtr pfsclient, // IN: client context 2606IntPtr pfsparaclient, // IN: 2607IntPtr nmFloater, // IN: name of floater 2609IntPtr pmcsclientIn, // IN: margin collapsing state 2619if (pmcsclientIn != IntPtr.Zero) 2645IntPtr pfsclient, // IN: client opaque data 2646IntPtr pfsc, // IN: FS context 2647IntPtr pfscbkobj, // IN: callbacks (FSCBKOBJ) 2650out IntPtr pfssobjc) // OUT: object context 2652pfssobjc = (IntPtr)(idobj + _objectContextOffset); 2656IntPtr pfssobjc) // IN: object context 2663IntPtr pfssobjc, // IN: object context 2664IntPtr pfsparaclient, // IN: 2665IntPtr pfsobjbrk, // IN: break record---use if !NULL 2667IntPtr nmp, // IN: name of paragraph---use if break record is NULL 2669IntPtr pftnrej, // IN: 2670IntPtr pfsgeom, // IN: pointer to geometry 2675IntPtr pmcsclientIn, // IN: input margin collapsing state 2682out IntPtr pfspara, // OUT: pointer to the para data 2683out IntPtr pbrkrecpara, // OUT: pointer to the para break record 2686out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2700if (pmcsclientIn != IntPtr.Zero) 2711fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 2718fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 2727IntPtr pfssobjc, // IN: object context 2728IntPtr pfsparaclient, // IN: 2729IntPtr nmp, // IN: name of paragraph 2731IntPtr pfsgeom, // IN: pointer to geometry 2737IntPtr pmcsclientIn, // IN: input margin collapsing state 2741out IntPtr pfspara, // OUT: pointer to the para data 2744out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2757if (pmcsclientIn != IntPtr.Zero) 2768pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2776pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2785IntPtr pfspara, // IN: pointer to the para data 2786IntPtr pfsparaclient, // IN: 2787IntPtr nmp, // IN: name of paragraph 2789IntPtr pfsgeom, // IN: pointer to geometry 2795IntPtr pmcsclientIn, // IN: input margin collapsing state 2801out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 2814if (pmcsclientIn != IntPtr.Zero) 2826pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2834pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 2843IntPtr pfspara, // IN: pointer to the para data 2844IntPtr pfsparaclient, // IN: 2845IntPtr pfsgeom, // IN: pointer to geometry 2870IntPtr pfsparaclientOld, // IN: 2871IntPtr pfsparaOld, // IN: pointer to the old para data 2872IntPtr pfsparaclientNew, // IN: 2873IntPtr pfsparaNew, // IN: pointer to the new para data 2882IntPtr pfspara) // IN: pointer to the para data 2888IntPtr pfspara) // IN: pointer to the para data 2894IntPtr pfssobjc, // IN: object context 2895IntPtr pfsbrkrecparaOrig, // IN: pointer to the para break record 2896out IntPtr pfsbrkrecparaDup) // OUT: pointer to the duplicate break record 2902IntPtr pfssobjc, // IN: object context 2903IntPtr pfsobjbrk) // IN: pointer to the para break record 2909IntPtr pfspara, // IN: pointer to the para data 2920IntPtr pfspara, // IN: pointer to the para data 2926IntPtr pfspara, // IN: pointer to the para data 2937internal int SubtrackShiftVertical(IntPtr pfspara, // IN: pointer to the para data 2938IntPtr pfsparaclient, // IN: 2939IntPtr pfsshift, // IN: pointer to the shift data 2949IntPtr pfsparaOld, // IN: pointer to the old para data 2950IntPtr pfsparaNew) // IN: pointer to the new para data 2960IntPtr pfsclient, // IN: client opaque data 2961IntPtr pfsc, // IN: FS context 2962IntPtr pfscbkobj, // IN: callbacks (FSCBKOBJ) 2965out IntPtr pfssobjc) // OUT: object context 2967pfssobjc = (IntPtr)(idobj + _objectContextOffset + 1); 2971IntPtr pfssobjc) // IN: object context 2978IntPtr pfssobjc, // IN: object context 2979IntPtr pfsparaclient, // IN: 2980IntPtr pfsobjbrk, // IN: break record---use if !NULL 2982IntPtr nmp, // IN: name of paragraph---use if break record is NULL 2984IntPtr pftnrej, // IN: 2985IntPtr pfsgeom, // IN: pointer to geometry 2990IntPtr pmcsclientIn, // IN: input margin collapsing state 2997out IntPtr pfspara, // OUT: pointer to the para data 2998out IntPtr pbrkrecpara, // OUT: pointer to the para break record 3001out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 3015if (pmcsclientIn != IntPtr.Zero) 3026fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 3033fsfmtr = new PTS.FSFMTR(); pfspara = pbrkrecpara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = 0; fsbbox = new PTS.FSBBOX(); 3041IntPtr pfssobjc, // IN: object context 3042IntPtr pfsparaclient, // IN: 3043IntPtr nmp, // IN: name of paragraph 3045IntPtr pfsgeom, // IN: pointer to geometry 3051IntPtr pmcsclientIn, // IN: input margin collapsing state 3055out IntPtr pfspara, // OUT: pointer to the para data 3058out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 3071if (pmcsclientIn != IntPtr.Zero) 3083pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3091pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3100IntPtr pfspara, // IN: pointer to the para data 3101IntPtr pfsparaclient, // IN: 3102IntPtr nmp, // IN: name of paragraph 3104IntPtr pfsgeom, // IN: pointer to geometry 3110IntPtr pmcsclientIn, // IN: input margin collapsing state 3116out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 3129if (pmcsclientIn != IntPtr.Zero) 3141pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3149pfspara = pmcsclientOut = IntPtr.Zero; dvrUsed = dvrTopSpace = fPageBecomesUninterruptable = 0; fsbbox = new PTS.FSBBOX(); 3157IntPtr pfspara, // IN: pointer to the para data 3158IntPtr pfsparaclient, // IN: 3159IntPtr pfsgeom, // IN: pointer to geometry 3168IntPtr pfsparaclientOld, // IN: 3169IntPtr pfsparaOld, // IN: pointer to the old para data 3170IntPtr pfsparaclientNew, // IN: 3171IntPtr pfsparaNew, // IN: pointer to the new para data 3180IntPtr pfspara) // IN: pointer to the para data 3186IntPtr pfspara) // IN: pointer to the para data 3192IntPtr pfssobjc, // IN: object context 3193IntPtr pfsbrkrecparaOrig, // IN: pointer to the para break record 3194out IntPtr pfsbrkrecparaDup) // OUT: pointer to the duplicate break record 3200IntPtr pfssobjc, // IN: object context 3201IntPtr pfsobjbrk) // IN: pointer to the para break record 3207IntPtr pfspara, // IN: pointer to the para data 3218IntPtr pfspara, // IN: pointer to the para data 3225IntPtr pfspara, // IN: pointer to the para data 3236IntPtr pfspara, // IN: pointer to the para data 3237IntPtr pfsparaclient, // IN: 3238IntPtr pfsshift, // IN: pointer to the shift data 3248IntPtr pfsparaOld, // IN: pointer to the old para data 3249IntPtr pfsparaNew) // IN: pointer to the new para data 3258IntPtr pfsclient, // IN: 3259IntPtr nmTable, // IN: 3286IntPtr pfsclient, // IN: 3287IntPtr pfsparaclientTable, // IN: 3288IntPtr nmTable, // IN: 3316IntPtr pfsclient, // IN: 3317IntPtr pfsparaclientTable, // IN: 3318IntPtr nmTable, // IN: 3351IntPtr pfsclient, // IN: 3352IntPtr pfsparaclientTable, // IN: 3353IntPtr nmTable, // IN: 3355IntPtr pmcsclientIn, // IN: 3356out IntPtr ppmcsclientOut) // OUT: 3368ppmcsclientOut = IntPtr.Zero; 3374ppmcsclientOut = IntPtr.Zero; 3381IntPtr pfsclient, // IN: 3382IntPtr nmTable, // IN: 3385out IntPtr pnmFirstHeaderRow) // OUT: 3398pnmFirstHeaderRow = IntPtr.Zero; 3405pnmFirstHeaderRow = IntPtr.Zero; 3412IntPtr pfsclient, // IN: 3413IntPtr nmTable, // IN: 3414IntPtr nmHeaderRow, // IN: 3417out IntPtr pnmNextHeaderRow) // OUT: 3430pnmNextHeaderRow = IntPtr.Zero; 3437pnmNextHeaderRow = IntPtr.Zero; 3444IntPtr pfsclient, // IN: 3445IntPtr nmTable, // IN: 3448out IntPtr pnmFirstFooterRow) // OUT: 3461pnmFirstFooterRow = IntPtr.Zero; 3468pnmFirstFooterRow = IntPtr.Zero; 3475IntPtr pfsclient, // IN: 3476IntPtr nmTable, // IN: 3477IntPtr nmFooterRow, // IN: 3480out IntPtr pnmNextFooterRow) // OUT: 3493pnmNextFooterRow = IntPtr.Zero; 3500pnmNextFooterRow = IntPtr.Zero; 3507IntPtr pfsclient, // IN: 3508IntPtr nmTable, // IN: 3510out IntPtr pnmFirstRow) // OUT: 3523pnmFirstRow = IntPtr.Zero; 3530pnmFirstRow = IntPtr.Zero; 3537IntPtr pfsclient, // IN: 3538IntPtr nmTable, // IN: 3539IntPtr nmRow, // IN: 3541out IntPtr pnmNextRow) // OUT: 3554pnmNextRow = IntPtr.Zero; 3561pnmNextRow = IntPtr.Zero; 3568IntPtr pfsclient, // IN: 3569IntPtr nmTable, // IN: 3608IntPtr pfsclient, // IN: 3609IntPtr nmTable, // IN: 3612out IntPtr pnmRowBeforeChange) // OUT: 3629pnmRowBeforeChange = IntPtr.Zero; 3637pnmRowBeforeChange = IntPtr.Zero; 3644IntPtr pfsclient, // IN: 3645IntPtr nmTable, // IN: 3646IntPtr nmRow, // IN: 3678IntPtr pfsclient, // IN: 3679IntPtr nmRow, // IN: 3680IntPtr nmCell, // IN: 3709IntPtr pfsclient, // IN: 3710IntPtr nmTable, // IN: 3737IntPtr pfsclient, // IN: 3738IntPtr nmRow, // IN: 3766IntPtr pfsclient, // IN: 3767IntPtr nmRow, // IN: 3769IntPtr* rgnmCell, // IN/OUT: 3793IntPtr pfsclient, // IN: 3794IntPtr pfsparaclient, // IN: 3795IntPtr nmRow, // IN: 3823IntPtr pfsclient, // IN: 3824IntPtr nmRow, // IN: 3826IntPtr* rgnmCell, // IN: 3827IntPtr* rgpfscell, // IN: 3863IntPtr pfsclient, // IN: 3864IntPtr pfsparaclientTable, // IN: table's para client 3865IntPtr pfsbrkcell, // IN: not NULL if cell broken from previous page/column 3866IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 3867IntPtr pfsFtnRejector, // IN: 3873out IntPtr ppfscell, // OUT: cell object 3874out IntPtr pfsbrkcellOut, // OUT: break if cell does not fit in dvrAvailable 3893ppfscell = IntPtr.Zero; 3894pfsbrkcellOut = IntPtr.Zero; 3902ppfscell = IntPtr.Zero; 3903pfsbrkcellOut = IntPtr.Zero; 3911IntPtr pfsclient, // IN: 3912IntPtr pfsparaclientTable, // IN: table's para client 3913IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 3916out IntPtr ppfscell, // OUT: cell object 3938ppfscell = IntPtr.Zero; 3946ppfscell = IntPtr.Zero; 3956IntPtr pfscell, // IN/OUT: cell object 3957IntPtr pfsparaclientTable, // IN: table's para client 3958IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 4000IntPtr pfscellOld, 4001IntPtr pfscellNew, 4010IntPtr pfscell) // IN:OUT: cell object 4016IntPtr pfscell, // IN/OUT: cell object 4017IntPtr pfsparaclientTable, // IN: table's para client 4018IntPtr pfsbrkcell, // IN: not NULL if cell broken from previous page/column 4019IntPtr nmCell, // IN: for vMerged cells, the first cell (master) 4058IntPtr pfsclient, // IN: 4059IntPtr pfsbrkcell, // IN: 4060out IntPtr ppfsbrkcellDup) // OUT: 4066IntPtr pfsclient, // IN: 4067IntPtr pfsbrkcell) // IN: 4072IntPtr pfsCell) // IN: 4093IntPtr pfsCell, // IN: 4120IntPtr pfscell, // IN: 4148IntPtr pfscellOld, // IN: opaque to PTS old paragraph client 4149IntPtr pfscellNew) // IN: opaque to PTS new paragraph client
MS\Internal\PtsHost\PtsPage.cs (20)
48_ptsPage = IntPtr.Zero; 294IntPtr ptsPage; 299_ptsPage = IntPtr.Zero; 391IntPtr brIn = (breakRecord != null) ? breakRecord.BreakRecord : IntPtr.Zero; 395IntPtr brOut; 396IntPtr ptsPage; 401_ptsPage = IntPtr.Zero; 402brOut = IntPtr.Zero; 409if (brOut != IntPtr.Zero) 452IntPtr brIn = (breakRecord != null) ? breakRecord.BreakRecord : IntPtr.Zero; 456IntPtr brOut; 468if (brOut != IntPtr.Zero) 671internal IntPtr PageHandle { get { return _ptsPage; } } 721_ptsPage = IntPtr.Zero; 1430if (_ptsPage != IntPtr.Zero) 1433_ptsPage = IntPtr.Zero; 1451return (_ptsPage == IntPtr.Zero); 1504private IntPtr _ptsPage;
MS\Internal\PtsHost\RowParagraph.cs (6)
80out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 83paraClientHandle = IntPtr.Zero; 187IntPtr* rgnmCell, 188IntPtr* rgpfsCell, 199if(rgpfsCell[index] != IntPtr.Zero) 218IntPtr* rgnmCell,
MS\Internal\PtsHost\Section.cs (18)
149IntPtr* rgnms, 173out IntPtr nmsNext) 176nmsNext = IntPtr.Zero; 235out IntPtr nmSegment) 273IntPtr pfsbrpagePrelim, 280out IntPtr nmsHeader) 286nmsHeader = IntPtr.Zero; 317IntPtr pfsbrpagePrelim, 324out IntPtr nmsFooter) 330nmsFooter = IntPtr.Zero; 377out IntPtr nmsEndnotes) 380nmsEndnotes = IntPtr.Zero; 396out IntPtr nmsEndnoteSeparator, 397out IntPtr nmsEndnoteContSeparator, 398out IntPtr nmsEndnoteContNotice) 400nmsEndnoteSeparator = IntPtr.Zero; 401nmsEndnoteContSeparator = IntPtr.Zero; 402nmsEndnoteContNotice = IntPtr.Zero;
MS\Internal\PtsHost\Segment.cs (3)
27out IntPtr firstParaName); 44out IntPtr nextParaName); 61out IntPtr nmpBeforeChange);
MS\Internal\PtsHost\SubpageParaClient.cs (4)
46if (_paraHandle != IntPtr.Zero) 49_paraHandle = IntPtr.Zero; 607internal ReadOnlyCollection<ParagraphResult> GetParagraphResultsFromColumn(IntPtr pfstrack, Vector parentOffset, out bool hasTextContent) 640internal TextContentRange GetTextContentRangeFromColumn(IntPtr pfstrack)
MS\Internal\PtsHost\SubpageParagraph.cs (29)
81out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 98IntPtr pbrkrecIn, // IN: break record---use if !NULL 100IntPtr footnoteRejector, // IN: 110out IntPtr pfspara, // OUT: pointer to the para data 111out IntPtr pbrkrecOut, // OUT: pointer to the para break record 114out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 137if (mcs != null && pbrkrecIn != IntPtr.Zero) 167if (pbrkrecIn == IntPtr.Zero) 233if (pbrkrecIn == IntPtr.Zero) // if first chunk 240if (pmcsclientOut != IntPtr.Zero) 244pmcsclientOut = IntPtr.Zero; 264pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 266if (pmcsclientOut == IntPtr.Zero) // if last chunk 294paraClient.SetChunkInfo(pbrkrecIn == IntPtr.Zero, pbrkrecOut == IntPtr.Zero); 311out IntPtr pfspara, // OUT: pointer to the para data 314out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 404if (pmcsclientOut != IntPtr.Zero) 408pmcsclientOut = IntPtr.Zero; 411pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 441Debug.Assert(pmcsclientOut == IntPtr.Zero); 442pfspara = IntPtr.Zero; 462IntPtr pfspara, // IN: pointer to the para data 475out IntPtr pmcsclientOut, // OUT: margin collapsing state at the bottom 563if (pmcsclientOut != IntPtr.Zero) 567pmcsclientOut = IntPtr.Zero; 570pmcsclientOut = (mcsBottom != null) ? mcsBottom.Handle : IntPtr.Zero; 600Debug.Assert(pmcsclientOut == IntPtr.Zero); 601pfspara = IntPtr.Zero;
MS\Internal\PtsHost\TableParaClient.cs (32)
104IntPtr[] arrayFsCell; 126if (arrayFsCell[iC] == IntPtr.Zero) 329IntPtr[] arrayFsCell; 340if (arrayFsCell[iC] == IntPtr.Zero) 377IntPtr[] arrayFsCell; 388if (arrayFsCell[iC] == IntPtr.Zero) 453IntPtr[] arrayFsCell; 462if (arrayFsCell[iC] == IntPtr.Zero) 543IntPtr[] arrayFsCell; 553if (arrayFsCell[iC] == IntPtr.Zero) 618IntPtr[] arrayFsCell; 629if (arrayFsCell[iC] == IntPtr.Zero) 739IntPtr[] arrayFsCell; 750if(arrayFsCell[iC] != IntPtr.Zero && 835IntPtr[] arrayFsCell; 846if (arrayFsCell[iC] == IntPtr.Zero) 902IntPtr[] arrayFsCell; 913if (arrayFsCell[iC] == IntPtr.Zero) 959IntPtr[] arrayFsCell; 973if (arrayFsCell[iC] == IntPtr.Zero) 1038IntPtr[] arrayFsCell; 1052if (arrayFsCell[iC] == IntPtr.Zero) 1421IntPtr pfstablerow, 1422out IntPtr[] arrayFsCell, 1434arrayFsCell = new IntPtr[tableRowDetails.cCells]; 1441fixed (IntPtr * rgFsCell = arrayFsCell) 1525IntPtr pfstablerow, 1530IntPtr[] arrayFsCell; 1551arrayFsCell[iC] == IntPtr.Zero 1631IntPtr pfstablerow, 1637IntPtr[] arrayFsCell; 1669if (arrayFsCell[iC] == IntPtr.Zero)
MS\Internal\PtsHost\TableParagraph.cs (22)
126out IntPtr pfsparaclient) // OUT: opaque to PTS paragraph client 168IntPtr pmcsclientIn, 169out IntPtr ppmcsclientOut) 171ppmcsclientOut = IntPtr.Zero; 175if (pmcsclientIn != IntPtr.Zero) 194out IntPtr pnmFirstHeaderRow) 197pnmFirstHeaderRow = IntPtr.Zero; 209IntPtr nmHeaderRow, 211out IntPtr pnmNextHeaderRow) 214pnmNextHeaderRow = IntPtr.Zero; 226out IntPtr pnmFirstFooterRow) 229pnmFirstFooterRow = IntPtr.Zero; 241IntPtr nmFooterRow, 243out IntPtr pnmNextFooterRow) 246pnmNextFooterRow = IntPtr.Zero; 256out IntPtr pnmFirstRow) 287pnmFirstRow = IntPtr.Zero; 298IntPtr nmRow, 300out IntPtr pnmNextRow) 362pnmNextRow = IntPtr.Zero; 394out IntPtr pnmRowBeforeChange) // OUT: 399pnmRowBeforeChange = IntPtr.Zero;
MS\Internal\PtsHost\TextParaClient.cs (4)
522IntPtr breakRecLine = IntPtr.Zero; 981IntPtr breakRecLine = IntPtr.Zero;
MS\Internal\PtsHost\TextParagraph.cs (15)
114out IntPtr paraClientHandle) 247out IntPtr mcsClient) 253mcsClient = IntPtr.Zero; 373IntPtr lineVariantRestriction, 483IntPtr pbrlineIn, 497out IntPtr lineHandle, 499out IntPtr ppbrlineOut, 546ppbrlineOut = IntPtr.Zero; 668IntPtr pbrlineIn, 681out IntPtr lineHandle, 683out IntPtr ppbrlineOut, 727ppbrlineOut = IntPtr.Zero; 1273internal void FormatLineCore(Line line, IntPtr pbrLineIn, Line.FormattingContext ctx, int dcp, int width, bool firstLine, int dcpLine) 1306internal void FormatLineCore(Line line, IntPtr pbrLineIn, Line.FormattingContext ctx, int dcp, int width, int trackWidth, bool firstLine, int dcpLine) 1312if(pbrLineIn != IntPtr.Zero)
MS\Internal\PtsHost\UIElementParagraph.cs (14)
87out IntPtr paraClientHandle) // OUT: opaque to PTS paragraph client 153IntPtr pbrkrecIn, // IN: break record---use if !IntPtr.Zero 155IntPtr footnoteRejector, // IN: 165out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 166out IntPtr pbrkrecOut, // OUT: pointer to the floater content break record 191pbrkrecOut = IntPtr.Zero; 192pfsFloatContent = IntPtr.Zero; 233pfsFloatContent = IntPtr.Zero; 251pbrkrecOut = IntPtr.Zero; 267out IntPtr pfsFloatContent, // OUT: opaque for PTS pointer pointer to formatted content 289pfsFloatContent = IntPtr.Zero; 337IntPtr pfsFloatContent, // IN: floater content (in UIElementParagraph, this is an alias to the paraClient) 357out IntPtr pmcsclientOut) // OUT: MCSCLIENT that floater will return to track 369pmcsclientOut = IntPtr.Zero;
MS\Internal\PtsHost\UnmanagedHandle.cs (3)
42_handle = IntPtr.Zero; 50internal IntPtr Handle 57private IntPtr _handle;
MS\Internal\WindowsRuntime\Generated\Windows.Data.Text.cs (176)
30public IntPtr ThisPtr => _default.ThisPtr; 37public static AlternateWordForm FromAbi(IntPtr thisPtr) 39if (thisPtr == IntPtr.Zero) return null; 49public static bool operator ==(AlternateWordForm x, AlternateWordForm y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 70global::System.Runtime.InteropServices.CustomQueryInterfaceResult global::System.Runtime.InteropServices.ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv) 72ppv = IntPtr.Zero; 248public IntPtr ThisPtr => _default.ThisPtr; 255public static WordSegment FromAbi(IntPtr thisPtr) 257if (thisPtr == IntPtr.Zero) return null; 267public static bool operator ==(WordSegment x, WordSegment y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 288global::System.Runtime.InteropServices.CustomQueryInterfaceResult global::System.Runtime.InteropServices.ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv) 290ppv = IntPtr.Zero; 314public IntPtr ThisPtr => _default.ThisPtr; 327public unsafe new IntPtr CreateWithLanguage(string language) 330IntPtr __retval = default; 346IntPtr ptr = (_IWordsSegmenterFactory.Instance.CreateWithLanguage(language)); 360public static WordsSegmenter FromAbi(IntPtr thisPtr) 362if (thisPtr == IntPtr.Zero) return null; 372public static bool operator ==(WordsSegmenter x, WordsSegmenter y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 395global::System.Runtime.InteropServices.CustomQueryInterfaceResult global::System.Runtime.InteropServices.ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv) 397ppv = IntPtr.Zero; 423public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 424public static global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm FromAbi(IntPtr thisPtr) => global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm.FromAbi(thisPtr); 425public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef(); 427public static (int length, IntPtr data) GetAbiArray(object box) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm>.GetAbiArray(box); 429public static (int length, IntPtr data) FromManagedArray(global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm[] array) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateWordForm>.FromManagedArray(array, (o) => FromManaged(o)); 432public static void DisposeAbi(IntPtr abi) => MarshalInspectable.DisposeAbi(abi); 448public static readonly IntPtr AbiToProjectionVftablePtr; 458var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 3); 459Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 460AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 463private static unsafe int Do_Abi_get_AlternateText_1(IntPtr thisPtr, out IntPtr value) 482private static unsafe int Do_Abi_get_NormalizationFormat_2(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateNormalizationFormat value) 501private static unsafe int Do_Abi_get_SourceTextSegment_0(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.TextSegment value) 521public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 526public IntPtr ThisPtr => _obj.ThisPtr; 539IntPtr __retval = default; 575public unsafe delegate int get_SourceTextSegment_0(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.TextSegment value); 576public unsafe delegate int get_NormalizationFormat_2(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.AlternateNormalizationFormat value); 606public static readonly IntPtr AbiToProjectionVftablePtr; 630var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 17); 631Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 632AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 635private static unsafe int Do_Abi_GetCodepointFromSurrogatePair_0(IntPtr thisPtr, uint highSurrogate, uint lowSurrogate, out uint codepoint) 654private static unsafe int Do_Abi_GetSurrogatePairFromCodepoint_1(IntPtr thisPtr, uint codepoint, out ushort highSurrogate, out ushort lowSurrogate) 676private static unsafe int Do_Abi_IsHighSurrogate_2(IntPtr thisPtr, uint codepoint, out byte value) 695private static unsafe int Do_Abi_IsLowSurrogate_3(IntPtr thisPtr, uint codepoint, out byte value) 714private static unsafe int Do_Abi_IsSupplementary_4(IntPtr thisPtr, uint codepoint, out byte value) 733private static unsafe int Do_Abi_IsNoncharacter_5(IntPtr thisPtr, uint codepoint, out byte value) 752private static unsafe int Do_Abi_IsWhitespace_6(IntPtr thisPtr, uint codepoint, out byte value) 771private static unsafe int Do_Abi_IsAlphabetic_7(IntPtr thisPtr, uint codepoint, out byte value) 790private static unsafe int Do_Abi_IsCased_8(IntPtr thisPtr, uint codepoint, out byte value) 809private static unsafe int Do_Abi_IsUppercase_9(IntPtr thisPtr, uint codepoint, out byte value) 828private static unsafe int Do_Abi_IsLowercase_10(IntPtr thisPtr, uint codepoint, out byte value) 847private static unsafe int Do_Abi_IsIdStart_11(IntPtr thisPtr, uint codepoint, out byte value) 866private static unsafe int Do_Abi_IsIdContinue_12(IntPtr thisPtr, uint codepoint, out byte value) 885private static unsafe int Do_Abi_IsGraphemeBase_13(IntPtr thisPtr, uint codepoint, out byte value) 904private static unsafe int Do_Abi_IsGraphemeExtend_14(IntPtr thisPtr, uint codepoint, out byte value) 923private static unsafe int Do_Abi_GetNumericType_15(IntPtr thisPtr, uint codepoint, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.UnicodeNumericType value) 942private static unsafe int Do_Abi_GetGeneralCategory_16(IntPtr thisPtr, uint codepoint, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.UnicodeGeneralCategory value) 962public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 967public IntPtr ThisPtr => _obj.ThisPtr; 1100public unsafe delegate int GetCodepointFromSurrogatePair_0(IntPtr thisPtr, uint highSurrogate, uint lowSurrogate, out uint codepoint); 1101public unsafe delegate int GetSurrogatePairFromCodepoint_1(IntPtr thisPtr, uint codepoint, out ushort highSurrogate, out ushort lowSurrogate); 1102public unsafe delegate int IsHighSurrogate_2(IntPtr thisPtr, uint codepoint, out byte value); 1103public unsafe delegate int IsLowSurrogate_3(IntPtr thisPtr, uint codepoint, out byte value); 1104public unsafe delegate int IsSupplementary_4(IntPtr thisPtr, uint codepoint, out byte value); 1105public unsafe delegate int IsNoncharacter_5(IntPtr thisPtr, uint codepoint, out byte value); 1106public unsafe delegate int IsWhitespace_6(IntPtr thisPtr, uint codepoint, out byte value); 1107public unsafe delegate int IsAlphabetic_7(IntPtr thisPtr, uint codepoint, out byte value); 1108public unsafe delegate int IsCased_8(IntPtr thisPtr, uint codepoint, out byte value); 1109public unsafe delegate int IsUppercase_9(IntPtr thisPtr, uint codepoint, out byte value); 1110public unsafe delegate int IsLowercase_10(IntPtr thisPtr, uint codepoint, out byte value); 1111public unsafe delegate int IsIdStart_11(IntPtr thisPtr, uint codepoint, out byte value); 1112public unsafe delegate int IsIdContinue_12(IntPtr thisPtr, uint codepoint, out byte value); 1113public unsafe delegate int IsGraphemeBase_13(IntPtr thisPtr, uint codepoint, out byte value); 1114public unsafe delegate int IsGraphemeExtend_14(IntPtr thisPtr, uint codepoint, out byte value); 1115public unsafe delegate int GetNumericType_15(IntPtr thisPtr, uint codepoint, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.UnicodeNumericType value); 1116public unsafe delegate int GetGeneralCategory_16(IntPtr thisPtr, uint codepoint, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.UnicodeGeneralCategory value); 1132public static readonly IntPtr AbiToProjectionVftablePtr; 1142var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 3); 1143Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 1144AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 1147private static unsafe int Do_Abi_get_AlternateForms_2(IntPtr thisPtr, out IntPtr value) 1166private static unsafe int Do_Abi_get_SourceTextSegment_1(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.TextSegment value) 1185private static unsafe int Do_Abi_get_Text_0(IntPtr thisPtr, out IntPtr value) 1205public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 1210public IntPtr ThisPtr => _obj.ThisPtr; 1223IntPtr __retval = default; 1250IntPtr __retval = default; 1266public unsafe delegate int get_SourceTextSegment_1(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Data.Text.TextSegment value); 1283public static readonly IntPtr AbiToProjectionVftablePtr; 1294var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4); 1295Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 1296AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 1299private static unsafe int Do_Abi_GetTokenAt_1(IntPtr thisPtr, IntPtr text, uint startIndex, out IntPtr result) 1318private static unsafe int Do_Abi_GetTokens_2(IntPtr thisPtr, IntPtr text, out IntPtr result) 1337private static unsafe int Do_Abi_Tokenize_3(IntPtr thisPtr, IntPtr text, uint startIndex, IntPtr handler) 1353private static unsafe int Do_Abi_get_ResolvedLanguage_0(IntPtr thisPtr, out IntPtr value) 1373public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 1378public IntPtr ThisPtr => _obj.ThisPtr; 1390IntPtr __retval = default; 1407IntPtr __retval = default; 1442IntPtr __retval = default; 1458public unsafe delegate int GetTokenAt_1(IntPtr thisPtr, IntPtr text, uint startIndex, out IntPtr result); 1459public unsafe delegate int GetTokens_2(IntPtr thisPtr, IntPtr text, out IntPtr result); 1460public unsafe delegate int Tokenize_3(IntPtr thisPtr, IntPtr text, uint startIndex, IntPtr handler); 1474public static readonly IntPtr AbiToProjectionVftablePtr; 1482var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); 1483Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 1484AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 1487private static unsafe int Do_Abi_CreateWithLanguage_0(IntPtr thisPtr, IntPtr language, out IntPtr result) 1507public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 1512public IntPtr ThisPtr => _obj.ThisPtr; 1524IntPtr __retval = default; 1541public unsafe delegate int CreateWithLanguage_0(IntPtr thisPtr, IntPtr language, out IntPtr result); 1547public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 1548public static global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment FromAbi(IntPtr thisPtr) => global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment.FromAbi(thisPtr); 1549public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef(); 1551public static (int length, IntPtr data) GetAbiArray(object box) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment>.GetAbiArray(box); 1553public static (int length, IntPtr data) FromManagedArray(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment[] array) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegment>.FromManagedArray(array, (o) => FromManaged(o)); 1556public static void DisposeAbi(IntPtr abi) => MarshalInspectable.DisposeAbi(abi); 1563private unsafe delegate int Abi_Invoke(IntPtr thisPtr, IntPtr precedingWords, IntPtr words); 1566public static readonly IntPtr AbiToProjectionVftablePtr; 1576var nativeVftbl = ComWrappersSupport.AllocateVtableMemory(typeof(WordSegmentsTokenizingHandler), Marshal.SizeOf<global::WinRT.Interop.IDelegateVftbl>()); 1586public static IntPtr GetAbi(IObjectReference value) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegmentsTokenizingHandler>.GetAbi(value); 1588public static unsafe global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegmentsTokenizingHandler FromAbi(IntPtr nativeDelegate) 1606IntPtr ThisPtr = _nativeDelegate.ThisPtr; 1625public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegmentsTokenizingHandler managedDelegate) => CreateMarshaler(managedDelegate)?.GetRef() ?? IntPtr.Zero; 1629public static void DisposeAbi(IntPtr abi) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordSegmentsTokenizingHandler>.DisposeAbi(abi); 1631private static unsafe int Do_Abi_Invoke(IntPtr thisPtr, IntPtr precedingWords, IntPtr words) 1656public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 1657public static global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter FromAbi(IntPtr thisPtr) => global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter.FromAbi(thisPtr); 1658public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef(); 1660public static (int length, IntPtr data) GetAbiArray(object box) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter>.GetAbiArray(box); 1662public static (int length, IntPtr data) FromManagedArray(global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter[] array) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Data.Text.WordsSegmenter>.FromManagedArray(array, (o) => FromManaged(o)); 1665public static void DisposeAbi(IntPtr abi) => MarshalInspectable.DisposeAbi(abi);
MS\Internal\WindowsRuntime\Generated\Windows.Globalization.cs (99)
66public IntPtr ThisPtr => _default.ThisPtr; 79public unsafe new IntPtr CreateLanguage(string languageTag) 82IntPtr __retval = default; 98IntPtr ptr = (_ILanguageFactory.Instance.CreateLanguage(languageTag)); 132public static Language FromAbi(IntPtr thisPtr) 134if (thisPtr == IntPtr.Zero) return null; 144public static bool operator ==(Language x, Language y) => (x?.ThisPtr ?? IntPtr.Zero) == (y?.ThisPtr ?? IntPtr.Zero); 175global::System.Runtime.InteropServices.CustomQueryInterfaceResult global::System.Runtime.InteropServices.ICustomQueryInterface.GetInterface(ref Guid iid, out IntPtr ppv) 177ppv = IntPtr.Zero; 222public static readonly IntPtr AbiToProjectionVftablePtr; 233var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4); 234Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 235AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 238private static unsafe int Do_Abi_get_DisplayName_1(IntPtr thisPtr, out IntPtr value) 257private static unsafe int Do_Abi_get_LanguageTag_0(IntPtr thisPtr, out IntPtr value) 276private static unsafe int Do_Abi_get_NativeName_2(IntPtr thisPtr, out IntPtr value) 295private static unsafe int Do_Abi_get_Script_3(IntPtr thisPtr, out IntPtr value) 315public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 320public IntPtr ThisPtr => _obj.ThisPtr; 333IntPtr __retval = default; 350IntPtr __retval = default; 367IntPtr __retval = default; 384IntPtr __retval = default; 409public static readonly IntPtr AbiToProjectionVftablePtr; 417var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); 418Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 419AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 422private static unsafe int Do_Abi_get_LayoutDirection_0(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Globalization.LanguageLayoutDirection value) 442public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 447public IntPtr ThisPtr => _obj.ThisPtr; 469public unsafe delegate int get_LayoutDirection_0(IntPtr thisPtr, out global::MS.Internal.WindowsRuntime.Windows.Globalization.LanguageLayoutDirection value); 483public static readonly IntPtr AbiToProjectionVftablePtr; 491var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); 492Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 493AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 496private static unsafe int Do_Abi_GetExtensionSubtags_0(IntPtr thisPtr, IntPtr singleton, out IntPtr value) 516public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 521public IntPtr ThisPtr => _obj.ThisPtr; 533IntPtr __retval = default; 550public unsafe delegate int GetExtensionSubtags_0(IntPtr thisPtr, IntPtr singleton, out IntPtr value); 564public static readonly IntPtr AbiToProjectionVftablePtr; 572var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); 573Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 574AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 577private static unsafe int Do_Abi_CreateLanguage_0(IntPtr thisPtr, IntPtr languageTag, out IntPtr result) 597public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 602public IntPtr ThisPtr => _obj.ThisPtr; 614IntPtr __retval = default; 631public unsafe delegate int CreateLanguage_0(IntPtr thisPtr, IntPtr languageTag, out IntPtr result); 646public static readonly IntPtr AbiToProjectionVftablePtr; 655var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 2); 656Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 657AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 660private static unsafe int Do_Abi_IsWellFormed_0(IntPtr thisPtr, IntPtr languageTag, out byte result) 679private static unsafe int Do_Abi_get_CurrentInputMethodLanguageTag_1(IntPtr thisPtr, out IntPtr value) 699public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 704public IntPtr ThisPtr => _obj.ThisPtr; 733IntPtr __retval = default; 749public unsafe delegate int IsWellFormed_0(IntPtr thisPtr, IntPtr languageTag, out byte result); 763public static readonly IntPtr AbiToProjectionVftablePtr; 771var nativeVftbl = (IntPtr*)ComWrappersSupport.AllocateVtableMemory(typeof(Vftbl), Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); 772Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 773AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 776private static unsafe int Do_Abi_TrySetInputMethodLanguageTag_0(IntPtr thisPtr, IntPtr languageTag, out byte result) 796public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 801public IntPtr ThisPtr => _obj.ThisPtr; 829public unsafe delegate int TrySetInputMethodLanguageTag_0(IntPtr thisPtr, IntPtr languageTag, out byte result); 836public static IntPtr GetAbi(IObjectReference value) => value is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(value); 837public static global::MS.Internal.WindowsRuntime.Windows.Globalization.Language FromAbi(IntPtr thisPtr) => global::MS.Internal.WindowsRuntime.Windows.Globalization.Language.FromAbi(thisPtr); 838public static IntPtr FromManaged(global::MS.Internal.WindowsRuntime.Windows.Globalization.Language obj) => obj is null ? IntPtr.Zero : CreateMarshaler(obj).GetRef(); 840public static (int length, IntPtr data) GetAbiArray(object box) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Globalization.Language>.GetAbiArray(box); 842public static (int length, IntPtr data) FromManagedArray(global::MS.Internal.WindowsRuntime.Windows.Globalization.Language[] array) => MarshalInterfaceHelper<global::MS.Internal.WindowsRuntime.Windows.Globalization.Language>.FromManagedArray(array, (o) => FromManaged(o)); 845public static void DisposeAbi(IntPtr abi) => MarshalInspectable.DisposeAbi(abi);
MS\Internal\WindowsRuntime\Generated\WinRT.cs (34)
30public static extern int CoDecrementMTAUsage(IntPtr cookie); 33public static extern unsafe int CoIncrementMTAUsage(IntPtr* cookie); 37public static extern bool FreeLibrary(IntPtr moduleHandle); 40public static extern IntPtr GetProcAddress(IntPtr moduleHandle, [MarshalAs(UnmanagedType.LPStr)] string functionName); 42public static T GetProcAddress<T>(IntPtr moduleHandle) 44IntPtr functionPtr = Platform.GetProcAddress(moduleHandle, typeof(T).Name); 45if (functionPtr == IntPtr.Zero) 53public static extern IntPtr LoadLibraryExW([MarshalAs(UnmanagedType.LPWStr)] string fileName, IntPtr fileHandle, uint flags); 56public static extern unsafe int RoGetActivationFactory(IntPtr runtimeClassId, ref Guid iid, IntPtr* factory); 61IntPtr* hstring); 66IntPtr* hstring_header, 67IntPtr* hstring); 70public static extern int WindowsDeleteString(IntPtr hstring); 73public static extern unsafe int WindowsDuplicateString(IntPtr sourceString, 74IntPtr* hstring); 77public static extern unsafe char* WindowsGetStringRawBuffer(IntPtr hstring, uint* length); 82public IntPtr Vftbl; 89IntPtr activatableClassId, 90out IntPtr activationFactory); 96private readonly IntPtr _moduleHandle; 123_moduleHandle = Platform.LoadLibraryExW(System.IO.Path.Combine(_currentModuleDirectory, fileName), IntPtr.Zero, /* LOAD_WITH_ALTERED_SEARCH_PATH */ 8); 125if (_moduleHandle == IntPtr.Zero) 135if (_moduleHandle == IntPtr.Zero) 142var canUnloadNow = Platform.GetProcAddress(_moduleHandle, "DllCanUnloadNow"); 143if (canUnloadNow != IntPtr.Zero) 151IntPtr instancePtr; 164if ((_moduleHandle != IntPtr.Zero) && !Platform.FreeLibrary(_moduleHandle)) 194private readonly IntPtr _mtaCookie; 200IntPtr mtaCookie; 209IntPtr instancePtr; 255Marshal.ThrowExceptionForHR(_IActivationFactory.Vftbl.ActivateInstance(_IActivationFactory.ThisPtr, out IntPtr instancePtr));
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.cs (6)
30public static TReturn MarshalDelegateInvoke<TDelegate, TReturn>(IntPtr thisPtr, Func<TDelegate, TReturn> invoke) 41public static void MarshalDelegateInvoke<T>(IntPtr thisPtr, Action<T> invoke) 83public static IObjectReference GetObjectReferenceForInterface(IntPtr externalComObject) 112Vtable = (IntPtr)ifaceAbiType.FindVftblType().GetField("AbiToProjectionVftablePtr", BindingFlags.Public | BindingFlags.Static).GetValue(null) 123Vtable = (IntPtr)compatibleIfaceAbiType.FindVftblType().GetField("AbiToProjectionVftablePtr", BindingFlags.Public | BindingFlags.Static).GetValue(null) 133Vtable = (IntPtr)obj.GetType().GetHelperType().GetField("AbiToProjectionVftablePtr", BindingFlags.Public | BindingFlags.Static).GetValue(null)
MS\Internal\WindowsRuntime\Generated\WinRT\ComWrappersSupport.net5.cs (13)
18public static unsafe InspectableInfo GetInspectableInfo(IntPtr pThis) 24public static object CreateRcwForComObject(IntPtr ptr) 29public static void RegisterObjectForInterface(object obj, IntPtr thisPtr) => TryRegisterObjectForInterface(obj, thisPtr); 31public static object TryRegisterObjectForInterface(object obj, IntPtr thisPtr) => ComWrappers.GetOrRegisterObjectForComInstance(thisPtr, CreateObjectFlags.TrackerObject, obj); 35IntPtr ccw = ComWrappers.GetOrCreateComInterfaceForObject(obj, CreateComInterfaceFlags.TrackerSupport); 39public static unsafe T FindObject<T>(IntPtr ptr) 42private static T FindDelegate<T>(IntPtr thisPtr) 47public static IntPtr AllocateVtableMemory(Type vtableType, int size) => RuntimeHelpers.AllocateTypeAssociatedMemory(vtableType, size); 62GetIUnknownImpl(out var qi, out var addRef, out var release); 103protected override object CreateObject(IntPtr externalComObject, CreateObjectFlags flags) 151Marshal.FreeCoTaskMem((IntPtr)_data);
MS\Internal\WindowsRuntime\Generated\WinRT\Context.cs (3)
12private static extern int CoGetObjectContext(ref Guid riid, out IntPtr ppv); 14public static IntPtr GetContextCallback() 17Marshal.ThrowExceptionForHR(CoGetObjectContext(ref riid, out IntPtr contextCallbackPtr));
MS\Internal\WindowsRuntime\Generated\WinRT\ExceptionHelpers.cs (19)
27private static extern int SetErrorInfo(uint dwReserved, IntPtr perrinfo); 29internal delegate int GetRestrictedErrorInfo(out IntPtr ppRestrictedErrorInfo); 32internal delegate int SetRestrictedErrorInfo(IntPtr pRestrictedErrorInfo); 35internal delegate int RoOriginateLanguageException(int error, IntPtr message, IntPtr langaugeException); 38internal delegate int RoReportUnhandledError(IntPtr pRestrictedErrorInfo); 43IntPtr winRTErrorModule = Platform.LoadLibraryExW("api-ms-win-core-winrt-error-l1-1-1.dll", IntPtr.Zero, (uint)DllImportSearchPath.System32); 44if (winRTErrorModule != IntPtr.Zero) 53winRTErrorModule = Platform.LoadLibraryExW("api-ms-win-core-winrt-error-l1-1-0.dll", IntPtr.Zero, (uint)DllImportSearchPath.System32); 54if (winRTErrorModule != IntPtr.Zero) 96Marshal.ThrowExceptionForHR(getRestrictedErrorInfo(out IntPtr restrictedErrorInfoPtr)); 98if (restrictedErrorInfoPtr != IntPtr.Zero) 148ex = Marshal.GetExceptionForHR(hr, iErrorInfo?.ThisPtr ?? (IntPtr)(-1)); 185IntPtr hstring; 189hstring = IntPtr.Zero; 208Marshal.ThrowExceptionForHR(getRestrictedErrorInfo(out IntPtr ppRestrictedErrorInfo)); 311Marshal.ThrowExceptionForHR(getRestrictedErrorInfo(out IntPtr restrictedErrorInfoPtr)); 313if (restrictedErrorInfoPtr != IntPtr.Zero)
MS\Internal\WindowsRuntime\Generated\WinRT\FundamentalMarshalers.cs (4)
12public static unsafe void CopyAbi(bool value, IntPtr dest) => *(byte*)dest.ToPointer() = GetAbi(value).value; 14public static unsafe void CopyManaged(bool arg, IntPtr dest) => *(byte*)dest.ToPointer() = FromManaged(arg).value; 25public static unsafe void CopyAbi(char value, IntPtr dest) => *(ushort*)dest.ToPointer() = GetAbi(value).value; 27public static unsafe void CopyManaged(char arg, IntPtr dest) => *(ushort*)dest.ToPointer() = FromManaged(arg).value;
MS\Internal\WindowsRuntime\Generated\WinRT\IInspectable.cs (12)
24internal delegate int _GetIids(IntPtr pThis, out uint iidCount, out Guid[] iids); 25internal delegate int _GetRuntimeClassName(IntPtr pThis, out IntPtr className); 26internal delegate int _GetTrustLevel(IntPtr pThis, out TrustLevel trustLevel); 34public static readonly IntPtr AbiToProjectionVftablePtr; 49private static int Do_Abi_GetIids(IntPtr pThis, out uint iidCount, out Guid[] iids) 65private static unsafe int Do_Abi_GetRuntimeClassName(IntPtr pThis, out IntPtr className) 80private static int Do_Abi_GetTrustLevel(IntPtr pThis, out TrustLevel trustLevel) 87public static IInspectable FromAbi(IntPtr thisPtr) => 91public IntPtr ThisPtr => _obj.ThisPtr; 104IntPtr __retval = default;
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\ExceptionErrorInfo.cs (63)
84internal delegate int _GetGuid(IntPtr thisPtr, out Guid guid); 85internal delegate int _GetBstr(IntPtr thisPtr, out IntPtr bstr); 94public static readonly IntPtr AbiToProjectionVftablePtr; 107var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<Vftbl>()); 108Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 109AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 112private static int Do_Abi_GetGuid_0(IntPtr thisPtr, out Guid guid) 127private static int Do_Abi_GetSource_1(IntPtr thisPtr, out IntPtr source) 129source = IntPtr.Zero; 145private static int Do_Abi_GetDescription_2(IntPtr thisPtr, out IntPtr description) 147description = IntPtr.Zero; 163private static int Do_Abi_GetHelpFile_3(IntPtr thisPtr, out IntPtr helpFile) 165helpFile = IntPtr.Zero; 181private static int Do_Abi_GetHelpFileContent_4(IntPtr thisPtr, out IntPtr helpFileContent) 183helpFileContent = IntPtr.Zero; 200public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 205public IntPtr ThisPtr => _obj.ThisPtr; 223IntPtr __retval = default; 227return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 237IntPtr __retval = default; 241return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 251IntPtr __retval = default; 255return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 265IntPtr __retval = default; 269return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty; 284internal delegate int _GetLanguageException(IntPtr thisPtr, out IntPtr languageException); 289public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 294public IntPtr ThisPtr => _obj.ThisPtr; 305IntPtr __return_value__ = IntPtr.Zero; 327internal delegate int _InterfaceSupportsErrorInfo(IntPtr thisPtr, ref Guid riid); 332public static readonly IntPtr AbiToProjectionVftablePtr; 341var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<Vftbl>()); 342Marshal.StructureToPtr(AbiToProjectionVftable, (IntPtr)nativeVftbl, false); 343AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 346private static int Do_Abi_InterfaceSupportsErrorInfo_0(IntPtr thisPtr, ref Guid guid) 360public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 365public IntPtr ThisPtr => _obj.ThisPtr; 386internal delegate int _GetErrorDetails(IntPtr thisPtr, out IntPtr description, out int error, out IntPtr restrictedDescription, out IntPtr capabilitySid); 387internal delegate int _GetReference(IntPtr thisPtr, out IntPtr reference); 394public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 399public IntPtr ThisPtr => _obj.ThisPtr; 414IntPtr _description = IntPtr.Zero; 415IntPtr _restrictedDescription = IntPtr.Zero; 416IntPtr _capabilitySid = IntPtr.Zero; 420description = _description != IntPtr.Zero ? Marshal.PtrToStringBSTR(_description) : string.Empty; 421restrictedDescription = _restrictedDescription != IntPtr.Zero ? Marshal.PtrToStringBSTR(_restrictedDescription) : string.Empty; 422capabilitySid = _capabilitySid != IntPtr.Zero ? Marshal.PtrToStringBSTR(_capabilitySid) : string.Empty; 434IntPtr __retval = default; 438return __retval != IntPtr.Zero ? Marshal.PtrToStringBSTR(__retval) : string.Empty;
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\IContextCallback.cs (7)
17public IntPtr pUserDefined; 45IntPtr pThis, 50IntPtr pUnk); 55public static ObjectReference<Vftbl> FromAbi(IntPtr thisPtr) => ObjectReference<Vftbl>.FromAbi(thisPtr); 60public IntPtr ThisPtr => _obj.ThisPtr; 71public IntPtr delegateHandle; 77Marshal.ThrowExceptionForHR(_obj.Vftbl.ContextCallback_4(ThisPtr, pfnCallback, pParam, ref riid, iMethod, IntPtr.Zero));
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\IUnknownVftbl.cs (5)
11public unsafe delegate int _QueryInterface(IntPtr pThis, ref Guid iid, out IntPtr vftbl); 12internal delegate uint _AddRef(IntPtr pThis); 13internal delegate uint _Release(IntPtr pThis); 20public static readonly IntPtr AbiToProjectionVftblPtr;
MS\Internal\WindowsRuntime\Generated\WinRT\Interop\StandardDelegates.cs (34)
10internal delegate int _get_PropertyAsBoolean(IntPtr thisPtr, out byte value); 12internal delegate int _put_PropertyAsBoolean(IntPtr thisPtr, byte value); 14internal delegate int _get_PropertyAsChar(IntPtr thisPtr, out ushort value); 16internal delegate int _put_PropertyAsChar(IntPtr thisPtr, ushort value); 18internal delegate int _get_PropertyAsSByte(IntPtr thisPtr, out sbyte value); 20internal delegate int _put_PropertyAsSByte(IntPtr thisPtr, sbyte value); 22internal delegate int _get_PropertyAsByte(IntPtr thisPtr, out byte value); 24internal delegate int _put_PropertyAsByte(IntPtr thisPtr, byte value); 26internal delegate int _get_PropertyAsInt16(IntPtr thisPtr, out short value); 28internal delegate int _put_PropertyAsInt16(IntPtr thisPtr, short value); 30internal delegate int _get_PropertyAsUInt16(IntPtr thisPtr, out ushort value); 32internal delegate int _put_PropertyAsUInt16(IntPtr thisPtr, ushort value); 34internal delegate int _get_PropertyAsInt32(IntPtr thisPtr, out int value); 36internal delegate int _put_PropertyAsInt32(IntPtr thisPtr, int value); 38internal delegate int _get_PropertyAsUInt32(IntPtr thisPtr, out uint value); 40internal delegate int _put_PropertyAsUInt32(IntPtr thisPtr, uint value); 42internal delegate int _get_PropertyAsInt64(IntPtr thisPtr, out long value); 44internal delegate int _put_PropertyAsInt64(IntPtr thisPtr, long value); 46internal delegate int _get_PropertyAsUInt64(IntPtr thisPtr, out ulong value); 48internal delegate int _put_PropertyAsUInt64(IntPtr thisPtr, ulong value); 50internal delegate int _get_PropertyAsFloat(IntPtr thisPtr, out float value); 52internal delegate int _put_PropertyAsFloat(IntPtr thisPtr, float value); 54internal delegate int _get_PropertyAsDouble(IntPtr thisPtr, out double value); 56internal delegate int _put_PropertyAsDouble(IntPtr thisPtr, double value); 58internal delegate int _get_PropertyAsObject(IntPtr thisPtr, out IntPtr value); 60internal delegate int _put_PropertyAsObject(IntPtr thisPtr, IntPtr value); 62internal delegate int _get_PropertyAsGuid(IntPtr thisPtr, out Guid value); 64internal delegate int _put_PropertyAsGuid(IntPtr thisPtr, Guid value); 66internal delegate int _get_PropertyAsString(IntPtr thisPtr, out IntPtr value); 68internal delegate int _put_PropertyAsString(IntPtr thisPtr, IntPtr value);
MS\Internal\WindowsRuntime\Generated\WinRT\Marshalers.cs (150)
36public IntPtr _handle; 55(char*)chars, value.Length, (IntPtr*)header, (IntPtr*)handle)); 66public static IntPtr GetAbi(MarshalString m) => m is null ? IntPtr.Zero : m._handle; 68public static IntPtr GetAbi(object box) => box is null ? IntPtr.Zero : ((MarshalString)box)._handle; 78public static void DisposeAbi(IntPtr hstring) 80if (hstring != IntPtr.Zero) 87DisposeAbi(((IntPtr)abi)); 90public static unsafe string FromAbi(IntPtr value) 92if (value == IntPtr.Zero) 99public static unsafe IntPtr FromManaged(string value) 103return IntPtr.Zero; 105IntPtr handle; 122if (_array != IntPtr.Zero) 128public IntPtr _array; 143m._array = Marshal.AllocCoTaskMem(length * IntPtr.Size); 145var elements = (IntPtr*)m._array.ToPointer(); 160public static (int length, IntPtr data) GetAbiArray(object box) 172var abi = ((int length, IntPtr data))box; 174var data = (IntPtr*)abi.data.ToPointer(); 184var abi = ((int length, IntPtr data))box; 185var data = (IntPtr*)abi.data.ToPointer(); 192public static unsafe (int length, IntPtr data) FromManagedArray(string[] array) 196return (0, IntPtr.Zero); 198IntPtr data = IntPtr.Zero; 204data = IntPtr.Zero; 210data = Marshal.AllocCoTaskMem(length * IntPtr.Size); 211var elements = (IntPtr*)data; 225public static unsafe void CopyManagedArray(string[] array, IntPtr data) 237var elements = (IntPtr*)data; 254public static unsafe void DisposeAbiArrayElements((int length, IntPtr data) abi) 256var elements = (IntPtr*)abi.data; 266var abi = ((int length, IntPtr data))box; 284public static (int length, IntPtr data) GetAbiArray(object box) 296var abi = ((int length, IntPtr data))box; 301public static unsafe (int length, IntPtr data) FromManagedArray(Array array) 305return (0, IntPtr.Zero); 309var data = Marshal.AllocCoTaskMem(byte_length); 314public static unsafe void CopyManagedArray(Array array, IntPtr data) 334var abi = ((int length, IntPtr data))box; 375public static readonly Action<object, IntPtr> CopyAbi; 376private static Action<object, IntPtr> BindCopyAbi() 380var parms = new[] { Expression.Parameter(typeof(object), "arg"), Expression.Parameter(typeof(IntPtr), "dest") }; 381return Expression.Lambda<Action<object, IntPtr>>( 404public static readonly Action<T, IntPtr> CopyManaged; 405private static Action<T, IntPtr> BindCopyManaged() 409var parms = new[] { Expression.Parameter(typeof(T), "arg"), Expression.Parameter(typeof(IntPtr), "dest") }; 410return Expression.Lambda<Action<T, IntPtr>>( 437if (_array != IntPtr.Zero) 443public IntPtr _array; 466Marshaler<T>.CopyAbi(m._marshalers[i], (IntPtr)element); 478public static (int length, IntPtr data) GetAbiArray(object box) 490var abi = ((int length, IntPtr data))box; 496var abi_element = Marshal.PtrToStructure((IntPtr)data, HelperType); 505var abi = ((int length, IntPtr data))box; 506if (abi.data == IntPtr.Zero) 514var abi_element = Marshal.PtrToStructure((IntPtr)data, HelperType); 520public static unsafe (int length, IntPtr data) FromManagedArray(T[] array) 524return (0, IntPtr.Zero); 526IntPtr data = IntPtr.Zero; 532data = IntPtr.Zero; 544Marshaler<T>.CopyManaged(array[i], (IntPtr)bytes); 556public static unsafe void CopyManagedArray(T[] array, IntPtr data) 573Marshaler<T>.CopyManaged(array[i], (IntPtr)bytes); 584public static unsafe void DisposeAbiArrayElements((int length, IntPtr data) abi) 590var abi_element = Marshal.PtrToStructure((IntPtr)data, HelperType); 599var abi = ((int length, IntPtr data))box; 600if (abi.data == IntPtr.Zero) return; 619if (_array != IntPtr.Zero) 625public IntPtr _array; 640var byte_length = length * IntPtr.Size; 643var element = (IntPtr*)m._array.ToPointer(); 658public static (int length, IntPtr data) GetAbiArray(object box) 664public static unsafe T[] FromAbiArray(object box, Func<IntPtr, T> fromAbi) 670var abi = ((int length, IntPtr data))box; 672var data = (IntPtr*)abi.data.ToPointer(); 680public static unsafe (int length, IntPtr data) FromManagedArray(T[] array, Func<T, IntPtr> fromManaged) 684return (0, IntPtr.Zero); 686IntPtr data = IntPtr.Zero; 692data = IntPtr.Zero; 698var byte_length = length * IntPtr.Size; 700var native = (IntPtr*)data.ToPointer(); 714public static unsafe void CopyManagedArray(T[] array, IntPtr data, Action<T, IntPtr> copyManaged) 726var byte_length = length * IntPtr.Size; 730copyManaged(array[i], (IntPtr)bytes); 731bytes += IntPtr.Size; 741public static unsafe void DisposeAbiArrayElements((int length, IntPtr data) abi) 743var data = (IntPtr*)abi.data.ToPointer(); 753var abi = ((int length, IntPtr data))box; 754if (abi.data == IntPtr.Zero) return; 759public static IntPtr GetAbi(IObjectReference objRef) 761return objRef?.ThisPtr ?? IntPtr.Zero; 769public static void DisposeAbi(IntPtr ptr) 771if (ptr == IntPtr.Zero) return; 781private static Func<IntPtr, T> _FromAbi; 784public static T FromAbi(IntPtr ptr) 786if (ptr == IntPtr.Zero) 834public static IntPtr GetAbi(IObjectReference value) => 835value is null ? IntPtr.Zero : MarshalInterfaceHelper<T>.GetAbi(value); 837public static void DisposeAbi(IntPtr thisPtr) => MarshalInterfaceHelper<T>.DisposeAbi(thisPtr); 841public static IntPtr FromManaged(T value) 845return IntPtr.Zero; 850public static unsafe void CopyManaged(T value, IntPtr dest) 852*(IntPtr*)dest.ToPointer() = 853(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 858public static (int length, IntPtr data) GetAbiArray(object box) => MarshalInterfaceHelper<T>.GetAbiArray(box); 862public static unsafe (int length, IntPtr data) FromManagedArray(T[] array) => MarshalInterfaceHelper<T>.FromManagedArray(array, (o) => FromManaged(o)); 864public static unsafe void CopyManagedArray(T[] array, IntPtr data) => MarshalInterfaceHelper<T>.CopyManagedArray(array, data, (o, dest) => CopyManaged(o, dest)); 870private static Func<IntPtr, T> BindFromAbi() 874var parms = new[] { Expression.Parameter(typeof(IntPtr), "arg") }; 875return Expression.Lambda<Func<IntPtr, T>>( 917public static IntPtr GetAbi(IObjectReference objRef) => 918objRef is null ? IntPtr.Zero : MarshalInterfaceHelper<object>.GetAbi(objRef); 920public static object FromAbi(IntPtr ptr) 922if (ptr == IntPtr.Zero) 949public static void DisposeAbi(IntPtr ptr) => MarshalInterfaceHelper<object>.DisposeAbi(ptr); 950public static IntPtr FromManaged(object o, bool unwrapObject = true) 953return objRef?.GetRef() ?? IntPtr.Zero; 956public static unsafe void CopyManaged(object o, IntPtr dest, bool unwrapObject = true) 959*(IntPtr*)dest.ToPointer() = objRef?.GetRef() ?? IntPtr.Zero; 964public static (int length, IntPtr data) GetAbiArray(object box) => MarshalInterfaceHelper<object>.GetAbiArray(box); 968public static unsafe (int length, IntPtr data) FromManagedArray(object[] array) => MarshalInterfaceHelper<object>.FromManagedArray(array, (o) => FromManaged(o)); 970public static unsafe void CopyManagedArray(object[] array, IntPtr data) => MarshalInterfaceHelper<object>.CopyManagedArray(array, data, (o, dest) => CopyManaged(o, dest)); 991AbiType = typeof(IntPtr); 994FromAbi = (object value) => (T)(object)MarshalString.FromAbi((IntPtr)value); 1002CopyManagedArray = (T[] array, IntPtr data) => MarshalString.CopyManagedArray((string[])(object)array, data); 1008AbiType = typeof(IntPtr); 1043CopyManagedArray = (T[] array, IntPtr data) => MarshalBlittable<T>.CopyManagedArray(array, data); 1061CopyManagedArray = (T[] array, IntPtr data) => MarshalNonBlittable<T>.CopyManagedArray(array, data); 1068AbiType = typeof(IntPtr); 1071FromAbi = (object value) => (T)(object)MarshalInterface<T>.FromAbi((IntPtr)value); 1074DisposeAbi = (object box) => MarshalInterface<T>.DisposeAbi((IntPtr)box); 1078AbiType = typeof(IntPtr); 1081FromAbi = (object box) => (T)MarshalInspectable.FromAbi((IntPtr)box); 1083CopyManaged = (T value, IntPtr dest) => MarshalInspectable.CopyManaged(value, dest); 1085DisposeAbi = (object box) => MarshalInspectable.DisposeAbi((IntPtr)box); 1089AbiType = typeof(IntPtr); 1105public static readonly Action<object, IntPtr> CopyAbi; 1108public static readonly Action<T, IntPtr> CopyManaged; 1112public static readonly Func<object, (int, IntPtr)> GetAbiArray; 1114public static readonly Func<T[], (int, IntPtr)> FromManagedArray; 1115public static readonly Action<T[], IntPtr> CopyManagedArray;
MS\Internal\WindowsRuntime\Generated\WinRT\ObjectReference.cs (24)
16private readonly IntPtr _thisPtr; 17public IntPtr ThisPtr 37protected IObjectReference(IntPtr thisPtr) 39if (thisPtr == IntPtr.Zero) 55Marshal.ThrowExceptionForHR(VftblIUnknown.QueryInterface(ThisPtr, ref iid, out IntPtr thatPtr)); 65int hr = VftblIUnknown.QueryInterface(ThisPtr, ref iid, out IntPtr thatPtr); 86public IntPtr GetRef() 154public static ObjectReference<T> Attach(ref IntPtr thisPtr) 156if (thisPtr == IntPtr.Zero) 161thisPtr = IntPtr.Zero; 165private ObjectReference(IntPtr thisPtr, IUnknownVftbl vftblIUnknown, T vftblT) : 172private protected ObjectReference(IntPtr thisPtr) : 177private ObjectReference(IntPtr thisPtr, (IUnknownVftbl vftblIUnknown, T vftblT) vtables) : 182public static ObjectReference<T> FromAbi(IntPtr thisPtr, IUnknownVftbl vftblIUnknown, T vftblT) 184if (thisPtr == IntPtr.Zero) 193public static ObjectReference<T> FromAbi(IntPtr thisPtr) 195if (thisPtr == IntPtr.Zero) 204private static unsafe (IUnknownVftbl vftblIUnknown, T vftblT) GetVtables(IntPtr thisPtr) 211vftblT = (T)typeof(T).GetConstructor(BindingFlags.NonPublic | BindingFlags.Instance | BindingFlags.CreateInstance, null, new[] { typeof(IntPtr) }, null).Invoke(new object[] { thisPtr }); 224private readonly IntPtr _contextCallbackPtr; 226public ObjectReferenceWithContext(IntPtr thisPtr, IntPtr contextCallbackPtr) 235IntPtr contextCallbackPtr = _contextCallbackPtr; 250int hr = VftblIUnknown.QueryInterface(ThisPtr, ref iid, out IntPtr thatPtr);
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IEnumerable.cs (49)
40public static IntPtr GetAbi(IObjectReference objRef) => 41objRef?.ThisPtr ?? IntPtr.Zero; 43public static global::System.Collections.Generic.IEnumerable<T> FromAbi(IntPtr thisPtr) => 44thisPtr == IntPtr.Zero ? null : new IEnumerable<T>(ObjRefFromAbi(thisPtr)); 46public static IntPtr FromManaged(global::System.Collections.Generic.IEnumerable<T> value) => 47(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 51public static void DisposeAbi(IntPtr abi) => 100internal unsafe Vftbl(IntPtr thisPtr) 103var vftbl = (IntPtr*)vftblPtr.Vftbl; 109public static readonly IntPtr AbiToProjectionVftablePtr; 117var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 1); 118Marshal.StructureToPtr(AbiToProjectionVftable.IInspectableVftbl, (IntPtr)nativeVftbl, false); 121AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 124private static unsafe int Do_Abi_First_0(IntPtr thisPtr, out IntPtr __return_value__) 141public static ObjectReference<Vftbl> ObjRefFromAbi(IntPtr thisPtr) 143if (thisPtr == IntPtr.Zero) 157public IntPtr ThisPtr => _obj.ThisPtr; 171IntPtr __retval = default; 188public unsafe delegate int First_0(IntPtr thisPtr, out IntPtr __return_value__); 197public static IntPtr GetAbi(IObjectReference objRef) => 198objRef?.ThisPtr ?? IntPtr.Zero; 200public static global::System.Collections.Generic.IEnumerator<T> FromAbi(IntPtr thisPtr) => 201thisPtr == IntPtr.Zero ? null : new IEnumerator<T>(ObjRefFromAbi(thisPtr)); 203internal static global::MS.Internal.WindowsRuntime.Windows.Foundation.Collections.IIterator<T> FromAbiInternal(IntPtr thisPtr) => 206public static IntPtr FromManaged(global::System.Collections.Generic.IEnumerator<T> value) => 207(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 211public static void DisposeAbi(IntPtr abi) => 426internal unsafe Vftbl(IntPtr thisPtr) 429var vftbl = (IntPtr*)vftblPtr.Vftbl; 438public static readonly IntPtr AbiToProjectionVftablePtr; 449var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4); 450Marshal.StructureToPtr(AbiToProjectionVftable.IInspectableVftbl, (IntPtr)nativeVftbl, false); 456AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 462private static ToAbiHelper FindAdapter(IntPtr thisPtr) 468private static unsafe int Do_Abi_MoveNext_2(IntPtr thisPtr, out byte __return_value__) 487private static unsafe int Do_Abi_GetMany_3(IntPtr thisPtr, int __itemsSize, IntPtr items, out uint __return_value__) 527private static unsafe int Do_Abi_get_HasCurrent_1(IntPtr thisPtr, out byte __return_value__) 546public static ObjectReference<Vftbl> ObjRefFromAbi(IntPtr thisPtr) 548if (thisPtr == IntPtr.Zero) 562public IntPtr ThisPtr => _obj.ThisPtr; 587IntPtr __items_data = default; 638public unsafe delegate int MoveNext_2(IntPtr thisPtr, out byte __return_value__); 639public unsafe delegate int GetMany_3(IntPtr thisPtr, int __itemsSize, IntPtr items, out uint __return_value__);
MS\Internal\WindowsRuntime\Generated\WinRT\Projections\IReadOnlyList.cs (24)
35public static IntPtr GetAbi(IObjectReference objRef) => 36objRef?.ThisPtr ?? IntPtr.Zero; 38public static global::System.Collections.Generic.IReadOnlyList<T> FromAbi(IntPtr thisPtr) => 39thisPtr == IntPtr.Zero ? null : new IReadOnlyList<T>(ObjRefFromAbi(thisPtr)); 41public static IntPtr FromManaged(global::System.Collections.Generic.IReadOnlyList<T> value) => 42(value is null) ? IntPtr.Zero : CreateMarshaler(value).GetRef(); 46public static void DisposeAbi(IntPtr abi) => 216internal unsafe Vftbl(IntPtr thisPtr) 219var vftbl = (IntPtr*)vftblPtr.Vftbl; 228public static readonly IntPtr AbiToProjectionVftablePtr; 239var nativeVftbl = (IntPtr*)Marshal.AllocCoTaskMem(Marshal.SizeOf<global::WinRT.IInspectable.Vftbl>() + sizeof(IntPtr) * 4); 240Marshal.StructureToPtr(AbiToProjectionVftable.IInspectableVftbl, (IntPtr)nativeVftbl, false); 246AbiToProjectionVftablePtr = (IntPtr)nativeVftbl; 252private static ToAbiHelper FindAdapter(IntPtr thisPtr) 297private static unsafe int Do_Abi_GetMany_3(IntPtr thisPtr, uint startIndex, int __itemsSize, IntPtr items, out uint __return_value__) 318private static unsafe int Do_Abi_get_Size_1(IntPtr thisPtr, out uint __return_value__) 338public static ObjectReference<Vftbl> ObjRefFromAbi(IntPtr thisPtr) 340if (thisPtr == IntPtr.Zero) 354public IntPtr ThisPtr => _obj.ThisPtr; 402IntPtr __items_data = default; 438public unsafe delegate int GetMany_3(IntPtr thisPtr, uint startIndex, int __itemsSize, IntPtr items, out uint __return_value__);
MS\Internal\WindowsRuntime\Generated\WinRT_Interop.cs (3)
14public unsafe delegate int _ActivateInstance(IntPtr pThis, out IntPtr instance); 24public IntPtr Invoke;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Internal\SecurityHelper.cs (1)
196IntPtr parentHwnd,
System\Windows\Appearance\WindowBackdropManager.cs (12)
43var handle = new WindowInteropHelper(window).Handle; 44if (handle == IntPtr.Zero) 54private static bool SetBackdropCore(IntPtr hwnd, WindowBackdropType backdropType) 56if (hwnd == IntPtr.Zero) 71private static bool ApplyBackdrop(IntPtr hwnd, WindowBackdropType backdropType) 88private static bool RemoveBackdrop(IntPtr hwnd) 97private static bool RemoveBackground(IntPtr hwnd) 99if (hwnd != IntPtr.Zero) 112private static bool RestoreBackground(IntPtr hwnd) 114if (hwnd != IntPtr.Zero) 117if (windowSource?.Handle != IntPtr.Zero && windowSource.CompositionTarget != null) 126private static bool UpdateGlassFrame(IntPtr hwnd, WindowBackdropType backdropType)
System\Windows\Application.cs (13)
1917internal IntPtr ParkingHwnd 1927return IntPtr.Zero; 2071IntPtr.Zero, 2076private IntPtr AppFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 2078IntPtr retInt = IntPtr.Zero; 2113private bool WmQueryEndSession(IntPtr lParam, ref IntPtr refInt) 2134refInt = IntPtr.Zero; 2284UnsafeNativeMethods.PlaySound(soundFile, IntPtr.Zero, PLAYSOUND_FLAGS);
System\Windows\Automation\Peers\HwndHostAutomationPeer.cs (2)
37IntPtr hwnd = host.Handle; 39if(hwnd != IntPtr.Zero)
System\Windows\Automation\Peers\WindowAutomationPeer.cs (2)
70IntPtr windowHandle = window.Handle; 71if(windowHandle != IntPtr.Zero) //it is Zero on a window that was just closed
System\Windows\Controls\ComboBox.cs (1)
1689if (comboBox.IsDropDownOpen && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero)
System\Windows\Controls\PasswordBox.cs (1)
154IntPtr ptr = System.Runtime.InteropServices.Marshal.SecureStringToBSTR(securePassword);
System\Windows\Controls\PopupControlService.cs (1)
97if (MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero)
System\Windows\Controls\Primitives\MenuBase.cs (3)
550if (menu.IsMenuMode && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero) 610IntPtr hwndWithFocus = MS.Win32.UnsafeNativeMethods.GetFocus(); 611HwndSource hwndSourceWithFocus = hwndWithFocus != IntPtr.Zero ? HwndSource.CriticalFromHwnd(hwndWithFocus) : null;
System\Windows\Controls\Primitives\Popup.cs (46)
1228bool reestablishCapture = e.OriginalSource != root && Mouse.Captured == null && MS.Win32.SafeNativeMethods.GetCapture() == IntPtr.Zero; 1749private IntPtr PopupFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1760if (wParam == IntPtr.Zero) 1793return IntPtr.Zero; 2672IntPtr monitor = SafeNativeMethods.MonitorFromRect(ref nativeBounds, NativeMethods.MONITOR_DEFAULTTONEAREST); 2674if (monitor != IntPtr.Zero) 2754IntPtr hCursor = SafeNativeMethods.GetCursor(); 2755if (hCursor != IntPtr.Zero) 3083UnsafeNativeMethods.SetWindowPos(new HandleRef(null, Handle), new HandleRef(null, IntPtr.Zero), 3091IntPtr parent = ParentHandle; 3092if (parent != IntPtr.Zero) 3104IntPtr hwnd = Handle; 3105if (hwnd != IntPtr.Zero) 3169IntPtr lastWebOCHwnd = GetLastWebOCHwnd(); 3173lastWebOCHwnd == IntPtr.Zero ? NativeMethods.HWND_TOP : new HandleRef(null, lastWebOCHwnd), 3204private IntPtr GetLastWebOCHwnd() 3207IntPtr lastHwnd = UnsafeNativeMethods.GetWindow(new HandleRef(null, Handle), NativeMethods.GW_HWNDLAST); 3211while (lastHwnd != IntPtr.Zero) 3237IntPtr handle = Handle; 3254UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(null, handle), NativeMethods.GWL_EXSTYLE, (IntPtr)styles); 3311IntPtr parent = IntPtr.Zero; 3343if ( parent != IntPtr.Zero ) 3351if ((parent != IntPtr.Zero) && ConnectedToForegroundWindow(parent)) 3377private static bool ConnectedToForegroundWindow(IntPtr window) 3379IntPtr foregroundWindow = UnsafeNativeMethods.GetForegroundWindow(); 3381while (window != IntPtr.Zero) 3397private static IntPtr GetHandle(HwndSource hwnd) 3400return (hwnd!=null ? hwnd.Handle : IntPtr.Zero); 3403private static IntPtr GetParentHandle(HwndSource hwnd) 3407IntPtr child = GetHandle(hwnd); 3408if (child != IntPtr.Zero) 3414return IntPtr.Zero; 3417private IntPtr Handle => GetHandle(_window); 3419private IntPtr ParentHandle => GetParentHandle(_window); 3433if (Handle != IntPtr.Zero && (UnsafeNativeMethods.IsWinEventHookInstalled(NativeMethods.EVENT_OBJECT_FOCUS) || UnsafeNativeMethods.IsWinEventHookInstalled(NativeMethods.EVENT_OBJECT_STATECHANGE))) 3438if (popupRootAutomationPeer.Hwnd == IntPtr.Zero) 3441IntPtr lResult = AutomationInteropProvider.ReturnRawElementProvider(Handle, IntPtr.Zero, new IntPtr(NativeMethods.OBJID_CLIENT), RootProviderForHwnd); 3442if (lResult != IntPtr.Zero) 3447hr = UnsafeNativeMethods.ObjectFromLresult(lResult, ref iid, IntPtr.Zero, ref acc); 3525return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE; 3567IntPtr hMonitor = SafeNativeMethods.MonitorFromPoint(screenOrigin.Value, NativeMethods.MONITOR_DEFAULTTONEAREST);
System\Windows\Controls\WebBrowser.cs (4)
277rgvarg = IntPtr.Zero 299dp.rgvarg = (args == null) ? IntPtr.Zero : UnsafeNativeMethods.ArrayToVARIANTHelper.ArrayToVARIANTVector(args); 301dp.rgdispidNamedArgs = IntPtr.Zero; 329if (dp.rgvarg != IntPtr.Zero)
System\windows\Documents\CaretElement.cs (3)
966IntPtr hwnd = IntPtr.Zero; 974if (hwnd != IntPtr.Zero)
System\Windows\Documents\ImmComposition.cs (52)
185IntPtr hwnd = IntPtr.Zero; 189IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 190if (himc != IntPtr.Zero) 321private IntPtr ImmCompositionFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 323IntPtr lret = IntPtr.Zero; 372private void OnWmImeComposition(IntPtr hwnd, IntPtr lParam, ref bool handled) 374IntPtr himc; 402if (himc == IntPtr.Zero) 413size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_RESULTSTR, IntPtr.Zero, 0); 427size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPSTR, IntPtr.Zero, 0); 439cursorPos = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_CURSORPOS, IntPtr.Zero, 0); 447deltaStart = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_DELTASTART, IntPtr.Zero, 0); 455size = UnsafeNativeMethods.ImmGetCompositionString(new HandleRef(this, himc), NativeMethods.GCS_COMPATTR, IntPtr.Zero, 0); 475private void OnWmImeChar(IntPtr wParam, ref bool handled) 556private void OnWmImeNotify(IntPtr hwnd, IntPtr wParam) 558IntPtr himc; 569if (himc != IntPtr.Zero) 704IntPtr hwnd; 750IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 751if (himc != IntPtr.Zero) 1274private IntPtr OnWmImeRequest(IntPtr wParam, IntPtr lParam, ref bool handled) 1276IntPtr lret = IntPtr.Zero; 1302private IntPtr OnWmImeRequest_ReconvertString(IntPtr lParam, ref bool handled, bool fDocFeed) 1311return IntPtr.Zero; 1331IntPtr lret = new IntPtr(requestSize); 1333if (lParam != IntPtr.Zero) 1370private static unsafe void StoreSurroundingText(IntPtr reconv, string surrounding) 1489private IntPtr OnWmImeRequest_ConfirmReconvertString(IntPtr lParam, ref bool handled) 1493return IntPtr.Zero; 1498return IntPtr.Zero; 1507return IntPtr.Zero; 1726IntPtr hwnd = IntPtr.Zero; 1730IntPtr himc = UnsafeNativeMethods.ImmGetContext(new HandleRef(this, hwnd)); 1732IntPtr lret = IntPtr.Zero; 1733if (himc != IntPtr.Zero) 1735IntPtr hwndDefIme = IntPtr.Zero; 1741return (lret != IntPtr.Zero) ? true : false;
System\Windows\Documents\InputScopeAttribute.cs (6)
48public void GetInputScopes(out IntPtr ppinputscopes, out int count) 79public int GetPhrase(out IntPtr ppbstrPhrases, out int count) 84ppbstrPhrases = Marshal.AllocCoTaskMem(IntPtr.Size * count); 94IntPtr pbstr; 105offset += IntPtr.Size; 111offset += IntPtr.Size;
System\Windows\Documents\MoveSizeWinEventHandler.cs (3)
59internal override void WinEventProc(int eventId, IntPtr hwnd) 70IntPtr hwndTemp = textstore.CriticalSourceWnd; 71while (hwndTemp != IntPtr.Zero)
System\Windows\Documents\NaturalLanguageHyphenator.cs (6)
25private IntPtr _hyphenatorResource; 71if (!_disposed && _hyphenatorResource != IntPtr.Zero) 113if (_hyphenatorResource == IntPtr.Zero) 209internal static extern IntPtr NlCreateHyphenator(); 212internal static extern void NlDestroyHyphenator(ref IntPtr hyphenator); 216IntPtr hyphenator,
System\Windows\Documents\NLGSpellerInterop.cs (3)
189IntPtr inputArray = Marshal.AllocHGlobal(count * 2); 1039result = variantEnumerator.Next(1, (IntPtr)pVariant, fetched); 1542void SetInputArray([In] IntPtr inputArray, Int32 size);
System\windows\Documents\TextEditorContextMenu.cs (2)
301IntPtr hwnd = IntPtr.Zero;
System\windows\Documents\TextEditorDragDrop.cs (3)
652IntPtr hwnd = IntPtr.Zero; 659if (hwnd != IntPtr.Zero)
System\windows\Documents\TextEditorTyping.cs (3)
1603IntPtr hwnd = IntPtr.Zero; 1606if (hwnd != (IntPtr)0)
System\windows\Documents\TextSelection.cs (2)
1673IntPtr[] keyboardList; 1675keyboardList = new IntPtr[keyboardListCount];
System\Windows\Documents\TextServicesPropertyRanges.cs (2)
173IntPtr p = (IntPtr)pguid;
System\Windows\Documents\TextStore.cs (16)
577public void QueryInsertEmbedded(ref Guid guidService, IntPtr formatEtc, out bool insertable) 1166void UnsafeNativeMethods.ITextStoreACP.GetWnd(int viewCookie, out IntPtr hwnd) 1168hwnd = IntPtr.Zero; 2142internal IntPtr CriticalSourceWnd 2617IntPtr hwnd = IntPtr.Zero; 2797attrval.val.data1 = (IntPtr)(int)fontSize; 2813attrval.val.data1 = (IntPtr)(int)(fontSize / 96.0 * 72.0); 2818attrval.val.data1 = IsReadOnly ? (IntPtr)1 : (IntPtr)0; 2823attrval.val.data1 = (IntPtr)0; 2858attrval.val.data1 = (IntPtr)((int)angle * 10); 2870attrval.val.data1 = (IntPtr)0; 3280private IntPtr GetSourceWnd(bool callerIsTrusted) 3282IntPtr hwnd = IntPtr.Zero;
System\Windows\Documents\WinEventHandler.cs (7)
63internal virtual void WinEventProc(int eventId, IntPtr hwnd) 84_hHook = UnsafeNativeMethods.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc, 86if (_hHook == IntPtr.Zero ) 96if (_hHook != IntPtr.Zero ) 99_hHook = IntPtr.Zero ; 119private void WinEventDefaultProc(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, int eventTime) 159private IntPtr _hHook;
System\Windows\Input\KeyboardNavigation.cs (2)
3275IntPtr activeWindow = MS.Win32.UnsafeNativeMethods.GetActiveWindow(); 3277if (activeWindow != IntPtr.Zero)
System\Windows\Interop\ActiveXHost.cs (6)
143if (ControlHandle.Handle == IntPtr.Zero) 145IntPtr inplaceWindow = IntPtr.Zero; 499IntPtr.Zero, 509internal void AttachWindow(IntPtr hwnd) 520if (this.ParentHandle.Handle != IntPtr.Zero)
System\Windows\Interop\HwndHost.cs (52)
64public IntPtr Handle 68if (_hwnd.Handle != IntPtr.Zero) 72_hwnd = new HandleRef(null, IntPtr.Zero); 301if (Handle != IntPtr.Zero && (hwndFocus.Handle == _hwnd.Handle || UnsafeNativeMethods.IsChild(_hwnd, hwndFocus))) 338if (( Handle != IntPtr.Zero) && IsVisible) 394IntPtr hwndParent = UnsafeNativeMethods.GetParent(_hwnd); 547protected virtual IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 554_hwnd = new HandleRef(null, IntPtr.Zero); 612return IntPtr.Zero ; 625private IntPtr OnWmGetObject(IntPtr wparam, IntPtr lparam) 627IntPtr result = IntPtr.Zero; 656new HandleRef(null, IntPtr.Zero), 694if(Handle != IntPtr.Zero) 726if(Handle != IntPtr.Zero) 733HandleRef hdcScreen = new HandleRef(this, UnsafeNativeMethods.GetDC(new HandleRef(this, IntPtr.Zero))); 734if(hdcScreen.Handle != IntPtr.Zero) 736HandleRef hdcBitmap = new HandleRef(this, IntPtr.Zero); 737HandleRef hBitmap = new HandleRef(this, IntPtr.Zero); 742if(hdcBitmap.Handle != IntPtr.Zero) 746if(hBitmap.Handle != IntPtr.Zero) 749IntPtr hOldBitmap = UnsafeNativeMethods.CriticalSelectObject(hdcBitmap, hBitmap.Handle); 754IntPtr hbrWhite = UnsafeNativeMethods.CriticalGetStockObject(NativeMethods.WHITE_BRUSH); 767UnsafeNativeMethods.SendMessage(_hwnd.Handle, WindowMessage.WM_PRINT, hdcBitmap.Handle, (IntPtr) (NativeMethods.PRF_CHILDREN | NativeMethods.PRF_CLIENT | NativeMethods.PRF_ERASEBKGND | NativeMethods.PRF_NONCLIENT)); 778UnsafeNativeMethods.CriticalRedrawWindow(_hwnd, IntPtr.Zero, IntPtr.Zero, NativeMethods.RDW_INVALIDATE | NativeMethods.RDW_ALLCHILDREN); 783System.Windows.Media.Imaging.BitmapSource bitmapSource = Imaging.CriticalCreateBitmapSourceFromHBitmap(hBitmap.Handle, IntPtr.Zero, Int32Rect.Empty, null, WICBitmapAlphaChannelOption.WICBitmapIgnoreAlpha); 798UnsafeNativeMethods.ReleaseDC(new HandleRef(this, IntPtr.Zero), hdcScreen); 799hdcScreen = new HandleRef(null, IntPtr.Zero); 801if(hBitmap.Handle != IntPtr.Zero) 804hBitmap = new HandleRef(this, IntPtr.Zero); 807if(hdcBitmap.Handle != IntPtr.Zero) 810hdcBitmap = new HandleRef(this, IntPtr.Zero); 924IntPtr hwndParent = IntPtr.Zero; 950if(hwndParent != IntPtr.Zero) 952if(_hwnd.Handle == IntPtr.Zero) 968else if (Handle != IntPtr.Zero) 1011if(_hwnd.Handle == IntPtr.Zero || !UnsafeNativeMethods.IsWindow(_hwnd)) 1077if( Handle == IntPtr.Zero) 1093_hwnd = new HandleRef(null, IntPtr.Zero); 1104private IntPtr SubclassWndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1106IntPtr result = IntPtr.Zero ;
System\Windows\Interop\WindowInteropHelper.cs (4)
51public IntPtr Handle 66public IntPtr Owner 93public IntPtr EnsureHandle() 96if (Handle == IntPtr.Zero)
System\Windows\MessageBox.cs (9)
107return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, defaultResult, options); 122return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, defaultResult, 0); 136return ShowCore(IntPtr.Zero, messageBoxText, caption, button, icon, 0, 0); 149return ShowCore(IntPtr.Zero, messageBoxText, caption, button, MessageBoxImage.None, 0, 0); 159return ShowCore(IntPtr.Zero, messageBoxText, caption, MessageBoxButton.OK, MessageBoxImage.None, 0, 0); 169return ShowCore(IntPtr.Zero, messageBoxText, String.Empty, MessageBoxButton.OK, MessageBoxImage.None, 0, 0); 362IntPtr owner, 395if (owner != IntPtr.Zero) 402if (owner == IntPtr.Zero)
System\Windows\Shell\WindowChromeWorker.cs (63)
36private IntPtr _hwnd; 146if (IntPtr.Zero != _hwnd) 216if (_chromeInfo != null && _hwnd != IntPtr.Zero) 232if (_hwnd == IntPtr.Zero || _hwndSource.IsDisposed) 256NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 344private IntPtr _WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 357return IntPtr.Zero; 360private IntPtr _HandleSetTextOrIcon(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 367IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, uMsg, wParam, lParam); 378private IntPtr _HandleNCActivate(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 385IntPtr lRet = NativeMethods.DefWindowProc(_hwnd, WM.NCACTIVATE, wParam, new IntPtr(-1)); 399private IntPtr _HandleNCCalcSize(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 442IntPtr retVal = IntPtr.Zero; 477private IntPtr _HandleNCHitTest(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 512IntPtr lRet; 518if (IntPtr.Zero != lRet) 534private IntPtr _HandleNCRButtonUp(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 543return IntPtr.Zero; 546private IntPtr _HandleSize(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 563return IntPtr.Zero; 566private IntPtr _HandleWindowPosChanged(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 592return IntPtr.Zero; 595private IntPtr _HandleDwmCompositionChanged(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled) 600return IntPtr.Zero; 669IntPtr hmenu = NativeMethods.GetSystemMenu(_hwnd, false); 670if (IntPtr.Zero != hmenu) 713if (IntPtr.Zero == _hwnd || _hwndSource.IsDisposed) 735NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags); 741NativeMethods.SetWindowRgn(_hwnd, IntPtr.Zero, NativeMethods.IsWindowVisible(_hwnd)); 769IntPtr hMon = NativeMethods.MonitorFromWindow(_hwnd, MONITOR_DEFAULTTONEAREST); 777IntPtr hrgn = IntPtr.Zero; 782hrgn = IntPtr.Zero; 809IntPtr hrgn = IntPtr.Zero; 859hrgn = IntPtr.Zero; 869private static IntPtr _CreateRoundRectRgn(Rect region, double radius) 893private static void _CreateAndCombineRoundRectRgn(IntPtr hrgnSource, Rect region, double radius) 895IntPtr hrgn = IntPtr.Zero; 943if (IntPtr.Zero == _hwnd) 1143if (!Utility.IsOSVistaOrNewer || _hwnd == IntPtr.Zero) 1161NativeMethods.SetWindowPos(_hwnd, IntPtr.Zero, 0, 0, 0, 0, _SwpFlags);
System\Windows\Standard\MessageWindow.cs (20)
23private static readonly Dictionary<IntPtr, MessageWindow> s_windowLookup = new Dictionary<IntPtr, MessageWindow>(); 30public IntPtr Handle 60IntPtr pinnedThisPtr = (IntPtr)gcHandle; 71IntPtr.Zero, 72IntPtr.Zero, 73IntPtr.Zero, 108IntPtr hwnd = Handle; 113_dispatcher.BeginInvoke(DispatcherPriority.Normal, (DispatcherOperationCallback)_DestroyWindowCallback, new object [] { IntPtr.Zero, className }); 115else if (Handle != IntPtr.Zero) 130Handle = IntPtr.Zero; 136_DestroyWindow((IntPtr)args[0], (string)args[1]); 141private static IntPtr _WndProc(IntPtr hwnd, WM msg, IntPtr wParam, IntPtr lParam) 143IntPtr ret = IntPtr.Zero; 181private static void _DestroyWindow(IntPtr hwnd, string className)
System\Windows\Standard\NativeMethods.cs (248)
1370public static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); 1373public static extern SafeDC GetDC(IntPtr hwnd); 1377public static extern SafeDC CreateDC([MarshalAs(UnmanagedType.LPWStr)] string lpszDriver, [MarshalAs(UnmanagedType.LPWStr)] string lpszDevice, IntPtr lpszOutput, IntPtr lpInitData); 1380public static extern SafeDC CreateCompatibleDC(IntPtr hdc); 1384public static extern bool DeleteDC(IntPtr hdc); 1387private IntPtr? _hwnd; 1390public IntPtr Hwnd 1408if (!_hwnd.HasValue || _hwnd.Value == IntPtr.Zero) 1423dc = NativeMethods.CreateDC(deviceName, null, IntPtr.Zero, IntPtr.Zero); 1445IntPtr hPtr = IntPtr.Zero; 1470public static SafeDC GetDC(IntPtr hwnd) 1493return GetDC(IntPtr.Zero); 1497public static SafeDC WrapDC(IntPtr hdc) 1504_hwnd = IntPtr.Zero, 1534IntPtr unsafeHandle; 1560handle = IntPtr.Zero; 1596handle = IntPtr.Zero; 1641public IntPtr lpszDefaultScheme; 1687public IntPtr lpCreateParams; 1688public IntPtr hInstance; 1689public IntPtr hMenu; 1690public IntPtr hwndParent; 1706public IntPtr hwnd; 1716public IntPtr hNameMappings; 1758public IntPtr hWnd; 1762public IntPtr hIcon; 1782private IntPtr hBalloonIcon; 1800private IntPtr pidl; 1810private IntPtr psl; // An IShellLink instance that when launched opens a recently used item in the specified 2118public IntPtr hook; 2119public IntPtr unhook; 2126public IntPtr DebugEventCallback; 2164public IntPtr hwnd; 2165public IntPtr hwndInsertAfter; 2181public IntPtr hInstance; 2182public IntPtr hIcon; 2183public IntPtr hCursor; 2184public IntPtr hbrBackground; 2189public IntPtr hIconSm; 2200public IntPtr dwExtraInfo; 2265internal delegate IntPtr WndProc(IntPtr hwnd, WM uMsg, IntPtr wParam, IntPtr lParam); 2268internal delegate IntPtr WndProcHook(IntPtr hwnd, WM uMsg, IntPtr wParam, IntPtr lParam, ref bool handled); 2271internal delegate IntPtr MessageHandler(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled); 2297private static extern bool _ChangeWindowMessageFilterEx(IntPtr hwnd, WM message, MSGFLT action, [In, Out, Optional] ref CHANGEFILTERSTRUCT pChangeFilterStruct); 2301public static HRESULT ChangeWindowMessageFilterEx(IntPtr hwnd, WM message, MSGFLT action, out MSGFLTINFO filterInfo) 2340public static extern CombineRgnResult CombineRgn(IntPtr hrgnDest, IntPtr hrgnSrc1, IntPtr hrgnSrc2, RGN fnCombineMode); 2343private static extern IntPtr _CommandLineToArgvW([MarshalAs(UnmanagedType.LPWStr)] string cmdLine, out int numArgs); 2347IntPtr argv = IntPtr.Zero; 2353if (argv == IntPtr.Zero) 2361IntPtr currArg = Marshal.ReadIntPtr(argv, i * IntPtr.Size); 2369IntPtr p = _LocalFree(argv); 2371Assert.AreEqual(IntPtr.Zero, p); 2376private static extern SafeHBITMAP _CreateDIBSection(SafeDC hdc, [In] ref BITMAPINFO bitmapInfo, int iUsage, [Out] out IntPtr ppvBits, IntPtr hSection, int dwOffset); 2379private static extern SafeHBITMAP _CreateDIBSectionIntPtr(IntPtr hdc, [In] ref BITMAPINFO bitmapInfo, int iUsage, [Out] out IntPtr ppvBits, IntPtr hSection, int dwOffset); 2381public static SafeHBITMAP CreateDIBSection(SafeDC hdc, ref BITMAPINFO bitmapInfo, out IntPtr ppvBits, IntPtr hSection, int dwOffset) 2387hBitmap = _CreateDIBSectionIntPtr(IntPtr.Zero, ref bitmapInfo, DIB_RGB_COLORS, out ppvBits, hSection, dwOffset); 2403private static extern IntPtr _CreateRoundRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nWidthEllipse, int nHeightEllipse); 2405public static IntPtr CreateRoundRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect, int nWidthEllipse, int nHeightEllipse) 2407IntPtr ret = _CreateRoundRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect, nWidthEllipse, nHeightEllipse); 2408if (IntPtr.Zero == ret) 2416private static extern IntPtr _CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect); 2418public static IntPtr CreateRectRgn(int nLeftRect, int nTopRect, int nRightRect, int nBottomRect) 2420IntPtr ret = _CreateRectRgn(nLeftRect, nTopRect, nRightRect, nBottomRect); 2421if (IntPtr.Zero == ret) 2429private static extern IntPtr _CreateRectRgnIndirect([In] ref RECT lprc); 2431public static IntPtr CreateRectRgnIndirect(RECT lprc) 2433IntPtr ret = _CreateRectRgnIndirect(ref lprc); 2434if (IntPtr.Zero == ret) 2442public static extern IntPtr CreateSolidBrush(int crColor); 2445private static extern IntPtr _CreateWindowEx( 2454IntPtr hWndParent, 2455IntPtr hMenu, 2456IntPtr hInstance, 2457IntPtr lpParam); 2459public static IntPtr CreateWindowEx( 2468IntPtr hWndParent, 2469IntPtr hMenu, 2470IntPtr hInstance, 2471IntPtr lpParam) 2473IntPtr ret = _CreateWindowEx(dwExStyle, lpClassName, lpWindowName, dwStyle, x, y, nWidth, nHeight, hWndParent, hMenu, hInstance, lpParam); 2474if (IntPtr.Zero == ret) 2483public static extern IntPtr DefWindowProc(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam); 2487public static extern bool DeleteObject(IntPtr hObject); 2491public static extern bool DestroyIcon(IntPtr handle); 2495public static extern bool DestroyWindow(IntPtr hwnd); 2499public static extern bool IsWindow(IntPtr hwnd); 2502public static extern int DwmGetWindowAttribute(IntPtr hWnd, DWMWA dwAttributeToGet, ref int pvAttributeValue, int cbAttribute); 2505public static extern int DwmExtendFrameIntoClientArea(IntPtr hwnd, ref MARGINS pMarInset); 2547public static extern bool DwmDefWindowProc(IntPtr hwnd, WM msg, IntPtr wParam, IntPtr lParam, out IntPtr plResult); 2550private static extern HRESULT _DwmSetWindowAttribute(IntPtr hwnd, DWMWA dwAttribute, ref int pvAttribute, int cbAttribute); 2552public static HRESULT DwmSetWindowAttributeSystemBackdropType(IntPtr hwnd, DWMSBT dwBackdropType) 2559public static bool DwmSetWindowAttributeUseImmersiveDarkMode(IntPtr hwnd, bool useImmersiveDarkMode) 2567public static void DwmSetWindowAttributeFlip3DPolicy(IntPtr hwnd, DWMFLIP3D flip3dPolicy) 2574public static void DwmSetWindowAttributeDisallowPeek(IntPtr hwnd, bool disallowPeek) 2582private static extern int _EnableMenuItem(IntPtr hMenu, SC uIDEnableItem, MF uEnable); 2584public static MF EnableMenuItem(IntPtr hMenu, SC uIDEnableItem, MF uEnable) 2593private static extern bool _RemoveMenu(IntPtr hMenu, uint uPosition, uint uFlags); 2595public static void RemoveMenu(IntPtr hMenu, SC uPosition, MF uFlags) 2605private static extern bool _DrawMenuBar(IntPtr hWnd); 2607public static void DrawMenuBar(IntPtr hWnd) 2618public static extern bool FindClose(IntPtr handle); 2631private static extern bool _GetClientRect(IntPtr hwnd, [Out] out RECT lpRect); 2633public static RECT GetClientRect(IntPtr hwnd) 2678private static extern int _GetModuleFileName(IntPtr hModule, StringBuilder lpFilename, int nSize); 2680public static string GetModuleFileName(IntPtr hModule) 2705private static extern IntPtr _GetModuleHandle([MarshalAs(UnmanagedType.LPWStr)] string lpModuleName); 2707public static IntPtr GetModuleHandle(string lpModuleName) 2709IntPtr retPtr = _GetModuleHandle(lpModuleName); 2710if (retPtr == IntPtr.Zero) 2719private static extern bool _GetMonitorInfo(IntPtr hMonitor, [In, Out] MONITORINFO lpmi); 2721public static MONITORINFO GetMonitorInfo(IntPtr hMonitor) 2732private static extern IntPtr _GetStockObject(StockObject fnObject); 2734public static IntPtr GetStockObject(StockObject fnObject) 2736IntPtr retPtr = _GetStockObject(fnObject); 2737if (retPtr == IntPtr.Zero) 2745public static extern IntPtr GetSystemMenu(IntPtr hWnd, [MarshalAs(UnmanagedType.Bool)] bool bRevert); 2751public static IntPtr GetWindowLongPtr(IntPtr hwnd, GWL nIndex) 2753IntPtr ret = IntPtr.Zero; 2754if (8 == IntPtr.Size) 2762if (IntPtr.Zero == ret) 2789public static extern void SetWindowThemeAttribute([In] IntPtr hwnd, [In] WINDOWTHEMEATTRIBUTETYPE eAttribute, [In] ref WTA_OPTIONS pvAttribute, [In] uint cbAttribute); 2793private static extern bool GetWindowPlacement(IntPtr hwnd, WINDOWPLACEMENT lpwndpl); 2795public static WINDOWPLACEMENT GetWindowPlacement(IntPtr hwnd) 2807private static extern bool _GetWindowRect(IntPtr hWnd, out RECT lpRect); 2809public static RECT GetWindowRect(IntPtr hwnd) 2820public static extern Status GdipCreateBitmapFromStream(IStream stream, out IntPtr bitmap); 2823public static extern Status GdipCreateHBITMAPFromBitmap(IntPtr bitmap, out IntPtr hbmReturn, Int32 background); 2826public static extern Status GdipCreateHICONFromBitmap(IntPtr bitmap, out IntPtr hbmReturn); 2829public static extern Status GdipDisposeImage(IntPtr image); 2832public static extern Status GdipImageForceValidation(IntPtr image); 2835public static extern Status GdiplusStartup(out IntPtr token, StartupInput input, out StartupOutput output); 2838public static extern Status GdiplusShutdown(IntPtr token); 2842public static extern bool IsWindowVisible(IntPtr hwnd); 2845private static extern IntPtr _LocalFree(IntPtr hMem); 2848public static extern IntPtr MonitorFromWindow(IntPtr hwnd, uint dwFlags); 2852private static extern bool _PostMessage(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam); 2854public static void PostMessage(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam) 2893private static extern IntPtr _SetActiveWindow(IntPtr hWnd); 2895public static IntPtr SetActiveWindow(IntPtr hwnd) 2898IntPtr ret = _SetActiveWindow(hwnd); 2899if (ret == IntPtr.Zero) 2908public static IntPtr SetClassLongPtr(IntPtr hwnd, GCLP nIndex, IntPtr dwNewLong) 2910if (8 == IntPtr.Size) 2918private static extern int SetClassLongPtr32(IntPtr hWnd, GCLP nIndex, int dwNewLong); 2921private static extern IntPtr SetClassLongPtr64(IntPtr hWnd, GCLP nIndex, IntPtr dwNewLong); 2928private static extern bool _SetProcessWorkingSetSize(IntPtr hProcess, IntPtr dwMinimiumWorkingSetSize, IntPtr dwMaximumWorkingSetSize); 2930public static void SetProcessWorkingSetSize(IntPtr hProcess, int dwMinimumWorkingSetSize, int dwMaximumWorkingSetSize) 2939public static IntPtr SetWindowLongPtr(IntPtr hwnd, GWL nIndex, IntPtr dwNewLong) 2941if (8 == IntPtr.Size) 2949private static extern int _SetWindowRgn(IntPtr hWnd, IntPtr hRgn, [MarshalAs(UnmanagedType.Bool)] bool bRedraw); 2951public static void SetWindowRgn(IntPtr hWnd, IntPtr hRgn, bool bRedraw) 2962private static extern bool _SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, SWP uFlags); 2964public static bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, SWP uFlags) 2980public static extern bool ShowWindow(IntPtr hwnd, SW nCmdShow); 3033public static extern uint TrackPopupMenuEx(IntPtr hmenu, uint fuFlags, int x, int y, IntPtr hwnd, IntPtr lptpm); 3036private static extern IntPtr _SelectObject(SafeDC hdc, IntPtr hgdiobj); 3038public static IntPtr SelectObject(SafeDC hdc, IntPtr hgdiobj) 3040IntPtr ret = _SelectObject(hdc, hgdiobj); 3041if (ret == IntPtr.Zero) 3049private static extern IntPtr _SelectObjectSafeHBITMAP(SafeDC hdc, SafeHBITMAP hgdiobj); 3051public static IntPtr SelectObject(SafeDC hdc, SafeHBITMAP hgdiobj) 3053IntPtr ret = _SelectObjectSafeHBITMAP(hdc, hgdiobj); 3054if (ret == IntPtr.Zero) 3066public static extern IntPtr SendMessage(IntPtr hWnd, WM Msg, IntPtr wParam, IntPtr lParam); 3070private static extern bool _UnregisterClassAtom(IntPtr lpClassName, IntPtr hInstance); 3074private static extern bool _UnregisterClassName(string lpClassName, IntPtr hInstance); 3076public static void UnregisterClass(short atom, IntPtr hinstance) 3084public static void UnregisterClass(string lpClassName, IntPtr hInstance) 3095IntPtr hwnd, 3108IntPtr hwnd, 3109IntPtr hdcDst, 3110IntPtr pptDst, 3111IntPtr psize, 3112IntPtr hdcSrc, 3113IntPtr pptSrc, 3119IntPtr hwnd, 3136IntPtr hwnd, 3141if (!_UpdateLayeredWindowIntPtr(hwnd, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, crKey, ref pblend, dwFlags)) 3172private static extern HRESULT _DwmGetCompositionTimingInfo(IntPtr hwnd, ref DWM_TIMING_INFO pTimingInfo); 3174public static DWM_TIMING_INFO? DwmGetCompositionTimingInfo(IntPtr hwnd) 3195public static extern void DwmInvalidateIconicBitmaps(IntPtr hwnd); 3198public static extern void DwmSetIconicThumbnail(IntPtr hwnd, IntPtr hbmp, DWM_SIT dwSITFlags); 3201public static extern void DwmSetIconicLivePreviewBitmap(IntPtr hwnd, IntPtr hbmp, RefPOINT pptClient, DWM_SIT dwSITFlags);
System\Windows\Standard\ShellProvider.cs (84)
331public IntPtr hIcon; 378HRESULT Next(uint celt, out IntPtr rgelt, out int pceltFetched); 468[In] IntPtr hwnd, 472[Out] out IntPtr ppidl, 476[In] IntPtr hwnd, 483[In] IntPtr pidl, 489object BindToStorage([In] IntPtr pidl, [In] IBindCtx pbc, [In] ref Guid riid); 499HRESULT CompareIDs([In] IntPtr lParam, [In] IntPtr pidl1, [In] IntPtr pidl2); 511object CreateViewObject([In] IntPtr hwndOwner, [In] ref Guid riid); 520[In] IntPtr apidl, 529[In] IntPtr hwndOwner, 531[In, MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.SysInt, SizeParamIndex = 2)] IntPtr apidl, 542void GetDisplayNameOf([In] IntPtr pidl, [In] SHGDN uFlags, [Out] out IntPtr pName); 547void SetNameOf([In] IntPtr hwnd, 548[In] IntPtr pidl, 551[Out] out IntPtr ppidlOut); 636IntPtr rgKeys, 643IntPtr keyType, 649PROPVARIANT GetProperty(IntPtr key); 651Guid GetCLSID(IntPtr key); 653FILETIME GetFileTime(IntPtr key); 655int GetInt32(IntPtr key); 658string GetString(IntPtr key); 660uint GetUInt32(IntPtr key); 662ulong GetUInt64(IntPtr key); 665void GetBool(IntPtr key); 676void GetIDList(out IntPtr ppidl); 677void SetIDList(IntPtr pidl); 691void Resolve(IntPtr hwnd, uint fFlags); 711void AddTab(IntPtr hwnd); 717void DeleteTab(IntPtr hwnd); 723void ActivateTab(IntPtr hwnd); 729void SetActiveAlt(IntPtr hwnd); 741new void AddTab(IntPtr hwnd); 742new void DeleteTab(IntPtr hwnd); 743new void ActivateTab(IntPtr hwnd); 744new void SetActiveAlt(IntPtr hwnd); 759void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 880new void AddTab(IntPtr hwnd); 881new void DeleteTab(IntPtr hwnd); 882new void ActivateTab(IntPtr hwnd); 883new void SetActiveAlt(IntPtr hwnd); 886new void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 891HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 894HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 897HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 900HRESULT UnregisterTab(IntPtr hwndTab); 903HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 906HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 909HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 912HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 915HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 918HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 921HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 925HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip); 941new void AddTab(IntPtr hwnd); 942new void DeleteTab(IntPtr hwnd); 943new void ActivateTab(IntPtr hwnd); 944new void SetActiveAlt(IntPtr hwnd); 947new void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); 951[PreserveSig] new HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); 952[PreserveSig] new HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); 953[PreserveSig] new HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); 954[PreserveSig] new HRESULT UnregisterTab(IntPtr hwndTab); 955[PreserveSig] new HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); 956[PreserveSig] new HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); 957[PreserveSig] new HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 958[PreserveSig] new HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); 959[PreserveSig] new HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); 960[PreserveSig] new HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); 961[PreserveSig] new HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); 963[PreserveSig] new HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip); 967void SetTabProperties(IntPtr hwndTab, STPF stpFlags);
System\Windows\Standard\Utilities.cs (9)
36public static int GET_X_LPARAM(IntPtr lParam) 43public static int GET_Y_LPARAM(IntPtr lParam) 187public static void SafeDeleteObject(ref IntPtr gdiObject) 189IntPtr p = gdiObject; 190gdiObject = IntPtr.Zero; 191if (IntPtr.Zero != p) 197public static void SafeDestroyWindow(ref IntPtr hwnd) 199IntPtr p = hwnd; 200hwnd = IntPtr.Zero;
System\Windows\SystemCommands.cs (8)
30IntPtr hwnd = new WindowInteropHelper(window).Handle; 31if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd)) 36NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr((int)command), IntPtr.Zero); 79IntPtr hwnd = new WindowInteropHelper(window).Handle; 80if (hwnd == IntPtr.Zero || !NativeMethods.IsWindow(hwnd)) 85IntPtr hmenu = NativeMethods.GetSystemMenu(hwnd, false); 87uint cmd = NativeMethods.TrackPopupMenuEx(hmenu, TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_RETURNCMD, (int)physicalScreenLocation.X, (int)physicalScreenLocation.Y, hwnd, IntPtr.Zero); 90NativeMethods.PostMessage(hwnd, WM.SYSCOMMAND, new IntPtr(cmd), IntPtr.Zero);
System\Windows\SystemParameters.cs (3)
5757HandleRef desktopWnd = new HandleRef(null, IntPtr.Zero); 5760IntPtr dc = UnsafeNativeMethods.GetDC(desktopWnd); 5762if (dc == IntPtr.Zero)
System\Windows\SystemResources.cs (9)
1106parent: IntPtr.Zero, 1274private static void InvalidateTabletDevices(WindowMessage msg, IntPtr wParam, IntPtr lParam) 1316private static IntPtr SystemThemeFilterMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 1423return IntPtr.Zero ; 1510return DpiUtil.GetProcessDpiAwarenessContextValue(IntPtr.Zero);
System\Windows\Window.cs (100)
251UnsafeNativeMethods.SendMessage( Handle, WindowMessage.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_MOUSEMOVE, IntPtr.Zero); 252UnsafeNativeMethods.SendMessage( Handle, WindowMessage.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero); 292_dialogOwnerHandle = IntPtr.Zero; 302if (_dialogOwnerHandle == IntPtr.Zero) 309if ((_dialogOwnerHandle != IntPtr.Zero) && 312_dialogOwnerHandle = IntPtr.Zero; 317if (_dialogOwnerHandle != IntPtr.Zero) 322while (_dialogOwnerHandle != IntPtr.Zero) 344_threadWindowHandles = new List<IntPtr>(); 357IntPtr hWndCapture = SafeNativeMethods.GetCapture(); 358if (hWndCapture != IntPtr.Zero) 426if ( (_dialogPreviousActiveHandle != IntPtr.Zero) && 1292SetOwnerHandle(_ownerWindow != null ? _ownerWindow.Handle: IntPtr.Zero); 2609IntPtr handle = Handle; 2610if (handle != IntPtr.Zero) 2839new HandleRef(null, IntPtr.Zero), 2922new HandleRef(null, IntPtr.Zero), 3023new HandleRef(null, IntPtr.Zero), 3187internal IntPtr Handle 3197return IntPtr.Zero; 3208internal IntPtr OwnerHandle 3600private bool ThreadWindowsCallback(IntPtr hWnd, IntPtr lparam) 3629IntPtr hWnd = _threadWindowHandles[i]; 3738private IntPtr GetCurrentMonitorFromMousePosition() 3785IntPtr hMonitor = IntPtr.Zero; 3786if ((_ownerHandle == IntPtr.Zero) || 3798if (hMonitor != IntPtr.Zero) 3822if (Owner.Handle == IntPtr.Zero) 3840if ((_ownerHandle != IntPtr.Zero) && UnsafeNativeMethods.IsWindow(new HandleRef(null, _ownerHandle))) 3868private static NativeMethods.RECT WorkAreaBoundsForHwnd(IntPtr hwnd) 3870IntPtr hMonitor = MonitorFromWindow(hwnd); 3875private static NativeMethods.RECT WorkAreaBoundsForMointor(IntPtr hMonitor) 3879Debug.Assert(hMonitor != IntPtr.Zero); 3885private static IntPtr MonitorFromWindow(IntPtr hwnd) 3887IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(null, hwnd), NativeMethods.MONITOR_DEFAULTTONEAREST); 3888if (hMonitor == IntPtr.Zero) 3903internal static void CalculateCenterScreenPosition(IntPtr hMonitor, Size currentSizeDeviceUnits, ref double leftDeviceUnits, ref double topDeviceUnits) 3952private Rect GetNormalRectDeviceUnits(IntPtr hwndHandle) 3981private Rect GetNormalRectLogicalUnits(IntPtr hwndHandle) 4126(IntPtr)NativeMethods.ICON_BIG, 4132(IntPtr)NativeMethods.ICON_SMALL, 4159private void SetOwnerHandle(IntPtr ownerHandle) 4168if (_ownerHandle == ownerHandle && _ownerHandle == IntPtr.Zero) 4176_ownerHandle = (IntPtr.Zero == ownerHandle && !ShowInTaskbar) 4243private IntPtr WindowFilterMessage( IntPtr hwnd, 4245IntPtr wParam, 4246IntPtr lParam, 4249IntPtr retInt = IntPtr.Zero ; 4319private bool WmCommand(IntPtr wParam, IntPtr lParam) 4479(_dialogPreviousActiveHandle != IntPtr.Zero) && 4577private bool WmActivate( IntPtr wParam ) 4620private bool WmSizeChanged(IntPtr wParam) 4851private bool WmGetMinMaxInfo( IntPtr lParam ) 4927private bool WmNcHitTest( IntPtr lParam, ref IntPtr refInt ) 4949internal virtual bool HandleWmNcHitTestMsg(IntPtr lParam, ref IntPtr refInt) 5014private bool WmShowWindow(IntPtr wParam, IntPtr lParam) 5994IntPtr hMonitor = SafeNativeMethods.MonitorFromWindow(new HandleRef(this, Handle), NativeMethods.MONITOR_DEFAULTTONULL); 5996if (hMonitor != IntPtr.Zero) 6239new HandleRef(null, IntPtr.Zero), 6359IntPtr.Zero, 6382if (_ownerHandle == IntPtr.Zero) 6404SetOwnerHandle(IntPtr.Zero); 6412UnsafeNativeMethods.PostMessage(new HandleRef(this, Handle), WM_APPLYTASKBARITEMINFO, IntPtr.Zero, IntPtr.Zero); 6747nativeTB.hIcon = IntPtr.Zero; 6864if (manager.Dirty && Handle != IntPtr.Zero) 6866UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,Handle), NativeMethods.GWL_STYLE, (IntPtr)_styleDoNotUse); 6867UnsafeNativeMethods.CriticalSetWindowLong(new HandleRef(this,Handle), NativeMethods.GWL_EXSTYLE, (IntPtr)_styleExDoNotUse); 6931SetOwnerHandle(IntPtr.Zero); 7236private IntPtr _ownerHandle = IntPtr.Zero; // no need to dispose this 7238private List<IntPtr> _threadWindowHandles; 7290private IntPtr _dialogOwnerHandle = IntPtr.Zero; 7291private IntPtr _dialogPreviousActiveHandle; 7382internal IntPtr Handle 7392return IntPtr.Zero; 7404IntPtr monitor; 7411if ( monitor != IntPtr.Zero ) 7818return DpiUtil.GetProcessDpiAwareness(IntPtr.Zero) == NativeMethods.PROCESS_DPI_AWARENESS.PROCESS_PER_MONITOR_DPI_AWARE; 7826/// happens in <see cref="MonitorEnumProc(IntPtr, IntPtr, ref Runtime.InteropServices.NativeMethods.RECT, IntPtr)"/>) 7833var nullHandle = new HandleRef(null, IntPtr.Zero); 7837IntPtr.Zero, 7839IntPtr.Zero); 7867private bool MonitorEnumProc(IntPtr hMonitor, IntPtr hdcMonitor, ref NativeMethods.RECT lprcMonitor, IntPtr dwData)
PresentationFramework-SystemDrawing (1)
SystemDrawingExtension.cs (1)
46return IntPtr.Zero;
PresentationUI (26)
MS\Internal\Documents\Application\CommandEnforcer.cs (1)
135if ((!_isRMMissing) && (IntPtr.Size == 4))
MS\Internal\Documents\Application\FileController.cs (1)
455IntPtr.Zero, originalUri, doc.DestinationToken.Location);
MS\Internal\Documents\Application\NativeDirectoryServicesQueryAPIs.cs (4)
44[In] IntPtr hwndParent, 75public IntPtr pHandlerParameters; 77public IntPtr pPersistQuery; // Originally an IPersistQuery (not an IntPtr), which we do not use. 78public IntPtr pFormParameters; // Originally a union in the COM definition;
MS\Internal\Documents\DocumentApplicationDocumentViewer.cs (4)
188IntPtr handle = helper.Handle; 2280public WrapperIWin32Window(IntPtr handle) 2289IntPtr System.Windows.Forms.IWin32Window.Handle 2297private IntPtr _handle;
MS\Internal\Documents\DocumentSignatureManager.cs (5)
322internal void ShowSigningDialog(IntPtr parentWindow) 338IntPtr parentWindow, 689internal void OnSign(SignatureResources? signatureResources, IntPtr parentWindow) 726IntPtr parentWindow) 900private static X509Certificate2 ShowCertificatePickerDialog(IntPtr parentWindow)
MS\Internal\Documents\PeoplePickerWrapper.cs (11)
53internal String[] Show(IntPtr hWndParent) 117private IDataObject OpenQueryWindow(IntPtr hWndParent) 144IntPtr queryInitParamsPtr = Marshal.AllocCoTaskMem(Marshal.SizeOf(queryInitParams)); 178pPersistQuery = IntPtr.Zero, //We aren't persisting this query anywhere 179pFormParameters = IntPtr.Zero //We aren't pre-populating the form 265private void ValidateHWnd(IntPtr hWndParent) 267if( hWndParent != IntPtr.Zero ) 326Invariant.Assert(_ptrToDsObjectNames != IntPtr.Zero, "Invalid pointer to DsObjectNames data."); 419IntPtr nameOffset = new IntPtr(_ptrToDsObjectNames.ToInt64() + dsObject.offsetName); 450IntPtr offset = new IntPtr(_ptrToDsObjectNames.ToInt64() + 497private IntPtr _ptrToDsObjectNames;
ReachFramework (56)
MS\Internal\Printing\Configuration\COMPSTUISRID.cs (1)
76this._compstuiHandle = UnsafeNativeMethods.LoadLibraryExW("compstui.dll", IntPtr.Zero, SafeLoadLibraryFlags);
MS\Internal\Printing\Configuration\DevMode.cs (2)
453public static DevMode FromIntPtr(IntPtr devModeWPointer) 455if (devModeWPointer == IntPtr.Zero)
MS\Internal\Printing\Configuration\SafeWinSpoolPrinterHandle.cs (2)
16: base(IntPtr.Zero, true) 26return (base.handle == IntPtr.Zero);
MS\Internal\Printing\Configuration\UnsafeNativeMethods.cs (7)
73public static extern uint PTCloseProviderImpl(IntPtr handle); 196out IntPtr devMode, 276public static extern bool ClosePrinter(IntPtr hPrinter); 279public static extern IntPtr CreateICW(string lpszDriver, string lpszDevice, string lpszOutput, SafeMemoryHandle devmodePtr); 291public static extern SafeModuleHandle LoadLibraryExW(string lpFileName, IntPtr hFile, LoadLibraryExFlags dwFlags); 294public static extern bool FreeLibrary(IntPtr hModule); 397out IntPtr devMode,
MS\Internal\Printing\Configuration\WinSpoolPrinterCapabilities.cs (8)
63IntPtr hdc = UnsafeNativeMethods.CreateICW(this._driverName, this._deviceName, null, this._devMode); 64if (hdc != IntPtr.Zero) 446IntPtr baseAddr = buffer.Handle.DangerousGetHandle(); 472IntPtr baseAddr = buffer.Handle.DangerousGetHandle(); 498IntPtr baseAddr = buffer.Handle.DangerousGetHandle(); 526IntPtr baseAddr = buffer.Handle.DangerousGetHandle(); 554IntPtr baseAddr = buffer.Handle.DangerousGetHandle(); 557IntPtr strAddr = new IntPtr(baseAddr.ToInt64() + offset);
Packaging\XpsDocument.cs (1)
909internal static void SaveWithUI(IntPtr parent, Uri source, Uri target)
PrintConfig\FallbackPTProvider.cs (17)
55if (!UnsafeNativeMethods.OpenPrinterW(deviceName, out this._deviceHandle, new HandleRef(this, IntPtr.Zero))) 510result = UnsafeNativeMethods.DocumentPropertiesW(new HandleRef(this, IntPtr.Zero), this._deviceHandle, this._deviceName, outPtr, buffer, flags); 748IntPtr ptr = pPrinterBuffer.Handle.DangerousGetHandle(); 751IntPtr pPrinterName = Marshal.ReadIntPtr(ptr, 1 * IntPtr.Size); 752if (pPrinterName != IntPtr.Zero) 758IntPtr pPortName = Marshal.ReadIntPtr(ptr, 3 * IntPtr.Size); 759if (pPortName != IntPtr.Zero) 765IntPtr pDriverName = Marshal.ReadIntPtr(ptr, 4 * IntPtr.Size); 766if (pDriverName != IntPtr.Zero) 772IntPtr pDevMode = Marshal.ReadIntPtr(ptr, 7 * IntPtr.Size); 773if (pDevMode != IntPtr.Zero) 817IntPtr pDevMode = Marshal.ReadIntPtr(pPrinterBuffer.Handle.DangerousGetHandle()); 818if (pDevMode != IntPtr.Zero)
PrintConfig\PTProvider.cs (11)
44private SafePTProviderHandle() : base(IntPtr.Zero, true) 58return (IsClosed || (handle == IntPtr.Zero)); 390IntPtr umDevMode = Marshal.AllocCoTaskMem(devMode.Length); 422if (umDevMode != IntPtr.Zero) 425umDevMode = IntPtr.Zero; 458IntPtr umDevMode = IntPtr.Zero; 487if (umDevMode != IntPtr.Zero) 490umDevMode = IntPtr.Zero; 791uint hResult = UnsafeNativeMethods.CreateStreamOnHGlobal(SafeMemoryHandle.Wrap(IntPtr.Zero), true, out result); 811stream.Seek(0, 0 /*STREAM_SEEK_SET*/ , IntPtr.Zero);
PrintSystemExceptions\InteropWin32ApiThunk.cs (2)
29public static extern int InvokeFormatMessage(int a, IntPtr b , int c, int d, System.Text.StringBuilder e, int f, IntPtr g);
PrintSystemExceptions\PrintSystemException.cs (2)
271IntPtr.Zero, 276IntPtr.Zero);
Serialization\RCW\_SECURITY_ATTRIBUTES.cs (1)
21public IntPtr lpSecurityDescriptor;
Serialization\RCW\IPrintDocumentPackageTarget.cs (1)
28void GetPackageTarget([In] ref Guid guidTargetType, [In] ref Guid riid, out IntPtr ppvTarget);
Serialization\RCW\IXpsOMObjectFactory.cs (1)
159IXpsOMPackageWriter CreatePackageWriterOnFile([MarshalAs(UnmanagedType.LPWStr)] [In] string fileName, [In] IntPtr securityAttributes, [In] uint flagsAndAttributes, [In] int optimizeMarkupSize, [ComAliasName("System.Windows.Xps.Serialization.RCW.XPS_INTERLEAVING")] [In] XPS_INTERLEAVING interleaving, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri documentSequencePartName, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMCoreProperties coreProperties, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMImageResource packageThumbnail, [MarshalAs(UnmanagedType.Interface)] [In] IXpsOMPrintTicketResource documentSequencePrintTicket, [MarshalAs(UnmanagedType.Interface)] [In] IOpcPartUri discardControlPartName);
Replay (14)
src\Compilers\Core\CommandLine\NativeMethods.cs (14)
29internal IntPtr lpReserved2; 30internal IntPtr hStdInput; 31internal IntPtr hStdOutput; 32internal IntPtr hStdError; 38public IntPtr hProcess; 39public IntPtr hThread; 54internal static readonly IntPtr NullPtr = IntPtr.Zero; 55internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1); 69internal static extern bool CloseHandle(IntPtr hObject); 80IntPtr lpProcessAttributes, 81IntPtr lpThreadAttributes, 85IntPtr lpEnvironment, 92internal static extern IntPtr GetCommandLine();
Roslyn.Test.PdbUtilities (7)
EditAndContinue\EditAndContinueTest.cs (1)
211var isInException = Marshal.GetExceptionPointers() != IntPtr.Zero;
Reader\PdbValidation.cs (1)
554Marshal.Copy((IntPtr)data, result, 0, result.Length);
Shared\DummyMetadataImport.cs (5)
351public uint GetMethodProps(uint mb, out uint pointerClass, IntPtr stringMethod, uint cchMethod, out uint pchMethod, IntPtr pdwAttr, IntPtr ppvSigBlob, IntPtr pcbSigBlob, IntPtr pulCodeRVA)
StackDepthTest (1)
Program.cs (1)
42Console.WriteLine($"Running in {IntPtr.Size * 8}-bit mode");
System.CodeDom (6)
System\CodeDom\Compiler\CompilerParameters.cs (1)
81public IntPtr UserToken { get; set; }
System\CodeDom\Compiler\Executor.cs (5)
24public static int ExecWaitWithCapture(IntPtr userToken, string cmd, TempFileCollection tempFiles, ref string outputName, ref string errorName) => 28ExecWaitWithCapture(IntPtr.Zero, cmd, currentDir, tempFiles, ref outputName, ref errorName); 31ExecWaitWithCapture(IntPtr.Zero, cmd, Environment.CurrentDirectory, tempFiles, ref outputName, ref errorName); 33public static int ExecWaitWithCapture(IntPtr userToken, string cmd, string currentDir, TempFileCollection tempFiles, ref string outputName, ref string errorName) 35if (userToken != IntPtr.Zero)
System.Collections (2)
System\Collections\Generic\OrderedDictionary.cs (2)
1093if (IntPtr.Size == 8) 1149if (IntPtr.Size == 8)
System.Collections.Concurrent (5)
System\Collections\Concurrent\ConcurrentDictionary.cs (3)
2257if (IntPtr.Size == 8) 2274if (IntPtr.Size == 8) 2309if (IntPtr.Size == 8)
System\Collections\Concurrent\PartitionerStatic.cs (2)
1659Debug.Assert((DEFAULT_BYTES_PER_CHUNK % IntPtr.Size) == 0, "bytes per chunk should be a multiple of pointer size"); 1660chunkSize = (DEFAULT_BYTES_PER_CHUNK / IntPtr.Size);
System.Collections.Immutable (1)
System\Collections\Frozen\Constants.cs (1)
82|| ((typeof(T) == typeof(nint) || typeof(T) == typeof(nuint)) && IntPtr.Size == 4);
System.Console (9)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.FileDescriptors.cs (1)
19return new SafeFileHandle((IntPtr)fileNumber, ownsHandle: false);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.FLock.cs (1)
28internal static partial int FLock(IntPtr fd, LockOperations operation);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
70username = Marshal.PtrToStringUTF8((IntPtr)passwd.Name);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Write.cs (1)
24internal static unsafe partial int Write(IntPtr fd, byte* buffer, int bufferSize);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
102path = Marshal.PtrToStringUTF8((IntPtr)passwd.HomeDirectory);
System.Data.Odbc (152)
Common\System\Data\Common\AdapterUtil.Odbc.cs (4)
572internal static readonly IntPtr PtrZero = new IntPtr(0); // IntPtr.Zero 573internal static readonly int PtrSize = IntPtr.Size; 659internal static IntPtr IntPtrOffset(IntPtr pbase, int offset)
Common\System\Data\Common\SafeNativeMethods.cs (4)
10internal static IntPtr LocalAlloc(nint initialSize) 12var handle = Marshal.AllocHGlobal(initialSize); 17internal static void LocalFree(IntPtr ptr) 22internal static void ZeroMemory(IntPtr ptr, int length)
Common\System\Data\ProviderBase\DbBuffer.cs (38)
17protected DbBuffer(int initialSize) : base(IntPtr.Zero, true) 26base.handle = SafeNativeMethods.LocalAlloc((IntPtr)initialSize); 28if (IntPtr.Zero == base.handle) 35protected DbBuffer(IntPtr invalidHandleValue, bool ownsHandle) : base(invalidHandleValue, ownsHandle) 45return (IntPtr.Zero == base.handle); 70IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 98IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 124IntPtr ptr = DangerousGetHandle(); 157IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 190IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 222IntPtr ptr = DangerousGetHandle(); 249IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 274IntPtr ptr = DangerousGetHandle(); 301IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 317Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 326IntPtr ptr = DangerousGetHandle(); 339internal IntPtr ReadIntPtr(int offset) 342ValidateCheck(offset, IntPtr.Size); 345IntPtr value; 352IntPtr ptr = DangerousGetHandle(); 374IntPtr ptr = base.handle; 375base.handle = IntPtr.Zero; 376if (IntPtr.Zero != ptr) 396IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 420IntPtr ptr = DangerousGetHandle(); 446IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 472IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 501IntPtr ptr = DangerousGetHandle(); 527IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 551IntPtr ptr = DangerousGetHandle(); 577IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset); 593Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 601IntPtr ptr = DangerousGetHandle(); 613internal void WriteIntPtr(int offset, IntPtr value) 616ValidateCheck(offset, IntPtr.Size); 617Debug.Assert(0 == offset % IntPtr.Size, "invalid alignment"); 625IntPtr ptr = DangerousGetHandle(); 650IntPtr ptr = DangerousGetHandle();
src\libraries\Common\src\Interop\Interop.Odbc.cs (29)
26/*SQLHANDLE*/IntPtr InputHandle, 27/*SQLHANDLE* */out IntPtr OutputHandle); 33/*SQLHANDLE* */out IntPtr OutputHandle); 45/*SQLLEN*/IntPtr BufferLength, 46/*SQLLEN* */IntPtr StrLen_or_Ind); 53/*SQLPOINTER*/IntPtr TargetValue, 54/*SQLLEN*/IntPtr BufferLength, 55/*SQLLEN* */IntPtr StrLen_or_Ind); 64/*SQLULEN*/IntPtr cbColDef, 65/*SQLSMALLINT*/IntPtr ibScale, 71/*SQLLEN*/IntPtr BufferLength, 94/*SQLPOINTER*/out IntPtr NumericAttribute); 125/*SQLHDBC*/IntPtr ConnectionHandle); 130/*SQLHWND*/IntPtr hwnd, 133/*SQLCHAR* */IntPtr connectionstringout, 141/*SQLHANDLE*/IntPtr Handle, 161/*SQLHSTMT*/IntPtr StatementHandle); 182/*SQLLEN*/IntPtr BufferLength, // sql.h differs from MSDN 183/*SQLLEN* */out IntPtr StrLen_or_Ind); 235/*SQLSMALLINT* */IntPtr pcbInfoValue); 241/*SQLPOINTER*/out IntPtr Value, 300/*SQLLEN* */out IntPtr RowCount); 313/*SQLPOINTER*/IntPtr Value, 318/*SQLHBDC*/IntPtr ConnectionHandle, 320/*SQLPOINTER*/IntPtr Value, 340/*SQLPOINTER*/IntPtr CharacterAttribute, 348/*SQLPOINTER*/IntPtr Value, 355/*SQLPOINTER*/IntPtr Value, 378/*SQLCHAR* */IntPtr TableName, // IntPtr instead of string because callee may mutate contents
src\libraries\Common\src\System\Runtime\InteropServices\HandleRefMarshaller.cs (1)
20public IntPtr ToUnmanaged() => _handle.Handle;
System\Data\Odbc\Odbc32.cs (7)
275internal static readonly IntPtr SQL_AUTOCOMMIT_OFF = ADP.PtrZero; 276internal static readonly IntPtr SQL_AUTOCOMMIT_ON = new IntPtr(1); 580internal static readonly IntPtr SQL_HANDLE_NULL = ADP.PtrZero; 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\OdbcCommand.cs (6)
625(IntPtr)this.CommandTimeout); 645TrySetStatementAttribute(stmt, (ODBC32.SQL_ATTR)ODBC32.SQL_SOPT_SS.NOBROWSETABLE, (IntPtr)ODBC32.SQL_NB.ON); 646TrySetStatementAttribute(stmt, (ODBC32.SQL_ATTR)ODBC32.SQL_SOPT_SS.HIDDEN_COLUMNS, (IntPtr)ODBC32.SQL_HC.ON); 655TrySetStatementAttribute(stmt, (ODBC32.SQL_ATTR)ODBC32.SQL_SOPT_SS.NOBROWSETABLE, (IntPtr)ODBC32.SQL_NB.OFF); 656TrySetStatementAttribute(stmt, (ODBC32.SQL_ATTR)ODBC32.SQL_SOPT_SS.HIDDEN_COLUMNS, (IntPtr)ODBC32.SQL_HC.OFF); 911private void TrySetStatementAttribute(OdbcStatementHandle stmt, ODBC32.SQL_ATTR stmtAttribute, IntPtr value)
System\Data\Odbc\OdbcConnectionHandle.cs (4)
42SetConnectionAttribute2(ODBC32.SQL_ATTR.LOGIN_TIMEOUT, (IntPtr)connectionTimeout, (int)ODBC32.SQL_IS.UINTEGER); 114retcode = SetConnectionAttribute2(isolationAttribute, (IntPtr)sql_iso, (int)ODBC32.SQL_IS.INTEGER); 158private ODBC32.SQLRETURN CompleteTransaction(short transactionOperation, IntPtr handle) 250internal ODBC32.SQLRETURN SetConnectionAttribute2(ODBC32.SQL_ATTR attribute, IntPtr value, int length)
System\Data\Odbc\OdbcDataReader.cs (16)
1769if (cbActual == (IntPtr)ODBC32.SQL_NO_TOTAL) 1785if (cbActual == (IntPtr)ODBC32.SQL_NULL_DATA) 2350(IntPtr)256, 2351buffer.PtrOffset(256, IntPtr.Size).Handle); 2420cbActual = IntPtr.Zero; 2426(IntPtr)256, 2427buffer.PtrOffset(256, IntPtr.Size).Handle); 2521IntPtr colnameActual = buffer.PtrOffset(colnameActualOffset, IntPtr.Size).Handle; 2522IntPtr indexActual = buffer.PtrOffset(indexActualOffset, IntPtr.Size).Handle; 2523IntPtr ordinalActual = buffer.PtrOffset(ordinalActualOffset, IntPtr.Size).Handle; 2531(IntPtr)256, 2537(IntPtr)4, 2544(IntPtr)256,
System\Data\Odbc\OdbcHandle.cs (10)
17protected OdbcHandle(ODBC32.SQL_HANDLE handleType, OdbcHandle? parentHandle) : base(IntPtr.Zero, true) 31retcode = Interop.Odbc.SQLAllocHandle(handleType, IntPtr.Zero, out base.handle); 55if (IntPtr.Zero != base.handle) 78internal OdbcHandle(OdbcStatementHandle parentHandle, ODBC32.SQL_ATTR attribute) : base(IntPtr.Zero, true) 98if (IntPtr.Zero != base.handle) 131return (IntPtr.Zero == base.handle); 138IntPtr handle = base.handle; 139base.handle = IntPtr.Zero; 141if (IntPtr.Zero != handle) 235internal ODBC32.SQLRETURN SetDescriptionField1(short ordinal, ODBC32.SQL_DESC type, IntPtr value)
System\Data\Odbc\OdbcParameter.cs (16)
49private IntPtr _boundBuffer; 50private IntPtr _boundIntbuffer; 786_preparedValueOffset = _preparedIntOffset + IntPtr.Size; 787parameterBufferSize += (cbParameterSize + IntPtr.Size); 808HandleRef intBuffer = parameterBuffer.PtrOffset(_preparedIntOffset, IntPtr.Size); 867(IntPtr)cchSize, // ColumnSize 868(IntPtr)scale, // DecimalDigits 870(IntPtr)_preparedBufferSize, 902retcode = hdesc.SetDescriptionField1(ordinal, ODBC32.SQL_DESC.TYPE, (IntPtr)ODBC32.SQL_C.NUMERIC); 914retcode = hdesc.SetDescriptionField1(ordinal, ODBC32.SQL_DESC.PRECISION, (IntPtr)cbActual); 926retcode = hdesc.SetDescriptionField1(ordinal, ODBC32.SQL_DESC.SCALE, (IntPtr)cbActual); 1057parameterBuffer.WriteIntPtr(_preparedIntOffset, (IntPtr)ODBC32.SQL_DEFAULT_PARAM); 1061parameterBuffer.WriteIntPtr(_preparedIntOffset, (IntPtr)ODBC32.SQL_NULL_DATA); 1071parameterBuffer.WriteIntPtr(_preparedIntOffset, (IntPtr)cbsize); 1074parameterBuffer.WriteIntPtr(_preparedIntOffset, IntPtr.Zero); 1090parameterBuffer.WriteIntPtr(_preparedIntOffset, (IntPtr)ODBC32.SQL_NULL_DATA);
System\Data\Odbc\OdbcParameterCollection.cs (2)
125parameterBufferSize = (parameterBufferSize + (IntPtr.Size - 1)) & ~(IntPtr.Size - 1); // align buffer;
System\Data\Odbc\OdbcStatementHandle.cs (14)
11private readonly IntPtr _value; 23internal SQLLEN(IntPtr value) 60internal ODBC32.SQLRETURN BindColumn2(int columnNumber, ODBC32.SQL_C targetType, HandleRef buffer, IntPtr length, IntPtr srLen_or_Ind) 67internal ODBC32.SQLRETURN BindColumn3(int columnNumber, ODBC32.SQL_C targetType, IntPtr srLen_or_Ind) 74internal ODBC32.SQLRETURN BindParameter(short ordinal, short parameterDirection, ODBC32.SQL_C sqlctype, ODBC32.SQL_TYPE sqltype, IntPtr cchSize, IntPtr scale, HandleRef buffer, IntPtr bufferLength, HandleRef intbuffer) 108IntPtr result; 162internal ODBC32.SQLRETURN GetData(int index, ODBC32.SQL_C sqlctype, CNativeBuffer buffer, int cb, out IntPtr cbActual) 174internal ODBC32.SQLRETURN GetStatementAttribute(ODBC32.SQL_ATTR attribute, out IntPtr value, out int stringLength) 257IntPtr result; 264internal ODBC32.SQLRETURN SetStatementAttribute(ODBC32.SQL_ATTR attribute, IntPtr value, ODBC32.SQL_IS stringLength) 292IntPtr pwszTableName = Marshal.StringToCoTaskMemUni(tableName);
System\Data\Odbc\OdbcUtils.cs (1)
329IntPtr ptr = ADP.IntPtrOffset(DangerousGetHandle(), offset);
System.Diagnostics.DiagnosticSource (1)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
System.Diagnostics.FileVersionInfo (1)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
System.Diagnostics.PerformanceCounter (6)
artifacts\obj\System.Diagnostics.PerformanceCounter\Debug\net10.0\System.Diagnostics.PerformanceCounter.notsupported.cs (6)
64void CollectData(int id, System.IntPtr valueName, System.IntPtr data, int totalBytes, out System.IntPtr res); 174void System.Diagnostics.ICollectData.CollectData(int callIdx, System.IntPtr valueNamePtr, System.IntPtr dataPtr, int totalBytes, out System.IntPtr res) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_PerfCounters); }
System.Diagnostics.Process (40)
Microsoft\Win32\SafeHandles\SafeProcessHandle.cs (3)
26: this(IntPtr.Zero) 30internal SafeProcessHandle(IntPtr handle) 40public SafeProcessHandle(IntPtr existingHandle, bool ownsHandle)
src\libraries\Common\src\Interop\Linux\procfs\Interop.ProcFsStat.ParseMapModules.cs (1)
69EntryPointAddress = IntPtr.Zero // unknown
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
41return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
70username = Marshal.PtrToStringUTF8((IntPtr)passwd.Name);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.FormatInfo.cs (1)
63Marshal.PtrToStringUTF8((IntPtr)formatBuffer)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SchedGetSetAffinity.cs (2)
12internal static partial int SchedSetAffinity(int pid, ref IntPtr mask); 15internal static partial int SchedGetAffinity(int pid, out IntPtr mask);
System\Diagnostics\Process.cs (9)
39private IntPtr _minWorkingSet; 40private IntPtr _maxWorkingSet; 43private IntPtr _processorAffinity; 130public IntPtr Handle => SafeHandle.DangerousGetHandle(); 264public IntPtr MaxWorkingSet 288public IntPtr MinWorkingSet 521public IntPtr ProcessorAffinity 1023private void SetWorkingSetLimits(IntPtr? min, IntPtr? max)
System\Diagnostics\Process.Linux.cs (11)
184private IntPtr ProcessorAffinityCore 190IntPtr set; 212private void GetWorkingSetLimits(out IntPtr minWorkingSet, out IntPtr maxWorkingSet) 214minWorkingSet = IntPtr.Zero; // no defined limit available 228switch (IntPtr.Size) 240maxWorkingSet = (IntPtr)rsslim; 249private static void SetWorkingSetLimitsCore(IntPtr? newMin, IntPtr? newMax, out IntPtr resultingMin, out IntPtr resultingMax)
System\Diagnostics\Process.Unix.cs (3)
849return new AnonymousPipeClientStream(direction, new SafePipeHandle((IntPtr)fd, ownsHandle: true)); 1061public IntPtr MainWindowHandle => IntPtr.Zero;
System\Diagnostics\ProcessModule.cs (2)
39public IntPtr BaseAddress { get; internal set; } 53public IntPtr EntryPointAddress { get; internal set; }
System\Diagnostics\ProcessStartInfo.cs (1)
154public IntPtr ErrorDialogParentHandle { get; set; }
System\Diagnostics\ProcessThread.cs (2)
114public unsafe IntPtr StartAddress 116get { return (IntPtr)_threadInfo._startAddress; }
System\Diagnostics\ProcessThread.Unix.cs (1)
45public IntPtr ProcessorAffinity
System.Diagnostics.StackTrace (15)
System\Diagnostics\StackTraceSymbols.cs (12)
53internal void GetSourceLineInfo(Assembly assembly, string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, bool isFileLayout, 54IntPtr inMemoryPdbAddress, int inMemoryPdbSize, int methodToken, int ilOffset, 117private MetadataReader? TryGetReader(Assembly assembly, string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, bool isFileLayout, IntPtr inMemoryPdbAddress, int inMemoryPdbSize) 119if (loadedPeAddress == IntPtr.Zero && assemblyPath == null && inMemoryPdbAddress == IntPtr.Zero) 127provider = inMemoryPdbAddress != IntPtr.Zero ? 143private static unsafe MetadataReaderProvider? TryOpenReaderForInMemoryPdb(IntPtr inMemoryPdbAddress, int inMemoryPdbSize) 145Debug.Assert(inMemoryPdbAddress != IntPtr.Zero); 169private static unsafe PEReader? TryGetPEReader(string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, bool isFileLayout) 171if (loadedPeAddress != IntPtr.Zero && loadedPeSize > 0) 185private static MetadataReaderProvider? TryOpenReaderFromAssemblyFile(string assemblyPath, IntPtr loadedPeAddress, int loadedPeSize, bool isFileLayout)
System\Diagnostics\SymbolStore\ISymbolBinder.cs (1)
16ISymbolReader? GetReader(IntPtr importer, string filename, string searchPath);
System\Diagnostics\SymbolStore\ISymbolWriter.cs (2)
14void Initialize(IntPtr emitter, string filename, bool fFullBuild); 171void SetUnderlyingWriter(IntPtr underlyingWriter);
System.DirectoryServices (1)
artifacts\obj\System.DirectoryServices\Debug\net10.0\System.DirectoryServices.notsupported.cs (1)
476public System.IntPtr Handle { get { throw new System.PlatformNotSupportedException(System.SR.DirectoryServices_PlatformNotSupported); } }
System.Drawing.Common.Tests (146)
mono\System.Drawing\GraphicsTests.cs (8)
2135IntPtr hdc1 = g.GetHdc(); 2137IntPtr hdc2 = g.GetHdc(); 2147Assert.Throws<ArgumentException>(() => g.ReleaseHdcInternal(IntPtr.Zero)); 2155IntPtr hdc = g.GetHdc(); 2165IntPtr hdc1 = g.GetHdc(); 2167IntPtr hdc2 = g.GetHdc(); 2984IntPtr hdc1 = g.GetHdc(); 2986IntPtr hdc2 = g.GetHdc();
mono\System.Imaging\MetafileTest.cs (5)
218IntPtr hdc = g.GetHdc(); 235IntPtr hdc = g.GetHdc(); 251IntPtr hdc = g.GetHdc(); 292IntPtr hdc = g.GetHdc(); 334IntPtr hdc = g.GetHdc();
System\Drawing\BitmapTests.cs (22)
197yield return new object[] { 10, 10, 0, PixelFormat.Format8bppIndexed, IntPtr.Zero }; 198yield return new object[] { 5, 15, int.MaxValue, PixelFormat.Format32bppArgb, IntPtr.Zero }; 199yield return new object[] { 5, 15, int.MinValue, PixelFormat.Format24bppRgb, IntPtr.Zero }; 200yield return new object[] { 1, 1, 1, PixelFormat.Format1bppIndexed, IntPtr.Zero }; 205public void Ctor_Width_Height_Stride_PixelFormat_Scan0(int width, int height, int stride, PixelFormat pixelFormat, IntPtr scan0) 226AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(width, 1, 0, PixelFormat.Format16bppArgb1555, IntPtr.Zero)); 241AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, height, 0, PixelFormat.Format16bppArgb1555, IntPtr.Zero)); 258AssertExtensions.Throws<ArgumentException>(null, () => new Bitmap(1, 1, 0, format, IntPtr.Zero)); 598IntPtr handle = bitmap.GetHbitmap(); 601Assert.NotEqual(IntPtr.Zero, handle); 655Assert.Throws<ExternalException>(() => Image.FromHbitmap(IntPtr.Zero)); 671IntPtr handle; 696public void GetHicon_FromHicon_ReturnsExpected(IntPtr handle, int width, int height) 698Assert.NotEqual(IntPtr.Zero, handle); 760AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromHicon(IntPtr.Zero)); 774AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromResource(IntPtr.Zero, "Name")); 781AssertExtensions.Throws<ArgumentException>(null, () => Bitmap.FromResource(IntPtr.Zero, "Name")); 1117Assert.Equal(IntPtr.Zero, bitmapData.Scan0); 1138Assert.Equal(IntPtr.Zero, bitmapData.Scan0); 1167Assert.Equal(IntPtr.Zero, bitmapData.Scan0); 1179Assert.Equal(IntPtr.Zero, bitmapData.Scan0); 1214data.Scan0 = IntPtr.Zero;
System\Drawing\BrushTests.cs (2)
13brush.PublicSetNativeBrush(IntPtr.Zero); 16brush.PublicSetNativeBrush(IntPtr.Zero);
System\Drawing\BufferedGraphicsContextTests.cs (3)
61IntPtr hdc = graphics.GetHdc(); 83IntPtr hdc = graphics.GetHdc(); 105IntPtr hdc = graphics.GetHdc();
System\Drawing\BufferedGraphicsTests.cs (2)
70IntPtr hdc = graphics.GetHdc(); 120graphics.Render(IntPtr.Zero);
System\Drawing\FontTests.cs (9)
461AssertExtensions.Throws<ArgumentException>(null, () => Font.FromHdc(IntPtr.Zero)); 469IntPtr hdc = graphics.GetHdc(); 483AssertExtensions.Throws<ArgumentException>(null, () => Font.FromHfont(IntPtr.Zero)); 593IntPtr hdc = graphics.GetHdc(); 618IntPtr hdc = graphics.GetHdc(); 815IntPtr hfont = font.ToHfont(); 816Assert.NotEqual(IntPtr.Zero, hfont); 828IntPtr hfont = font.ToHfont(); 829Assert.NotEqual(IntPtr.Zero, hfont);
System\Drawing\GraphicsTests.cs (14)
23IntPtr hdc = graphics.GetHdc(); 26Assert.NotEqual(IntPtr.Zero, hdc); 93using Graphics graphics = Graphics.FromHdc(hdc, IntPtr.Zero); 110AssertExtensions.Throws<ArgumentNullException>("hdc", () => Graphics.FromHdc(IntPtr.Zero)); 116Assert.Throws<OutOfMemoryException>(() => Graphics.FromHdcInternal(IntPtr.Zero)); 122Assert.Throws<OutOfMemoryException>(() => Graphics.FromHdc(IntPtr.Zero, 10)); 137IntPtr hdc = graphics.GetHdc(); 158IntPtr hdc = graphics.GetHdc(); 174IntPtr hdc1 = graphics1.GetHdc(); 175IntPtr hdc2 = graphics2.GetHdc(); 191AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdc(IntPtr.Zero)); 192AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(IntPtr.Zero)); 203AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdc(IntPtr.Zero)); 204AssertExtensions.Throws<ArgumentException>(null, () => graphics.ReleaseHdcInternal(IntPtr.Zero));
System\Drawing\IconTests.cs (5)
324IntPtr handle = icon.Handle; 325Assert.NotEqual(IntPtr.Zero, handle); 663IntPtr handle; 678IntPtr handle; 700AssertExtensions.Throws<ArgumentException>("handle", null, () => Icon.FromHandle(IntPtr.Zero));
System\Drawing\Imaging\BitmapDataTests.cs (1)
15Assert.Equal(IntPtr.Zero, bd.Scan0);
System\Drawing\Imaging\EncoderParameterTests.cs (14)
176yield return new object[] { 0, EncoderParameterValueType.ValueTypeAscii, IntPtr.Zero }; 177yield return new object[] { 0, EncoderParameterValueType.ValueTypeByte, IntPtr.Zero }; 178yield return new object[] { 0, EncoderParameterValueType.ValueTypeLong, IntPtr.Zero }; 179yield return new object[] { 0, EncoderParameterValueType.ValueTypeLongRange, IntPtr.Zero }; 180yield return new object[] { 0, EncoderParameterValueType.ValueTypeRational, IntPtr.Zero }; 181yield return new object[] { 0, EncoderParameterValueType.ValueTypeRationalRange, IntPtr.Zero }; 182yield return new object[] { 0, EncoderParameterValueType.ValueTypeShort, IntPtr.Zero }; 183yield return new object[] { 0, EncoderParameterValueType.ValueTypeUndefined, IntPtr.Zero }; 184yield return new object[] { 0, EncoderParameterValueType.ValueTypeUndefined, IntPtr.Zero }; 190public void Ctor_Encoder_NumberOfValues_Type_Value(int numberOfValues, EncoderParameterValueType type, IntPtr value) 210Assert.Throws<InvalidOperationException>(() => new EncoderParameter(s_anyEncoder, 1, (EncoderParameterValueType)999, IntPtr.Zero)); 310Assert.Throws(expected, () => new EncoderParameter(s_anyEncoder, numberOfValues, type, IntPtr.Zero)); 320IntPtr anyValue = IntPtr.Zero;
System\Drawing\Imaging\MetafileTests.cs (43)
43AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, false)); 152AssertExtensions.Throws<ArgumentException>(null, () => new Metafile((IntPtr)null, EmfType.EmfOnly)); 158AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, EmfType.EmfOnly)); 181AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, EmfType.EmfOnly, description)); 277AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangleF)); 278AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangleF, MetafileFrameUnit.Pixel)); 280new Metafile(IntPtr.Zero, _rectangleF, MetafileFrameUnit.Pixel, EmfType.EmfOnly)); 282new Metafile(IntPtr.Zero, _rectangleF, MetafileFrameUnit.Pixel, EmfType.EmfOnly, "description")); 284AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangle)); 285AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(IntPtr.Zero, _rectangle, MetafileFrameUnit.Pixel)); 287new Metafile(IntPtr.Zero, _rectangle, MetafileFrameUnit.Pixel, EmfType.EmfOnly)); 289new Metafile(IntPtr.Zero, _rectangle, MetafileFrameUnit.Pixel, EmfType.EmfOnly, "description")); 306IntPtr referenceHdc = g.GetHdc(); 324IntPtr referenceHdc = g.GetHdc(); 389AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero)); 390AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, EmfType.EmfOnly)); 391AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, EmfType.EmfOnly, "description")); 402IntPtr referenceHdc = g.GetHdc(); 413IntPtr referenceHdc = g.GetHdc(); 426IntPtr referenceHdc = g.GetHdc(); 438IntPtr referenceHdc = g.GetHdc(); 617AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangleF)); 618AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangleF, MetafileFrameUnit.GdiCompatible)); 620new Metafile(fileName, IntPtr.Zero, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 622new Metafile(fileName, IntPtr.Zero, _rectangleF, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 624AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangle)); 625AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(fileName, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible)); 627new Metafile(fileName, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 629new Metafile(fileName, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 640IntPtr referenceHdc = g.GetHdc(); 662IntPtr referenceHdc = g.GetHdc(); 680IntPtr referenceHdc = g.GetHdc(); 697IntPtr referenceHdc = g.GetHdc(); 713IntPtr referenceHdc = g.GetHdc(); 787AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(stream, IntPtr.Zero, _rectangle)); 788AssertExtensions.Throws<ArgumentException>(null, () => new Metafile(stream, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible)); 790new Metafile(stream, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly)); 792new Metafile(stream, IntPtr.Zero, _rectangle, MetafileFrameUnit.GdiCompatible, EmfType.EmfOnly, "description")); 802IntPtr referenceHdc = g.GetHdc(); 817IntPtr referenceHdc = g.GetHdc(); 829IntPtr referenceHdc = g.GetHdc(); 848AssertExtensions.Throws<ArgumentException>(null, () => Metafile.GetMetafileHeader(IntPtr.Zero)); 911Assert.NotEqual(IntPtr.Zero, metafile.GetHenhmetafile());
System\Drawing\Printing\PrinterSettingsTests.cs (3)
546IntPtr handle = printerSettings.GetHdevmode(); 581AssertExtensions.Throws<ArgumentException>(null, () => printerSettings.SetHdevmode(IntPtr.Zero)); 589IntPtr handle = printerSettings.GetHdevnames();
System\Drawing\RegionTests.cs (12)
912IntPtr handle1 = region.GetHrgn(s_graphic); 913IntPtr handle2 = region.GetHrgn(s_graphic); 914Assert.NotEqual(IntPtr.Zero, handle1); 918IntPtr handle3 = newRegion.GetHrgn(s_graphic); 930AssertExtensions.Throws<ArgumentException>(null, () => Region.FromHrgn(IntPtr.Zero)); 937IntPtr handle = region.GetHrgn(s_graphic); 938Assert.NotEqual(IntPtr.Zero, handle); 942Assert.Equal(IntPtr.Zero, region.GetHrgn(s_graphic)); 949Assert.Equal(IntPtr.Zero, region.GetHrgn(s_graphic)); 952IntPtr handle = region.GetHrgn(s_graphic); 953Assert.NotEqual(IntPtr.Zero, handle); 974AssertExtensions.Throws<ArgumentNullException>("regionHandle", () => region.ReleaseHrgn(IntPtr.Zero));
System\Drawing\Text\PrivateFontCollectionTests.cs (3)
140IntPtr fontBuffer = Marshal.AllocCoTaskMem(data.Length); 159AssertExtensions.Throws<ArgumentException>(null, () => fontCollection.AddMemoryFont(IntPtr.Zero, 100)); 176IntPtr fontBuffer = Marshal.AllocCoTaskMem(data.Length);
System.Formats.Nrbf (2)
System\Formats\Nrbf\ClassWithIdRecord.cs (1)
67MemberPrimitiveTypedRecord<IntPtr> => Create(new IntPtr(reader.ReadInt64())),
System\Formats\Nrbf\Utils\TypeNameHelpers.cs (1)
102else if (typeof(T) == typeof(IntPtr))
System.Formats.Tar (4)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
70username = Marshal.PtrToStringUTF8((IntPtr)passwd.Name);
System.IO.Compression (16)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (6)
20internal static readonly IntPtr ZNullPtr = IntPtr.Zero; 145/// <see cref="SafeHandle" />. This would save an <see cref="IntPtr" /> field since 172SetHandle(IntPtr.Zero); 195public IntPtr NextIn 207public IntPtr NextOut
src\libraries\Common\src\System\IO\Compression\ZLibNative.ZStream.cs (4)
19internal IntPtr nextIn; //Bytef *next_in; /* next input byte */ 20internal IntPtr nextOut; //Bytef *next_out; /* next output byte should be put there */ 22internal IntPtr msg; //char *msg; /* last error message, NULL if no error */ 24private readonly IntPtr internalState; //internal state that is not visible to managed code
System\IO\Compression\DeflateZLib\Deflater.cs (3)
98_zlibStream.NextIn = (IntPtr)_inputBufferHandle.Pointer; 111_zlibStream.NextIn = (IntPtr)inputBufferPtr; 145_zlibStream.NextOut = (IntPtr)bufPtr;
System\IO\Compression\DeflateZLib\Inflater.cs (2)
197_zlibStream.NextIn = (IntPtr)_inputBufferHandle.Pointer; 271_zlibStream.NextOut = (IntPtr)bufPtr;
System\IO\Compression\ZipArchiveEntry.cs (1)
389private static readonly bool s_allowLargeZipArchiveEntriesInUpdateMode = IntPtr.Size > 4;
System.IO.Compression.Brotli (21)
src\libraries\Common\src\Interop\Interop.Brotli.cs (8)
14internal static partial SafeBrotliDecoderHandle BrotliDecoderCreateInstance(IntPtr allocFunc, IntPtr freeFunc, IntPtr opaque); 25internal static partial void BrotliDecoderDestroyInstance(IntPtr state); 31internal static partial SafeBrotliEncoderHandle BrotliEncoderCreateInstance(IntPtr allocFunc, IntPtr freeFunc, IntPtr opaque); 48internal static partial void BrotliEncoderDestroyInstance(IntPtr state);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBrotliHandle.cs (4)
11public SafeBrotliEncoderHandle() : base(IntPtr.Zero, true) { } 19public override bool IsInvalid => handle == IntPtr.Zero; 24public SafeBrotliDecoderHandle() : base(IntPtr.Zero, true) { } 32public override bool IsInvalid => handle == IntPtr.Zero;
System\IO\Compression\dec\BrotliDecoder.cs (3)
19_state = Interop.Brotli.BrotliDecoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
System\IO\Compression\enc\BrotliEncoder.cs (6)
27_state = Interop.Brotli.BrotliEncoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); 42_state = Interop.Brotli.BrotliEncoderCreateInstance(IntPtr.Zero, IntPtr.Zero, IntPtr.Zero);
System.IO.Compression.ZipFile (3)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
System.IO.FileSystem.DriveInfo (5)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.cs (1)
29callbackContext->_results.Add(Marshal.PtrToStringUTF8((IntPtr)name)!);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.FormatInfo.cs (1)
63Marshal.PtrToStringUTF8((IntPtr)formatBuffer)!;
System.IO.FileSystem.Watcher (3)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
System.IO.IsolatedStorage (1)
System\IO\IsolatedStorage\IsolatedStorageFileStream.cs (1)
324public override IntPtr Handle
System.IO.MemoryMappedFiles (30)
Microsoft\Win32\SafeMemoryMappedFileHandle.Unix.cs (3)
53IntPtr handlePtr; 64handlePtr = IntPtr.MaxValue; 74SetHandle((IntPtr)(-1));
Microsoft\Win32\SafeMemoryMappedViewHandle.Unix.cs (2)
10internal SafeMemoryMappedViewHandle(IntPtr handle, bool ownsHandle) 18IntPtr addr = handle;
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Fcntl.cs (2)
14internal static partial int DangerousSetIsNonBlocking(IntPtr fd, int isNonBlocking); 29internal static partial int GetFD(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MAdvise.cs (1)
12internal static partial int MAdvise(IntPtr addr, ulong length, MemoryAdvice advice);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MMap.cs (5)
32internal static partial IntPtr MMap( 33IntPtr addr, ulong len, 39internal static partial IntPtr MMap( 40IntPtr addr, ulong len, 42IntPtr fd, long offset);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MSync.cs (1)
20internal static partial int MSync(IntPtr addr, ulong len, MemoryMappedSyncFlags flags);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MUnmap.cs (1)
12internal static partial int MUnmap(IntPtr addr, ulong len);
System\IO\MemoryMappedFiles\MemoryMappedFile.cs (4)
295if (IntPtr.Size == 4 && capacity > uint.MaxValue) 352if (IntPtr.Size == 4 && capacity > uint.MaxValue) 411if (IntPtr.Size == 4 && size > uint.MaxValue) 445if (IntPtr.Size == 4 && size > uint.MaxValue)
System\IO\MemoryMappedFiles\MemoryMappedView.cs (1)
86if (IntPtr.Size == 4 && newSize > uint.MaxValue)
System\IO\MemoryMappedFiles\MemoryMappedView.Unix.cs (6)
80IntPtr addr; 84IntPtr.Zero, // don't specify an address; let the system choose one 99IntPtr.Zero, 108if (addr == IntPtr.Zero) // note that shim uses null pointer, not non-null MAP_FAILED sentinel 140(IntPtr)ptr, (ulong)capacity, 159private static void DisableForkingIfPossible(IntPtr addr, ulong length)
System.IO.Pipes (12)
Microsoft\Win32\SafeHandles\SafePipeHandle.cs (1)
25public SafePipeHandle(IntPtr preexistingHandle, bool ownsHandle)
Microsoft\Win32\SafeHandles\SafePipeHandle.Unix.cs (2)
56base.SetHandle((IntPtr)DefaultInvalidHandle); 133internal void SetHandle(IntPtr descriptor, bool ownsHandle = true)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Fcntl.cs (2)
14internal static partial int DangerousSetIsNonBlocking(IntPtr fd, int isNonBlocking); 29internal static partial int GetFD(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.FLock.cs (1)
28internal static partial int FLock(IntPtr fd, LockOperations operation);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
41return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
70username = Marshal.PtrToStringUTF8((IntPtr)passwd.Name);
System.IO.Ports (5)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
src\libraries\Common\src\Interop\Unix\System.IO.Ports.Native\Interop.Serial.cs (2)
17internal static partial int SerialPortClose(IntPtr handle); 20internal static partial Error Shutdown(IntPtr socket, SocketShutdown how);
System.Linq.Expressions (2)
System\Dynamic\Utils\DelegateHelpers.cs (1)
350return (t.IsPointer) ? typeof(IntPtr) : t;
System\Linq\Expressions\Compiler\DelegateHelpers.cs (1)
119Type[] delegateCtorSignature = { typeof(object), typeof(IntPtr) };
System.Linq.Parallel (2)
System\Linq\Parallel\Scheduling\Scheduling.cs (2)
88Debug.Assert((DEFAULT_BYTES_PER_CHUNK % IntPtr.Size) == 0, "bytes per chunk should be a multiple of pointer size"); 89chunkSize = (DEFAULT_BYTES_PER_CHUNK / IntPtr.Size);
System.Management (1)
artifacts\obj\System.Management\Debug\net10.0\System.Management.notsupported.cs (1)
159public static explicit operator System.IntPtr (System.Management.ManagementBaseObject managementObject) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemManagement); }
System.Net.Http (35)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
22protected DebugSafeHandle(IntPtr invalidValue, bool ownsHandle) : base(ownsHandle)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.Associate.cs (4)
59DataPointer = (IntPtr)string1Bytes, 64DataPointer = (IntPtr)string2Bytes, 69DataPointer = (IntPtr)string3Bytes, 74DataPointer = (IntPtr)string4Bytes,
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
System\Net\Http\HttpTelemetry.cs (20)
255DataPointer = (IntPtr)(arg1Ptr), 260DataPointer = (IntPtr)(arg2Ptr), 265DataPointer = (IntPtr)(&arg3), 270DataPointer = (IntPtr)(arg4Ptr), 275DataPointer = (IntPtr)(&arg5), 280DataPointer = (IntPtr)(&arg6), 285DataPointer = (IntPtr)(&arg7), 303DataPointer = (IntPtr)(&arg1), 308DataPointer = (IntPtr)(&arg2), 313DataPointer = (IntPtr)(&arg3), 330DataPointer = (IntPtr)(&arg1), 335DataPointer = (IntPtr)(&arg2), 340DataPointer = (IntPtr)(&arg3), 365DataPointer = (IntPtr)(&arg1), 370DataPointer = (IntPtr)(&arg2), 375DataPointer = (IntPtr)(&arg3), 380DataPointer = (IntPtr)arg4Ptr, 385DataPointer = (IntPtr)arg5Ptr, 390DataPointer = (IntPtr)(&arg6), 395DataPointer = (IntPtr)arg7Ptr,
System\Net\Http\NetEventSource.Http.cs (5)
93DataPointer = (IntPtr)(&arg1), 98DataPointer = (IntPtr)(&arg2), 103DataPointer = (IntPtr)(&arg3), 108DataPointer = (IntPtr)string4Bytes, 113DataPointer = (IntPtr)string5Bytes,
System.Net.HttpListener (17)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (4)
297protected void ProtectedInvokeCallback(object? result, IntPtr userToken) 340ProtectedInvokeCallback(result, IntPtr.Zero); 346ProtectedInvokeCallback(null, IntPtr.Zero); 353protected virtual void Complete(IntPtr userToken)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.Associate.cs (4)
59DataPointer = (IntPtr)string1Bytes, 64DataPointer = (IntPtr)string2Bytes, 69DataPointer = (IntPtr)string3Bytes, 74DataPointer = (IntPtr)string4Bytes,
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (4)
60DataPointer = (IntPtr)arg1Ptr, 65DataPointer = (IntPtr)arg2Ptr, 70DataPointer = (IntPtr)(&bufferLength), 75DataPointer = (IntPtr)arg3Ptr,
System.Net.Mail (18)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
src\libraries\Common\src\System\Net\ContextAwareResult.cs (4)
324base.Complete(IntPtr.Zero); 332protected override void Complete(IntPtr userToken) 355if (userToken != IntPtr.Zero || context == null) 367base.Complete(IntPtr.Zero);
src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
22protected DebugSafeHandle(IntPtr invalidValue, bool ownsHandle) : base(ownsHandle)
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (4)
297protected void ProtectedInvokeCallback(object? result, IntPtr userToken) 340ProtectedInvokeCallback(result, IntPtr.Zero); 346ProtectedInvokeCallback(null, IntPtr.Zero); 353protected virtual void Complete(IntPtr userToken)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.Associate.cs (4)
59DataPointer = (IntPtr)string1Bytes, 64DataPointer = (IntPtr)string2Bytes, 69DataPointer = (IntPtr)string3Bytes, 74DataPointer = (IntPtr)string4Bytes,
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
System.Net.NameResolution (15)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
41return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Socket.cs (1)
14internal static unsafe partial Error Socket(int addressFamily, int socketType, int protocolType, IntPtr* socket);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
152uint addr = (uint)System.Runtime.InteropServices.Marshal.ReadInt32((IntPtr)address);
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (3)
21IntPtr invalid = (IntPtr)(-1); 22IntPtr socket = invalid;
System\Net\NameResolutionPal.Unix.cs (3)
60? Marshal.PtrToStringUTF8((IntPtr)hostEntry.CanonicalName) 116localAliases[i] = Marshal.PtrToStringUTF8((IntPtr)hostEntry.Aliases[i])!; 189return socketError == SocketError.Success ? Marshal.PtrToStringUTF8((IntPtr)buffer) : null;
System.Net.NetworkInformation (12)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetDomainName.cs (1)
34string domainName = Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
41return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.NetworkChange.cs (2)
20public static unsafe partial Error CreateNetworkChangeListenerSocket(IntPtr* socket); 23public static unsafe partial Error ReadEvents(SafeHandle socket, delegate* unmanaged<IntPtr, NetworkChangeKind, void> onNetworkChange);
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
System\Net\NetworkInformation\LinuxNetworkInterface.cs (4)
81IntPtr globalMemory = (IntPtr)null; 89globalMemory = (IntPtr)nii; 97var lni = new LinuxNetworkInterface(Marshal.PtrToStringUTF8((IntPtr)nii->Name)!, nii->InterfaceIndex, systemProperties);
System\Net\NetworkInformation\NetworkAddressChange.Unix.cs (2)
157IntPtr newSocket; 222private static void ProcessEvent(IntPtr socket, Interop.Sys.NetworkChangeKind kind)
System.Net.Ping (7)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Socket.cs (1)
14internal static unsafe partial Error Socket(int addressFamily, int socketType, int protocolType, IntPtr* socket);
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
152uint addr = (uint)System.Runtime.InteropServices.Marshal.ReadInt32((IntPtr)address);
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (3)
21IntPtr invalid = (IntPtr)(-1); 22IntPtr socket = invalid;
System.Net.Primitives (12)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetDomainName.cs (1)
34string domainName = Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
41return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
152uint addr = (uint)System.Runtime.InteropServices.Marshal.ReadInt32((IntPtr)address);
System\Net\NetworkCredential.cs (3)
161IntPtr ptr = IntPtr.Zero; 170if (ptr != IntPtr.Zero)
System.Net.Quic (127)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs (11)
19private static unsafe partial int ObjObj2Txt(byte* buf, int buf_len, IntPtr a); 22private static partial IntPtr CryptoNative_GetObjectDefinitionByName(string friendlyName); 23internal static IntPtr GetObjectDefinitionByName(string friendlyName) 25IntPtr ret = CryptoNative_GetObjectDefinitionByName(friendlyName); 26if (ret == IntPtr.Zero) 36internal static partial IntPtr ObjNid2Obj(int nid); 39internal static partial void Asn1ObjectFree(IntPtr o); 49internal static partial void Asn1OctetStringFree(IntPtr o); 51internal static unsafe string GetOidValue(IntPtr asn1ObjectPtr) 70return Marshal.PtrToStringUTF8((IntPtr)bufStack, bytesNeeded); 96return Marshal.PtrToStringUTF8((IntPtr)buf, bytesNeeded);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.BIO.cs (1)
20internal static partial bool BioDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Crypto.cs (17)
12using TrackedAllocationDelegate = System.Action<System.IntPtr, ulong, System.IntPtr, int>; 41private static partial int GetX509NameRawBytes(IntPtr x509Name, byte[]? buf, int cBuf); 47internal static partial IntPtr GetX509CrlNextUpdate(SafeX509CrlHandle crl); 59private static partial int GetAsn1StringBytes(IntPtr asn1, byte[]? buf, int cBuf); 72IntPtr ptr = GetX509RootStorePath_private(&usedDefault); 84private static unsafe partial IntPtr GetX509RootStorePath_private(byte* defaultPath); 87private static unsafe partial IntPtr GetX509RootStoreFile_private(byte* defaultPath); 129internal static byte[] GetAsn1StringBytes(IntPtr asn1) 139internal static X500DistinguishedName LoadX500Name(IntPtr namePtr) 246private static unsafe partial void ForEachTrackedAllocation(delegate* unmanaged<IntPtr, ulong, char*, int, IntPtr, void> callback, IntPtr ctx); 250ForEachTrackedAllocation(&MemoryTrackingCallback, (IntPtr)(&callback)); 254private static unsafe void MemoryTrackingCallback(IntPtr ptr, ulong size, char* file, int line, IntPtr ctx) 257callback(ptr, size, (IntPtr)file, line);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (4)
27internal static partial IntPtr ErrReasonErrorString(ulong error); 40ret = Marshal.PtrToStringUTF8((IntPtr)buf)!; 100internal static void CheckValidOpenSslHandle(IntPtr handle) 102if (handle == IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509.cs (22)
16internal static partial IntPtr GetX509NotBefore(SafeX509Handle x509); 19internal static partial IntPtr GetX509NotAfter(SafeX509Handle x509); 22internal static partial IntPtr GetX509SignatureAlgorithm(SafeX509Handle x509); 25internal static partial IntPtr GetX509PublicKeyAlgorithm(SafeX509Handle x509); 28internal static partial IntPtr GetX509PublicKeyBytes(SafeX509Handle x509); 40internal static partial SafeX509Handle DecodeX509(IntPtr buf, int len); 49internal static partial void X509Destroy(IntPtr a); 55internal static partial SafeX509Handle X509Duplicate(IntPtr handle); 68internal static partial SafeX509Handle X509UpRef(IntPtr handle); 96internal static partial IntPtr X509GetIssuerName(SafeX509Handle x); 99internal static partial IntPtr X509GetSubjectName(SafeX509Handle x); 129internal static partial IntPtr X509GetExt(SafeX509Handle x, int loc); 133internal static partial IntPtr X509ExtensionGetOid(IntPtr ex); 137internal static partial IntPtr X509ExtensionGetData(IntPtr ex); 141internal static partial bool X509ExtensionGetCritical(IntPtr ex); 161internal static partial void X509StoreDestroy(IntPtr v); 240private static unsafe partial int CryptoNative_X509StoreCtxSetVerifyCallback(SafeX509StoreCtxHandle ctx, delegate* unmanaged<int, IntPtr, int> callback, void* appData); 242internal static unsafe void X509StoreCtxSetVerifyCallback(SafeX509StoreCtxHandle ctx, delegate* unmanaged<int, IntPtr, int> callback, void* appData) 259private static partial IntPtr CryptoNative_X509VerifyCertErrorString(int n); 262internal static partial void X509CrlDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Ext.cs (1)
19internal static partial int X509ExtensionDestroy(IntPtr x);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Name.cs (2)
52base(IntPtr.Zero, ownsHandle: true) 64base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (7)
16internal static partial void RecursiveFreeX509Stack(IntPtr stack); 29internal static partial IntPtr GetX509StackField(SafeX509StackHandle stack, int loc); 36internal static partial IntPtr GetX509StackField(SafeSharedX509StackHandle stack, int loc); 67base(IntPtr.Zero, ownsHandle: true) 74SetHandle(IntPtr.Zero); 80get { return handle == IntPtr.Zero; } 104base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (5)
16internal static partial void X509StoreCtxDestroy(IntPtr v); 75base(IntPtr.Zero, ownsHandle: true) 79internal SafeX509StoreCtxHandle(IntPtr handle, bool ownsHandle) : 87SetHandle(IntPtr.Zero); 93get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (8)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; } 32base(IntPtr.Zero, ownsHandle: true) 39SetHandle(IntPtr.Zero); 45get { return handle == IntPtr.Zero; } 52base(IntPtr.Zero, ownsHandle: true) 60base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (4)
16base(IntPtr.Zero, ownsHandle: true) 22IntPtr h = handle; 23SetHandle(IntPtr.Zero); 44return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (3)
14protected SafeInteriorHandle(IntPtr invalidHandleValue, bool ownsHandle) 28SetHandle(IntPtr.Zero); 38return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (9)
31base(IntPtr.Zero, ownsHandle: true) 38SetHandle(IntPtr.Zero); 44get { return handle == IntPtr.Zero; } 51base(IntPtr.Zero, ownsHandle: true) 58SetHandle(IntPtr.Zero); 64get { return handle == IntPtr.Zero; } 71base(IntPtr.Zero, ownsHandle: true) 78SetHandle(IntPtr.Zero); 84get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (3)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; }
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
152uint addr = (uint)System.Runtime.InteropServices.Marshal.ReadInt32((IntPtr)address);
System\Net\Quic\Internal\MsQuicApi.cs (3)
79IntPtr msQuicHandle = IntPtr.Zero; 173string? gitHash = Marshal.PtrToStringUTF8((IntPtr)libGitHash);
System\Net\Quic\Internal\MsQuicConfiguration.cs (3)
17=> certificate is X509Certificate2 certificate2 && certificate2.Handle != IntPtr.Zero && certificate2.HasPrivateKey; 225(void*)IntPtr.Zero, 277PrivateKeyPassword = (sbyte*)IntPtr.Zero
System\Net\Quic\Internal\MsQuicExtensions.cs (4)
21=> $"{{ {nameof(NEW_CONNECTION.Info)} = {{ {nameof(QUIC_NEW_CONNECTION_INFO.QuicVersion)} = {NEW_CONNECTION.Info->QuicVersion}, {nameof(QUIC_NEW_CONNECTION_INFO.LocalAddress)} = {MsQuicHelpers.QuicAddrToIPEndPoint(NEW_CONNECTION.Info->LocalAddress)}, {nameof(QUIC_NEW_CONNECTION_INFO.RemoteAddress)} = {MsQuicHelpers.QuicAddrToIPEndPoint(NEW_CONNECTION.Info->RemoteAddress)} }}, {nameof(NEW_CONNECTION.Connection)} = 0x{(IntPtr)NEW_CONNECTION.Connection:X11} }}", 44=> $"{{ {nameof(PEER_STREAM_STARTED.Stream)} = 0x{(IntPtr)PEER_STREAM_STARTED.Stream:X11} {nameof(PEER_STREAM_STARTED.Flags)} = {PEER_STREAM_STARTED.Flags} }}", 56=> $"{{ {nameof(DATAGRAM_SEND_STATE_CHANGED.ClientContext)} = 0x{(IntPtr)DATAGRAM_SEND_STATE_CHANGED.ClientContext:X11}, {nameof(DATAGRAM_SEND_STATE_CHANGED.State)} = {DATAGRAM_SEND_STATE_CHANGED.State} }}", 62=> $"{{ {nameof(PEER_CERTIFICATE_RECEIVED.DeferredStatus)} = {PEER_CERTIFICATE_RECEIVED.DeferredStatus}, {nameof(PEER_CERTIFICATE_RECEIVED.DeferredErrorFlags)} = {PEER_CERTIFICATE_RECEIVED.DeferredErrorFlags}, {nameof(PEER_CERTIFICATE_RECEIVED.Certificate)} = 0x{(IntPtr)PEER_CERTIFICATE_RECEIVED.Certificate:X11} }}",
System\Net\Quic\Internal\MsQuicSafeHandle.cs (3)
28public override bool IsInvalid => handle == IntPtr.Zero; 33: base((IntPtr)handle, ownsHandle: true) 62SetHandle(IntPtr.Zero);
System\Net\Quic\QuicConnection.cs (4)
428IntPtr targetHostPtr = Marshal.StringToCoTaskMemUTF8(sni); 760var task = _sslConnectionOptions.StartAsyncCertificateValidation((IntPtr)data.Certificate, (IntPtr)data.Chain); 789GCHandle stateHandle = GCHandle.FromIntPtr((IntPtr)context);
System\Net\Quic\QuicConnection.SslConnectionOptions.cs (3)
69internal async Task<bool> StartAsyncCertificateValidation(IntPtr certificatePtr, IntPtr chainPtr) 83if (certificatePtr != IntPtr.Zero)
System\Net\Quic\QuicListener.cs (2)
344SslClientHelloInfo clientHello = new SslClientHelloInfo(data.Info->ServerNameLength > 0 ? Marshal.PtrToStringUTF8((IntPtr)data.Info->ServerName, data.Info->ServerNameLength) : "", SslProtocols.Tls13); 371GCHandle stateHandle = GCHandle.FromIntPtr((IntPtr)context);
System\Net\Quic\QuicStream.cs (1)
675GCHandle stateHandle = GCHandle.FromIntPtr((IntPtr)context);
System.Net.Requests (21)
src\libraries\Common\src\System\Net\ContextAwareResult.cs (4)
324base.Complete(IntPtr.Zero); 332protected override void Complete(IntPtr userToken) 355if (userToken != IntPtr.Zero || context == null) 367base.Complete(IntPtr.Zero);
src\libraries\Common\src\System\Net\LazyAsyncResult.cs (4)
297protected void ProtectedInvokeCallback(object? result, IntPtr userToken) 340ProtectedInvokeCallback(result, IntPtr.Zero); 346ProtectedInvokeCallback(null, IntPtr.Zero); 353protected virtual void Complete(IntPtr userToken)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.Associate.cs (4)
59DataPointer = (IntPtr)string1Bytes, 64DataPointer = (IntPtr)string2Bytes, 69DataPointer = (IntPtr)string3Bytes, 74DataPointer = (IntPtr)string4Bytes,
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
System\Net\TimerThread.cs (5)
169private IntPtr _thisHandle; 205if (_thisHandle == IntPtr.Zero) 207_thisHandle = (IntPtr)GCHandle.Alloc(this); 245if (_thisHandle != IntPtr.Zero) 248_thisHandle = IntPtr.Zero;
System.Net.Security (295)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.GssBuffer.cs (6)
17internal IntPtr _data; 24if (_data == IntPtr.Zero || _length == 0) 43if (_data == IntPtr.Zero || _length == 0) 54internal unsafe ReadOnlySpan<byte> Span => (_data != IntPtr.Zero && _length != 0) ? 60if (_data != IntPtr.Zero) 63_data = IntPtr.Zero;
src\libraries\Common\src\Interop\Unix\System.Net.Security.Native\Interop.NetSecurityNative.cs (6)
16IntPtr bufferPtr, 48ref IntPtr inputName); 73ref IntPtr credHandle); 95IntPtr cbt, 136IntPtr cbt, 195ref IntPtr contextHandle);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs (11)
19private static unsafe partial int ObjObj2Txt(byte* buf, int buf_len, IntPtr a); 22private static partial IntPtr CryptoNative_GetObjectDefinitionByName(string friendlyName); 23internal static IntPtr GetObjectDefinitionByName(string friendlyName) 25IntPtr ret = CryptoNative_GetObjectDefinitionByName(friendlyName); 26if (ret == IntPtr.Zero) 36internal static partial IntPtr ObjNid2Obj(int nid); 39internal static partial void Asn1ObjectFree(IntPtr o); 49internal static partial void Asn1OctetStringFree(IntPtr o); 51internal static unsafe string GetOidValue(IntPtr asn1ObjectPtr) 70return Marshal.PtrToStringUTF8((IntPtr)bufStack, bytesNeeded); 96return Marshal.PtrToStringUTF8((IntPtr)buf, bytesNeeded);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.BIO.cs (1)
20internal static partial bool BioDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Crypto.cs (17)
12using TrackedAllocationDelegate = System.Action<System.IntPtr, ulong, System.IntPtr, int>; 41private static partial int GetX509NameRawBytes(IntPtr x509Name, byte[]? buf, int cBuf); 47internal static partial IntPtr GetX509CrlNextUpdate(SafeX509CrlHandle crl); 59private static partial int GetAsn1StringBytes(IntPtr asn1, byte[]? buf, int cBuf); 72IntPtr ptr = GetX509RootStorePath_private(&usedDefault); 84private static unsafe partial IntPtr GetX509RootStorePath_private(byte* defaultPath); 87private static unsafe partial IntPtr GetX509RootStoreFile_private(byte* defaultPath); 129internal static byte[] GetAsn1StringBytes(IntPtr asn1) 139internal static X500DistinguishedName LoadX500Name(IntPtr namePtr) 246private static unsafe partial void ForEachTrackedAllocation(delegate* unmanaged<IntPtr, ulong, char*, int, IntPtr, void> callback, IntPtr ctx); 250ForEachTrackedAllocation(&MemoryTrackingCallback, (IntPtr)(&callback)); 254private static unsafe void MemoryTrackingCallback(IntPtr ptr, ulong size, char* file, int line, IntPtr ctx) 257callback(ptr, size, (IntPtr)file, line);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (4)
27internal static partial IntPtr ErrReasonErrorString(ulong error); 40ret = Marshal.PtrToStringUTF8((IntPtr)buf)!; 100internal static void CheckValidOpenSslHandle(IntPtr handle) 102if (handle == IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OCSP.cs (11)
15internal static partial void OcspRequestDestroy(IntPtr ocspReq); 24internal static partial SafeOcspRequestHandle X509BuildOcspRequest(IntPtr subject, IntPtr issuer); 31IntPtr subject, 32IntPtr* issuers, 39IntPtr x509Subject, 40ReadOnlySpan<IntPtr> x509Issuers, 47fixed (IntPtr* pIssuers = x509Issuers) 92internal static partial void OcspResponseDestroy(IntPtr ocspReq); 108handle = IntPtr.Zero; 123handle = IntPtr.Zero;
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OpenSsl.cs (29)
276Interop.Ssl.SslCtxSetAlpnSelectCb(sslCtx, &AlpnServerSelectCallback, IntPtr.Zero); 421Debug.Assert(Interop.Ssl.SslGetData(sslHandle) == IntPtr.Zero); 479Span<IntPtr> handles = certList.Count <= 256 ? 480stackalloc IntPtr[256] : 481new IntPtr[certList.Count]; 688internal static IntPtr GetPeerCertificate(SafeSslHandle context) 719private static int VerifyClientCertificate(int preverify_ok, IntPtr x509_ctx_ptr) 731private static unsafe int AlpnServerSelectCallback(IntPtr ssl, byte** outp, byte* outlen, byte* inp, uint inlen, IntPtr arg) 735IntPtr sslData = Ssl.SslGetData(ssl); 737if (sslData == IntPtr.Zero) 790private static unsafe int NewSessionCallback(IntPtr ssl, IntPtr session) 792Debug.Assert(ssl != IntPtr.Zero); 793Debug.Assert(session != IntPtr.Zero); 798IntPtr cert = Interop.Ssl.SslGetCertificate(ssl); 801IntPtr ptr = Ssl.SslGetData(ssl); 802if (ptr != IntPtr.Zero) 805IntPtr name = Ssl.SslGetServerName(ssl); 806Debug.Assert(name != IntPtr.Zero); 823private static unsafe void RemoveSessionCallback(IntPtr ctx, IntPtr session) 825Debug.Assert(ctx != IntPtr.Zero && session != IntPtr.Zero); 827IntPtr ptr = Ssl.SslCtxGetData(ctx); 828if (ptr == IntPtr.Zero) 841IntPtr name = Ssl.SessionGetHostname(session); 842Debug.Assert(name != IntPtr.Zero); 847private static unsafe void KeyLogCallback(IntPtr ssl, char* line)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SetProtocolOptions.cs (1)
14internal static partial void SslCtxSetProtocolOptions(IntPtr ctx, SslProtocols protocols);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Ssl.cs (44)
26internal static partial IntPtr SslV2_3Method(); 35internal static partial SslErrorCode SslGetError(IntPtr ssl, int ret); 41internal static partial void SslDestroy(IntPtr ssl); 53internal static partial IntPtr SslGetVersion(SafeSslHandle ssl); 60internal static unsafe partial IntPtr SslGetServerName(IntPtr ssl); 63internal static unsafe partial int SslSetSession(SafeSslHandle ssl, IntPtr session); 66internal static partial void SslGetAlpnSelected(SafeSslHandle ssl, out IntPtr protocol, out int len); 70IntPtr protocol; 94internal static partial int SslShutdown(IntPtr ssl); 117internal static partial IntPtr SslGetPeerCertificate(SafeSslHandle ssl); 120internal static partial IntPtr SslGetCertificate(SafeSslHandle ssl); 123internal static partial IntPtr SslGetCertificate(IntPtr ssl); 136internal static partial int SslGetPeerFinished(SafeSslHandle ssl, IntPtr buf, int count); 139internal static partial int SslGetFinished(SafeSslHandle ssl, IntPtr buf, int count); 146internal static partial IntPtr SslGetSession(SafeSslHandle ssl); 156private static partial IntPtr GetOpenSslCipherSuiteName(SafeSslHandle ssl, int cipherSuite, out int isTls12OrLower); 166internal static partial IntPtr SslGetData(IntPtr ssl); 169internal static partial IntPtr SslGetData(SafeSslHandle ssl); 172internal static partial int SslSetData(SafeSslHandle ssl, IntPtr data); 175internal static partial int SslSetData(IntPtr ssl, IntPtr data); 193internal static partial IntPtr SessionGetHostname(IntPtr session); 196internal static partial void SessionFree(IntPtr session); 199internal static partial int SessionSetHostname(IntPtr session, IntPtr name); 202internal static partial IntPtr SslSessionGetData(IntPtr session); 205internal static partial void SslSessionSetData(IntPtr session, IntPtr val); 265private static unsafe partial bool SslAddClientCAs(SafeSslHandle ssl, IntPtr* x509s, int count); 267internal static unsafe bool SslAddClientCAs(SafeSslHandle ssl, Span<IntPtr> x509handles) 269fixed (IntPtr* pHandles = &MemoryMarshal.GetReference(x509handles)) 330internal static readonly IntPtr SSLv23_method = SslV2_3Method(); 436get { return handle == IntPtr.Zero; } 461Interop.Ssl.SslSetData(handle, IntPtr.Zero); 465IntPtr h = handle; 466SetHandle(IntPtr.Zero); 494public SafeSslHandle() : base(IntPtr.Zero, true) 498internal SafeSslHandle(IntPtr validSslPointer, bool ownsHandle) : base(IntPtr.Zero, ownsHandle)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.SslCtx.cs (40)
21internal static partial SafeSslContextHandle SslCtxCreate(IntPtr method); 24internal static partial void SslCtxDestroy(IntPtr ctx); 27internal static partial IntPtr SslCtxGetData(IntPtr ctx); 30internal static partial int SslCtxSetData(SafeSslContextHandle ctx, IntPtr data); 33internal static partial int SslCtxSetData(IntPtr ctx, IntPtr data); 36internal static unsafe partial void SslCtxSetAlpnSelectCb(SafeSslContextHandle ctx, delegate* unmanaged<IntPtr, byte**, byte*, byte*, uint, IntPtr, int> callback, IntPtr arg); 39internal static unsafe partial void SslCtxSetKeylogCallback(SafeSslContextHandle ctx, delegate* unmanaged<IntPtr, char*, void> callback); 42internal static unsafe partial int SslCtxSetCaching(SafeSslContextHandle ctx, int mode, int cacheSize, int contextIdLength, Span<byte> contextId, delegate* unmanaged<IntPtr, IntPtr, int> neewSessionCallback, delegate* unmanaged<IntPtr, IntPtr, void> removeSessionCallback); 45internal static unsafe partial void SslCtxRemoveSession(SafeSslContextHandle ctx, IntPtr session); 73private Dictionary<string, IntPtr>? _sslSessions; 82: base(IntPtr.Zero, true) 86internal SafeSslContextHandle(IntPtr handle, bool ownsHandle) 93get { return handle == IntPtr.Zero; } 135Interop.Ssl.SslCtxSetData(handle, IntPtr.Zero); 139foreach (IntPtr session in _sslSessions.Values) 152SetHandle(IntPtr.Zero); 161_sslSessions = new Dictionary<string, IntPtr>(); 165Interop.Ssl.SslCtxSetData(this, (IntPtr)_gch); 168internal bool TryAddSession(IntPtr namePtr, IntPtr session) 170Debug.Assert(_sslSessions != null && session != IntPtr.Zero); 172if (_sslSessions == null || namePtr == IntPtr.Zero) 187IntPtr oldSession = IntPtr.Zero; 200if (oldSession != IntPtr.Zero) 218internal void RemoveSession(IntPtr namePtr, IntPtr session) 227IntPtr oldSession = IntPtr.Zero; 231if (_sslSessions.TryGetValue(targetName, out IntPtr existingSession) && existingSession == session) 258Debug.Assert(Interop.Ssl.SslGetData(sslHandle) == IntPtr.Zero); 259Interop.Ssl.SslSetData(sslHandle, (IntPtr)_gch); 263if (_sslSessions.TryGetValue(name, out IntPtr session))
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509.cs (22)
16internal static partial IntPtr GetX509NotBefore(SafeX509Handle x509); 19internal static partial IntPtr GetX509NotAfter(SafeX509Handle x509); 22internal static partial IntPtr GetX509SignatureAlgorithm(SafeX509Handle x509); 25internal static partial IntPtr GetX509PublicKeyAlgorithm(SafeX509Handle x509); 28internal static partial IntPtr GetX509PublicKeyBytes(SafeX509Handle x509); 40internal static partial SafeX509Handle DecodeX509(IntPtr buf, int len); 49internal static partial void X509Destroy(IntPtr a); 55internal static partial SafeX509Handle X509Duplicate(IntPtr handle); 68internal static partial SafeX509Handle X509UpRef(IntPtr handle); 96internal static partial IntPtr X509GetIssuerName(SafeX509Handle x); 99internal static partial IntPtr X509GetSubjectName(SafeX509Handle x); 129internal static partial IntPtr X509GetExt(SafeX509Handle x, int loc); 133internal static partial IntPtr X509ExtensionGetOid(IntPtr ex); 137internal static partial IntPtr X509ExtensionGetData(IntPtr ex); 141internal static partial bool X509ExtensionGetCritical(IntPtr ex); 161internal static partial void X509StoreDestroy(IntPtr v); 240private static unsafe partial int CryptoNative_X509StoreCtxSetVerifyCallback(SafeX509StoreCtxHandle ctx, delegate* unmanaged<int, IntPtr, int> callback, void* appData); 242internal static unsafe void X509StoreCtxSetVerifyCallback(SafeX509StoreCtxHandle ctx, delegate* unmanaged<int, IntPtr, int> callback, void* appData) 259private static partial IntPtr CryptoNative_X509VerifyCertErrorString(int n); 262internal static partial void X509CrlDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Ext.cs (1)
19internal static partial int X509ExtensionDestroy(IntPtr x);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Name.cs (2)
52base(IntPtr.Zero, ownsHandle: true) 64base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (7)
16internal static partial void RecursiveFreeX509Stack(IntPtr stack); 29internal static partial IntPtr GetX509StackField(SafeX509StackHandle stack, int loc); 36internal static partial IntPtr GetX509StackField(SafeSharedX509StackHandle stack, int loc); 67base(IntPtr.Zero, ownsHandle: true) 74SetHandle(IntPtr.Zero); 80get { return handle == IntPtr.Zero; } 104base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (5)
16internal static partial void X509StoreCtxDestroy(IntPtr v); 75base(IntPtr.Zero, ownsHandle: true) 79internal SafeX509StoreCtxHandle(IntPtr handle, bool ownsHandle) : 87SetHandle(IntPtr.Zero); 93get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (8)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; } 32base(IntPtr.Zero, ownsHandle: true) 39SetHandle(IntPtr.Zero); 45get { return handle == IntPtr.Zero; } 52base(IntPtr.Zero, ownsHandle: true) 60base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\GssSafeHandles.cs (9)
52get { return handle == IntPtr.Zero; } 58SetHandle(IntPtr.Zero); 63: base(IntPtr.Zero, true) 134: base(IntPtr.Zero, true) 140get { return handle == IntPtr.Zero; } 146SetHandle(IntPtr.Zero); 159: base(IntPtr.Zero, true) 165get { return handle == IntPtr.Zero; } 171SetHandle(IntPtr.Zero);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (4)
16base(IntPtr.Zero, ownsHandle: true) 22IntPtr h = handle; 23SetHandle(IntPtr.Zero); 44return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (3)
14protected SafeInteriorHandle(IntPtr invalidHandleValue, bool ownsHandle) 28SetHandle(IntPtr.Zero); 38return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (9)
31base(IntPtr.Zero, ownsHandle: true) 38SetHandle(IntPtr.Zero); 44get { return handle == IntPtr.Zero; } 51base(IntPtr.Zero, ownsHandle: true) 58SetHandle(IntPtr.Zero); 64get { return handle == IntPtr.Zero; } 71base(IntPtr.Zero, ownsHandle: true) 78SetHandle(IntPtr.Zero); 84get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (3)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; }
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
src\libraries\Common\src\System\Net\DebugSafeHandle.cs (1)
22protected DebugSafeHandle(IntPtr invalidValue, bool ownsHandle) : base(ownsHandle)
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (4)
60DataPointer = (IntPtr)arg1Ptr, 65DataPointer = (IntPtr)arg2Ptr, 70DataPointer = (IntPtr)(&bufferLength), 75DataPointer = (IntPtr)arg3Ptr,
src\libraries\Common\src\System\Net\Security\Unix\SafeDeleteContext.cs (3)
16public SafeDeleteContext(IntPtr handle) : base(handle, true) 20public SafeDeleteContext(IntPtr handle, bool ownsHandle) : base(handle, ownsHandle) 26get { return (IntPtr.Zero == handle); }
src\libraries\Common\src\System\Net\Security\Unix\SafeDeleteSslContext.cs (2)
17public SafeDeleteSslContext(IntPtr handle) : base(handle, true) 21public SafeDeleteSslContext(IntPtr handle, bool ownsHandle) : base(handle, ownsHandle)
src\libraries\Common\src\System\Net\Security\Unix\SafeFreeCredentials.cs (1)
26protected SafeFreeCredentials(IntPtr handle, bool ownsHandle) : base(handle, ownsHandle)
System\Net\CertificateValidationPal.Unix.cs (9)
39IntPtr remoteCertificate = Interop.OpenSsl.GetPeerCertificate((SafeSslHandle)securityContext); 42if (remoteCertificate == IntPtr.Zero) 66IntPtr certPtr = Interop.Crypto.GetX509StackField(chainStack, i); 68if (certPtr != IntPtr.Zero) 86if (remoteCertificate != IntPtr.Zero) 109return Interop.Ssl.SslGetCertificate(ssl) != IntPtr.Zero; 123IntPtr session = Interop.Ssl.SslGetSession(ssl); 124Debug.Assert(session != IntPtr.Zero); 125return Interop.Ssl.SslSessionGetData(session) != IntPtr.Zero;
System\Net\NegotiateAuthenticationPal.ManagedNtlm.cs (1)
434IntPtr cbtData = (nint)_channelBinding.DangerousGetHandle() + appDataOffset;
System\Net\NegotiateAuthenticationPal.Unix.cs (1)
594IntPtr cbtAppData = channelBinding.DangerousGetHandle() + appDataOffset;
System\Net\Security\NetEventSource.Security.cs (8)
300DataPointer = (IntPtr)(arg1Ptr), 305DataPointer = (IntPtr)(&arg2), 310DataPointer = (IntPtr)(&arg3), 315DataPointer = (IntPtr)(&arg4), 320DataPointer = (IntPtr)(&arg5), 325DataPointer = (IntPtr)(&arg6), 330DataPointer = (IntPtr)(&arg7), 335DataPointer = (IntPtr)(&arg8),
System\Net\Security\NetSecurityTelemetry.cs (5)
270DataPointer = (IntPtr)(&arg1), 275DataPointer = (IntPtr)(arg2Ptr), 297DataPointer = (IntPtr)(&arg1), 302DataPointer = (IntPtr)(&arg2), 307DataPointer = (IntPtr)(arg3Ptr),
System\Net\Security\Pal.Managed\SafeChannelBindingHandle.cs (4)
18internal IntPtr CertHashPtr { get; } 40IntPtr cbtPrefixPtr = handle + SecChannelBindingSize; 59public override bool IsInvalid => handle == IntPtr.Zero; 64SetHandle(IntPtr.Zero);
System\Net\Security\SslConnectionInfo.Linux.cs (1)
48private unsafe SslProtocols MapProtocolVersion(IntPtr protocolVersion)
System\Net\Security\SslStream.Protocol.cs (1)
289if (certificate.Handle != IntPtr.Zero)
System\Net\Security\SslStreamCertificateContext.Linux.cs (5)
278IntPtr subject = TargetCertificate.Handle; 279IntPtr issuer = caCert.Handle; 292IntPtr[] issuerHandles = ArrayPool<IntPtr>.Shared.Rent(_privateIntermediateCertificates.Length + 1); 353ArrayPool<IntPtr>.Shared.Return(issuerHandles);
System.Net.Sockets (71)
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Accept.cs (1)
12internal static unsafe partial Error Accept(SafeHandle socket, byte* socketAddress, int* socketAddressLen, IntPtr* acceptedFd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Disconnect.cs (1)
12internal static partial Error Disconnect(IntPtr socket);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Fcntl.cs (2)
14internal static partial int DangerousSetIsNonBlocking(IntPtr fd, int isNonBlocking); 29internal static partial int GetFD(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetSockOpt.cs (1)
16internal static unsafe partial Error GetSockOpt(IntPtr socket, SocketOptionLevel optionLevel, SocketOptionName optionName, byte* optionValue, int* optionLen);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.LingerOption.cs (1)
25internal static unsafe partial Error SetLingerOption(IntPtr socket, LingerOption* option);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SetSockOpt.cs (1)
16internal static unsafe partial Error SetSockOpt(IntPtr socket, SocketOptionLevel optionLevel, SocketOptionName optionName, byte* optionValue, int optionLen);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Shutdown.cs (1)
16internal static partial Error Shutdown(IntPtr socket, SocketShutdown how);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Socket.cs (1)
14internal static unsafe partial Error Socket(int addressFamily, int socketType, int protocolType, IntPtr* socket);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.SocketEvent.cs (9)
25public IntPtr Data; 31internal static unsafe partial Error CreateSocketEventPort(IntPtr* port); 34internal static partial Error CloseSocketEventPort(IntPtr port); 43internal static partial Error TryChangeSocketEventRegistration(IntPtr port, SafeHandle socket, SocketEvents currentEvents, SocketEvents newEvents, IntPtr data); 46internal static partial Error TryChangeSocketEventRegistration(IntPtr port, IntPtr socket, SocketEvents currentEvents, SocketEvents newEvents, IntPtr data); 49internal static unsafe partial Error WaitForSocketEvents(IntPtr port, SocketEvent* buffer, int* count);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Write.cs (1)
24internal static unsafe partial int Write(IntPtr fd, byte* buffer, int bufferSize);
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.DumpBuffer.cs (4)
60DataPointer = (IntPtr)arg1Ptr, 65DataPointer = (IntPtr)arg2Ptr, 70DataPointer = (IntPtr)(&bufferLength), 75DataPointer = (IntPtr)arg3Ptr,
src\libraries\Common\src\System\Net\SocketAddressPal.Unix.cs (1)
152uint addr = (uint)System.Runtime.InteropServices.Marshal.ReadInt32((IntPtr)address);
src\libraries\Common\src\System\Net\SocketProtocolSupportPal.Unix.cs (3)
21IntPtr invalid = (IntPtr)(-1); 22IntPtr socket = invalid;
System\Net\Sockets\SafeSocketHandle.cs (2)
43public SafeSocketHandle(IntPtr preexistingHandle, bool ownsHandle) 171private void SetHandleAndValid(IntPtr handle)
System\Net\Sockets\SafeSocketHandle.Unix.cs (1)
294private Interop.Error CloseHandle(IntPtr handle)
System\Net\Sockets\Socket.cs (1)
391public IntPtr Handle => SafeHandle.DangerousGetHandle();
System\Net\Sockets\SocketAsyncContext.Unix.cs (11)
618public IntPtr AcceptedFileDescriptor; 622public Action<IntPtr, Memory<byte>, SocketError>? Callback { get; set; } 627Debug.Assert(ErrorCode == SocketError.Success || AcceptedFileDescriptor == (IntPtr)(-1), $"Unexpected values: ErrorCode={ErrorCode}, AcceptedFileDescriptor={AcceptedFileDescriptor}"); 638IntPtr fd = AcceptedFileDescriptor; 1297IntPtr handle = _socket.DangerousGetHandle(); 1449public SocketError Accept(Memory<byte> socketAddress, out int socketAddressLen, out IntPtr acceptedFd) 1458Debug.Assert(errorCode == SocketError.Success || acceptedFd == (IntPtr)(-1), $"Unexpected values: errorCode={errorCode}, acceptedFd={acceptedFd}"); 1474public SocketError AcceptAsync(Memory<byte> socketAddress, out int socketAddressLen, out IntPtr acceptedFd, Action<IntPtr, Memory<byte>, SocketError> callback, CancellationToken cancellationToken) 1486Debug.Assert(errorCode == SocketError.Success || acceptedFd == (IntPtr)(-1), $"Unexpected values: errorCode={errorCode}, acceptedFd={acceptedFd}"); 1505acceptedFd = (IntPtr)(-1);
System\Net\Sockets\SocketAsyncEngine.Unix.cs (6)
86private readonly IntPtr _port; 115public static bool TryRegisterSocket(IntPtr socketHandle, SocketAsyncContext context, out SocketAsyncEngine? engine, out Interop.Error error) 124private bool TryRegisterCore(IntPtr socketHandle, SocketAsyncContext context, out Interop.Error error) 178_port = (IntPtr)(-1); 185fixed (IntPtr* portPtr = &_port) 342if (_port != (IntPtr)(-1))
System\Net\Sockets\SocketAsyncEventArgs.Unix.cs (5)
13private IntPtr _acceptedFileDescriptor; 26private void AcceptCompletionCallback(IntPtr acceptedFileDescriptor, Memory<byte> socketAddress, SocketError socketError) 33private void CompleteAcceptOperation(IntPtr acceptedFileDescriptor, Memory<byte> socketAddress, SocketError socketError) 53_acceptedFileDescriptor = (IntPtr)(-1); 57IntPtr acceptedFd;
System\Net\Sockets\SocketPal.Unix.cs (12)
63IntPtr fd; 68Debug.Assert(fd != (IntPtr)(-1), "fd should not be -1"); 82fd = (IntPtr)(-1); 89Debug.Assert(fd == (IntPtr)(-1), $"Unexpected fd: {fd}"); 626public static unsafe bool TryCompleteAccept(SafeSocketHandle socket, Memory<byte> socketAddress, out int socketAddressLen, out IntPtr acceptedFd, out SocketError errorCode) 628IntPtr fd = IntPtr.Zero; 642acceptedFd = (IntPtr)(-1); 650Debug.Assert(fd != (IntPtr)(-1), "Expected fd != -1"); 658acceptedFd = (IntPtr)(-1); 1137IntPtr acceptedFd; 2167internal static unsafe SafeSocketHandle CreateSocket(IntPtr fileDescriptor)
System.Net.WebClient (1)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
System.Net.WebSockets (31)
src\libraries\Common\src\System\IO\Compression\ZLibNative.cs (6)
20internal static readonly IntPtr ZNullPtr = IntPtr.Zero; 145/// <see cref="SafeHandle" />. This would save an <see cref="IntPtr" /> field since 172SetHandle(IntPtr.Zero); 195public IntPtr NextIn 207public IntPtr NextOut
src\libraries\Common\src\System\IO\Compression\ZLibNative.ZStream.cs (4)
19internal IntPtr nextIn; //Bytef *next_in; /* next input byte */ 20internal IntPtr nextOut; //Bytef *next_out; /* next output byte should be put there */ 22internal IntPtr msg; //char *msg; /* last error message, NULL if no error */ 24private readonly IntPtr internalState; //internal state that is not visible to managed code
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.Associate.cs (4)
59DataPointer = (IntPtr)string1Bytes, 64DataPointer = (IntPtr)string2Bytes, 69DataPointer = (IntPtr)string3Bytes, 74DataPointer = (IntPtr)string4Bytes,
src\libraries\Common\src\System\Net\Logging\NetEventSource.Common.cs (4)
153if (value is IntPtr) 208DataPointer = (IntPtr)(arg1Ptr), 213DataPointer = (IntPtr)(arg2Ptr), 218DataPointer = (IntPtr)(&arg3),
System\Net\WebSockets\Compression\WebSocketDeflater.cs (4)
129_stream.NextIn = (IntPtr)fixedInput; 132_stream.NextOut = (IntPtr)fixedOutput; 161_stream.NextIn = IntPtr.Zero; 164_stream.NextOut = (IntPtr)fixedOutput;
System\Net\WebSockets\Compression\WebSocketInflater.cs (2)
136_stream.NextIn = (IntPtr)(bufferPtr + _position); 235stream.NextOut = (IntPtr)bufPtr;
System\Net\WebSockets\NetEventSource.WebSockets.cs (7)
218DataPointer = (IntPtr)(arg1Ptr), 223DataPointer = (IntPtr)(arg2Ptr), 228DataPointer = (IntPtr)(&arg3), 250DataPointer = (IntPtr)(arg1Ptr), 255DataPointer = (IntPtr)(arg2Ptr), 260DataPointer = (IntPtr)(arg3Ptr), 265DataPointer = (IntPtr)(&arg4),
System.Numerics.Tensors (4)
System\Numerics\Tensors\netcore\TensorPrimitives.ConvertHelpers.cs (4)
769private static bool IsUInt32Like<T>() => typeof(T) == typeof(uint) || (IntPtr.Size == 4 && typeof(T) == typeof(nuint)); 772private static bool IsInt32Like<T>() => typeof(T) == typeof(int) || (IntPtr.Size == 4 && typeof(T) == typeof(nint)); 775private static bool IsUInt64Like<T>() => typeof(T) == typeof(ulong) || (IntPtr.Size == 8 && typeof(T) == typeof(nuint)); 778private static bool IsInt64Like<T>() => typeof(T) == typeof(long) || (IntPtr.Size == 8 && typeof(T) == typeof(nint));
System.Private.CoreLib (1753)
artifacts\obj\coreclr\System.Private.CoreLib\linux.x64.Debug\NativeRuntimeEventSource.Generated.cs (26)
121private void GCAllocationTick_V4(uint AllocationAmount, uint AllocationKind, ushort ClrInstanceID, ulong AllocationAmount64, IntPtr TypeID, string TypeName, uint HeapIndex, IntPtr Address, ulong ObjectSize) 191private void GCSampledObjectAllocationHigh(IntPtr Address, IntPtr TypeID, uint ObjectCountForTypeSample, ulong TotalSizeForTypeSample, ushort ClrInstanceID) 212private void GCGenerationRange(byte Generation, IntPtr RangeStart, ulong RangeUsedLength, ulong RangeReservedLength, ushort ClrInstanceID) 247private void FinalizeObject(IntPtr TypeID, IntPtr ObjectID, ushort ClrInstanceID) 254private void SetGCHandle(IntPtr HandleID, IntPtr ObjectID, uint Kind, uint Generation, ulong AppDomainID, ushort ClrInstanceID) 261private void DestroyGCHandle(IntPtr HandleID, ushort ClrInstanceID) 268private void GCSampledObjectAllocationLow(IntPtr Address, IntPtr TypeID, uint ObjectCountForTypeSample, ulong TotalSizeForTypeSample, ushort ClrInstanceID) 275private void PinObjectAtGCTime(IntPtr HandleID, IntPtr ObjectID, ulong ObjectSize, string TypeName, ushort ClrInstanceID) 394private void ThreadCreating(IntPtr ID, ushort ClrInstanceID) 401private void ThreadRunning(IntPtr ID, ushort ClrInstanceID) 429private void ExceptionThrown_V1(string ExceptionType, string ExceptionMessage, IntPtr ExceptionEIP, uint ExceptionHRESULT, ushort ExceptionFlags, ushort ClrInstanceID) 821private void GCPerHeapHistory_V3(ushort ClrInstanceID, IntPtr FreeListAllocated, IntPtr FreeListRejected, IntPtr EndOfSegAllocated, IntPtr CondemnedAllocated, IntPtr PinnedAllocated, IntPtr PinnedAllocatedAdvance, uint RunningFreeListEfficiency, uint CondemnReasons0, uint CondemnReasons1, uint CompactMechanisms, uint ExpandMechanisms, uint HeapIndex, IntPtr ExtraGen0Commit, uint Count) 1017private void AllocationSampled(uint AllocationKind, ushort ClrInstanceID, IntPtr TypeID, string TypeName, IntPtr Address, ulong ObjectSize, ulong SampledByteOffset)
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\ExceptionHandling.cs (17)
68private IntPtr _dummy; // For alignment 106IntPtr classlibAddress) 205RhFailFastReason reason, object unhandledException, IntPtr classlibAddress, ref ExInfo exInfo) 256private static void AppendExceptionStackFrameViaClasslib(object exception, IntPtr ip, 296internal static Exception GetClasslibException(ExceptionIDs id, IntPtr address) 463internal IntPtr IP; 570IntPtr faultingCodeAddress = exInfo._pExContext->IP; 660IntPtr faultingCodeAddress = exInfo._pExContext->IP; 771IntPtr pReversePInvokePropagationCallback = IntPtr.Zero; 772IntPtr pReversePInvokePropagationContext = IntPtr.Zero; 803UpdateStackTrace(exceptionObj, exInfo._frameIter.FramePointer, (IntPtr)frameIter.OriginalControlPC, frameIter.SP, ref isFirstRethrowFrame, ref prevFramePtr, ref isFirstFrame, ref exInfo); 845if (pCatchHandler == null && pReversePInvokePropagationCallback == IntPtr.Zero && !isExceptionIntercepted 856(IntPtr)prevOriginalPC, // IP of the last frame that did not handle the exception 862Debug.Assert(pCatchHandler != null || pReversePInvokePropagationCallback != IntPtr.Zero || unwoundReversePInvoke || isExceptionIntercepted, "We should have a handler if we're starting the second pass"); 985private static void UpdateStackTrace(object exceptionObj, UIntPtr curFramePtr, IntPtr ip, UIntPtr sp,
src\coreclr\nativeaot\Runtime.Base\src\System\Runtime\StackFrameIterator.cs (1)
18internal IntPtr ControlPC;
src\Internal\Runtime\InteropServices\ComActivationContextInternal.cs (1)
18public IntPtr ClassFactoryDest;
src\Internal\Runtime\InteropServices\ComponentActivator.CoreCLR.cs (2)
13private static void OnDisabledGetFunctionPointerCall(IntPtr typeNameNative, IntPtr methodNameNative)
src\Internal\Runtime\InteropServices\InMemoryAssemblyLoader.PlatformNotSupported.cs (2)
18public static unsafe void LoadInMemoryAssembly(IntPtr moduleHandle, IntPtr assemblyPath)
src\libraries\Common\src\Interop\Interop.Calendar.cs (5)
18internal static unsafe bool EnumCalendarInfo(delegate* unmanaged<char*, IntPtr, void> callback, string localeName, CalendarId calendarId, CalendarDataType calendarDataType, IntPtr context) 20return EnumCalendarInfo((IntPtr)callback, localeName, calendarId, calendarDataType, context); 27private static unsafe partial bool EnumCalendarInfo(IntPtr callback, string localeName, CalendarId calendarId, CalendarDataType calendarDataType, IntPtr context);
src\libraries\Common\src\Interop\Interop.Collation.cs (11)
14internal static unsafe partial ResultCode GetSortHandle(string localeName, out IntPtr sortHandle); 17internal static partial void CloseSortHandle(IntPtr handle); 20internal static unsafe partial int CompareString(IntPtr sortHandle, char* lpStr1, int cwStr1Len, char* lpStr2, int cwStr2Len, CompareOptions options); 23internal static unsafe partial int IndexOf(IntPtr sortHandle, char* target, int cwTargetLength, char* pSource, int cwSourceLength, CompareOptions options, int* matchLengthPtr); 26internal static unsafe partial int LastIndexOf(IntPtr sortHandle, char* target, int cwTargetLength, char* pSource, int cwSourceLength, CompareOptions options, int* matchLengthPtr); 31internal static unsafe partial bool StartsWith(IntPtr sortHandle, char* target, int cwTargetLength, char* source, int cwSourceLength, CompareOptions options, int* matchedLength); 36internal static unsafe partial bool EndsWith(IntPtr sortHandle, char* target, int cwTargetLength, char* source, int cwSourceLength, CompareOptions options, int* matchedLength); 40internal static partial bool StartsWith(IntPtr sortHandle, string target, int cwTargetLength, string source, int cwSourceLength, CompareOptions options); 44internal static partial bool EndsWith(IntPtr sortHandle, string target, int cwTargetLength, string source, int cwSourceLength, CompareOptions options); 47internal static unsafe partial int GetSortKey(IntPtr sortHandle, char* str, int strLength, byte* sortKey, int sortKeyLength, CompareOptions options); 50internal static partial int GetSortVersion(IntPtr sortHandle);
src\libraries\Common\src\Interop\Interop.HostPolicy.cs (6)
12internal delegate void corehost_resolve_component_dependencies_result_fn(IntPtr assemblyPaths, 13IntPtr nativeSearchPaths, IntPtr resourceSearchPaths); 16internal delegate void corehost_error_writer_fn(IntPtr message); 30internal static partial IntPtr corehost_set_error_writer(IntPtr errorWriter);
src\libraries\Common\src\Interop\Interop.ICU.cs (6)
15internal static void InitICUFunctions(IntPtr icuuc, IntPtr icuin, ReadOnlySpan<char> version, ReadOnlySpan<char> suffix) 17Debug.Assert(icuuc != IntPtr.Zero); 18Debug.Assert(icuin != IntPtr.Zero); 24internal static partial void InitICUFunctions(IntPtr icuuc, IntPtr icuin, string version, string? suffix);
src\libraries\Common\src\Interop\Interop.TimeZoneInfo.cs (1)
20internal static unsafe partial int WindowsIdToIanaId(string windowsId, IntPtr region, char* ianaId, int ianaIdLength);
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\Interop.IOErrors.cs (2)
79internal static IntPtr CheckIo(IntPtr result, string? path = null, bool isDirError = false)
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Close.cs (1)
12internal static partial int Close(IntPtr fd);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.DynamicLoad.cs (8)
12internal static partial IntPtr LoadLibrary(string filename); 15internal static partial IntPtr GetLoadLibraryError(); 18internal static partial IntPtr GetProcAddress(IntPtr handle, byte* symbol); 21internal static partial IntPtr GetProcAddress(IntPtr handle, string symbol); 24internal static partial void FreeLibrary(IntPtr handle); 27internal static partial IntPtr GetDefaultSearchOrderPseudoHandle();
src\libraries\Common\src\Interop\Unix\System.Native\Interop.FLock.cs (1)
28internal static partial int FLock(IntPtr fd, LockOperations operation);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetCwd.cs (1)
57return Marshal.PtrToStringUTF8((IntPtr)ptr);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetEnv.cs (1)
12internal static unsafe partial IntPtr GetEnv(string name);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetEnviron.cs (2)
12internal static unsafe partial IntPtr GetEnviron(); 15internal static unsafe partial void FreeEnviron(IntPtr environ);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetHostName.cs (1)
41return Marshal.PtrToStringUTF8((IntPtr)name)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
70username = Marshal.PtrToStringUTF8((IntPtr)passwd.Name);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.LowLevelMonitor.cs (7)
12internal static partial IntPtr LowLevelMonitor_Create(); 15internal static partial void LowLevelMonitor_Destroy(IntPtr monitor); 18internal static partial void LowLevelMonitor_Acquire(IntPtr monitor); 21internal static partial void LowLevelMonitor_Release(IntPtr monitor); 24internal static partial void LowLevelMonitor_Wait(IntPtr monitor); 28internal static partial bool LowLevelMonitor_TimedWait(IntPtr monitor, int timeoutMilliseconds); 31internal static partial void LowLevelMonitor_Signal_Release(IntPtr monitor);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MksTemps.cs (1)
12internal static unsafe partial IntPtr MksTemps(
src\libraries\Common\src\Interop\Unix\System.Native\Interop.MountPoints.cs (1)
29callbackContext->_results.Add(Marshal.PtrToStringUTF8((IntPtr)name)!);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.ReadDir.cs (3)
57internal static partial IntPtr OpenDir(string path); 64internal static unsafe partial int ReadDirR(IntPtr dir, byte* buffer, int bufferSize, DirectoryEntry* outputEntry); 67internal static partial int CloseDir(IntPtr dir);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Threading.cs (4)
13internal static unsafe partial bool CreateThread(IntPtr stackSize, delegate* unmanaged<IntPtr, IntPtr> startAddress, IntPtr parameter);
src\libraries\Common\src\Interop\Unix\System.Native\Interop.Write.cs (1)
24internal static unsafe partial int Write(IntPtr fd, byte* buffer, int bufferSize);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.CloseHandle.cs (1)
13internal static partial bool CloseHandle(IntPtr handle);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.EventWaitHandle.cs (1)
24internal static partial SafeWaitHandle CreateEventEx(IntPtr lpSecurityAttributes, string? name, uint flags, uint desiredAccess);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (8)
21IntPtr lpSource, 26IntPtr arguments); 32GetMessage(errorCode, IntPtr.Zero); 34internal static unsafe string GetMessage(int errorCode, IntPtr moduleHandle) 37if (moduleHandle != IntPtr.Zero) 46int length = FormatMessage(flags, moduleHandle, unchecked((uint)errorCode), 0, bufferPtr, stackBuffer.Length, IntPtr.Zero); 58IntPtr nativeMsgPtr = default; 61int length = FormatMessage(flags | FORMAT_MESSAGE_ALLOCATE_BUFFER, moduleHandle, unchecked((uint)errorCode), 0, &nativeMsgPtr, 0, IntPtr.Zero);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.Globalization.cs (11)
66IntPtr sortHandle); 79IntPtr sortHandle); 91IntPtr lParam); 115IntPtr lpVersionInformation, 127internal static unsafe partial bool EnumSystemLocalesEx(delegate* unmanaged<char*, uint, void*, BOOL> lpLocaleEnumProcEx, uint dwFlags, void* lParam, IntPtr reserved); 134internal static partial int GetCalendarInfoEx(string? lpLocaleName, uint Calendar, IntPtr lpReserved, uint CalType, IntPtr lpCalData, int cchData, out int lpValue); 137internal static partial int GetCalendarInfoEx(string? lpLocaleName, uint Calendar, IntPtr lpReserved, uint CalType, IntPtr lpCalData, int cchData, IntPtr lpValue); 147internal static unsafe partial bool EnumCalendarInfoExEx(delegate* unmanaged<char*, uint, IntPtr, void*, BOOL> pCalInfoEnumProcExEx, string lpLocaleName, uint Calendar, string? lpReserved, uint CalType, void* lParam);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.Mutex.cs (1)
18internal static partial SafeWaitHandle CreateMutexEx(IntPtr lpMutexAttributes, string? name, uint flags, uint desiredAccess);
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.Semaphore.cs (1)
16internal static partial SafeWaitHandle CreateSemaphoreEx(IntPtr lpSecurityAttributes, int initialCount, int maximumCount, string? name, uint flags, uint desiredAccess);
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\ComponentActivator.cs (39)
25private static readonly Dictionary<IntPtr, Delegate> s_delegates = new Dictionary<IntPtr, Delegate>(); 37public delegate int ComponentEntryPoint(IntPtr args, int sizeBytes); 39private static string MarshalToString(IntPtr arg, string argName) 63public static unsafe int LoadAssemblyAndGetFunctionPointer(IntPtr assemblyPathNative, 64IntPtr typeNameNative, 65IntPtr methodNameNative, 66IntPtr delegateTypeNative, 67IntPtr reserved, 68IntPtr functionHandle) 70if (functionHandle != IntPtr.Zero) 71*(IntPtr*)functionHandle = 0; 83ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 90*(IntPtr*)functionHandle = InternalGetFunctionPointer(alc, typeName, methodName, delegateTypeNative); 113public static int LoadAssembly(IntPtr assemblyPathNative, IntPtr loadContext, IntPtr reserved) 122ArgumentOutOfRangeException.ThrowIfNotEqual(loadContext, IntPtr.Zero); 123ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 183public static unsafe int LoadAssemblyBytes(byte* assembly, nint assemblyByteLength, byte* symbols, nint symbolsByteLength, IntPtr loadContext, IntPtr reserved) 193ArgumentOutOfRangeException.ThrowIfNotEqual(loadContext, IntPtr.Zero); 194ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 228public static unsafe int GetFunctionPointer(IntPtr typeNameNative, 229IntPtr methodNameNative, 230IntPtr delegateTypeNative, 231IntPtr loadContext, 232IntPtr reserved, 233IntPtr functionHandle) 235if (functionHandle != IntPtr.Zero) 236*(IntPtr*)functionHandle = 0; 264ArgumentOutOfRangeException.ThrowIfNotEqual(loadContext, IntPtr.Zero); 265ArgumentOutOfRangeException.ThrowIfNotEqual(reserved, IntPtr.Zero); 270*(IntPtr*)functionHandle = InternalGetFunctionPointer(AssemblyLoadContext.Default, typeName, methodName, delegateTypeNative); 304private static IntPtr InternalGetFunctionPointer(AssemblyLoadContext alc, 307IntPtr delegateTypeNative) 318if (delegateTypeNative == IntPtr.Zero) 322else if (delegateTypeNative == (IntPtr)(-1)) 335IntPtr functionPtr;
src\libraries\System.Private.CoreLib\src\Internal\Runtime\InteropServices\IsolatedComponentLoadContext.cs (2)
43protected override IntPtr LoadUnmanagedDll(string unmanagedDllName) 51return IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\CriticalHandleZeroOrMinusOneIsInvalid.cs (2)
13: base(IntPtr.Zero) 17public override bool IsInvalid => handle == IntPtr.Zero || handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeFileHandle.cs (1)
17public SafeFileHandle(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle)
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeHandleZeroOrMinusOneIsInvalid.cs (2)
12protected SafeHandleZeroOrMinusOneIsInvalid(bool ownsHandle) : base(IntPtr.Zero, ownsHandle) 16public override bool IsInvalid => handle == IntPtr.Zero || handle == new IntPtr(-1);
src\libraries\System.Private.CoreLib\src\Microsoft\Win32\SafeHandles\SafeWaitHandle.cs (1)
22public SafeWaitHandle(IntPtr existingHandle, bool ownsHandle) : base(ownsHandle)
src\libraries\System.Private.CoreLib\src\System\AccessViolationException.cs (2)
42private IntPtr _ip; // Address of faulting instruction. 43private IntPtr _target; // Address that could not be accessed.
src\libraries\System.Private.CoreLib\src\System\ArgumentNullException.cs (2)
87internal static void ThrowIfNull(IntPtr argument, [CallerArgumentExpression(nameof(argument))] string? paramName = null) 89if (argument == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Array.cs (7)
931if (IntPtr.Size == 4) 935if (IntPtr.Size == 4) 1431if (IntPtr.Size == 4) 1658if (IntPtr.Size == 4) 1866if (IntPtr.Size == 4) 2071if (IntPtr.Size == 4) 2075if (IntPtr.Size == 4)
src\libraries\System.Private.CoreLib\src\System\Buffers\ArrayPoolEventSource.cs (14)
58payload[0].DataPointer = ((IntPtr)(&bufferId)); 61payload[1].DataPointer = ((IntPtr)(&bufferSize)); 64payload[2].DataPointer = ((IntPtr)(&poolId)); 67payload[3].DataPointer = ((IntPtr)(&bucketId)); 84payload[0].DataPointer = ((IntPtr)(&bufferId)); 87payload[1].DataPointer = ((IntPtr)(&bufferSize)); 90payload[2].DataPointer = ((IntPtr)(&poolId)); 93payload[3].DataPointer = ((IntPtr)(&bucketId)); 96payload[4].DataPointer = ((IntPtr)(&reason)); 133payload[0].DataPointer = ((IntPtr)(&bufferId)); 136payload[1].DataPointer = ((IntPtr)(&bufferSize)); 139payload[2].DataPointer = ((IntPtr)(&poolId)); 142payload[3].DataPointer = ((IntPtr)(&bucketId)); 145payload[4].DataPointer = ((IntPtr)(&reason));
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64DecoderHelper.cs (5)
174int i2 = Unsafe.Add(ref decodingMap, (IntPtr)t2); 175int i3 = Unsafe.Add(ref decodingMap, (IntPtr)t3); 197int i2 = Unsafe.Add(ref decodingMap, (IntPtr)t2); 1440int i0 = Unsafe.Add(ref decodingMap, (IntPtr)t0); 1441int i1 = Unsafe.Add(ref decodingMap, (IntPtr)t1);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Helper\Base64EncoderHelper.cs (9)
648uint i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 18)); 649uint i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 12) & 0x3F)); 650uint i2 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 6) & 0x3F)); 651uint i3 = Unsafe.Add(ref encodingMap, (IntPtr)(i & 0x3F)); 705uint i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 10)); 706uint i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 4) & 0x3F)); 720uint i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 18)); 721uint i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 12) & 0x3F)); 722uint i2 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 6) & 0x3F));
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlDecoder.cs (2)
828int i0 = Unsafe.Add(ref decodingMap, (IntPtr)t0); 829int i1 = Unsafe.Add(ref decodingMap, (IntPtr)t1);
src\libraries\System.Private.CoreLib\src\System\Buffers\Text\Base64Url\Base64UrlEncoder.cs (15)
157return string.Create(encodedLength, (IntPtr)(&source), static (buffer, spanPtr) => 252byte i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 10)); 253byte i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 4) & 0x3F)); 277byte i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 18)); 278byte i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 12) & 0x3F)); 279byte i2 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 6) & 0x3F)); 346uint i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 10)); 347uint i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 4) & 0x3F)); 371ushort i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 18)); 372ushort i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 12) & 0x3F)); 373ushort i2 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 6) & 0x3F)); 434ulong i0 = Unsafe.Add(ref encodingMap, (IntPtr)(i >> 18)); 435ulong i1 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 12) & 0x3F)); 436ulong i2 = Unsafe.Add(ref encodingMap, (IntPtr)((i >> 6) & 0x3F)); 437ulong i3 = Unsafe.Add(ref encodingMap, (IntPtr)(i & 0x3F));
src\libraries\System.Private.CoreLib\src\System\ComAwareWeakReference.cs (4)
26private IntPtr _pComWeakRef; 46IntPtr pComWeakRef = ObjectToComWeakRef(target, out long wrapperId); 62private ComInfo(IntPtr pComWeakRef, long wrapperId) 64Debug.Assert(pComWeakRef != IntPtr.Zero);
src\libraries\System.Private.CoreLib\src\System\DefaultBinder.cs (2)
1234if ((source == typeof(IntPtr) && target == typeof(IntPtr)) ||
src\libraries\System.Private.CoreLib\src\System\Diagnostics\DebugProvider.Unix.cs (1)
89int bytesWritten = Interop.Sys.Write((IntPtr)2 /* stderr */, buf + totalBytesWritten, bufCount);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\StackFrameExtensions.cs (5)
13return stackFrame.GetNativeImageBase() != IntPtr.Zero; 33public static IntPtr GetNativeIP(this StackFrame stackFrame) 35return IntPtr.Zero; 38public static IntPtr GetNativeImageBase(this StackFrame stackFrame) 40return IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipe.cs (5)
13internal IntPtr ProviderID; 19internal IntPtr Payload; 106Marshal.FreeCoTaskMem((IntPtr)m_pProviderName); 110Marshal.FreeCoTaskMem((IntPtr)m_pFilterData); 146Marshal.FreeCoTaskMem((IntPtr)providersNativePointer);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipe.Internal.cs (6)
31internal static unsafe partial IntPtr CreateProvider(string providerName, 36internal static unsafe partial IntPtr DefineEvent(IntPtr provHandle, uint eventID, long keywords, uint eventVersion, uint level, void *pMetadata, uint metadataLength); 39internal static partial IntPtr GetProvider(string providerName); 42internal static partial void DeleteProvider(IntPtr provHandle); 48internal static unsafe partial void WriteEventData(IntPtr eventHandle, EventProvider.EventData* pEventData, uint dataCount, Guid* activityId, Guid* relatedActivityId);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventDispatcher.cs (1)
25private readonly IntPtr m_RuntimeProviderID;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeEventProvider.cs (5)
12private IntPtr _provHandle; 65EventPipeEventProvider _this = GCHandle<EventPipeEventProvider>.FromIntPtr((IntPtr)callbackContext).Target; 104IntPtr eventHandle, 110if (eventHandle != IntPtr.Zero) 140internal override unsafe IntPtr DefineEventHandle(uint eventID, string eventName, long keywords, uint eventVersion, uint level,
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipeMetadataGenerator.cs (3)
535else if (type == typeof(IntPtr)) 661if (parameterType == typeof(IntPtr)) 662return IntPtr.Size == 4 ? TypeCode.Int32 : TypeCode.Int64;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventPipePayloadDecoder.cs (2)
31if (parameterType == typeof(IntPtr)) 34payload = payload.Slice(IntPtr.Size);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventProvider.cs (14)
284else if (data is IntPtr) 286dataDescriptor->Size = (uint)sizeof(IntPtr); 287IntPtr* intptrPtr = (IntPtr*)dataBuffer; 288*intptrPtr = (IntPtr)data; 463internal unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, IntPtr eventHandle, Guid* activityID, Guid* childActivityID, object?[] eventPayload) 673protected internal unsafe bool WriteEvent(ref EventDescriptor eventDescriptor, IntPtr eventHandle, Guid* activityID, Guid* childActivityID, int dataCount, IntPtr data) 696IntPtr eventHandle, 700IntPtr data) 1245IntPtr eventHandle, 1260internal virtual unsafe IntPtr DefineEventHandle(uint eventID, string eventName, long keywords, uint eventVersion, 1263return IntPtr.Zero; 1358Marshal.Copy((IntPtr)(void*)filterData->Ptr, data, 0, data.Length);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\EventSource.cs (68)
250private IntPtr m_writeEventStringEventHandle = IntPtr.Zero; 805IntPtr eventHandle = m_eventPipeProvider._eventProvider.DefineEventHandle( 814Debug.Assert(eventHandle != IntPtr.Zero); 843descrs[0].DataPointer = (IntPtr)(&arg1); 857descrs[0].DataPointer = (IntPtr)(&arg1); 860descrs[1].DataPointer = (IntPtr)(&arg2); 874descrs[0].DataPointer = (IntPtr)(&arg1); 877descrs[1].DataPointer = (IntPtr)(&arg2); 880descrs[2].DataPointer = (IntPtr)(&arg3); 895descrs[0].DataPointer = (IntPtr)(&arg1); 909descrs[0].DataPointer = (IntPtr)(&arg1); 912descrs[1].DataPointer = (IntPtr)(&arg2); 926descrs[0].DataPointer = (IntPtr)(&arg1); 929descrs[1].DataPointer = (IntPtr)(&arg2); 932descrs[2].DataPointer = (IntPtr)(&arg3); 950descrs[0].DataPointer = (IntPtr)string1Bytes; 970descrs[0].DataPointer = (IntPtr)string1Bytes; 973descrs[1].DataPointer = (IntPtr)string2Bytes; 995descrs[0].DataPointer = (IntPtr)string1Bytes; 998descrs[1].DataPointer = (IntPtr)string2Bytes; 1001descrs[2].DataPointer = (IntPtr)string3Bytes; 1020descrs[0].DataPointer = (IntPtr)string1Bytes; 1023descrs[1].DataPointer = (IntPtr)(&arg2); 1041descrs[0].DataPointer = (IntPtr)string1Bytes; 1044descrs[1].DataPointer = (IntPtr)(&arg2); 1047descrs[2].DataPointer = (IntPtr)(&arg3); 1066descrs[0].DataPointer = (IntPtr)string1Bytes; 1069descrs[1].DataPointer = (IntPtr)(&arg2); 1088descrs[0].DataPointer = (IntPtr)(&arg1); 1091descrs[1].DataPointer = (IntPtr)string2Bytes; 1110descrs[0].DataPointer = (IntPtr)(&arg1); 1113descrs[1].DataPointer = (IntPtr)string2Bytes; 1131descrs[0].DataPointer = (IntPtr)(&blobSize); 1134descrs[1].DataPointer = (IntPtr)(&blobSize); // valid address instead of empty content 1144descrs[0].DataPointer = (IntPtr)(&blobSize); 1147descrs[1].DataPointer = (IntPtr)blob; 1163descrs[0].DataPointer = (IntPtr)(&arg1); 1169descrs[1].DataPointer = (IntPtr)(&blobSize); 1172descrs[2].DataPointer = (IntPtr)(&blobSize); // valid address instead of empty contents 1182descrs[1].DataPointer = (IntPtr)(&blobSize); 1185descrs[2].DataPointer = (IntPtr)blob; 1254public unsafe IntPtr DataPointer 1256get => (IntPtr)(void*)m_Ptr; 1404if (metadata.EnabledForETW && !m_etwProvider.WriteEvent(ref metadata.Descriptor, metadata.EventHandle, pActivityId, relatedActivityId, eventDataCount, (IntPtr)data)) 1407if (metadata.EnabledForEventPipe && !m_eventPipeProvider.WriteEvent(ref metadata.Descriptor, metadata.EventHandle, pActivityId, relatedActivityId, eventDataCount, (IntPtr)data)) 1585IntPtr eventHandle, 1589IntPtr data) 1781IntPtr dataPointer = data->DataPointer; 1827else if (IntPtr.Size == 4 && dataType == typeof(IntPtr)) 1829decoded = *(IntPtr*)dataPointer; 1887else if (IntPtr.Size == 8 && dataType == typeof(IntPtr)) 1889decoded = *(IntPtr*)dataPointer; 1937decoded = dataPointer == IntPtr.Zero ? null : new string((char*)dataPointer, 0, (data->Size >> 1) - 1); 2157IntPtr dataPointer = data->DataPointer; 2158args[i] = dataPointer == IntPtr.Zero ? null : new string((char*)dataPointer, 0, (data->Size >> 1) - 1); 2265m_etwProvider?.WriteEvent(ref descr, IntPtr.Zero, null, null, 1, (IntPtr)((void*)&data)); 2269if (m_writeEventStringEventHandle == IntPtr.Zero) 2278if (m_writeEventStringEventHandle == IntPtr.Zero) 2295m_eventPipeProvider.WriteEvent(ref descr, m_writeEventStringEventHandle, null, null, 1, (IntPtr)((void*)&data)); 2502public IntPtr EventHandle; // EventPipeEvent handle. 2948if (!m_etwProvider.WriteEvent(ref manifestDescr, IntPtr.Zero, null, null, 2, (IntPtr)dataDescrs)) 3527metadata.EventHandle = IntPtr.Zero; 6082else if (type == typeof(IntPtr))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\FrameworkEventSource.cs (9)
49descrs[0].DataPointer = (IntPtr)(&arg1); 52descrs[1].DataPointer = (IntPtr)(&arg2); 55descrs[2].DataPointer = (IntPtr)string3Bytes; 58descrs[3].DataPointer = (IntPtr)(&arg4); 61descrs[4].DataPointer = (IntPtr)(&arg5); 64descrs[5].DataPointer = (IntPtr)(&arg6); 84descrs[0].DataPointer = (IntPtr)(&arg1); 87descrs[1].DataPointer = (IntPtr)(&arg2); 90descrs[2].DataPointer = (IntPtr)string3Bytes;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\NativeRuntimeEventSource.Threading.NativeSinks.cs (19)
226IntPtr NativeOverlapped, 227IntPtr Overlapped, // 0 if the Windows thread pool is used, the relevant info could be obtained from the NativeOverlapped* if necessary 243IntPtr overlapped = (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode(); 246(IntPtr)nativeOverlapped, 261ThreadPoolIOEnqueue((IntPtr)registeredWaitHandle.GetHashCode(), IntPtr.Zero, registeredWaitHandle.Repeating); 268IntPtr NativeOverlapped, 269IntPtr Overlapped, // 0 if the Windows thread pool is used, the relevant info could be obtained from the NativeOverlapped* if necessary 284IntPtr overlapped = (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode(); 287(IntPtr)nativeOverlapped, 300ThreadPoolIODequeue((IntPtr)registeredWaitHandle.GetHashCode(), IntPtr.Zero); 323IntPtr overlapped = (IntPtr)Overlapped.GetOverlappedFromNative(nativeOverlapped).GetHashCode(); 326(IntPtr)nativeOverlapped, 333IntPtr NativeOverlapped, 334IntPtr Overlapped, // 0 if the Windows thread pool is used, the relevant info could be obtained from the NativeOverlapped* if necessary
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\NativeRuntimeEventSource.Threading.NativeSinks.Internal.cs (7)
75IntPtr NativeOverlapped, 76IntPtr Overlapped, 83IntPtr NativeOverlapped, 84IntPtr Overlapped, 96IntPtr NativeOverlapped, 97IntPtr Overlapped, 104IntPtr AssociatedObjectID,
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\DataCollector.cs (3)
137Marshal.Copy((IntPtr)p, buffer, oldPos, size); 176Marshal.Copy((IntPtr)p, buffer, oldPos, size); 341datasTemp->DataPointer = (IntPtr)this.scratch;
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\NameInfo.cs (4)
74public IntPtr GetOrCreateEventHandle(EventProvider provider, TraceLoggingEventHandleTable eventHandleTable, EventDescriptor descriptor, TraceLoggingEventTypes eventTypes) 76IntPtr eventHandle; 77if ((eventHandle = eventHandleTable[descriptor.EventId]) == IntPtr.Zero) 81if ((eventHandle = eventHandleTable[descriptor.EventId]) == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\PropertyValue.cs (7)
45public IntPtr AsIntPtr; 93private PropertyValue(IntPtr value) : this(new Scalar() { AsIntPtr = value }, sizeof(IntPtr)) { } 115if (type == typeof(IntPtr)) return value => new PropertyValue((IntPtr)value!); 240if (type == typeof(IntPtr)) { var f = GetGetMethod<IntPtr>(property); return container => new PropertyValue(f((TContainer)container.ReferenceValue!)); }
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\SimpleTypeInfos.cs (4)
91public static TraceLoggingTypeInfo IntPtr() => s_intptr ??= new ScalarTypeInfo(typeof(IntPtr), Statics.IntPtrType); 152public static TraceLoggingTypeInfo IntPtr() => s_intptr ??= new ScalarArrayTypeInfo(typeof(IntPtr[]), Statics.IntPtrType, System.IntPtr.Size); 153public static TraceLoggingTypeInfo UIntPtr() => s_uintptr ??= new ScalarArrayTypeInfo(typeof(UIntPtr[]), Statics.UIntPtrType, System.IntPtr.Size);
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\Statics.cs (5)
32public static readonly TraceLoggingDataType IntPtrType = IntPtr.Size == 8 35public static readonly TraceLoggingDataType UIntPtrType = IntPtr.Size == 8 38public static readonly TraceLoggingDataType HexIntPtrType = IntPtr.Size == 8 466else if (elementType == typeof(IntPtr)) 548else if (dataType == typeof(IntPtr))
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventHandleTable.cs (9)
15private IntPtr[] m_innerTable; 19m_innerTable = new IntPtr[DefaultLength]; 22internal IntPtr this[int eventID] 26IntPtr ret = IntPtr.Zero; 27IntPtr[] innerTable = Volatile.Read(ref m_innerTable); 38internal void SetEventHandle(int eventID, IntPtr eventHandle) 51IntPtr[] newTable = new IntPtr[newSize];
src\libraries\System.Private.CoreLib\src\System\Diagnostics\Tracing\TraceLogging\TraceLoggingEventSource.cs (9)
419IntPtr eventHandle = nameInfo.GetOrCreateEventHandle(m_eventPipeProvider, m_eventHandleTable, descriptor, eventTypes); 420Debug.Assert(eventHandle != IntPtr.Zero); 468(IntPtr)descriptors); 529IntPtr eventHandle = nameInfo.GetOrCreateEventHandle(m_eventPipeProvider, m_eventHandleTable, descriptor, eventTypes); 530Debug.Assert(eventHandle != IntPtr.Zero); 572(IntPtr)descriptors); 597IntPtr eventHandle = nameInfo.GetOrCreateEventHandle(m_eventPipeProvider, m_eventHandleTable, descriptor, eventTypes); 598Debug.Assert(eventHandle != IntPtr.Zero); 666(IntPtr)descriptors);
src\libraries\System.Private.CoreLib\src\System\Enum.cs (3)
1180CorElementType.ELEMENT_TYPE_I => Unsafe.As<byte, IntPtr>(ref data), 1270CorElementType.ELEMENT_TYPE_I => Unsafe.As<byte, IntPtr>(ref data).GetHashCode(), 1542return string.Create(sizeof(TStorage) * 2, (IntPtr)ptr, (destination, intptr) =>
src\libraries\System.Private.CoreLib\src\System\Environment.cs (1)
208public static bool Is64BitProcess => IntPtr.Size == 8;
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendarData.Icu.cs (2)
435return Interop.Globalization.EnumCalendarInfo(&EnumCalendarInfoCallback, localeName, calendarId, dataType, (IntPtr)callbackContext); 440private static unsafe void EnumCalendarInfoCallback(char* calendarStringPtr, IntPtr context)
src\libraries\System.Private.CoreLib\src\System\Globalization\CalendarData.Nls.cs (7)
29return Interop.Kernel32.GetCalendarInfoEx(localeName, (uint)calendar, IntPtr.Zero, calType | CAL_RETURN_NUMBER, IntPtr.Zero, 0, out data) != 0; 39int ret = Interop.Kernel32.GetCalendarInfoEx(localeName, (uint)calendar, IntPtr.Zero, calType, (IntPtr)buffer, BUFFER_LENGTH, IntPtr.Zero); 62private static unsafe Interop.BOOL EnumCalendarInfoCallback(char* lpCalendarInfoString, uint calendar, IntPtr pReserved, void* lParam) 94private static unsafe Interop.BOOL EnumCalendarsCallback(char* lpCalendarInfoString, uint calendar, IntPtr reserved, void* lParam)
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.cs (1)
43private IntPtr _sortHandle;
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Icu.cs (4)
961private static readonly Dictionary<string, IntPtr> s_sortNameToSortHandleCache = new Dictionary<string, IntPtr>(); 963internal static IntPtr GetCachedSortHandle(string sortName) 967if (!s_sortNameToSortHandleCache.TryGetValue(sortName, out IntPtr result))
src\libraries\System.Private.CoreLib\src\System\Globalization\CompareInfo.Nls.cs (15)
18internal static unsafe IntPtr NlsGetSortHandle(string cultureName) 22return IntPtr.Zero; 25IntPtr handle; 26int ret = Interop.Kernel32.LCMapStringEx(cultureName, Interop.Kernel32.LCMAP_SORTHANDLE, null, 0, &handle, IntPtr.Size, null, null, IntPtr.Zero); 41return IntPtr.Zero; 140int sortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 162if (Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 214string? localeName = _sortHandle != IntPtr.Zero ? null : _sortName; 267string? localeName = _sortHandle != IntPtr.Zero ? null : _sortName; 395int sortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 409if (Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 494actualSortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 546sortKeyLength = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _sortName, 574return Interop.Kernel32.IsNLSDefinedString(Interop.Kernel32.COMPARE_STRING, 0, IntPtr.Zero, pText, text.Length);
src\libraries\System.Private.CoreLib\src\System\Globalization\CultureData.Nls.cs (3)
126Interop.Kernel32.EnumSystemLocalesEx(&EnumSystemLocalesProc, Interop.Kernel32.LOCALE_SPECIFICDATA | Interop.Kernel32.LOCALE_SUPPLEMENTAL, &context, IntPtr.Zero); 497Interop.Kernel32.EnumSystemLocalesEx(&EnumAllSystemLocalesProc, flags, &context, IntPtr.Zero); 525Interop.Kernel32.EnumSystemLocalesEx(&EnumAllSystemLocalesProc, Interop.Kernel32.LOCALE_REPLACEMENT, &context, IntPtr.Zero);
src\libraries\System.Private.CoreLib\src\System\Globalization\GlobalizationMode.cs (2)
89private static IntPtr LoadLibrary(string library, bool failOnLoadFailure) 91if (!NativeLibrary.TryLoad(library, typeof(object).Assembly, DllImportSearchPath.ApplicationDirectory | DllImportSearchPath.System32, out IntPtr lib) && failOnLoadFailure)
src\libraries\System.Private.CoreLib\src\System\Globalization\GlobalizationMode.Unix.cs (2)
76IntPtr icuucLib = LoadLibrary(CreateLibraryName("libicuuc", suffixAndSeparator, extension, version, versionAtEnd), failOnLoadFailure: true); 77IntPtr icuinLib = LoadLibrary(CreateLibraryName("libicui18n", suffixAndSeparator, extension, version, versionAtEnd), failOnLoadFailure: true);
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.cs (2)
179IntPtr byteOffset = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Globalization\Ordinal.Utf8.cs (4)
174IntPtr byteOffset = IntPtr.Zero; 484IntPtr byteOffset = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Globalization\TextInfo.Nls.cs (2)
25int ret = Interop.Kernel32.LCMapStringEx(_sortHandle != IntPtr.Zero ? null : _textInfoName, 44private IntPtr _sortHandle;
src\libraries\System.Private.CoreLib\src\System\Half.cs (5)
882/// <summary>Explicitly converts a half-precision floating-point value to its nearest representable <see cref="IntPtr" /> value.</summary> 884/// <returns><paramref name="value" /> converted to its nearest representable <see cref="IntPtr" /> value.</returns> 887/// <summary>Explicitly converts a half-precision floating-point value to its nearest representable <see cref="IntPtr" /> value, throwing an overflow exception for any values that fall outside the representable range.</summary> 889/// <returns><paramref name="value" /> converted to its nearest representable <see cref="IntPtr" /> value.</returns> 890/// <exception cref="OverflowException"><paramref name="value" /> is not representable by <see cref="IntPtr" />.</exception>
src\libraries\System.Private.CoreLib\src\System\IO\Enumeration\FileSystemEnumerator.Unix.cs (11)
23private IntPtr _directoryHandle; 40if (_directoryHandle == IntPtr.Zero) 69private IntPtr CreateDirectoryHandle(string path, bool ignoreNotFound = false) 71IntPtr handle = Interop.Sys.OpenDir(path); 72if (handle == IntPtr.Zero) 77return IntPtr.Zero; 86IntPtr handle = Interlocked.Exchange(ref _directoryHandle, IntPtr.Zero); 87if (handle != IntPtr.Zero) 217_directoryHandle = IntPtr.Zero; 219while (_directoryHandle == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\IO\FileStream.cs (5)
23public FileStream(IntPtr handle, FileAccess access) 30public FileStream(IntPtr handle, FileAccess access, bool ownsHandle) 37public FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize) 44public FileStream(IntPtr handle, FileAccess access, bool ownsHandle, int bufferSize, bool isAsync) 226public virtual IntPtr Handle => _strategy.Handle;
src\libraries\System.Private.CoreLib\src\System\IO\Path.cs (6)
28512, (IntPtr)pKey, (span, key) => // 12 == 8 + 1 (for period) + 3 736ReadOnlySpanPtr1 = (IntPtr)(&first), 737ReadOnlySpanPtr2 = (IntPtr)(&second), 738ReadOnlySpanPtr3 = (IntPtr)(&third), 739ReadOnlySpanPtr4 = (IntPtr)(&fourth), 788public IntPtr ReadOnlySpanPtr1, ReadOnlySpanPtr2, ReadOnlySpanPtr3, ReadOnlySpanPtr4;
src\libraries\System.Private.CoreLib\src\System\IO\Path.Unix.cs (1)
115IntPtr fd = Interop.CheckIo(Interop.Sys.MksTemps(pPath, SuffixByteLength), tempPath, isDirError: true);
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
102path = Marshal.PtrToStringUTF8((IntPtr)passwd.HomeDirectory);
src\libraries\System.Private.CoreLib\src\System\IO\Strategies\FileStreamStrategy.cs (1)
18internal IntPtr Handle => SafeFileHandle.DangerousGetHandle();
src\libraries\System.Private.CoreLib\src\System\Math.cs (3)
90/// <param name="value">A number that is greater than <see cref="IntPtr.MinValue" />, but less than or equal to <see cref="IntPtr.MaxValue" />.</param> 91/// <returns>A native signed integer, x, such that 0 \u2264 x \u2264 <see cref="IntPtr.MaxValue" />.</returns>
src\libraries\System.Private.CoreLib\src\System\MemoryExtensions.cs (8)
1934if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 1943if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint))) 1999if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 2008if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint))) 2064if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 2073if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint))) 2129if (lowInclusive is int or uint || (IntPtr.Size == 4 && (lowInclusive is nint or nuint))) 2138if (lowInclusive is long or ulong || (IntPtr.Size == 8 && (lowInclusive is nint or nuint)))
src\libraries\System.Private.CoreLib\src\System\Numerics\BitOperations.cs (2)
397(IntPtr)(int)((value * 0x07C4ACDDu) >> 27)); 580(IntPtr)(int)(((value & (uint)-(int)value) * 0x077CB531u) >> 27)); // Multi-cast mitigates redundant conv.u8
src\libraries\System.Private.CoreLib\src\System\Reflection\ConstructorInvoker.cs (9)
293IntPtr* pByRefFixedStorage = (IntPtr*)&byrefs; 318IntPtr* pArgStorage = stackalloc IntPtr[_argCount]; 319NativeMemory.Clear(pArgStorage, (nuint)_argCount * (nuint)sizeof(IntPtr)); 349IntPtr* pStorage = stackalloc IntPtr[2 * _argCount]; 350NativeMemory.Clear(pStorage, (nuint)(2 * _argCount) * (nuint)sizeof(IntPtr)); 353IntPtr* pByRefStorage = pStorage + _argCount;
src\libraries\System.Private.CoreLib\src\System\Reflection\FieldAccessor.cs (17)
14private IntPtr _addressOrOffset; 81_methodTable = (MethodTable*)typeof(IntPtr).TypeHandle.Value; 109_methodTable = (MethodTable*)typeof(IntPtr).TypeHandle.Value; 148(void*)Unsafe.As<byte, IntPtr>(ref Unsafe.AddByteOffset(ref obj.GetRawData(), _addressOrOffset)), 152return Volatile.Read(ref Unsafe.As<IntPtr, object>(ref *(IntPtr*)_addressOrOffset)); 165ref Unsafe.As<IntPtr, object>(ref *(IntPtr*)_addressOrOffset).GetRawData()); 168return Pointer.Box((void*)Unsafe.As<byte, IntPtr>( 261Volatile.Write(ref Unsafe.As<IntPtr, object?>(ref *(IntPtr*)_addressOrOffset), value); 417else if (fieldType == typeof(IntPtr) || 444else if (fieldType == typeof(IntPtr) || 455if (IntPtr.Size == 4) 459else if (IntPtr.Size == 8) 471if (IntPtr.Size == 4) 475else if (IntPtr.Size == 8)
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokerEmitUtil.cs (8)
15internal unsafe delegate object? InvokeFunc_RefArgs(object? obj, IntPtr* refArguments); 72Unbox(il, typeof(IntPtr)); 129Unbox(il, typeof(IntPtr)); 151Type[] delegateParameters = [typeof(object), typeof(object), typeof(IntPtr*)]; 180il.Emit(OpCodes.Ldc_I4, i * IntPtr.Size); 189il.Emit(OpCodes.Ldobj, parameterType.IsPointer || parameterType.IsFunctionPointer ? typeof(IntPtr) : parameterType); 274il.Emit(OpCodes.Box, typeof(IntPtr)); 302il.Emit(OpCodes.Box, typeof(IntPtr));
src\libraries\System.Private.CoreLib\src\System\Reflection\InvokeUtils.cs (1)
114if (srcObject is IntPtr or UIntPtr)
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.Constructor.cs (4)
27IntPtr* pStorage = stackalloc IntPtr[2 * argCount]; 28NativeMemory.Clear(pStorage, (nuint)(2 * argCount) * (nuint)sizeof(IntPtr)); 31IntPtr* pByRefStorage = pStorage + argCount;
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodBaseInvoker.cs (9)
163IntPtr* pByRefFixedStorage = (IntPtr*)&byrefs; 203IntPtr* pArgStorage = stackalloc IntPtr[_argCount * 2]; 204NativeMemory.Clear(pArgStorage, (nuint)_argCount * (nuint)sizeof(IntPtr) * 2); 238IntPtr* pStorage = stackalloc IntPtr[3 * _argCount]; 239NativeMemory.Clear(pStorage, (nuint)(3 * _argCount) * (nuint)sizeof(IntPtr)); 242IntPtr* pByRefStorage = pStorage + _argCount;
src\libraries\System.Private.CoreLib\src\System\Reflection\MethodInvoker.cs (9)
346IntPtr* pByRefFixedStorage = (IntPtr*)&byrefs; 371IntPtr* pArgStorage = stackalloc IntPtr[_argCount]; 372NativeMemory.Clear(pArgStorage, (nuint)_argCount * (nuint)sizeof(IntPtr)); 402IntPtr* pStorage = stackalloc IntPtr[2 * _argCount]; 403NativeMemory.Clear(pStorage, (nuint)(2 * _argCount) * (nuint)sizeof(IntPtr)); 406IntPtr* pByRefStorage = pStorage + _argCount;
src\libraries\System.Private.CoreLib\src\System\Reflection\Pointer.cs (2)
61internal IntPtr GetPointerValue() => (IntPtr)_ptr;
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\QCallHandles.cs (5)
85private IntPtr _module; 104private IntPtr _assembly; 109_assembly = assembly?.GetUnderlyingNativeHandle() ?? IntPtr.Zero; 117private IntPtr _handle; 122_handle = type?.GetUnderlyingNativeHandle() ?? IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\RuntimeFeature.cs (1)
46/// Indicates that this version of runtime supports <see cref="System.IntPtr" /> and <see cref="System.UIntPtr" /> as numeric types.
src\libraries\System.Private.CoreLib\src\System\Runtime\CompilerServices\Unsafe.cs (5)
127public static ref T Add<T>(ref T source, IntPtr elementOffset) 629public static ref T AddByteOffset<T>(ref T source, IntPtr byteOffset) 708public static IntPtr ByteOffset<T>([AllowNull] ref readonly T origin, [AllowNull] ref readonly T target) 837public static ref T Subtract<T>(ref T source, IntPtr elementOffset) 888public static ref T SubtractByteOffset<T>(ref T source, IntPtr byteOffset)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CLong.cs (4)
11using NativeType = System.IntPtr; 27private readonly NativeType _value; 35_value = (NativeType)value; 45_value = checked((NativeType)value);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\IEnumConnectionPoints.cs (1)
15int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] IConnectionPoint[] rgelt, IntPtr pceltFetched);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\IEnumConnections.cs (1)
24int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] CONNECTDATA[] rgelt, IntPtr pceltFetched);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\IEnumMoniker.cs (1)
15int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] IMoniker[] rgelt, IntPtr pceltFetched);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\IEnumString.cs (1)
15int Next(int celt, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 0), Out] string[] rgelt, IntPtr pceltFetched);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\IEnumVARIANT.cs (1)
15int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] object?[] rgVar, IntPtr pceltFetched);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\IStream.cs (5)
32void Read([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1), Out] byte[] pv, int cb, IntPtr pcbRead); 33void Write([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] byte[] pv, int cb, IntPtr pcbWritten); 36void Seek(long dlibMove, int dwOrigin, IntPtr plibNewPosition); 38void CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\ITypeComp.cs (3)
24public IntPtr lpfuncdesc; 26public IntPtr lpvardesc; 28public IntPtr lptcomp;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\ITypeInfo.cs (23)
66public IntPtr lpstrSchema; 86public IntPtr lprgscode; // /* [size_is(cScodes)] */ SCODE RPC_FAR *lprgscode; 87public IntPtr lprgelemdescParam; // /* [size_is(cParams)] */ ELEMDESC __RPC_FAR *lprgelemdescParam; 114public IntPtr dwReserved; 136public IntPtr lpVarValue; 144public IntPtr lpValue; 187public IntPtr lpvarValue; 201public IntPtr rgvarg; 202public IntPtr rgdispidNamedArgs; 217public IntPtr pvReserved; 218public IntPtr pfnDeferredFillIn; 301void GetTypeAttr(out IntPtr ppTypeAttr); 303void GetFuncDesc(int index, out IntPtr ppFuncDesc); 304void GetVarDesc(int index, out IntPtr ppVarDesc); 309void Invoke([MarshalAs(UnmanagedType.IUnknown)] object pvInstance, int memid, short wFlags, ref DISPPARAMS pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, out int puArgErr); 311void GetDllEntry(int memid, INVOKEKIND invKind, IntPtr pBstrDllName, IntPtr pBstrName, IntPtr pwOrdinal); 313void AddressOfMember(int memid, INVOKEKIND invKind, out IntPtr ppv); 318void ReleaseTypeAttr(IntPtr pTypeAttr); 320void ReleaseFuncDesc(IntPtr pFuncDesc); 322void ReleaseVarDesc(IntPtr pVarDesc);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\ITypeInfo2.cs (17)
14new void GetTypeAttr(out IntPtr ppTypeAttr); 16new void GetFuncDesc(int index, out IntPtr ppFuncDesc); 17new void GetVarDesc(int index, out IntPtr ppVarDesc); 22new void Invoke([MarshalAs(UnmanagedType.IUnknown)] object pvInstance, int memid, short wFlags, ref DISPPARAMS pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, out int puArgErr); 24new void GetDllEntry(int memid, INVOKEKIND invKind, IntPtr pBstrDllName, IntPtr pBstrName, IntPtr pwOrdinal); 26new void AddressOfMember(int memid, INVOKEKIND invKind, out IntPtr ppv); 31new void ReleaseTypeAttr(IntPtr pTypeAttr); 33new void ReleaseFuncDesc(IntPtr pFuncDesc); 35new void ReleaseVarDesc(IntPtr pVarDesc); 47void GetAllCustData(IntPtr pCustData); 48void GetAllFuncCustData(int index, IntPtr pCustData); 49void GetAllParamCustData(int indexFunc, int indexParam, IntPtr pCustData); 50void GetAllVarCustData(int index, IntPtr pCustData); 51void GetAllImplTypeCustData(int index, IntPtr pCustData);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\ITypeLib.cs (2)
50void GetLibAttr(out IntPtr ppTLibAttr); 57void ReleaseTLibAttr(IntPtr pTLibAttr);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComTypes\ITypeLib2.cs (4)
19new void GetLibAttr(out IntPtr ppTLibAttr); 26new void ReleaseTLibAttr(IntPtr pTLibAttr); 28void GetLibStatistics(IntPtr pcUniqueNames, out int pcchUniqueNames); 31void GetAllCustData(IntPtr pCustData);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ComWrappers.cs (4)
37/// Enumeration of flags for <see cref="ComWrappers.GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags)"/>. 92public IntPtr Vtable; 99public IntPtr Vtable; 127protected abstract object? CreateObject(IntPtr externalComObject, CreateObjectFlags flags);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\CriticalHandle.cs (3)
123protected IntPtr handle; // This must be protected so derived classes can use out params. 127protected CriticalHandle(IntPtr invalidHandleValue) 157protected void SetHandle(IntPtr handle)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\DispatchWrapper.cs (1)
19IntPtr pdisp = Marshal.GetIDispatchForObject(obj);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (21)
31private IntPtr _handle; 47IntPtr handle = InternalAlloc(value, type); 59private GCHandle(IntPtr handle) => _handle = handle; 78IntPtr handle = Interlocked.Exchange(ref _handle, IntPtr.Zero); 88IntPtr handle = _handle; 95IntPtr handle = _handle; 111public readonly IntPtr AddrOfPinnedObject() 115IntPtr handle = _handle; 138return (IntPtr)Unsafe.AsPointer(ref Unsafe.As<string>(target).GetRawStringData()); 142return (IntPtr)Unsafe.AsPointer(ref MemoryMarshal.GetArrayDataReference(Unsafe.As<Array>(target))); 145return (IntPtr)Unsafe.AsPointer(ref target.GetRawData()); 156public static explicit operator GCHandle(IntPtr value) => FromIntPtr(value); 158public static GCHandle FromIntPtr(IntPtr value) 165public static explicit operator IntPtr(GCHandle value) => ToIntPtr(value); 167public static IntPtr ToIntPtr(GCHandle value) => value._handle; 183private static IntPtr GetHandleValue(IntPtr handle) => new IntPtr(handle & ~1); // Remove Pin flag 186private static bool IsPinned(IntPtr handle) => (handle & 1) != 0; // Check Pin flag 189private static void ThrowIfInvalid(IntPtr handle) 199internal static unsafe void CheckUninitialized(IntPtr handle)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.T.cs (14)
27private IntPtr _handle; 38private GCHandle(IntPtr handle) => _handle = handle; 41public readonly bool IsAllocated => _handle != IntPtr.Zero; 49IntPtr handle = _handle; 56IntPtr handle = _handle; 65/// <param name="value">An <see cref="IntPtr"/> handle to a managed object to create a <see cref="GCHandle{T}"/> object from.</param> 70/// The <see cref="IntPtr"/> representation of <see cref="GCHandle{T}"/> is not 74public static GCHandle<T> FromIntPtr(IntPtr value) => new GCHandle<T>(value); 80/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="GCHandle{T}"/> object.</returns> 82/// The <see cref="IntPtr"/> representation of <see cref="GCHandle{T}"/> is not 85public static IntPtr ToIntPtr(GCHandle<T> value) => value._handle; 93IntPtr handle = _handle; 94if (handle != IntPtr.Zero) 96_handle = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\HandleRef.cs (5)
11private readonly IntPtr _handle; 14public HandleRef(object? wrapper, IntPtr handle) 22public IntPtr Handle => _handle; 24public static explicit operator IntPtr(HandleRef value) => value._handle; 26public static IntPtr ToIntPtr(HandleRef value) => value._handle;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ICustomMarshaler.cs (3)
17object MarshalNativeToManaged(IntPtr pNativeData); 19IntPtr MarshalManagedToNative(object ManagedObj); 21void CleanUpNativeData(IntPtr pNativeData);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ICustomQueryInterface.cs (1)
12CustomQueryInterfaceResult GetInterface([In] ref Guid iid, out IntPtr ppv);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.cs (128)
31public static IntPtr AllocHGlobal(int cb) => AllocHGlobal((nint)cb); 33public static unsafe string? PtrToStringAnsi(IntPtr ptr) 43public static unsafe string PtrToStringAnsi(IntPtr ptr, int len) 51public static unsafe string? PtrToStringUni(IntPtr ptr) 61public static unsafe string PtrToStringUni(IntPtr ptr, int len) 69public static unsafe string? PtrToStringUTF8(IntPtr ptr) 80public static unsafe string PtrToStringUTF8(IntPtr ptr, int byteLen) 133public static unsafe int QueryInterface(IntPtr pUnk, in Guid iid, out IntPtr ppv) 138fixed (IntPtr* p = &ppv) 140return ((delegate* unmanaged<IntPtr, Guid*, IntPtr*, int>)(*(*(void***)pUnk + 0 /* IUnknown.QueryInterface slot */)))(pUnk, pIID, p); 144public static unsafe int AddRef(IntPtr pUnk) 148return ((delegate* unmanaged<IntPtr, int>)(*(*(void***)pUnk + 1 /* IUnknown.AddRef slot */)))(pUnk); 151public static unsafe int Release(IntPtr pUnk) 155return ((delegate* unmanaged<IntPtr, int>)(*(*(void***)pUnk + 2 /* IUnknown.Release slot */)))(pUnk); 164public static unsafe IntPtr UnsafeAddrOfPinnedArrayElement(Array arr, int index) 170return (IntPtr)((byte*)pRawData + (uint)index * (nuint)arr.GetElementSize()); 173public static unsafe IntPtr UnsafeAddrOfPinnedArrayElement<T>(T[] arr, int index) 179return (IntPtr)((byte*)pRawData + (uint)index * (nuint)sizeof(T)); 182public static IntPtr OffsetOf<T>(string fieldName) => OffsetOf(typeof(T), fieldName); 184public static void Copy(int[] source, int startIndex, IntPtr destination, int length) 189public static void Copy(char[] source, int startIndex, IntPtr destination, int length) 194public static void Copy(short[] source, int startIndex, IntPtr destination, int length) 199public static void Copy(long[] source, int startIndex, IntPtr destination, int length) 204public static void Copy(float[] source, int startIndex, IntPtr destination, int length) 209public static void Copy(double[] source, int startIndex, IntPtr destination, int length) 214public static void Copy(byte[] source, int startIndex, IntPtr destination, int length) 219public static void Copy(IntPtr[] source, int startIndex, IntPtr destination, int length) 224private static unsafe void CopyToNative<T>(T[] source, int startIndex, IntPtr destination, int length) 234public static void Copy(IntPtr source, int[] destination, int startIndex, int length) 239public static void Copy(IntPtr source, char[] destination, int startIndex, int length) 244public static void Copy(IntPtr source, short[] destination, int startIndex, int length) 249public static void Copy(IntPtr source, long[] destination, int startIndex, int length) 254public static void Copy(IntPtr source, float[] destination, int startIndex, int length) 259public static void Copy(IntPtr source, double[] destination, int startIndex, int length) 264public static void Copy(IntPtr source, byte[] destination, int startIndex, int length) 269public static void Copy(IntPtr source, IntPtr[] destination, int startIndex, int length) 274private static unsafe void CopyToManaged<T>(IntPtr source, T[] destination, int startIndex, int length) 287public static unsafe byte ReadByte(IntPtr ptr, int ofs) 301public static byte ReadByte(IntPtr ptr) => ReadByte(ptr, 0); 303public static unsafe short ReadInt16(IntPtr ptr, int ofs) 325public static short ReadInt16(IntPtr ptr) => ReadInt16(ptr, 0); 327public static unsafe int ReadInt32(IntPtr ptr, int ofs) 349public static int ReadInt32(IntPtr ptr) => ReadInt32(ptr, 0); 354public static IntPtr ReadIntPtr(object ptr, int ofs) 363public static IntPtr ReadIntPtr(IntPtr ptr, int ofs) 372public static IntPtr ReadIntPtr(IntPtr ptr) => ReadIntPtr(ptr, 0); 374public static unsafe long ReadInt64(IntPtr ptr, int ofs) 396public static long ReadInt64(IntPtr ptr) => ReadInt64(ptr, 0); 398public static unsafe void WriteByte(IntPtr ptr, int ofs, byte val) 412public static void WriteByte(IntPtr ptr, byte val) => WriteByte(ptr, 0, val); 414public static unsafe void WriteInt16(IntPtr ptr, int ofs, short val) 436public static void WriteInt16(IntPtr ptr, short val) => WriteInt16(ptr, 0, val); 438public static void WriteInt16(IntPtr ptr, int ofs, char val) => WriteInt16(ptr, ofs, (short)val); 445public static void WriteInt16(IntPtr ptr, char val) => WriteInt16(ptr, 0, (short)val); 447public static unsafe void WriteInt32(IntPtr ptr, int ofs, int val) 469public static void WriteInt32(IntPtr ptr, int val) => WriteInt32(ptr, 0, val); 471public static void WriteIntPtr(IntPtr ptr, int ofs, IntPtr val) 485public static void WriteIntPtr(object ptr, int ofs, IntPtr val) 496public static void WriteIntPtr(IntPtr ptr, IntPtr val) => WriteIntPtr(ptr, 0, val); 498public static unsafe void WriteInt64(IntPtr ptr, int ofs, long val) 520public static void WriteInt64(IntPtr ptr, long val) => WriteInt64(ptr, 0, val); 545public static void StructureToPtr<T>([DisallowNull] T structure, IntPtr ptr, bool fDeleteOld) 556public static object? PtrToStructure(IntPtr ptr, 562if (ptr == IntPtr.Zero) 586public static void PtrToStructure(IntPtr ptr, object structure) 594public static void PtrToStructure<T>(IntPtr ptr, [DisallowNull] T structure) 604public static T? PtrToStructure<[DynamicallyAccessedMembers(DynamicallyAccessedMemberTypes.PublicConstructors | DynamicallyAccessedMemberTypes.NonPublicConstructors)] T>(IntPtr ptr) 606if (ptr == IntPtr.Zero) 627public static void DestroyStructure<T>(IntPtr ptr) => DestroyStructure(ptr, typeof(T)); 633public static IntPtr GetHINSTANCE(Module m) 637return (IntPtr)(-1); 644public static Exception? GetExceptionForHR(int errorCode) => GetExceptionForHR(errorCode, IntPtr.Zero); 646public static Exception? GetExceptionForHR(int errorCode, IntPtr errorInfo) 860public static void ThrowExceptionForHR(int errorCode, IntPtr errorInfo) 868public static IntPtr SecureStringToBSTR(SecureString s) 878public static IntPtr SecureStringToCoTaskMemAnsi(SecureString s) 888public static IntPtr SecureStringToCoTaskMemUnicode(SecureString s) 898public static IntPtr SecureStringToGlobalAllocAnsi(SecureString s) 908public static IntPtr SecureStringToGlobalAllocUnicode(SecureString s) 918public static unsafe IntPtr StringToHGlobalAnsi(string? s) 922return IntPtr.Zero; 934IntPtr ptr = AllocHGlobal((IntPtr)nb); 940public static unsafe IntPtr StringToHGlobalUni(string? s) 944return IntPtr.Zero; 955IntPtr ptr = AllocHGlobal((IntPtr)nb); 963private static unsafe IntPtr StringToHGlobalUTF8(string? s) 967return IntPtr.Zero; 972IntPtr ptr = AllocHGlobal(checked(nb + 1)); 981public static unsafe IntPtr StringToCoTaskMemUni(string? s) 985return IntPtr.Zero; 996IntPtr ptr = AllocCoTaskMem(nb); 1004public static unsafe IntPtr StringToCoTaskMemUTF8(string? s) 1008return IntPtr.Zero; 1013IntPtr ptr = AllocCoTaskMem(checked(nb + 1)); 1022public static unsafe IntPtr StringToCoTaskMemAnsi(string? s) 1026return IntPtr.Zero; 1038IntPtr ptr = AllocCoTaskMem(nb); 1092public static Delegate GetDelegateForFunctionPointer(IntPtr ptr, Type t) 1117public static TDelegate GetDelegateForFunctionPointer<TDelegate>(IntPtr ptr) 1140public static IntPtr GetFunctionPointerForDelegate(Delegate d) 1149public static IntPtr GetFunctionPointerForDelegate<TDelegate>(TDelegate d) where TDelegate : notnull 1165public static unsafe void ZeroFreeBSTR(IntPtr s) 1167if (s == IntPtr.Zero) 1175public static void ZeroFreeCoTaskMemAnsi(IntPtr s) 1180public static unsafe void ZeroFreeCoTaskMemUnicode(IntPtr s) 1182if (s == IntPtr.Zero) 1190public static unsafe void ZeroFreeCoTaskMemUTF8(IntPtr s) 1192if (s == IntPtr.Zero) 1200public static unsafe void ZeroFreeGlobalAllocAnsi(IntPtr s) 1202if (s == IntPtr.Zero) 1210public static unsafe void ZeroFreeGlobalAllocUnicode(IntPtr s) 1212if (s == IntPtr.Zero) 1220public static unsafe IntPtr StringToBSTR(string? s) 1224return IntPtr.Zero; 1227IntPtr bstr = AllocBSTR(s.Length); 1234public static string PtrToStringBSTR(IntPtr ptr) 1241internal static unsafe uint SysStringByteLen(IntPtr s) 1254public static void InitHandle(SafeHandle safeHandle, IntPtr handle)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.NoCom.cs (18)
25public static IntPtr CreateAggregatedObject(IntPtr pOuter, object o) 42public static IntPtr CreateAggregatedObject<T>(IntPtr pOuter, T o) where T : notnull 75public static IntPtr GetComInterfaceForObject(object o, Type T) 82public static IntPtr GetComInterfaceForObject(object o, Type T, CustomQueryInterfaceMode mode) 88public static IntPtr GetComInterfaceForObject<T, TInterface>([DisallowNull] T o) 100public static IntPtr GetIDispatchForObject(object o) 106public static IntPtr GetIUnknownForObject(object o) 113public static void GetNativeVariantForObject(object? obj, IntPtr pDstNativeVariant) 120public static void GetNativeVariantForObject<T>(T? obj, IntPtr pDstNativeVariant) 126public static object GetTypedObjectForIUnknown(IntPtr pUnk, Type t) 132public static object GetObjectForIUnknown(IntPtr pUnk) 139public static object? GetObjectForNativeVariant(IntPtr pSrcNativeVariant) 146public static T? GetObjectForNativeVariant<T>(IntPtr pSrcNativeVariant) 153public static object?[] GetObjectsForNativeVariants(IntPtr aSrcNativeVariant, int cVars) 160public static T[] GetObjectsForNativeVariants<T>(IntPtr aSrcNativeVariant, int cVars) 194public static object GetUniqueObjectForIUnknown(IntPtr unknown)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshal.Unix.cs (22)
11public static string? PtrToStringAuto(IntPtr ptr, int len) 16public static string? PtrToStringAuto(IntPtr ptr) 21public static IntPtr StringToHGlobalAuto(string? s) 26public static IntPtr StringToCoTaskMemAuto(string? s) 33private static bool IsNullOrWin32Atom(IntPtr ptr) => ptr == IntPtr.Zero; 59public static unsafe IntPtr AllocHGlobal(IntPtr cb) 64public static unsafe void FreeHGlobal(IntPtr hglobal) 69public static unsafe IntPtr ReAllocHGlobal(IntPtr pv, IntPtr cb) 74public static IntPtr AllocCoTaskMem(int cb) => AllocHGlobal((nint)(uint)cb); 76public static void FreeCoTaskMem(IntPtr ptr) => FreeHGlobal(ptr); 78public static unsafe IntPtr ReAllocCoTaskMem(IntPtr pv, int cb) 86return IntPtr.Zero; 92internal static unsafe IntPtr AllocBSTR(int length) 97ulong cbNative = 2 * (ulong)(uint)length + (uint)sizeof(IntPtr) + (uint)sizeof(char) + WIN32_ALLOC_ALIGN; 118internal static unsafe IntPtr AllocBSTRByteLen(uint length) 123ulong cbNative = (ulong)(uint)length + (uint)sizeof(IntPtr) + (uint)sizeof(char) + WIN32_ALLOC_ALIGN; 147public static unsafe void FreeBSTR(IntPtr ptr)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\AnsiStringMarshaller.cs (2)
40=> Marshal.PtrToStringAnsi((IntPtr)unmanaged); 47=> Marshal.FreeCoTaskMem((IntPtr)unmanaged);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ArrayMarshaller.cs (1)
99=> Marshal.FreeCoTaskMem((IntPtr)unmanaged);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\BStrStringMarshaller.cs (3)
36return Marshal.PtrToStringBSTR((IntPtr)unmanaged); 44=> Marshal.FreeBSTR((IntPtr)unmanaged); 96Debug.Assert(lengthInBytes == Marshal.SysStringByteLen((IntPtr)ptrToFirstChar));
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ComVariant.cs (26)
27if (IntPtr.Size == 4) 29Debug.Assert(variantSize == (4 * IntPtr.Size)); 33Debug.Assert(IntPtr.Size == 8); 34Debug.Assert(variantSize == (3 * IntPtr.Size)); 67public IntPtr _record; 68public IntPtr _recordInfo; 75public IntPtr _data; 91public IntPtr _stream; 99public IntPtr _data; 121[FieldOffset(0)] public IntPtr _bstr; 122[FieldOffset(0)] public IntPtr _unknown; 123[FieldOffset(0)] public IntPtr _dispatch; 124[FieldOffset(0)] public IntPtr _pvarVal; 125[FieldOffset(0)] public IntPtr _byref; 158if (_typeUnion._unionTypes._unknown != IntPtr.Zero) 165if (_typeUnion._unionTypes._record._recordInfo != IntPtr.Zero) 168if (_typeUnion._unionTypes._record._record != IntPtr.Zero) 170Marshal.ThrowExceptionForHR(((delegate* unmanaged<IntPtr, IntPtr, int>)(*(*(void***)_typeUnion._unionTypes._record._recordInfo + 4 /* IRecordInfo.RecordClear slot */)))(_typeUnion._unionTypes._record._recordInfo, _typeUnion._unionTypes._record._record)); 185if (_typeUnion._unionTypes._unknown != IntPtr.Zero) 193if (versionedStream != null && versionedStream->_stream != IntPtr.Zero) 213foreach (var str in GetRawDataRef<Vector<IntPtr>>().AsSpan()) 220foreach (var str in GetRawDataRef<Vector<IntPtr>>().AsSpan()) 495if (_typeUnion._unionTypes._bstr == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\PointerArrayMarshaller.cs (7)
52public static ReadOnlySpan<IntPtr> GetManagedValuesSource(T*[]? managed) 53=> Unsafe.As<IntPtr[]>(managed); 83public static Span<IntPtr> GetManagedValuesDestination(T*[]? managed) 84=> Unsafe.As<IntPtr[]>(managed); 100=> Marshal.FreeCoTaskMem((IntPtr)unmanaged); 159public ReadOnlySpan<IntPtr> GetManagedValuesSource() => Unsafe.As<IntPtr[]>(_managedArray);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\ReadOnlySpanMarshaller.cs (1)
223Marshal.FreeCoTaskMem((IntPtr)_unmanagedArray);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SafeHandleMarshaller.cs (5)
39public IntPtr ToUnmanaged() => _handle!.DangerousGetHandle(); 61private IntPtr _originalHandleValue; 94public IntPtr ToUnmanaged() => _originalHandleValue; 100public void FromUnmanaged(IntPtr value) 172public void FromUnmanaged(IntPtr value)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\SpanMarshaller.cs (1)
104=> Marshal.FreeCoTaskMem((IntPtr)unmanaged);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\Utf16StringMarshaller.cs (2)
29=> Marshal.PtrToStringUni((IntPtr)unmanaged); 36=> Marshal.FreeCoTaskMem((IntPtr)unmanaged);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\Marshalling\Utf8StringMarshaller.cs (2)
42=> Marshal.PtrToStringUTF8((IntPtr)unmanaged); 49=> Marshal.FreeCoTaskMem((IntPtr)unmanaged);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NativeLibrary.cs (21)
22public delegate IntPtr DllImportResolver(string libraryName, 40public static IntPtr Load(string libraryPath) 54public static bool TryLoad(string libraryPath, out IntPtr handle) 59return handle != IntPtr.Zero; 84public static IntPtr Load(string libraryName, Assembly assembly, DllImportSearchPath? searchPath) 119public static bool TryLoad(string libraryName, Assembly assembly, DllImportSearchPath? searchPath, out IntPtr handle) 131return handle != IntPtr.Zero; 140public static void Free(IntPtr handle) 142if (handle == IntPtr.Zero) 156public static IntPtr GetExport(IntPtr handle, string name) 172public static bool TryGetExport(IntPtr handle, string name, out IntPtr address) 178return address != IntPtr.Zero; 231internal static IntPtr LoadLibraryCallbackStub(string libraryName, Assembly assembly, 236return IntPtr.Zero; 241return IntPtr.Zero; 251public static IntPtr GetMainProgramHandle() 253IntPtr result = IntPtr.Zero; 261if (result == IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\NFloat.cs (6)
342/// <summary>Explicitly converts a native-sized floating-point value to its nearest representable <see cref="IntPtr" /> value.</summary> 344/// <returns><paramref name="value" /> converted to its nearest representable <see cref="IntPtr" /> value.</returns> 348/// <summary>Explicitly converts a native-sized floating-point value to its nearest representable <see cref="IntPtr" /> value, throwing an overflow exception for any values that fall outside the representable range.</summary> 350/// <returns><paramref name="value" /> converted to its nearest representable <see cref="IntPtr" /> value.</returns> 351/// <exception cref="OverflowException"><paramref name="value" /> is not representable by <see cref="IntPtr" />.</exception> 505/// <summary>Implicitly converts a <see cref="System.IntPtr" /> value to its nearest representable native-sized floating-point value.</summary>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\ObjectiveC\ObjectiveCMarshal.PlatformNotSupported.cs (6)
33public unsafe delegate delegate* unmanaged<IntPtr, void> UnhandledExceptionPropagationHandler( 36out IntPtr context); 60delegate* unmanaged<IntPtr, int> isReferencedCallback, 61delegate* unmanaged<IntPtr, void> trackedObjectEnteredFinalization, 93out Span<IntPtr> taggedMemory) 132public static void SetMessageSendCallback(MessageSendFunction msgSendFunction, IntPtr func)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\PinnedGCHandle.T.cs (14)
28private IntPtr _handle; 40private PinnedGCHandle(IntPtr handle) => _handle = handle; 43public readonly bool IsAllocated => _handle != IntPtr.Zero; 51IntPtr handle = _handle; 58IntPtr handle = _handle; 99/// <param name="value">An <see cref="IntPtr"/> handle to a managed object to create a <see cref="PinnedGCHandle{T}"/> object from.</param> 104/// The <see cref="IntPtr"/> representation of <see cref="PinnedGCHandle{T}"/> is not 108public static PinnedGCHandle<T> FromIntPtr(IntPtr value) => new PinnedGCHandle<T>(value); 114/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="PinnedGCHandle{T}"/> object.</returns> 116/// The <see cref="IntPtr"/> representation of <see cref="PinnedGCHandle{T}"/> is not 119public static IntPtr ToIntPtr(PinnedGCHandle<T> value) => value._handle; 127IntPtr handle = _handle; 128if (handle != IntPtr.Zero) 130_handle = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeBuffer.cs (1)
91if (IntPtr.Size == 4 && numBytes > uint.MaxValue)
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\SafeHandle.cs (4)
35protected IntPtr handle; 64protected SafeHandle(IntPtr invalidHandleValue, bool ownsHandle) 96protected internal void SetHandle(IntPtr handle) => this.handle = handle; 98public IntPtr DangerousGetHandle() => handle;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\WeakGCHandle.T.cs (14)
27private IntPtr _handle; 39private WeakGCHandle(IntPtr handle) => _handle = handle; 42public readonly bool IsAllocated => _handle != IntPtr.Zero; 53IntPtr handle = _handle; 65IntPtr handle = _handle; 73/// <param name="value">An <see cref="IntPtr"/> handle to a managed object to create a <see cref="WeakGCHandle{T}"/> object from.</param> 78/// The <see cref="IntPtr"/> representation of <see cref="WeakGCHandle{T}"/> is not 82public static WeakGCHandle<T> FromIntPtr(IntPtr value) => new WeakGCHandle<T>(value); 88/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="WeakGCHandle{T}"/> object.</returns> 90/// The <see cref="IntPtr"/> representation of <see cref="WeakGCHandle{T}"/> is not 93public static IntPtr ToIntPtr(WeakGCHandle<T> value) => value._handle; 101IntPtr handle = _handle; 102if (handle != IntPtr.Zero) 104_handle = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyDependencyResolver.cs (2)
50IntPtr errorWriterPtr = Marshal.GetFunctionPointerForDelegate(errorWriter); 51IntPtr previousErrorWriterPtr = Interop.HostPolicy.corehost_set_error_writer(errorWriterPtr);
src\libraries\System.Private.CoreLib\src\System\Runtime\Loader\AssemblyLoadContext.cs (14)
48private readonly IntPtr _nativeAssemblyLoadContext; 54private event Func<Assembly, string, IntPtr>? _resolvingUnmanagedDll; 102var thisHandlePtr = GCHandle.ToIntPtr(thisHandle); 148var thisStrongHandlePtr = GCHandle.ToIntPtr(thisStrongHandle); 189public event Func<Assembly, string, IntPtr>? ResolvingUnmanagedDll 438protected IntPtr LoadUnmanagedDllFromPath(string unmanagedDllPath) 453protected virtual IntPtr LoadUnmanagedDll(string unmanagedDllName) 456return IntPtr.Zero; 607private static RuntimeAssembly? Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) 792internal IntPtr GetResolvedUnmanagedDll(Assembly assembly, string unmanagedDllName) 795foreach (Func<Assembly, string, IntPtr> handler in Delegate.EnumerateInvocationList(_resolvingUnmanagedDll)) 797IntPtr resolvedDll = handler(assembly, unmanagedDllName); 798if (resolvedDll != IntPtr.Zero) 804return IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Runtime\MemoryFailPoint.Unix.cs (1)
12return IntPtr.Size == 4 ? uint.MaxValue : ulong.MaxValue;
src\libraries\System.Private.CoreLib\src\System\RuntimeType.cs (1)
979value = default(IntPtr);
src\libraries\System.Private.CoreLib\src\System\SearchValues\ProbabilisticMapState.cs (8)
57Debug.Assert((IntPtr)valuesPtr != IntPtr.Zero); 77Debug.Assert((IntPtr)_slowContainsValuesPtr == IntPtr.Zero); 95Debug.Assert((IntPtr)_slowContainsValuesPtr != IntPtr.Zero); 107Debug.Assert((IntPtr)_slowContainsValuesPtr != IntPtr.Zero);
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\Helpers\RabinKarp.cs (1)
34private static int HashShiftPerElement => IntPtr.Size == 8 ? 2 : 1;
src\libraries\System.Private.CoreLib\src\System\SearchValues\Strings\StringSearchValues.cs (1)
385int maxLength = IntPtr.Size == 4 ? 1_000_000_000 : int.MaxValue;
src\libraries\System.Private.CoreLib\src\System\Security\SecureString.cs (12)
306internal unsafe IntPtr MarshalToBSTR() 315IntPtr ptr = IntPtr.Zero; 325IntPtr result = ptr; 326ptr = IntPtr.Zero; 332if (ptr != IntPtr.Zero) 344internal unsafe IntPtr MarshalToString(bool globalAlloc, bool unicode) 353IntPtr ptr = IntPtr.Zero; 388IntPtr result = ptr; 389ptr = IntPtr.Zero; 395if (ptr != IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\Span.cs (1)
284SpanHelpers.ClearWithReferences(ref Unsafe.As<T, IntPtr>(ref _reference), (uint)_length * (nuint)(sizeof(T) / sizeof(nuint)));
src\libraries\System.Private.CoreLib\src\System\SpanHelpers.cs (2)
13public static unsafe void ClearWithReferences(ref IntPtr ip, nuint pointerSizeLength) 15Debug.Assert(Unsafe.IsOpportunisticallyAligned(ref ip, (uint)sizeof(IntPtr)), "Should've been aligned on natural word boundary.");
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.CaseConversion.cs (2)
316if (IntPtr.Size >= 8 && (elementCount - i) >= (nuint)(8 / sizeof(TFrom))) 426if (IntPtr.Size < 8 || !Vector128.IsHardwareAccelerated)
src\libraries\System.Private.CoreLib\src\System\Text\Ascii.Utility.cs (3)
1356if (IntPtr.Size >= 8) 1399if (IntPtr.Size >= 8) 1459if (IntPtr.Size >= 8)
src\libraries\System.Private.CoreLib\src\System\Text\Latin1Utility.cs (4)
558if (IntPtr.Size >= 8) 590if (IntPtr.Size >= 8) 641if (IntPtr.Size >= 8) 701if (IntPtr.Size >= 8)
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf16Utility.Validation.cs (2)
237if (IntPtr.Size == 8) 305if (IntPtr.Size == 8)
src\libraries\System.Private.CoreLib\src\System\Text\Unicode\Utf8Utility.Validation.cs (1)
454if (IntPtr.Size >= 8 && BitConverter.IsLittleEndian)
src\libraries\System.Private.CoreLib\src\System\Threading\Interlocked.cs (14)
202public static IntPtr Exchange(ref IntPtr location1, IntPtr value) 206return (IntPtr)Interlocked.Exchange(ref Unsafe.As<IntPtr, long>(ref location1), (long)value); 445/// <param name="location1">The destination <see cref="IntPtr"/>, whose value is compared with the value of <paramref name="comparand"/> and possibly replaced by <paramref name="value"/>.</param> 446/// <param name="value">The <see cref="IntPtr"/> that replaces the destination value if the comparison results in equality.</param> 447/// <param name="comparand">The <see cref="IntPtr"/> that is compared to the value at <paramref name="location1"/>.</param> 452public static IntPtr CompareExchange(ref IntPtr location1, IntPtr value, IntPtr comparand) 456return (IntPtr)Interlocked.CompareExchange(ref Unsafe.As<IntPtr, long>(ref location1), (long)value, (long)comparand);
src\libraries\System.Private.CoreLib\src\System\Threading\LowLevelMonitor.Unix.cs (4)
10private IntPtr _nativeMonitor; 15if (_nativeMonitor == IntPtr.Zero) 23if (_nativeMonitor == IntPtr.Zero) 29_nativeMonitor = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\Threading\NativeOverlapped.cs (3)
11public IntPtr InternalLow; 12public IntPtr InternalHigh; 15public IntPtr EventHandle;
src\libraries\System.Private.CoreLib\src\System\Threading\Overlapped.cs (3)
15private IntPtr _eventHandle; 23public Overlapped(int offsetLo, int offsetHi, IntPtr hEvent, IAsyncResult? ar) 62public IntPtr EventHandleIntPtr
src\libraries\System.Private.CoreLib\src\System\Threading\RegisteredWaitHandle.Portable.cs (6)
26private IntPtr UserUnregisterWaitHandleValue { get; set; } 28private static IntPtr InvalidHandleValue => new IntPtr(-1); 113UserUnregisterWaitHandleValue = UserUnregisterWaitHandle?.DangerousGetHandle() ?? IntPtr.Zero; 143UserUnregisterWaitHandleValue = IntPtr.Zero; 170IntPtr handleValue = UserUnregisterWaitHandleValue; 173if (handleValue != IntPtr.Zero && handleValue != InvalidHandleValue)
src\libraries\System.Private.CoreLib\src\System\Threading\SynchronizationContext.cs (2)
42public virtual int Wait(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout) 48protected static int WaitHelper(IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)
src\libraries\System.Private.CoreLib\src\System\Threading\Tasks\TplEventSource.cs (22)
203eventPayload[0].DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)); 206eventPayload[1].DataPointer = ((IntPtr)(&OriginatingTaskID)); 209eventPayload[2].DataPointer = ((IntPtr)(&TaskID)); 212eventPayload[3].DataPointer = ((IntPtr)(&CreatingTaskID)); 215eventPayload[4].DataPointer = ((IntPtr)(&TaskCreationOptions)); 218eventPayload[5].DataPointer = ((IntPtr)(&appDomain)); 275eventPayload[0].DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)); 278eventPayload[1].DataPointer = ((IntPtr)(&OriginatingTaskID)); 281eventPayload[2].DataPointer = ((IntPtr)(&TaskID)); 284eventPayload[3].DataPointer = ((IntPtr)(&isExceptionalInt)); 319eventPayload[0].DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)); 322eventPayload[1].DataPointer = ((IntPtr)(&OriginatingTaskID)); 325eventPayload[2].DataPointer = ((IntPtr)(&TaskID)); 328eventPayload[3].DataPointer = ((IntPtr)(&Behavior)); 331eventPayload[4].DataPointer = ((IntPtr)(&ContinueWithTaskID)); 411eventPayload[0].DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)); 414eventPayload[1].DataPointer = ((IntPtr)(&OriginatingTaskID)); 417eventPayload[2].DataPointer = ((IntPtr)(&ContinueWithTaskId)); 444eventPayload[0].DataPointer = ((IntPtr)(&TaskID)); 448eventPayload[1].DataPointer = ((IntPtr)operationNamePtr); 452eventPayload[2].DataPointer = ((IntPtr)(&RelatedContext)); 496eventPayload[0].DataPointer = ((IntPtr)(&Work));
src\libraries\System.Private.CoreLib\src\System\Threading\Thread.cs (4)
579public static IntPtr VolatileRead(ref IntPtr address) => Volatile.Read(ref address); 624public static void VolatileWrite(ref IntPtr address, IntPtr value) => Volatile.Write(ref address, value);
src\libraries\System.Private.CoreLib\src\System\Threading\ThreadPool.Unix.cs (1)
99public static bool BindHandle(IntPtr osHandle) =>
src\libraries\System.Private.CoreLib\src\System\Threading\Volatile.cs (7)
110private struct VolatileIntPtr { public volatile IntPtr Value; } 114public static IntPtr Read(ref readonly IntPtr location) => 115Unsafe.As<IntPtr, VolatileIntPtr>(ref Unsafe.AsRef(in location)).Value; 119public static void Write(ref IntPtr location, IntPtr value) => 120Unsafe.As<IntPtr, VolatileIntPtr>(ref location).Value = value;
src\libraries\System.Private.CoreLib\src\System\Threading\WaitHandle.cs (12)
15protected static readonly IntPtr InvalidHandle = new IntPtr(-1); 46public virtual IntPtr Handle 240Span<IntPtr> unsafeWaitHandles) 319IntPtr[] unsafeWaitHandles = new IntPtr[waitHandles.Length]; 325Span<IntPtr> unsafeWaitHandles = stackalloc IntPtr[waitHandles.Length]; 377IntPtr[] unsafeWaitHandles = new IntPtr[safeWaitHandles.Length]; 387Span<IntPtr> unsafeWaitHandles = stackalloc IntPtr[safeWaitHandles.Length]; 399internal static int WaitMultipleIgnoringSyncContext(ReadOnlySpan<IntPtr> handles, bool waitAll, int millisecondsTimeout)
src\libraries\System.Private.CoreLib\src\System\Threading\Win32ThreadPoolNativeOverlapped.cs (7)
20private static IntPtr s_freeList; // Lock-free linked stack of free ThreadPoolNativeOverlapped instances. 23private IntPtr _nextFree; // if this instance if free, points to the next free instance. 48IntPtr freePtr; 53while ((freePtr = Volatile.Read(ref s_freeList)) != IntPtr.Zero) 60overlapped->_nextFree = IntPtr.Zero; 166IntPtr freePtr = Volatile.Read(ref s_freeList); 169if (Interlocked.CompareExchange(ref s_freeList, (IntPtr)overlapped, freePtr) == freePtr)
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.FullGlobalizationData.cs (2)
66IntPtr regionPtr = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\TimeZoneInfo.Unix.NonAndroid.cs (3)
291IntPtr dirHandle = Interop.Sys.OpenDir(currentPath); 292if (dirHandle == IntPtr.Zero) 352if (dirHandle != IntPtr.Zero)
src\libraries\System.Private.CoreLib\src\System\TypedReference.cs (2)
67if (_type == IntPtr.Zero) 78internal bool IsNull => Unsafe.IsNullRef(ref _value) && _type == IntPtr.Zero;
src\System\ArgIterator.cs (3)
13private IntPtr _argCookie; // Cookie from the EE. 18internal IntPtr _ptr; 23private IntPtr _argPtr; // Pointer to remaining args.
src\System\Array.CoreCLR.cs (8)
380Debug.Assert(totalByteLength % (nuint)sizeof(IntPtr) == 0); 381SpanHelpers.ClearWithReferences(ref Unsafe.As<byte, IntPtr>(ref pStart), totalByteLength / (nuint)sizeof(IntPtr)); 417SpanHelpers.ClearWithReferences(ref Unsafe.As<byte, IntPtr>(ref ptr), byteLength / (uint)sizeof(IntPtr)); 538SpanHelpers.ClearWithReferences(ref Unsafe.As<byte, nint>(ref offsetDataRef), elementSize / (nuint)sizeof(IntPtr)); 677return (IntPtr)thisMT->ElementType == (IntPtr)RuntimeHelpers.GetMethodTable(value);
src\System\ComAwareWeakReference.CoreCLR.cs (5)
13private static partial void ComWeakRefToObject(IntPtr pComWeakRef, long wrapperId, ObjectHandleOnStack retRcw); 15internal static object? ComWeakRefToObject(IntPtr pComWeakRef, long wrapperId) 33int header = *(int*)(pRawData - sizeof(IntPtr) - sizeof(int)); 43private static partial IntPtr ObjectToComWeakRef(ObjectHandleOnStack retRcw, out long wrapperId); 53return IntPtr.Zero;
src\System\Delegate.CoreCLR.cs (21)
26internal IntPtr _methodPtr; 32internal IntPtr _methodPtrAux; 105if (_methodPtrAux == IntPtr.Zero) 107if (d._methodPtrAux != IntPtr.Zero) 118if (d._methodPtrAux == IntPtr.Zero) 153if (_methodPtrAux == IntPtr.Zero) 175if (_methodPtrAux == IntPtr.Zero) 469private void DelegateConstruct(object target, IntPtr method) 473if (method == IntPtr.Zero) 483private static partial void Construct(ObjectHandleOnStack _this, ObjectHandleOnStack target, IntPtr method); 491internal unsafe IntPtr GetMulticastInvoke() 502return (IntPtr)ptr; 508internal unsafe IntPtr GetInvokeMethod() 513return (IntPtr)ptr; 536internal static IntPtr AdjustTarget(object target, IntPtr methodPtr) 542private static partial IntPtr AdjustTarget(ObjectHandleOnStack target, IntPtr methodPtr); 544internal void InitializeVirtualCallStub(IntPtr methodPtr) 551private static partial void InitializeVirtualCallStub(ObjectHandleOnStack d, IntPtr methodPtr); 555return (_methodPtrAux == IntPtr.Zero) ? _target : null;
src\System\Diagnostics\StackFrame.CoreCLR.cs (3)
60private static partial RuntimeMethodHandleInternal GetMethodDescFromNativeIP(IntPtr ip); 69internal static MethodBase? GetMethodFromNativeIP(IntPtr ip) 73if (method.Value == IntPtr.Zero)
src\System\Diagnostics\StackFrameHelper.cs (9)
24private IntPtr[]? rgMethodHandle; 27private IntPtr[]? rgLoadedPeAddress; 30private IntPtr[]? rgInMemoryPdbAddress; 41private delegate void GetSourceLineInfoDelegate(Assembly? assembly, string assemblyPath, IntPtr loadedPeAddress, 42int loadedPeSize, bool isFileLayout, IntPtr inMemoryPdbAddress, int inMemoryPdbSize, int methodToken, int ilOffset, 113typeof(Assembly), typeof(string), typeof(IntPtr), typeof(int), typeof(bool), typeof(IntPtr), 162IntPtr mh = rgMethodHandle![i]; 164if (mh == IntPtr.Zero)
src\System\Exception.CoreCLR.cs (1)
165private readonly IntPtr _xptrs; // Internal EE stuff
src\System\GC.CoreCLR.cs (7)
103private static partial void AllocateNewArray(IntPtr typeHandlePtr, int length, GC_ALLOC_FLAGS flags, ObjectHandleOnStack ret); 135if (IntPtr.Size == 4) 146if (IntPtr.Size == 4) 407private static partial IntPtr _RegisterFrozenSegment(IntPtr sectionAddress, nint sectionSize); 410private static partial void _UnregisterFrozenSegment(IntPtr segmentHandle); 883string nameAsString = Marshal.PtrToStringUTF8((IntPtr)name)!;
src\System\MulticastDelegate.CoreCLR.cs (15)
551private void CtorClosed(object target, IntPtr methodPtr) 561private void CtorClosedStatic(object target, IntPtr methodPtr) 569private void CtorRTClosed(object target, IntPtr methodPtr) 579private void CtorOpened(object target, IntPtr methodPtr, IntPtr shuffleThunk) 588private void CtorVirtualDispatch(object target, IntPtr methodPtr, IntPtr shuffleThunk) 597private void CtorCollectibleClosedStatic(object target, IntPtr methodPtr, IntPtr gchandle) 606private void CtorCollectibleOpened(object target, IntPtr methodPtr, IntPtr shuffleThunk, IntPtr gchandle) 616private void CtorCollectibleVirtualDispatch(object target, IntPtr methodPtr, IntPtr shuffleThunk, IntPtr gchandle)
src\System\Reflection\Associates.cs (2)
58stackalloc IntPtr[genericArguments.Length] : 59new IntPtr[genericArguments.Length];
src\System\Reflection\ConstructorInvoker.CoreCLR.cs (1)
16private unsafe object? InterpretedInvoke(object? obj, IntPtr* args)
src\System\Reflection\Emit\CustomAttributeBuilder.cs (2)
246return t != typeof(IntPtr) && t != typeof(UIntPtr); 273if (passedType == typeof(IntPtr) || passedType == typeof(UIntPtr))
src\System\Reflection\Emit\DynamicILGenerator.cs (3)
772internal override void ResolveToken(int token, out IntPtr typeHandle, out IntPtr methodHandle, out IntPtr fieldHandle)
src\System\Reflection\Emit\SignatureHelper.cs (1)
547IntPtr handle = type.TypeHandle.Value;
src\System\Reflection\LoaderAllocator.cs (3)
26internal IntPtr m_nativeLoaderAllocator; 30private static partial bool Destroy(IntPtr nativeLoaderAllocator); 34if (m_nativeLoaderAllocator == IntPtr.Zero)
src\System\Reflection\MdImport.cs (27)
111internal readonly IntPtr m_constArray; 113public IntPtr Signature => m_constArray; 207private readonly IntPtr m_metadataImport2; 232IntPtr pNativeType, 305private static extern IntPtr GetMetadataImport(RuntimeModule module); 318private static unsafe partial void Enum(IntPtr scope, int type, int parent, ref int length, int* shortResult, ObjectHandleOnStack longResult); 372IntPtr scope, 395private static extern unsafe int GetUserString(IntPtr scope, int mdToken, out char* stringMetadataEncoding, out int length); 407private static extern unsafe int GetName(IntPtr scope, int mdToken, out byte* name); 416private static extern unsafe int GetNamespace(IntPtr scope, int mdToken, out byte* namesp); 425private static extern unsafe int GetEventProps(IntPtr scope, int mdToken, out void* name, out int eventAttributes); 434private static extern int GetFieldDefProps(IntPtr scope, int mdToken, out int fieldAttributes); 443private static extern unsafe int GetPropertyProps(IntPtr scope, int mdToken, out void* name, out int propertyAttributes, out ConstArray signature); 452private static extern int GetParentToken(IntPtr scope, int mdToken, out int tkParent); 461private static extern int GetParamDefProps(IntPtr scope, int parameterToken, out int sequence, out int attributes); 470private static extern int GetGenericParamProps(IntPtr scope, int genericParameter, out int flags); 481private static extern int GetScopeProps(IntPtr scope, out Guid mvid); 497private static extern int GetSigOfMethodDef(IntPtr scope, int methodToken, ref ConstArray signature); 507private static extern int GetSignatureFromToken(IntPtr scope, int methodToken, ref ConstArray signature); 517private static extern int GetMemberRefProps(IntPtr scope, int memberTokenRef, out ConstArray signature); 526private static extern int GetCustomAttributeProps(IntPtr scope, 540private static extern int GetClassLayout(IntPtr scope, int typeTokenDef, out int packSize, out int classSize); 551private static extern int GetFieldOffset(IntPtr scope, int typeTokenDef, int fieldTokenDef, out int offset, out bool found); 567private static extern int GetSigOfFieldDef(IntPtr scope, int fieldToken, ref ConstArray fieldMarshal); 577private static extern int GetFieldMarshal(IntPtr scope, int fieldToken, ref ConstArray fieldMarshal); 587private static extern unsafe int GetPInvokeMap(IntPtr scope, 607private static extern bool IsValidToken(IntPtr scope, int token);
src\System\Reflection\MethodBase.CoreCLR.cs (1)
54private IntPtr GetMethodDesc() { return MethodHandle.Value; }
src\System\Reflection\MethodBaseInvoker.CoreCLR.cs (2)
32private unsafe object? InterpretedInvoke_Constructor(object? obj, IntPtr* args) => 35private unsafe object? InterpretedInvoke_Method(object? obj, IntPtr* args) =>
src\System\Reflection\MethodInvoker.CoreCLR.cs (2)
33private unsafe object? InterpretedInvoke_Method(object? obj, IntPtr* args) => 36private unsafe object? InterpretedInvoke_Constructor(object? obj, IntPtr* args) =>
src\System\Reflection\RtFieldInfo.cs (2)
16private readonly IntPtr m_fieldHandle; 117internal IntPtr GetFieldDesc()
src\System\Reflection\RuntimeAssembly.cs (3)
32private IntPtr m_assembly; // slack for ptr datum on unmanaged side 37internal IntPtr GetUnderlyingNativeHandle() { return m_assembly; } 584private static extern bool GetIsDynamic(IntPtr assembly);
src\System\Reflection\RuntimeConstructorInfo.CoreCLR.cs (1)
27private readonly IntPtr m_handle;
src\System\Reflection\RuntimeMethodInfo.CoreCLR.cs (1)
19private readonly IntPtr m_handle;
src\System\Reflection\RuntimeModule.cs (2)
20private readonly IntPtr m_pData; 521internal IntPtr GetUnderlyingNativeHandle()
src\System\Runtime\CompilerServices\AsyncHelpers.CoreCLR.cs (3)
126LoaderAllocator loaderAllocator = RuntimeMethodHandle.GetLoaderAllocator(new RuntimeMethodHandleInternal((IntPtr)method)); 145IntPtr loaderAllocatorHandle = methodTable->GetLoaderAllocatorHandle(); 147if (loaderAllocatorHandle != IntPtr.Zero)
src\System\Runtime\CompilerServices\CastHelpers.cs (2)
631SpanHelpers.ClearWithReferences(ref Unsafe.As<byte, IntPtr>(ref destPtr), typeMT->GetNumInstanceFieldBytesIfContainsGCPointers() / (nuint)sizeof(IntPtr));
src\System\Runtime\CompilerServices\GenericsHelpers.cs (23)
15private static partial IntPtr GenericHandleWorker(IntPtr pMD, IntPtr pMT, IntPtr signature, uint dictionaryIndexAndSlot, IntPtr pModule); 19public IntPtr signature; 20public IntPtr module; 25public static IntPtr Method(IntPtr methodHnd, IntPtr signature) 27return GenericHandleWorker(methodHnd, IntPtr.Zero, signature, 0xFFFFFFFF, IntPtr.Zero); 31public static IntPtr MethodWithSlotAndModule(IntPtr methodHnd, GenericHandleArgs * pArgs) 33return GenericHandleWorker(methodHnd, IntPtr.Zero, pArgs->signature, pArgs->dictionaryIndexAndSlot, pArgs->module); 37public static IntPtr Class(IntPtr classHnd, IntPtr signature) 39return GenericHandleWorker(IntPtr.Zero, classHnd, signature, 0xFFFFFFFF, IntPtr.Zero); 43public static IntPtr ClassWithSlotAndModule(IntPtr classHnd, GenericHandleArgs * pArgs) 45return GenericHandleWorker(IntPtr.Zero, classHnd, pArgs->signature, pArgs->dictionaryIndexAndSlot, pArgs->module);
src\System\Runtime\CompilerServices\RuntimeHelpers.CoreCLR.cs (32)
200private static unsafe partial void PrepareMethod(RuntimeMethodHandleInternal method, IntPtr* pInstantiation, int cInstantiation); 212ReadOnlySpan<IntPtr> instantiationHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(instantiation, stackScratch: stackalloc IntPtr[8]); 213fixed (IntPtr* pInstantiation = instantiationHandles) 398nuint rawSize = pMT->BaseSize - (nuint)(2 * sizeof(IntPtr)); 476public static IntPtr AllocateTypeAssociatedMemory(Type type, int size) 487private static partial IntPtr AllocateTypeAssociatedMemory(QCallTypeHandle type, uint size); 490private static extern IntPtr AllocTailCallArgBufferWorker(int size, IntPtr gcDesc); 492private static IntPtr AllocTailCallArgBuffer(int size, IntPtr gcDesc) 494IntPtr buffer = AllocTailCallArgBufferWorker(size, gcDesc); 495if (buffer == IntPtr.Zero) 503private static extern unsafe TailCallTls* GetTailCallInfo(IntPtr retAddrSlot, IntPtr* retAddr); 507IntPtr callersRetAddrSlot, 508delegate*<IntPtr, ref byte, PortableTailCallFrame*, void> callTarget, 511IntPtr callersRetAddr; 540if (tls->ArgBuffer != IntPtr.Zero && *(int*)tls->ArgBuffer == 1 /* TAILCALLARGBUFFER_INSTARG_ONLY */) 625public IntPtr CodeData; 628private MethodDescChunk* GetMethodDescChunk() => (MethodDescChunk*)(((byte*)Unsafe.AsPointer<MethodDesc>(ref this)) - (sizeof(MethodDescChunk) + ChunkIndex * sizeof(IntPtr))); 829return BaseSize > (uint)(3 * sizeof(IntPtr)); 841return (int)((BaseSize - (uint)(3 * sizeof(IntPtr))) / (uint)(2 * sizeof(int))); 930Debug.Assert((BaseSize - (nuint)(2 * sizeof(IntPtr)) == GetNumInstanceFieldBytes())); 931return BaseSize - (uint)(2 * sizeof(IntPtr)); 935public extern IntPtr GetLoaderAllocatorHandle(); 958internal IntPtr _pGCStatics; // The ISCLASSNOTINITED bit is set when the class is NOT initialized 959internal IntPtr _pNonGCStatics; // The ISCLASSNOTINITED bit is set when the class is NOT initialized 980internal IntPtr _pFieldDescs; 1200public IntPtr TailCallAwareReturnAddress; 1201public delegate*<IntPtr, ref byte, PortableTailCallFrame*, void> NextCall; 1208public IntPtr ArgBuffer;
src\System\Runtime\CompilerServices\StaticsHelpers.cs (7)
20private static ref byte VolatileReadAsByref(ref IntPtr address) => ref VolatileReadAsByref(ref address); 100private IntPtr _nonCollectibleTlsArrayData_private; // This is object[], but using object[] directly causes the structure to be laid out via auto-layout, which is not what we want. 101internal IntPtr* _collectibleTlsArrayData; // Points at the Thread local array data. 108return Unsafe.As<IntPtr, object[]>(ref _nonCollectibleTlsArrayData_private); 199IntPtr* pCollectibleTlsArrayData = t_ThreadStatics->_collectibleTlsArrayData; 202IntPtr objHandle = *pCollectibleTlsArrayData; 203if (objHandle != IntPtr.Zero)
src\System\Runtime\CompilerServices\VirtualDispatchHelpers.cs (23)
19public IntPtr _classHandle; 20public IntPtr _methodHandle; 23public VirtualResolutionData(MethodTable* objectMethodTable, IntPtr classHandle, IntPtr methodHandle) 46public IntPtr classHnd; 47public IntPtr methodHnd; 59private static GenericCache<VirtualResolutionData, IntPtr> s_virtualFunctionPointerCache = new GenericCache<VirtualResolutionData, IntPtr>(InitialCacheSize, MaximumCacheSize); 62private static unsafe partial IntPtr ResolveVirtualFunctionPointer(ObjectHandleOnStack obj, IntPtr classHandle, IntPtr methodHandle); 66private static IntPtr VirtualFunctionPointerSlow(object obj, IntPtr classHandle, IntPtr methodHandle) 68IntPtr result = ResolveVirtualFunctionPointer(ObjectHandleOnStack.Create(ref obj), classHandle, methodHandle); 75private static IntPtr VirtualFunctionPointer(object obj, IntPtr classHandle, IntPtr methodHandle) 77if (s_virtualFunctionPointerCache.TryGet(new VirtualResolutionData(RuntimeHelpers.GetMethodTable(obj), classHandle, methodHandle), out IntPtr result)) 85private static IntPtr VirtualFunctionPointer_Dynamic(object obj, ref VirtualFunctionPointerArgs virtualFunctionPointerArgs) 87IntPtr classHandle = virtualFunctionPointerArgs.classHnd; 88IntPtr methodHandle = virtualFunctionPointerArgs.methodHnd; 90if (s_virtualFunctionPointerCache.TryGet(new VirtualResolutionData(RuntimeHelpers.GetMethodTable(obj), classHandle, methodHandle), out IntPtr result))
src\System\Runtime\DependentHandle.cs (19)
57private IntPtr _handle; 66IntPtr handle = InternalAlloc(target, dependent); 91IntPtr handle = _handle; 102IntPtr handle = _handle; 128IntPtr handle = _handle; 139IntPtr handle = _handle; 164IntPtr handle = _handle; 226IntPtr handle = _handle; 240private static extern IntPtr InternalAlloc(object? target, object? dependent); 243private static IntPtr InternalAllocWithGCTransition(object? target, object? dependent) 247private static partial IntPtr _InternalAllocWithGCTransition(ObjectHandleOnStack target, ObjectHandleOnStack dependent); 251private static extern object? InternalGetTarget(IntPtr dependentHandle); 260private static extern object? InternalGetDependent(IntPtr dependentHandle); 263private static extern object? InternalGetTargetAndDependent(IntPtr dependentHandle, out object? dependent); 266private static extern void InternalSetDependent(IntPtr dependentHandle, object? dependent); 269private static extern void InternalSetTargetToNull(IntPtr dependentHandle); 272private static extern bool InternalFree(IntPtr dependentHandle); 275private static void InternalFreeWithGCTransition(IntPtr dependentHandle) 279private static partial void _InternalFreeWithGCTransition(IntPtr dependentHandle);
src\System\Runtime\ExceptionServices\InternalCalls.cs (2)
27internal static unsafe partial IntPtr RhpCallCatchFunclet( 39internal static unsafe partial void RhpAppendExceptionStackFrame(ObjectHandleOnStack exceptionObj, IntPtr ip, UIntPtr sp, int flags, EH.ExInfo* exInfo);
src\System\Runtime\InteropServices\ComWrappers.cs (33)
37/// This can be done through an API like <see cref="Marshal.Release(IntPtr)"/>. 42public static bool TryGetComInstance(object obj, out IntPtr unknown) 46unknown = IntPtr.Zero; 55private static partial bool TryGetComInstanceInternal(ObjectHandleOnStack wrapperMaybe, out IntPtr externalComObject); 64public static bool TryGetObject(IntPtr unknown, [NotNullWhen(true)] out object? obj) 67if (unknown == IntPtr.Zero) 77private static partial bool TryGetObjectInternal(IntPtr wrapperMaybe, ObjectHandleOnStack instance); 85/// Given a <see cref="System.IntPtr"/> from a generated Vtable, convert to the target type. 102public IntPtr GcHandle; 130public IntPtr GetOrCreateComInterfaceForObject(object instance, CreateComInterfaceFlags flags) 132IntPtr ptr; 150private static bool TryGetOrCreateComInterfaceForObjectInternal(ComWrappers impl, object instance, CreateComInterfaceFlags flags, out IntPtr retValue) 159private static partial bool TryGetOrCreateComInterfaceForObjectInternal(ObjectHandleOnStack comWrappersImpl, long wrapperId, ObjectHandleOnStack instance, CreateComInterfaceFlags flags, out IntPtr retValue); 198public object GetOrCreateObjectForComInstance(IntPtr externalComObject, CreateObjectFlags flags) 201if (!TryGetOrCreateObjectForComInstanceInternal(this, externalComObject, IntPtr.Zero, flags, null, out obj)) 208internal static object? CallCreateObject(ComWrappersScenario scenario, ComWrappers? comWrappersImpl, IntPtr externalComObject, CreateObjectFlags flags) 240public object GetOrRegisterObjectForComInstance(IntPtr externalComObject, CreateObjectFlags flags, object wrapper) 242return GetOrRegisterObjectForComInstance(externalComObject, flags, wrapper, IntPtr.Zero); 261public object GetOrRegisterObjectForComInstance(IntPtr externalComObject, CreateObjectFlags flags, object wrapper, IntPtr inner) 287IntPtr externalComObject, 288IntPtr innerMaybe, 296if (innerMaybe != IntPtr.Zero && !flags.HasFlag(CreateObjectFlags.Aggregation)) 306private static partial bool TryGetOrCreateObjectForComInstanceInternal(ObjectHandleOnStack comWrappersImpl, long wrapperId, IntPtr externalComObject, IntPtr innerMaybe, CreateObjectFlags flags, ObjectHandleOnStack wrapper, ObjectHandleOnStack retValue); 379public static void GetIUnknownImpl(out IntPtr fpQueryInterface, out IntPtr fpAddRef, out IntPtr fpRelease) 383private static partial void GetIUnknownImplInternal(out IntPtr fpQueryInterface, out IntPtr fpAddRef, out IntPtr fpRelease); 385internal static int CallICustomQueryInterface(object customQueryInterfaceMaybe, ref Guid iid, out IntPtr ppObject) 392ppObject = IntPtr.Zero;
src\System\Runtime\InteropServices\GCHandle.CoreCLR.cs (12)
10internal static IntPtr InternalAlloc(object? value, GCHandleType type) 12IntPtr handle = _InternalAlloc(value, type); 19private static extern IntPtr _InternalAlloc(object? value, GCHandleType type); 22private static IntPtr InternalAllocWithGCTransition(object? value, GCHandleType type) 26private static partial IntPtr _InternalAllocWithGCTransition(ObjectHandleOnStack value, GCHandleType type); 28internal static void InternalFree(IntPtr handle) 35private static extern bool _InternalFree(IntPtr handle); 38private static void InternalFreeWithGCTransition(IntPtr dependentHandle) 42private static partial void _InternalFreeWithGCTransition(IntPtr dependentHandle); 47internal static extern object? InternalGet(IntPtr handle); 53internal static extern void InternalSet(IntPtr handle, object? value); 56internal static extern object? InternalCompareExchange(IntPtr handle, object? value, object? oldValue);
src\System\Runtime\InteropServices\Marshal.CoreCLR.cs (21)
41public static IntPtr OffsetOf(Type t, string fieldName) 59private static partial nint OffsetOf(IntPtr pFD); 100private static unsafe T ReadValueSlow<T>(object ptr, int ofs, Func<IntPtr, int, T> readValueHelper) 116IntPtr pNativeHome = IntPtr.Zero; 166private static unsafe void WriteValueSlow<T>(object ptr, int ofs, T val, Action<IntPtr, int, T> writeValueHelper) 183IntPtr pNativeHome = IntPtr.Zero; 230public static extern /* struct _EXCEPTION_POINTERS* */ IntPtr GetExceptionPointers(); 244public static unsafe void StructureToPtr(object structure, IntPtr ptr, bool fDeleteOld) 256if (!TryGetStructMarshalStub((IntPtr)pMT, &structMarshalStub, &size)) 277private static unsafe void PtrToStructureHelper(IntPtr ptr, object structure, bool allowValueClasses) 286if (!TryGetStructMarshalStub((IntPtr)pMT, &structMarshalStub, &size)) 305public static unsafe void DestroyStructure(IntPtr ptr, Type structuretype) 331internal static unsafe partial bool TryGetStructMarshalStub(IntPtr th, delegate*<ref byte, byte*, int, ref CleanupWorkListElement?, void>* structMarshalStub, nuint* size); 368internal static Exception GetExceptionForHRInternal(int errorCode, IntPtr errorInfo) 376private static partial void GetExceptionForHRInternal(int errorCode, IntPtr errorInfo, ObjectHandleOnStack exception); 975internal static Delegate GetDelegateForFunctionPointerInternal(IntPtr ptr, RuntimeType t) 983private static partial void GetDelegateForFunctionPointerInternal(IntPtr ptr, QCallTypeHandle t, ObjectHandleOnStack retDelegate); 985internal static IntPtr GetFunctionPointerForDelegateInternal(Delegate d) 991private static partial IntPtr GetFunctionPointerForDelegateInternal(ObjectHandleOnStack d);
src\System\Runtime\InteropServices\MemoryMarshal.CoreCLR.cs (1)
44return ref Unsafe.AddByteOffset(ref Unsafe.As<RawData>(array).Data, (nuint)RuntimeHelpers.GetMethodTable(array)->BaseSize - (nuint)(2 * sizeof(IntPtr)));
src\System\Runtime\InteropServices\NativeLibrary.CoreCLR.cs (6)
11internal static IntPtr LoadLibraryByName(string libraryName, Assembly assembly, DllImportSearchPath? searchPath, bool throwOnError) 24internal static partial IntPtr LoadFromPath(string libraryName, [MarshalAs(UnmanagedType.Bool)] bool throwOnError); 27internal static partial IntPtr LoadByName(string libraryName, QCallAssembly callingAssembly, 32internal static partial void FreeLib(IntPtr handle); 35internal static partial IntPtr GetSymbol(IntPtr handle, string symbolName, [MarshalAs(UnmanagedType.Bool)] bool throwOnError);
src\System\Runtime\Loader\AssemblyLoadContext.CoreCLR.cs (18)
15private static partial IntPtr InitializeAssemblyLoadContext(IntPtr ptrAssemblyLoadContext, [MarshalAs(UnmanagedType.Bool)] bool fRepresentsTPALoadContext, [MarshalAs(UnmanagedType.Bool)] bool isCollectible); 18private static partial void PrepareForAssemblyLoadContextRelease(IntPtr ptrNativeAssemblyBinder, IntPtr ptrAssemblyLoadContextStrong); 22private static partial void LoadFromStream(IntPtr ptrNativeAssemblyBinder, IntPtr ptrAssemblyArray, int iAssemblyArrayLen, IntPtr ptrSymbols, int iSymbolArrayLen, ObjectHandleOnStack retAssembly); 28internal static partial void InternalStartProfile(string? profile, IntPtr ptrNativeAssemblyBinder); 32private static partial void LoadFromPath(IntPtr ptrNativeAssemblyBinder, string? ilPath, string? niPath, ObjectHandleOnStack retAssembly); 113private static RuntimeAssembly? ResolveSatelliteAssembly(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) 123private static IntPtr ResolveUnmanagedDll(string unmanagedDllName, IntPtr gchManagedAssemblyLoadContext) 131private static IntPtr ResolveUnmanagedDllUsingEvent(string unmanagedDllName, Assembly assembly, IntPtr gchManagedAssemblyLoadContext) 139private static RuntimeAssembly? ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName) 147private static partial IntPtr GetLoadContextForAssembly(QCallAssembly assembly); 161IntPtr ptrAssemblyLoadContext = GetLoadContextForAssembly(new QCallAssembly(ref runtimeAssembly)); 162if (ptrAssemblyLoadContext == IntPtr.Zero)
src\System\RuntimeArgumentHandle.cs (2)
16private IntPtr m_ptr; 18internal IntPtr Value => m_ptr;
src\System\RuntimeHandles.cs (99)
33public static RuntimeTypeHandle FromIntPtr(IntPtr value) => 38IntPtr handle, 42private static RuntimeType GetRuntimeTypeFromHandleSlow(IntPtr handle) 50internal static unsafe RuntimeType GetRuntimeTypeFromHandle(IntPtr handle) 59internal static RuntimeType? GetRuntimeTypeFromHandleMaybeNull(IntPtr handle) 61if (handle == IntPtr.Zero) 72return pMT->AuxiliaryData->ExposedClassObject ?? GetRuntimeTypeFromHandleSlow((IntPtr)pMT); 79/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="RuntimeTypeHandle"/> object.</returns> 81public static IntPtr ToIntPtr(RuntimeTypeHandle value) => value.Value; 103public IntPtr Value => m_type?.m_handle ?? 0; 183internal static ReadOnlySpan<IntPtr> CopyRuntimeTypeHandles(RuntimeTypeHandle[]? inHandles, Span<IntPtr> stackScratch) 190Span<IntPtr> outHandles = inHandles.Length <= stackScratch.Length ? 192new IntPtr[inHandles.Length]; 206internal static IntPtr[]? CopyRuntimeTypeHandles(Type[]? inHandles, out int length) 214IntPtr[] outHandles = new IntPtr[inHandles.Length]; 235IntPtr typeHandle = genericParameter.TypeHandle.Value; 259IntPtr* pTypeHandles = stackalloc IntPtr[] 280IntPtr* pTypeHandles, 436private static extern IntPtr GetElementTypeHandle(IntPtr handle); 440IntPtr handle = GetElementTypeHandle(type.GetUnderlyingNativeHandle()); 441if (handle == IntPtr.Zero) 461private static unsafe partial IntPtr GetMethodAt(MethodTable* pMT, int slot); 511else if (_handle.Value != IntPtr.Zero) 515return !(_handle.Value == IntPtr.Zero); 539private static partial Interop.BOOL GetFields(MethodTable* pMT, Span<IntPtr> data, ref int usedCount); 541internal static bool GetFields(RuntimeType type, Span<IntPtr> buffer, out int count) 592private static partial IntPtr GetGCHandle(QCallTypeHandle handle, GCHandleType type); 594internal IntPtr GetGCHandle(GCHandleType type) 601private static partial IntPtr FreeGCHandle(QCallTypeHandle typeHandle, IntPtr objHandle); 603internal IntPtr FreeGCHandle(IntPtr objHandle) 692private static partial IntPtr GetDeclaringTypeHandleForGenericVariable(IntPtr typeHandle); 695private static partial IntPtr GetDeclaringTypeHandle(IntPtr typeHandle); 699IntPtr retTypeHandle = IntPtr.Zero; 714if (retTypeHandle == IntPtr.Zero) 756private static partial void Instantiate(QCallTypeHandle handle, IntPtr* pInst, int numGenericArgs, ObjectHandleOnStack type); 760IntPtr ptr = inst.TypeHandle.Value; 771IntPtr[]? instHandles = CopyRuntimeTypeHandles(inst, out int instCount); 773fixed (IntPtr* pInst = instHandles) 907return m_handle == IntPtr.Zero; 910internal IntPtr Value => m_handle; 912internal RuntimeMethodHandleInternal(IntPtr value) 917private IntPtr m_handle; 950internal static object FromPtr(IntPtr pMD) 996public IntPtr Value => m_value != null ? m_value.Value.Value : IntPtr.Zero; 1018public static RuntimeMethodHandle FromIntPtr(IntPtr value) 1029/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="RuntimeMethodHandle"/> object.</returns> 1030public static IntPtr ToIntPtr(RuntimeMethodHandle value) => value.Value; 1047internal static partial IntPtr GetFunctionPointer(RuntimeMethodHandleInternal handle); 1049public IntPtr GetFunctionPointer() 1051IntPtr ptr = GetFunctionPointer(EnsureNonNullMethodInfo(m_value!).Value); 1370return m_handle == IntPtr.Zero; 1373internal IntPtr Value => m_handle; 1375internal RuntimeFieldHandleInternal(IntPtr value) 1380internal IntPtr m_handle; 1418internal static object FromPtr(IntPtr pFD) 1444public IntPtr Value => m_ptr != null ? m_ptr.Value.Value : IntPtr.Zero; 1476public static RuntimeFieldHandle FromIntPtr(IntPtr value) 1487/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="RuntimeFieldHandle"/> object.</returns> 1488public static IntPtr ToIntPtr(RuntimeFieldHandle value) => value.Value; 1546internal static extern IntPtr GetStaticFieldAddress(RtFieldInfo field); 1569private static unsafe partial void GetFieldDataReference(IntPtr fieldDesc, ObjectHandleOnStack target, ByteRefOnStack fieldDataRef); 1572private static extern int GetToken(IntPtr fieldDesc); 1583IntPtr fieldDesc, 1605IntPtr fieldDesc, 1626IntPtr fieldDesc, 1646IntPtr fieldDesc, 1833typeInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, stackScratch: stackalloc IntPtr[8]); 1838methodInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, stackScratch: stackalloc IntPtr[8]); 1841fixed (IntPtr* typeInstArgs = typeInstantiationContextHandles, methodInstArgs = methodInstantiationContextHandles) 1864IntPtr* typeInstArgs, 1866IntPtr* methodInstArgs, 1883ReadOnlySpan<IntPtr> typeInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, stackScratch: stackalloc IntPtr[8]); 1884ReadOnlySpan<IntPtr> methodInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, stackScratch: stackalloc IntPtr[8]); 1893internal static RuntimeMethodHandleInternal ResolveMethodHandleInternal(RuntimeModule module, int methodToken, ReadOnlySpan<IntPtr> typeInstantiationContext, ReadOnlySpan<IntPtr> methodInstantiationContext) 1899fixed (IntPtr* typeInstArgs = typeInstantiationContext, methodInstArgs = methodInstantiationContext) 1916IntPtr* typeInstArgs, 1918IntPtr* methodInstArgs, 1939typeInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(typeInstantiationContext, stackScratch: stackalloc IntPtr[8]); 1944methodInstantiationContextHandles = RuntimeTypeHandle.CopyRuntimeTypeHandles(methodInstantiationContext, stackScratch: stackalloc IntPtr[8]); 1947fixed (IntPtr* typeInstArgs = typeInstantiationContextHandles, methodInstArgs = methodInstantiationContextHandles) 1970IntPtr* typeInstArgs, 1972IntPtr* methodInstArgs, 2206internal abstract void ResolveToken(int token, out IntPtr typeHandle, out IntPtr methodHandle, out IntPtr fieldHandle);
src\System\RuntimeType.CoreCLR.cs (17)
841Span<IntPtr> result = stackalloc IntPtr[64]; 846result = new IntPtr[count]; 856ReadOnlySpan<IntPtr> fieldHandles, RuntimeType declaringType, ref ListBuilder<RuntimeFieldInfo> list) 864foreach (IntPtr handle in fieldHandles) 2383private IntPtr m_cache; 2384internal IntPtr m_handle; 2405internal IntPtr GetUnderlyingNativeHandle() 2420if (m_cache != IntPtr.Zero) 2435if (m_cache != IntPtr.Zero) 2451if (m_cache == IntPtr.Zero) 2454IntPtr newgcHandle = th.GetGCHandle(GCHandleType.WeakTrackResurrection); 2455IntPtr gcHandle = Interlocked.CompareExchange(ref m_cache, newgcHandle, IntPtr.Zero); 2456if (gcHandle != IntPtr.Zero) 2476if (Volatile.Read(ref m_cache) == IntPtr.Zero) 3714if (valueType == typeof(IntPtr))
src\System\String.CoreCLR.cs (3)
14private static unsafe partial string* StrCnsInternal(uint rid, IntPtr scopeHandle); 20internal static unsafe string StrCns(uint rid, IntPtr scopeHandle) 52internal static unsafe void InternalCopy(string src, IntPtr dest, int len)
src\System\StubHelpers.cs (147)
53internal static unsafe IntPtr ConvertToNative(int flags, string strManaged, IntPtr pNativeBuffer) 57return IntPtr.Zero; 88Marshal.FreeCoTaskMem((IntPtr)pbNativeBuffer); 119return (IntPtr)pbNativeBuffer; 122internal static unsafe string? ConvertToManaged(IntPtr cstr) 124if (IntPtr.Zero == cstr) 130internal static unsafe void ConvertFixedToNative(int flags, string strManaged, IntPtr pNativeBuffer, int length) 184internal static unsafe string ConvertFixedToManaged(IntPtr cstr, int length) 198internal static unsafe IntPtr ConvertToNative(StringBuilder sb, IntPtr pNativeBuffer, int flags) 202return IntPtr.Zero; 216return (IntPtr)pbNativeBuffer; 219internal static unsafe void ConvertToManaged(StringBuilder sb, IntPtr pNative) 221if (pNative == IntPtr.Zero) 232internal static unsafe IntPtr ConvertToNative(string strManaged, IntPtr pNativeBuffer) 236return IntPtr.Zero; 252if (pNativeBuffer != IntPtr.Zero) 283return (IntPtr)ptrToFirstChar; 287internal static unsafe string? ConvertToManaged(IntPtr bstr) 289if (IntPtr.Zero == bstr) 331internal static void ClearNative(IntPtr pNative) 339internal static unsafe IntPtr ConvertToNative(string strManaged, bool fBestFit, bool fThrowOnUnmappableChar, ref int cch) 343return IntPtr.Zero; 378internal static unsafe string? ConvertToManaged(IntPtr pNative, int cch) 380if (IntPtr.Zero == pNative) 388internal static void ClearNative(IntPtr pNative) 390if (IntPtr.Zero != pNative) 399internal static unsafe IntPtr ConvertToNative(int flags, string strManaged) 403return IntPtr.Zero; 415IntPtr bstr = Marshal.AllocBSTRByteLen(length); 424internal static unsafe string? ConvertToManaged(IntPtr bstr) 426if (IntPtr.Zero == bstr) 439internal static void ClearNative(IntPtr pNative) 447internal static unsafe void ConvertToNative(string? strManaged, IntPtr nativeHome, int length) 458internal static unsafe string ConvertToManaged(IntPtr nativeHome, int length) 508internal static IntPtr ConvertSafeHandleToNative(SafeHandle? handle, ref CleanupWorkListElement? cleanupWorkList) 586internal IntPtr m_pElementMT; 588internal IntPtr m_pManagedNativeArrayMarshaler; 595internal static unsafe void CreateMarshaler(IntPtr pMarshalState, IntPtr pMT, int dwFlags, bool nativeDataValid, IntPtr pManagedMarshaler) 607internal static void ConvertSpaceToNative(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 614private static partial void ConvertSpaceToNative(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome); 616internal static void ConvertContentsToNative(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 623private static partial void ConvertContentsToNative(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome); 625internal static void ConvertSpaceToManaged(IntPtr pMarshalState, ref object? pManagedHome, IntPtr pNativeHome, 634private static partial void ConvertSpaceToManaged(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome, 637internal static void ConvertContentsToManaged(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 644private static partial void ConvertContentsToManaged(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome); 646internal static unsafe void ClearNative(IntPtr pMarshalState, IntPtr pNativeHome, int cElements) 648IntPtr nativeHome = *(IntPtr*)pNativeHome; 650if (nativeHome != IntPtr.Zero) 658internal static partial void ClearNativeContents(IntPtr pMarshalState, IntPtr pNativeHome, int cElements); 667internal IntPtr m_pElementMT; 668internal IntPtr m_pManagedElementMarshaler; 669internal IntPtr m_Array; 677internal static unsafe void CreateMarshaler(IntPtr pMarshalState, IntPtr pMT, int dwFlags, int cElements, IntPtr pManagedMarshaler) 689internal static unsafe void ConvertSpaceToNative(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 702internal static void ConvertContentsToNative(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 709private static partial void ConvertContentsToNative(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome); 711internal static void ConvertSpaceToManaged(IntPtr pMarshalState, ref object pManagedHome, IntPtr pNativeHome) 719private static partial void ConvertSpaceToManaged(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome); 721internal static void ConvertContentsToManaged(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 728private static partial void ConvertContentsToManaged(IntPtr pMarshalState, ObjectHandleOnStack pManagedHome, IntPtr pNativeHome); 731internal static void ClearNativeContents(IntPtr pMarshalState, in object pManagedHome, IntPtr pNativeHome) 738private static partial void ClearNativeContents(IntPtr pMarshalState, IntPtr pNativeHome); 801internal static void ConvertContentsToNative(ICustomMarshaler marshaler, in object pManagedHome, IntPtr* pNativeHome) 806*pNativeHome = IntPtr.Zero; 813internal static void ConvertContentsToManaged(ICustomMarshaler marshaler, ref object? pManagedHome, IntPtr* pNativeHome) 816if (*pNativeHome == IntPtr.Zero) 826internal static void ClearNative(ICustomMarshaler marshaler, ref object pManagedHome, IntPtr* pNativeHome) 829if (*pNativeHome == IntPtr.Zero) 844internal static void ClearManaged(ICustomMarshaler marshaler, in object pManagedHome, IntPtr* pNativeHome) 872private readonly IntPtr pvArrayMarshaler; 899internal AsAnyMarshaler(IntPtr pvArrayMarshaler) 902Debug.Assert(pvArrayMarshaler != IntPtr.Zero, "pvArrayMarshaler must not be null"); 912private unsafe IntPtr ConvertArrayToNative(object pManagedHome, int dwFlags) 934if (elementType == typeof(IntPtr)) 936vt = (IntPtr.Size == 4 ? VarEnum.VT_I4 : VarEnum.VT_I8); 940vt = (IntPtr.Size == 4 ? VarEnum.VT_UI4 : VarEnum.VT_UI8); 957IntPtr.Zero, // not needed as we marshal primitive VTs only 960IntPtr.Zero); // not needed as we marshal primitive VTs only 962IntPtr pNativeHome; 963IntPtr pNativeHomeAddr = new IntPtr(&pNativeHome); 985private static IntPtr ConvertStringToNative(string pManagedHome, int dwFlags) 987IntPtr pNativeHome; 996IntPtr.Zero); // unmanaged buffer will be allocated 1012private unsafe IntPtr ConvertStringBuilderToNative(StringBuilder pManagedHome, int dwFlags) 1014IntPtr pNativeHome; 1094private unsafe IntPtr ConvertLayoutToNative(object pManagedHome, int dwFlags) 1101IntPtr pNativeHome = Marshal.AllocCoTaskMem(allocSize); 1119internal IntPtr ConvertToNative(object pManagedHome, int dwFlags) 1122return IntPtr.Zero; 1127IntPtr pNativeHome; 1161internal unsafe void ConvertToManaged(object pManagedHome, IntPtr pNativeHome) 1183if (pNativeHome == IntPtr.Zero) 1199if (pNativeHome == IntPtr.Zero) 1216internal void ClearNative(IntPtr pNativeHome) 1218if (pNativeHome != IntPtr.Zero) 1309public IntPtr AddRef() 1319internal static extern IntPtr GetDelegateTarget(Delegate pThis); 1330internal static IntPtr AddToCleanupList(ref CleanupWorkListElement? pCleanupWorkList, SafeHandle handle) 1397internal static partial void CreateCustomMarshaler(IntPtr pMD, int paramToken, IntPtr hndManagedType, ObjectHandleOnStack customMarshaler); 1404internal static object CreateCustomMarshaler(IntPtr pMD, int paramToken, IntPtr hndManagedType) 1424internal static IntPtr SafeHandleAddRef(SafeHandle pHandle, ref bool success) 1517bool success = Marshal.TryGetStructMarshalStub((IntPtr)pMT, &structMarshalStub, &size); 1536bool success = Marshal.TryGetStructMarshalStub((IntPtr)pMT, &structMarshalStub, &size); 1555bool success = Marshal.TryGetStructMarshalStub((IntPtr)pMT, &structMarshalStub, &size); 1565internal static partial void MarshalToManagedVaList(IntPtr va_list, IntPtr pArgIterator); 1568internal static partial void MarshalToUnmanagedVaList(IntPtr va_list, uint vaListSize, IntPtr pArgIterator); 1571internal static extern uint CalcVaListSize(IntPtr va_list); 1574internal static extern void LogPinnedArgument(IntPtr localDesc, IntPtr nativeArg); 1577private static partial void ValidateObject(ObjectHandleOnStack obj, IntPtr pMD); 1579internal static void ValidateObject(object obj, IntPtr pMD) 1583internal static partial void ValidateByref(IntPtr byref, IntPtr pMD); // the byref is pinned so we can safely "cast" it to IntPtr 1587internal static extern IntPtr GetStubContext(); 1600internal static extern IntPtr NextCallReturnAddress();
src\System\Text\StringBuilder.CoreCLR.cs (1)
106internal unsafe void InternalCopy(IntPtr dest, int charLen) =>
src\System\Threading\SynchronizationContext.CoreCLR.cs (1)
8private static int InvokeWaitMethodHelper(SynchronizationContext syncContext, IntPtr[] waitHandles, bool waitAll, int millisecondsTimeout)
src\System\Threading\Thread.CoreCLR.cs (6)
15private readonly IntPtr _ptr; 17internal ThreadHandle(IntPtr pThread) 46private IntPtr _DONT_USE_InternalThread; // Pointer 76IntPtr thread = _DONT_USE_InternalThread; 79if (thread == IntPtr.Zero) 437public static IntPtr pNativeThread;
src\System\Threading\WaitHandle.CoreCLR.cs (7)
12private static partial int WaitOneCore(IntPtr waitHandle, int millisecondsTimeout, [MarshalAs(UnmanagedType.Bool)] bool useTrivialWaits); 14private static int WaitMultipleIgnoringSyncContextCore(ReadOnlySpan<IntPtr> waitHandles, bool waitAll, int millisecondsTimeout) 18private static partial int WaitMultipleIgnoringSyncContext(ReadOnlySpan<IntPtr> waitHandles, int numHandles, [MarshalAs(UnmanagedType.Bool)] bool waitAll, int millisecondsTimeout); 20private static int SignalAndWaitCore(IntPtr waitHandleToSignal, IntPtr waitHandleToWaitOn, int millisecondsTimeout) 33private static partial int SignalAndWait(IntPtr waitHandleToSignal, IntPtr waitHandleToWaitOn, int millisecondsTimeout);
src\System\TypedReference.CoreCLR.cs (2)
18private readonly IntPtr _type; 22internal static ref byte GetRefAny(IntPtr clsHnd, TypedReference typedByRef)
src\System\ValueType.cs (1)
112hashCode.Add((IntPtr)pMT);
System.Private.DataContractSerialization (1)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
System.Private.Uri (1)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
System.Private.Windows.Core (25)
System\Private\Windows\Nrbf\CoreNrbfSerializer.cs (2)
52{ TypeName.Parse(Types.IntPtrType), typeof(IntPtr) }, 120|| type == typeof(IntPtr)
Windows\Win32\Foundation\PWSTR.cs (1)
18Marshal.FreeCoTaskMem((IntPtr)Value);
Windows\Win32\PInvokeCore.GetClassLong.cs (1)
19public static IntPtr GetClassLong(HWND hWnd, GET_CLASS_LONG_INDEX nIndex)
Windows\Win32\PInvokeCore.SetWindowLong.cs (2)
38IntPtr pointer = Marshal.GetFunctionPointerForDelegate(dwNewLong); 39IntPtr result = SetWindowLong(hWnd, nIndex, pointer);
Windows\Win32\System\Com\Lifetime.cs (1)
77return (TObject?)GCHandle.FromIntPtr((IntPtr)lifetime->_handle).Target;
Windows\Win32\System\Com\SAFEARRAY.cs (2)
48else if (hardwiredType == FADF_UNKNOWN && cbElements == sizeof(IntPtr)) 52else if (hardwiredType == FADF_DISPATCH && cbElements == sizeof(IntPtr))
Windows\Win32\System\Com\WinFormsComWrappers.cs (1)
40protected override object CreateObject(IntPtr externalComObject, CreateObjectFlags flags)
Windows\Win32\System\Variant\VARIANT.cs (14)
121return IntPtr.Size == 8 ? (ulong)data : (object)(uint)data; 159return Marshal.PtrToStringUni(*(IntPtr*)data); 161return Marshal.PtrToStringAnsi(*(IntPtr*)data); 376Span<IntPtr> data = new(psa->pvData, array.Length); 389Span<IntPtr> data = new(psa->pvData, array.Length); 393result[i] = data[i] == IntPtr.Zero ? null : ComHelpers.GetObjectForIUnknown((IUnknown*)data[i]); 588IntPtr data = psa->GetValue<IntPtr>(indices); 596IntPtr data = psa->GetValue<IntPtr>(indices); 597if (data == IntPtr.Zero) 734return (uint)IntPtr.Size; 826Span<IntPtr> data = new(ca.pElems, (int)ca.cElems); 838Span<IntPtr> data = new(ca.pElems, (int)ca.cElems);
Windows\Win32\System\Variant\VARIANTVector.cs (1)
25Marshal.GetNativeVariantForObject(values[i], (IntPtr)(&pVariants[i]));
System.Private.Windows.Core.TestUtilities (2)
CommonTestHelper.cs (2)
51public static TheoryData<IntPtr> GetIntPtrTheoryData() 55IntPtr.Zero,
System.Private.Xml (1)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
System.Reflection.Metadata (14)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
System\Reflection\Internal\MemoryBlocks\NativeHeapMemoryBlock.cs (4)
20private IntPtr _pointer; 46IntPtr ptr = Interlocked.Exchange(ref _pointer, IntPtr.Zero); 47if (ptr != IntPtr.Zero)
System\Reflection\Internal\Utilities\EncodingHelper.netcoreapp.cs (1)
48Marshal.Copy((IntPtr)bytes, buffer, prefix.Length, byteCount);
System\Reflection\Metadata\BlobReader.cs (1)
437Marshal.Copy((IntPtr)GetCurrentPointerAndAdvance(byteCount), buffer, bufferOffset, byteCount);
System\Reflection\Metadata\Ecma335\Encoding\BlobEncoders.cs (1)
974/// Encodes <see cref="System.IntPtr"/>.
System\Reflection\Metadata\Internal\StringHeap.cs (1)
188Marshal.Copy((IntPtr)block.Pointer, bytes, prefix.Length, block.Length);
System\Reflection\Metadata\MetadataReaderProvider.cs (2)
50/// <exception cref="ArgumentNullException"><paramref name="start"/> is <see cref="IntPtr.Zero"/>.</exception> 64/// <exception cref="ArgumentNullException"><paramref name="start"/> is <see cref="IntPtr.Zero"/>.</exception>
System\Reflection\Metadata\Signatures\SignatureTypeCode.cs (1)
125/// Represents a <see cref="System.IntPtr"/> in signatures.
System\Reflection\PortableExecutable\PEReader.cs (2)
50/// <exception cref="ArgumentNullException"><paramref name="peImage"/> is <see cref="IntPtr.Zero"/>.</exception> 68/// <exception cref="ArgumentNullException"><paramref name="peImage"/> is <see cref="IntPtr.Zero"/>.</exception>
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
283[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.IntPtr))]
System.Runtime.Caching (1)
System\Runtime\Caching\CacheMemoryMonitor.cs (1)
92bool is64bit = (IntPtr.Size == 8);
System.Runtime.InteropServices (16)
System\Runtime\InteropServices\ComTypes\FORMATETC.cs (1)
13public IntPtr ptd;
System\Runtime\InteropServices\ComTypes\STGMEDIUM.cs (1)
12public IntPtr unionmember;
System\Runtime\InteropServices\Marshalling\ComInterfaceMarshaller.cs (1)
13/// to <see cref="ComWrappers.GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags)"/>.
System\Runtime\InteropServices\Marshalling\ComVariantMarshaller.cs (7)
195return Marshal.PtrToStringBSTR(*(IntPtr*)unmanaged.GetRawDataRef<nint>()); 256*(IntPtr*)_unmanaged.GetRawDataRef<nint>() = default; 305ref IntPtr bstrStorage = ref *(IntPtr*)_unmanaged.GetRawDataRef<nint>(); 312ref IntPtr bstrStorage = ref *(IntPtr*)_unmanaged.GetRawDataRef<nint>(); 327*(IntPtr*)_unmanaged.GetRawDataRef<nint>() = StrategyBasedComWrappers.DefaultMarshallingInstance.GetOrCreateComInterfaceForObject(unkObj, CreateComInterfaceFlags.None);
System\Runtime\InteropServices\Marshalling\UniqueComInterfaceMarshaller.cs (1)
14/// to <see cref="ComWrappers.GetOrCreateObjectForComInstance(IntPtr, CreateObjectFlags)"/>.
System\Runtime\InteropServices\RuntimeEnvironment.cs (1)
32public static IntPtr GetRuntimeInterfaceAsIntPtr(Guid clsid, Guid riid) => throw new PlatformNotSupportedException();
System\Security\SecureStringMarshal.cs (4)
10public static IntPtr SecureStringToCoTaskMemAnsi(SecureString s) => Marshal.SecureStringToCoTaskMemAnsi(s); 11public static IntPtr SecureStringToGlobalAllocAnsi(SecureString s) => Marshal.SecureStringToGlobalAllocAnsi(s); 12public static IntPtr SecureStringToCoTaskMemUnicode(SecureString s) => Marshal.SecureStringToCoTaskMemUnicode(s); 13public static IntPtr SecureStringToGlobalAllocUnicode(SecureString s) => Marshal.SecureStringToGlobalAllocUnicode(s);
System.Runtime.InteropServices.JavaScript (4)
artifacts\obj\System.Runtime.InteropServices.JavaScript\Debug\net10.0\System.Runtime.InteropServices.JavaScript.notsupported.cs (4)
252public void ToManaged(out IntPtr value) { throw new System.PlatformNotSupportedException(System.SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported); } 253public void ToJS(IntPtr value) { throw new System.PlatformNotSupportedException(System.SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported); } 254public void ToManaged(out IntPtr? value) { throw new System.PlatformNotSupportedException(System.SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported); } 255public void ToJS(IntPtr? value) { throw new System.PlatformNotSupportedException(System.SR.SystemRuntimeInteropServicesJavaScript_PlatformNotSupported); }
System.Runtime.Numerics (5)
System\Number.BigInteger.cs (1)
858strResult = string.Create(strLength, (digits, ptr: (IntPtr)ptr, base1E9Value.Length, sNegative), static (span, state) =>
System\Numerics\BigInteger.cs (3)
1977/// <summary>Explicitly converts a big integer to a <see cref="IntPtr" /> value.</summary> 1979/// <returns><paramref name="value" /> converted to <see cref="IntPtr" /> value.</returns> 2232/// <summary>Implicitly converts a <see cref="IntPtr" /> value to a big integer.</summary>
System\Numerics\Complex.cs (1)
850/// <summary>Implicitly converts a <see cref="IntPtr" /> value to a double-precision complex number.</summary>
System.Security.Cryptography (430)
Microsoft\Win32\SafeHandles\SafePasswordHandle.cs (1)
78SetHandle((IntPtr)(-1));
src\libraries\Common\src\Interop\Unix\Interop.Errors.cs (1)
182return Marshal.PtrToStringUTF8((IntPtr)message)!;
src\libraries\Common\src\Interop\Unix\System.Native\Interop.GetPwUid.cs (1)
70username = Marshal.PtrToStringUTF8((IntPtr)passwd.Name);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ASN1.cs (11)
19private static unsafe partial int ObjObj2Txt(byte* buf, int buf_len, IntPtr a); 22private static partial IntPtr CryptoNative_GetObjectDefinitionByName(string friendlyName); 23internal static IntPtr GetObjectDefinitionByName(string friendlyName) 25IntPtr ret = CryptoNative_GetObjectDefinitionByName(friendlyName); 26if (ret == IntPtr.Zero) 36internal static partial IntPtr ObjNid2Obj(int nid); 39internal static partial void Asn1ObjectFree(IntPtr o); 49internal static partial void Asn1OctetStringFree(IntPtr o); 51internal static unsafe string GetOidValue(IntPtr asn1ObjectPtr) 70return Marshal.PtrToStringUTF8((IntPtr)bufStack, bytesNeeded); 96return Marshal.PtrToStringUTF8((IntPtr)buf, bytesNeeded);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Bignum.cs (2)
14internal static partial void BigNumDestroy(IntPtr a); 38internal static byte[]? ExtractBignum(IntPtr bignum, int targetSize)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.BIO.cs (1)
20internal static partial bool BioDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Crypto.cs (17)
12using TrackedAllocationDelegate = System.Action<System.IntPtr, ulong, System.IntPtr, int>; 41private static partial int GetX509NameRawBytes(IntPtr x509Name, byte[]? buf, int cBuf); 47internal static partial IntPtr GetX509CrlNextUpdate(SafeX509CrlHandle crl); 59private static partial int GetAsn1StringBytes(IntPtr asn1, byte[]? buf, int cBuf); 72IntPtr ptr = GetX509RootStorePath_private(&usedDefault); 84private static unsafe partial IntPtr GetX509RootStorePath_private(byte* defaultPath); 87private static unsafe partial IntPtr GetX509RootStoreFile_private(byte* defaultPath); 129internal static byte[] GetAsn1StringBytes(IntPtr asn1) 139internal static X500DistinguishedName LoadX500Name(IntPtr namePtr) 246private static unsafe partial void ForEachTrackedAllocation(delegate* unmanaged<IntPtr, ulong, char*, int, IntPtr, void> callback, IntPtr ctx); 250ForEachTrackedAllocation(&MemoryTrackingCallback, (IntPtr)(&callback)); 254private static unsafe void MemoryTrackingCallback(IntPtr ptr, ulong size, char* file, int line, IntPtr ctx) 257callback(ptr, size, (IntPtr)file, line);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Dsa.cs (8)
16internal static partial bool DsaUpRef(IntPtr dsa); 19internal static partial void DsaDestroy(IntPtr dsa); 101IntPtr p_bn, q_bn, g_bn, y_bn, x_bn; // these are not owned 151out IntPtr p, out int p_cb, 152out IntPtr q, out int q_cb, 153out IntPtr g, out int g_cb, 154out IntPtr y, out int y_cb, 155out IntPtr x, out int x_cb);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EcDsa.ImportExport.cs (4)
134out IntPtr d_bn_not_owned, out int d_cb); 149IntPtr d_bn_not_owned; 267out IntPtr d_bn_not_owned, out int d_cb, 300IntPtr d_bn_not_owned;
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EcKey.cs (4)
27internal static partial void EcKeyDestroy(IntPtr a); 35internal static partial bool EcKeyUpRef(IntPtr r); 85IntPtr objCurveName = Interop.Crypto.ObjNid2Obj(nidCurveName); 86if (objCurveName != IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.ERR.cs (4)
27internal static partial IntPtr ErrReasonErrorString(ulong error); 40ret = Marshal.PtrToStringUTF8((IntPtr)buf)!; 100internal static void CheckValidOpenSslHandle(IntPtr handle) 102if (handle == IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.Cipher.cs (31)
15IntPtr cipher, 23IntPtr cipher); 76internal static partial void EvpCipherDestroy(IntPtr ctx); 244internal static partial IntPtr EvpAes128Ecb(); 247internal static partial IntPtr EvpAes128Cbc(); 250internal static partial IntPtr EvpAes128Gcm(); 253internal static partial IntPtr EvpAes128Cfb8(); 256internal static partial IntPtr EvpAes128Cfb128(); 259internal static partial IntPtr EvpAes128Ccm(); 262internal static partial IntPtr EvpAes192Ecb(); 265internal static partial IntPtr EvpAes192Cbc(); 268internal static partial IntPtr EvpAes192Gcm(); 271internal static partial IntPtr EvpAes192Cfb8(); 274internal static partial IntPtr EvpAes192Cfb128(); 277internal static partial IntPtr EvpAes192Ccm(); 280internal static partial IntPtr EvpAes256Ecb(); 283internal static partial IntPtr EvpAes256Cbc(); 286internal static partial IntPtr EvpAes256Gcm(); 289internal static partial IntPtr EvpAes256Cfb128(); 292internal static partial IntPtr EvpAes256Cfb8(); 295internal static partial IntPtr EvpAes256Ccm(); 298internal static partial IntPtr EvpDesCbc(); 301internal static partial IntPtr EvpDesEcb(); 304internal static partial IntPtr EvpDesCfb8(); 307internal static partial IntPtr EvpDes3Cbc(); 310internal static partial IntPtr EvpDes3Ecb(); 313internal static partial IntPtr EvpDes3Cfb8(); 316internal static partial IntPtr EvpDes3Cfb64(); 319internal static partial IntPtr EvpRC2Cbc(); 322internal static partial IntPtr EvpRC2Ecb(); 325internal static partial IntPtr EvpChaCha20Poly1305();
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.cs (9)
16internal static partial SafeEvpMdCtxHandle EvpMdCtxCreate(IntPtr type); 19internal static partial void EvpMdCtxDestroy(IntPtr ctx); 22internal static partial int EvpDigestReset(SafeEvpMdCtxHandle ctx, IntPtr type); 47internal static unsafe partial int EvpDigestOneShot(IntPtr type, byte* source, int sourceSize, byte* md, uint* mdSize); 50private static unsafe partial int EvpDigestXOFOneShot(IntPtr type, ReadOnlySpan<byte> source, int sourceSize, Span<byte> md, uint len); 53internal static partial int EvpMdSize(IntPtr md); 65IntPtr digestEvp, 73IntPtr digestEvp, 97internal static unsafe int EvpDigestXOFOneShot(IntPtr type, ReadOnlySpan<byte> source, Span<byte> destination)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.DigestAlgs.cs (41)
12private static volatile IntPtr s_evpMd5; 13private static volatile IntPtr s_evpSha1; 14private static volatile IntPtr s_evpSha256; 15private static volatile IntPtr s_evpSha384; 16private static volatile IntPtr s_evpSha512; 17private static volatile IntPtr s_evpSha3_256; 18private static volatile IntPtr s_evpSha3_384; 19private static volatile IntPtr s_evpSha3_512; 20private static volatile IntPtr s_evpSha3_Shake128; 21private static volatile IntPtr s_evpSha3_Shake256; 29private static partial IntPtr CryptoNative_EvpMd5(); 31private static IntPtr EvpMd5() => 32s_evpMd5 != IntPtr.Zero ? s_evpMd5 : (s_evpMd5 = CryptoNative_EvpMd5()); 35private static partial IntPtr CryptoNative_EvpSha1(); 37private static IntPtr EvpSha1() => 38s_evpSha1 != IntPtr.Zero ? s_evpSha1 : (s_evpSha1 = CryptoNative_EvpSha1()); 41private static partial IntPtr CryptoNative_EvpSha256(); 43private static IntPtr EvpSha256() => 44s_evpSha256 != IntPtr.Zero ? s_evpSha256 : (s_evpSha256 = CryptoNative_EvpSha256()); 47private static partial IntPtr CryptoNative_EvpSha384(); 49private static IntPtr EvpSha384() => 50s_evpSha384 != IntPtr.Zero ? s_evpSha384 : (s_evpSha384 = CryptoNative_EvpSha384()); 53private static partial IntPtr CryptoNative_EvpSha512(); 55private static IntPtr EvpSha512() => 56s_evpSha512 != IntPtr.Zero ? s_evpSha512 : (s_evpSha512 = CryptoNative_EvpSha512()); 59private static partial IntPtr CryptoNative_EvpSha3_256(); 61private static IntPtr EvpSha3_256() 73private static partial IntPtr CryptoNative_EvpSha3_384(); 75private static IntPtr EvpSha3_384() 87private static partial IntPtr CryptoNative_EvpSha3_512(); 89private static IntPtr EvpSha3_512() 101private static partial IntPtr CryptoNative_EvpShake128(); 103private static IntPtr EvpShake128() 115private static partial IntPtr CryptoNative_EvpShake256(); 117private static IntPtr EvpShake256() 128internal static IntPtr HashAlgorithmToEvp(string hashAlgorithmId) 137IntPtr sha3_256 = EvpSha3_256(); 140IntPtr sha3_384 = EvpSha3_384(); 143IntPtr sha3_512 = EvpSha3_512(); 146IntPtr shake128 = EvpShake128(); 149IntPtr shake256 = EvpShake256();
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.ExtraHandle.cs (1)
11private static partial IntPtr GetExtraHandle(SafeEvpPKeyHandle handle) => handle.ExtraHandle;
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.Kdf.cs (1)
14internal static partial void EvpKdfFree(IntPtr kdf);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.Kem.cs (3)
27private static partial IntPtr GetExtraHandle(SafeEvpPKeyHandle handle); 41IntPtr extraHandle, 81IntPtr extraHandle,
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EVP.Mac.cs (2)
14internal static partial void EvpMacFree(IntPtr mac); 17internal static partial void EvpMacCtxFree(IntPtr ctx);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.cs (24)
17internal static partial void EvpPkeyDestroy(IntPtr pkey, IntPtr extraHandle); 40private static partial int UpRefEvpPkey(SafeEvpPKeyHandle handle, IntPtr extraHandle); 112private static partial int CryptoNative_GetPkcs8PrivateKeySize(IntPtr pkey, out int p8size); 114private static int GetPkcs8PrivateKeySize(IntPtr pkey) 137private static unsafe partial int CryptoNative_EncodePkcs8PrivateKey(IntPtr pkey, byte* buf); 146IntPtr handle = pkey.DangerousGetHandle(); 173private static partial int CryptoNative_GetSubjectPublicKeyInfoSize(IntPtr pkey); 175private static int GetSubjectPublicKeyInfoSize(IntPtr pkey) 188private static unsafe partial int CryptoNative_EncodeSubjectPublicKeyInfo(IntPtr pkey, byte* buf); 197IntPtr handle = pkey.DangerousGetHandle(); 284private static partial IntPtr CryptoNative_LoadKeyFromProvider( 287ref IntPtr extraHandle, 294IntPtr extraHandle = IntPtr.Zero; 295IntPtr evpPKeyHandle = IntPtr.Zero; 303Debug.Assert(evpPKeyHandle == IntPtr.Zero && extraHandle == IntPtr.Zero, "both handles should be null if provider is not supported"); 307if (evpPKeyHandle == IntPtr.Zero || extraHandle == IntPtr.Zero) 309Debug.Assert(evpPKeyHandle == IntPtr.Zero, "extraHandle should not be null if evpPKeyHandle is not null"); 317if (evpPKeyHandle != IntPtr.Zero || extraHandle != IntPtr.Zero)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Ecdh.cs (1)
17IntPtr extraHandle,
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.EcDsa.cs (2)
17IntPtr extraHandle, 48IntPtr extraHandle,
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.MLDsa.cs (2)
69SafeEvpPKeyHandle pkey, IntPtr extraHandle, 94SafeEvpPKeyHandle pkey, IntPtr extraHandle,
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.Rsa.cs (15)
15private static partial SafeEvpPKeyHandle CryptoNative_EvpPKeyCreateRsa(IntPtr rsa); 17internal static SafeEvpPKeyHandle EvpPKeyCreateRsa(IntPtr rsa) 19Debug.Assert(rsa != IntPtr.Zero); 51IntPtr extraHandle, 55IntPtr digestAlgorithm, 63IntPtr digestAlgorithm, 88IntPtr extraHandle, 92IntPtr digestAlgorithm, 100IntPtr digestAlgorithm, 125IntPtr extraHandle, 127IntPtr digestAlgorithm, 142IntPtr digestAlgorithmPtr = Interop.Crypto.HashAlgorithmToEvp(digestAlgorithm.Name); 166IntPtr extraHandle, 168IntPtr digestAlgorithm, 183IntPtr digestAlgorithmPtr = Interop.Crypto.HashAlgorithmToEvp(digestAlgorithm.Name);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.EvpPkey.SlhDsa.cs (2)
78SafeEvpPKeyHandle pkey, IntPtr extraHandle, 103SafeEvpPKeyHandle pkey, IntPtr extraHandle,
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Hmac.cs (4)
14internal static partial SafeHmacCtxHandle HmacCreate(ref byte key, int keyLen, IntPtr md); 17internal static partial void HmacDestroy(IntPtr ctx); 32private static unsafe partial int HmacOneShot(IntPtr type, byte* key, int keySize, byte* source, int sourceSize, byte* md, int* mdSize); 37internal static unsafe int HmacOneShot(IntPtr type, ReadOnlySpan<byte> key, ReadOnlySpan<byte> source, Span<byte> destination)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.LookupFriendlyNameByOid.cs (1)
12internal static partial int LookupFriendlyNameByOid(string oidValue, ref IntPtr friendlyNamePtr);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.OCSP.cs (11)
15internal static partial void OcspRequestDestroy(IntPtr ocspReq); 24internal static partial SafeOcspRequestHandle X509BuildOcspRequest(IntPtr subject, IntPtr issuer); 31IntPtr subject, 32IntPtr* issuers, 39IntPtr x509Subject, 40ReadOnlySpan<IntPtr> x509Issuers, 47fixed (IntPtr* pIssuers = x509Issuers) 92internal static partial void OcspResponseDestroy(IntPtr ocspReq); 108handle = IntPtr.Zero; 123handle = IntPtr.Zero;
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.Pkcs7.cs (1)
28internal static partial void Pkcs7Destroy(IntPtr p7);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.PooledCrypto.cs (1)
11internal static ArraySegment<byte> RentAsn1StringBytes(IntPtr asn1)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509.cs (22)
16internal static partial IntPtr GetX509NotBefore(SafeX509Handle x509); 19internal static partial IntPtr GetX509NotAfter(SafeX509Handle x509); 22internal static partial IntPtr GetX509SignatureAlgorithm(SafeX509Handle x509); 25internal static partial IntPtr GetX509PublicKeyAlgorithm(SafeX509Handle x509); 28internal static partial IntPtr GetX509PublicKeyBytes(SafeX509Handle x509); 40internal static partial SafeX509Handle DecodeX509(IntPtr buf, int len); 49internal static partial void X509Destroy(IntPtr a); 55internal static partial SafeX509Handle X509Duplicate(IntPtr handle); 68internal static partial SafeX509Handle X509UpRef(IntPtr handle); 96internal static partial IntPtr X509GetIssuerName(SafeX509Handle x); 99internal static partial IntPtr X509GetSubjectName(SafeX509Handle x); 129internal static partial IntPtr X509GetExt(SafeX509Handle x, int loc); 133internal static partial IntPtr X509ExtensionGetOid(IntPtr ex); 137internal static partial IntPtr X509ExtensionGetData(IntPtr ex); 141internal static partial bool X509ExtensionGetCritical(IntPtr ex); 161internal static partial void X509StoreDestroy(IntPtr v); 240private static unsafe partial int CryptoNative_X509StoreCtxSetVerifyCallback(SafeX509StoreCtxHandle ctx, delegate* unmanaged<int, IntPtr, int> callback, void* appData); 242internal static unsafe void X509StoreCtxSetVerifyCallback(SafeX509StoreCtxHandle ctx, delegate* unmanaged<int, IntPtr, int> callback, void* appData) 259private static partial IntPtr CryptoNative_X509VerifyCertErrorString(int n); 262internal static partial void X509CrlDestroy(IntPtr a);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Ext.cs (1)
19internal static partial int X509ExtensionDestroy(IntPtr x);
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509Stack.cs (7)
16internal static partial void RecursiveFreeX509Stack(IntPtr stack); 29internal static partial IntPtr GetX509StackField(SafeX509StackHandle stack, int loc); 36internal static partial IntPtr GetX509StackField(SafeSharedX509StackHandle stack, int loc); 67base(IntPtr.Zero, ownsHandle: true) 74SetHandle(IntPtr.Zero); 80get { return handle == IntPtr.Zero; } 104base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Interop\Unix\System.Security.Cryptography.Native\Interop.X509StoreCtx.cs (5)
16internal static partial void X509StoreCtxDestroy(IntPtr v); 75base(IntPtr.Zero, ownsHandle: true) 79internal SafeX509StoreCtxHandle(IntPtr handle, bool ownsHandle) : 87SetHandle(IntPtr.Zero); 93get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\Asn1SafeHandles.Unix.cs (8)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; } 32base(IntPtr.Zero, ownsHandle: true) 39SetHandle(IntPtr.Zero); 45get { return handle == IntPtr.Zero; } 52base(IntPtr.Zero, ownsHandle: true) 60base(IntPtr.Zero, ownsHandle: true)
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBignumHandle.Unix.cs (4)
13base(IntPtr.Zero, ownsHandle: true) 17internal SafeBignumHandle(IntPtr handle, bool ownsHandle) 25SetHandle(IntPtr.Zero); 31get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeBioHandle.Unix.cs (4)
16base(IntPtr.Zero, ownsHandle: true) 22IntPtr h = handle; 23SetHandle(IntPtr.Zero); 44return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeDsaHandle.Unix.cs (5)
14base(IntPtr.Zero, ownsHandle: true) 21SetHandle(IntPtr.Zero); 27get { return handle == IntPtr.Zero; } 30internal static SafeDsaHandle DuplicateHandle(IntPtr handle) 32Debug.Assert(handle != IntPtr.Zero);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEcKeyHandle.Unix.cs (5)
14base(IntPtr.Zero, ownsHandle: true) 21SetHandle(IntPtr.Zero); 27get { return handle == IntPtr.Zero; } 30internal static SafeEcKeyHandle DuplicateHandle(IntPtr handle) 32Debug.Assert(handle != IntPtr.Zero);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpCipherCtxHandle.Unix.cs (3)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeEvpMdCtxHandle.Unix.cs (2)
13base(IntPtr.Zero, ownsHandle: true) 25get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeHmacCtxHandle.Unix.cs (3)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeInteriorHandle.cs (3)
14protected SafeInteriorHandle(IntPtr invalidHandleValue, bool ownsHandle) 28SetHandle(IntPtr.Zero); 38return handle == IntPtr.Zero || (_parent != null && _parent.IsInvalid);
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafePkcs7Handle.Unix.cs (3)
12base(IntPtr.Zero, ownsHandle: true) 19SetHandle(IntPtr.Zero); 25get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\SafeX509Handles.Unix.cs (9)
31base(IntPtr.Zero, ownsHandle: true) 38SetHandle(IntPtr.Zero); 44get { return handle == IntPtr.Zero; } 51base(IntPtr.Zero, ownsHandle: true) 58SetHandle(IntPtr.Zero); 64get { return handle == IntPtr.Zero; } 71base(IntPtr.Zero, ownsHandle: true) 78SetHandle(IntPtr.Zero); 84get { return handle == IntPtr.Zero; }
src\libraries\Common\src\Microsoft\Win32\SafeHandles\X509ExtensionSafeHandles.Unix.cs (3)
13base(IntPtr.Zero, ownsHandle: true) 20SetHandle(IntPtr.Zero); 26get { return handle == IntPtr.Zero; }
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
src\libraries\Common\src\System\Security\Cryptography\RSAOpenSsl.cs (4)
189IntPtr hashAlgorithm = IntPtr.Zero; 256IntPtr hashAlgorithm = IntPtr.Zero;
src\libraries\System.Private.CoreLib\src\System\IO\PersistedFiles.Unix.cs (1)
102path = Marshal.PtrToStringUTF8((IntPtr)passwd.HomeDirectory);
System\Security\Cryptography\AesCcm.OpenSsl.cs (2)
153private static IntPtr GetCipher(int keySizeInBits) 162return IntPtr.Zero;
System\Security\Cryptography\AesGcm.OpenSsl.cs (2)
124private static IntPtr GetCipher(int keySizeInBits) 133return IntPtr.Zero;
System\Security\Cryptography\AesImplementation.OpenSsl.cs (3)
19IntPtr algorithm = GetAlgorithm(key.Length * 8, feedback * 8, cipherMode); 34IntPtr algorithm = GetAlgorithm(key.Length * 8, feedback * 8, cipherMode); 38private static IntPtr GetAlgorithm(int keySize, int feedback, CipherMode cipherMode) =>
System\Security\Cryptography\ChaCha20Poly1305.OpenSsl.cs (3)
13Interop.Crypto.EvpChaCha20Poly1305() != IntPtr.Zero; 121private static IntPtr GetCipher(int keySizeInBits) 128return IntPtr.Zero;
System\Security\Cryptography\Cng.NotSupported.cs (3)
21protected SafeNCryptHandle(IntPtr handle, SafeHandle parentHandle) : base(default(bool)) 39public SafeNCryptKeyHandle(IntPtr handle, SafeHandle parentHandle) 113public IntPtr ParentWindowHandle { get => default; set { } }
System\Security\Cryptography\CngKeyCreationParameters.cs (1)
44public IntPtr ParentWindowHandle { get; set; }
System\Security\Cryptography\CspParameters.cs (2)
17private IntPtr _parentWindowHandle; 82public IntPtr ParentWindowHandle
System\Security\Cryptography\DesImplementation.OpenSsl.cs (3)
21IntPtr algorithm = GetAlgorithm(cipherMode, feedbackSize); 39IntPtr algorithm = GetAlgorithm(cipherMode, feedbackSize); 45private static IntPtr GetAlgorithm(CipherMode cipherMode, int feedbackSize)
System\Security\Cryptography\DSAOpenSsl.cs (3)
59/// Create an DSAOpenSsl from an existing <see cref="IntPtr"/> whose value is an 73public DSAOpenSsl(IntPtr handle) 75if (handle == IntPtr.Zero)
System\Security\Cryptography\ECDiffieHellmanOpenSsl.cs (3)
44/// Create an ECDsaOpenSsl from an existing <see cref="IntPtr"/> whose value is an 58public ECDiffieHellmanOpenSsl(IntPtr handle) 60if (handle == IntPtr.Zero)
System\Security\Cryptography\ECDsaOpenSsl.cs (3)
44/// Create an ECDsaOpenSsl from an existing <see cref="IntPtr"/> whose value is an 58public ECDsaOpenSsl(IntPtr handle) 60if (handle == IntPtr.Zero)
System\Security\Cryptography\FixedMemoryKeyBox.cs (3)
12internal FixedMemoryKeyBox(ReadOnlySpan<byte> key) : base(IntPtr.Zero, ownsHandle: true) 16SetHandle((IntPtr)memory); 29public override bool IsInvalid => handle == IntPtr.Zero;
System\Security\Cryptography\HashProviderDispenser.OpenSsl.cs (2)
47IntPtr evpType = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmId); 48Debug.Assert(evpType != IntPtr.Zero);
System\Security\Cryptography\HashProviderDispenser.Unix.cs (4)
40IntPtr evpType = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmId); 41Debug.Assert(evpType != IntPtr.Zero); 58IntPtr evpType = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmId); 59Debug.Assert(evpType != IntPtr.Zero);
System\Security\Cryptography\LiteHash.Unix.cs (13)
14IntPtr algorithm = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmId); 20IntPtr algorithm = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmId); 26IntPtr algorithm = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmId); 34private readonly IntPtr _algorithm; 38internal LiteXof(IntPtr algorithm) 40Debug.Assert(algorithm != IntPtr.Zero); 47private LiteXof(SafeEvpMdCtxHandle ctx, IntPtr algorithm) 118private readonly IntPtr _algorithm; 123internal LiteHash(IntPtr algorithm) 125Debug.Assert(algorithm != IntPtr.Zero); 140private LiteHash(SafeEvpMdCtxHandle ctx, IntPtr algorithm, int hashSizeInBytes) 212internal LiteHmac(IntPtr algorithm, ReadOnlySpan<byte> key) 214Debug.Assert(algorithm != IntPtr.Zero);
System\Security\Cryptography\OidLookup.OpenSsl.cs (5)
20IntPtr friendlyNamePtr = IntPtr.Zero; 26Debug.Assert(friendlyNamePtr != IntPtr.Zero); 43IntPtr sharedObject = Interop.Crypto.GetObjectDefinitionByName(friendlyName); 45if (sharedObject == IntPtr.Zero)
System\Security\Cryptography\OpenSslCipher.cs (1)
14IntPtr algorithm,
System\Security\Cryptography\OpenSslCipherLite.cs (2)
25IntPtr algorithm, 32Debug.Assert(algorithm != IntPtr.Zero);
System\Security\Cryptography\Pbkdf2Implementation.OpenSsl.cs (1)
19IntPtr evpHashType = Interop.Crypto.HashAlgorithmToEvp(hashAlgorithmName.Name);
System\Security\Cryptography\PemEncoding.cs (2)
711(LabelPointer: (IntPtr)(&label), DataPointer: (IntPtr)(&data)),
System\Security\Cryptography\RC2Implementation.OpenSsl.cs (5)
21IntPtr algorithm = GetAlgorithm(cipherMode); 38IntPtr algorithm = GetAlgorithm(cipherMode); 44private static IntPtr GetAlgorithm(CipherMode cipherMode) 46IntPtr algorithm = cipherMode switch 53if (algorithm == IntPtr.Zero)
System\Security\Cryptography\RSAOpenSsl.cs (3)
27/// Create an RSAOpenSsl from an existing <see cref="IntPtr"/> whose value is an 41public RSAOpenSsl(IntPtr handle) 43if (handle == IntPtr.Zero)
System\Security\Cryptography\SafeEvpPKeyHandle.OpenSsl.cs (8)
18internal IntPtr ExtraHandle { get; private set; } 26base(IntPtr.Zero, ownsHandle: true) 35public SafeEvpPKeyHandle(IntPtr handle, bool ownsHandle) 40internal SafeEvpPKeyHandle(IntPtr handle, IntPtr extraHandle) 49ExtraHandle = IntPtr.Zero; 51SetHandle(IntPtr.Zero); 57get { return handle == IntPtr.Zero; }
System\Security\Cryptography\TripleDesImplementation.OpenSsl.cs (3)
21IntPtr algorithm = GetAlgorithm(cipherMode, feedbackSize); 37IntPtr algorithm = GetAlgorithm(cipherMode, feedbackSize); 48private static IntPtr GetAlgorithm(CipherMode cipherMode, int feedbackSizeInBytes) => cipherMode switch
System\Security\Cryptography\X509Certificates\CertificatePal.cs (1)
10internal static partial ICertificatePal FromHandle(IntPtr handle);
System\Security\Cryptography\X509Certificates\CertificatePal.OpenSsl.cs (1)
13internal static partial ICertificatePal FromHandle(IntPtr handle)
System\Security\Cryptography\X509Certificates\ChainPal.cs (2)
8internal static partial IChainPal FromHandle(IntPtr chainContext); 10internal static partial bool ReleaseSafeX509ChainHandle(IntPtr handle);
System\Security\Cryptography\X509Certificates\ChainPal.OpenSsl.cs (2)
14internal static partial IChainPal FromHandle(IntPtr chainContext) 19internal static partial bool ReleaseSafeX509ChainHandle(IntPtr handle)
System\Security\Cryptography\X509Certificates\ICertificatePalCore.cs (1)
12IntPtr Handle { get; }
System\Security\Cryptography\X509Certificates\OpenSslCrlCache.cs (2)
132IntPtr nextUpdatePtr = Interop.Crypto.GetX509CrlNextUpdate(crl); 138if (nextUpdatePtr == IntPtr.Zero)
System\Security\Cryptography\X509Certificates\OpenSslExportProvider.cs (1)
70private static void PushHandle(IntPtr certPtr, SafeX509StackHandle publicCerts)
System\Security\Cryptography\X509Certificates\OpenSslPkcsFormatReader.cs (1)
227IntPtr certHandle = Interop.Crypto.GetX509StackField(certs, i);
System\Security\Cryptography\X509Certificates\OpenSslX509CertificateReader.cs (14)
25public static ICertificatePal FromHandle(IntPtr handle) 27if (handle == IntPtr.Zero) 255public IntPtr Handle 257get { return _cert == null ? IntPtr.Zero : _cert.DangerousGetHandle(); } 308IntPtr oidPtr = Interop.Crypto.GetX509PublicKeyAlgorithm(cert); 327IntPtr keyBytesPtr = Interop.Crypto.GetX509PublicKeyBytes(cert); 349IntPtr oidPtr = Interop.Crypto.GetX509SignatureAlgorithm(cert); 453IntPtr ext = Interop.Crypto.X509GetExt(cert, i); 456IntPtr oidPtr = Interop.Crypto.X509ExtensionGetOid(ext); 460IntPtr dataPtr = Interop.Crypto.X509ExtensionGetData(ext); 500IntPtr ext = Interop.Crypto.X509GetExt(cert, i); 504IntPtr oidPtr = Interop.Crypto.X509ExtensionGetOid(ext); 511IntPtr dataPtr = Interop.Crypto.X509ExtensionGetData(ext); 861internal static DateTime ExtractValidityDateTime(IntPtr validityDatePtr)
System\Security\Cryptography\X509Certificates\OpenSslX509ChainProcessor.cs (13)
218IntPtr lastCert = IntPtr.Zero; 228IntPtr currentHandle = currentCert.DangerousGetHandle(); 280Span<IntPtr> tempChain = stackalloc IntPtr[DefaultChainCapacity]; 289int targetSize = checked(chainSize * IntPtr.Size); 291tempChain = MemoryMarshal.Cast<byte, IntPtr>(tempChainRent.AsSpan(0, targetSize)); 545IntPtr rootPtr = Interop.Crypto.GetX509StackField(chainStack, start); 608IntPtr certPtr = Interop.Crypto.GetX509StackField(chainStack, i); 638private static unsafe int VerifyCallback(int ok, IntPtr ctx) 884IntPtr elementCertPtr = Interop.Crypto.GetX509StackField(chainStack, i); 886if (elementCertPtr == IntPtr.Zero) 1301private static void AddToStackAndUpRef(IntPtr cert, SafeX509StackHandle stack)
System\Security\Cryptography\X509Certificates\StorePal.cs (1)
11internal static partial IStorePal FromHandle(IntPtr storeHandle);
System\Security\Cryptography\X509Certificates\StorePal.OpenSsl.cs (1)
13internal static partial IStorePal FromHandle(IntPtr storeHandle)
System\Security\Cryptography\X509Certificates\X509Certificate.cs (3)
135public X509Certificate(IntPtr handle) 264public IntPtr Handle => Pal is null ? IntPtr.Zero : Pal.Handle;
System\Security\Cryptography\X509Certificates\X509Certificate2.cs (1)
124public X509Certificate2(IntPtr handle)
System\Security\Cryptography\X509Certificates\X509Chain.cs (4)
28public X509Chain(IntPtr chainContext) 61public IntPtr ChainContext 69return IntPtr.Zero; 110if (customCertificate == null || customCertificate.Handle == IntPtr.Zero)
System\Security\Cryptography\X509Certificates\X509Store.cs (3)
79public X509Store(IntPtr storeHandle) 85public IntPtr StoreHandle 94return IntPtr.Zero;
System.Security.Cryptography.Pkcs (1)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
System.Security.Cryptography.ProtectedData (24)
src\libraries\Common\src\Interop\Windows\Crypt32\Interop.CryptProtectData.cs (2)
18IntPtr pvReserved, 19IntPtr pPromptStruct,
src\libraries\Common\src\Interop\Windows\Crypt32\Interop.CryptUnprotectData.cs (3)
16IntPtr ppszDataDescr, 18IntPtr pvReserved, 19IntPtr pPromptStruct,
src\libraries\Common\src\Interop\Windows\Crypt32\Interop.DATA_BLOB.cs (2)
15internal IntPtr pbData; 17internal DATA_BLOB(IntPtr handle, uint size)
src\libraries\Common\src\Interop\Windows\Kernel32\Interop.FormatMessage.cs (8)
21IntPtr lpSource, 26IntPtr arguments); 32GetMessage(errorCode, IntPtr.Zero); 34internal static unsafe string GetMessage(int errorCode, IntPtr moduleHandle) 37if (moduleHandle != IntPtr.Zero) 46int length = FormatMessage(flags, moduleHandle, unchecked((uint)errorCode), 0, bufferPtr, stackBuffer.Length, IntPtr.Zero); 58IntPtr nativeMsgPtr = default; 61int length = FormatMessage(flags | FORMAT_MESSAGE_ALLOCATE_BUFFER, moduleHandle, unchecked((uint)errorCode), 0, &nativeMsgPtr, 0, IntPtr.Zero);
System\Security\Cryptography\ProtectedData.cs (9)
339DATA_BLOB userDataBlob = new DATA_BLOB((IntPtr)pInputData, (uint)(inputData.Length)); 343optionalEntropyBlob = new DATA_BLOB((IntPtr)pOptionalEntropy, (uint)(optionalEntropy.Length)); 358Interop.Crypt32.CryptProtectData(in userDataBlob, null, ref optionalEntropyBlob, IntPtr.Zero, IntPtr.Zero, flags, out outputBlob) : 359Interop.Crypt32.CryptUnprotectData(in userDataBlob, IntPtr.Zero, ref optionalEntropyBlob, IntPtr.Zero, IntPtr.Zero, flags, out outputBlob); 375if (outputBlob.pbData == IntPtr.Zero) 402if (outputBlob.pbData != IntPtr.Zero)
System.Security.Cryptography.Xml (1)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
System.Security.Principal.Windows (9)
artifacts\obj\System.Security.Principal.Windows\Debug\net10.0\System.Security.Principal.Windows.notsupported.cs (9)
11public SafeAccessTokenHandle() : base (default(System.IntPtr), default(bool)) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 12public SafeAccessTokenHandle(System.IntPtr handle) : base (default(System.IntPtr), default(bool)) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 77public SecurityIdentifier(System.IntPtr binaryForm) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 237public WindowsIdentity(System.IntPtr userToken) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 238public WindowsIdentity(System.IntPtr userToken, string type) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 239public WindowsIdentity(System.IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 240public WindowsIdentity(System.IntPtr userToken, string type, System.Security.Principal.WindowsAccountType acctType, bool isAuthenticated) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } 258public virtual System.IntPtr Token { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } }
System.ServiceProcess.ServiceController (2)
artifacts\obj\System.ServiceProcess.ServiceController\Debug\net10.0\System.ServiceProcess.ServiceController.notsupported.cs (2)
42protected System.IntPtr ServiceHandle { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_ServiceController); } } 57public void ServiceMainCallback(int argCount, System.IntPtr argPointer) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_ServiceController); }
System.Speech (6)
artifacts\obj\System.Speech\Debug\net10.0\System.Speech.notsupported.cs (6)
1005int Write(System.IntPtr data, int count); 1106public SpeechEventInfo(short eventId, short parameterType, int param1, System.IntPtr param2) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } 1109public System.IntPtr Param2 { get { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_SystemSpeech); } } 1141public abstract System.IntPtr GetOutputFormat(System.Speech.Synthesis.TtsEngine.SpeakOutputFormat speakOutputFormat, System.IntPtr targetWaveFormat); 1143public abstract void Speak(System.Speech.Synthesis.TtsEngine.TextFragment[] fragment, System.IntPtr waveHeader, System.Speech.Synthesis.TtsEngine.ITtsEngineSite site);
System.Text.Encoding.CodePages (5)
Microsoft\Win32\SafeHandles\SafeAllocHHandle.cs (3)
14internal SafeAllocHHandle(IntPtr handle) : base(true) 21get { return new SafeAllocHHandle(IntPtr.Zero); } 26if (handle != IntPtr.Zero)
System\Text\BaseCodePageEncoding.cs (2)
372safeNativeMemoryHandle = new SafeAllocHHandle((IntPtr)pNativeMemory); 408if (safeNativeMemoryHandle != null && safeNativeMemoryHandle.DangerousGetHandle() == IntPtr.Zero)
System.Text.Encodings.Web (1)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
System.Text.Json (2)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
System\Text\Json\Serialization\Converters\Value\UnsupportedTypeConverterFactory.cs (1)
27type == typeof(IntPtr) ||
System.Text.Json.SourceGeneration (1)
Helpers\KnownTypeSymbols.cs (1)
253public INamedTypeSymbol? IntPtrType => GetOrResolveType(typeof(IntPtr), ref _IntPtrType);
System.Text.RegularExpressions (2)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
System\Text\RegularExpressions\RegexReplacement.cs (1)
272result = string.Create(length, ((IntPtr)(&tmpSpan), input, replacement), static (dest, state) =>
System.Text.RegularExpressions.Generator (2)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
src\libraries\System.Text.RegularExpressions\src\System\Text\RegularExpressions\RegexCharClass.cs (1)
1616return StringExtensions.Create(SetStartIndex + count, (IntPtr)(&tmpChars), static (span, charsPtr) =>
System.Threading (2)
System\Threading\CDSsyncETWBCLProvider.cs (2)
80DataPointer = ((IntPtr)(&senseAsInt32)) 85DataPointer = ((IntPtr)(&phaseNum))
System.Threading.Tasks.Parallel (17)
System\Threading\Tasks\ParallelETWProvider.cs (15)
122DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)) 127DataPointer = ((IntPtr)(&OriginatingTaskID)) 132DataPointer = ((IntPtr)(&ForkJoinContextID)) 137DataPointer = ((IntPtr)(&OperationType)) 142DataPointer = ((IntPtr)(&InclusiveFrom)) 147DataPointer = ((IntPtr)(&ExclusiveTo)) 182DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)) 187DataPointer = ((IntPtr)(&OriginatingTaskID)) 192DataPointer = ((IntPtr)(&ForkJoinContextID)) 197DataPointer = ((IntPtr)(&TotalIterations)) 232DataPointer = ((IntPtr)(&OriginatingTaskSchedulerID)) 237DataPointer = ((IntPtr)(&OriginatingTaskID)) 242DataPointer = ((IntPtr)(&ForkJoinContextID)) 247DataPointer = ((IntPtr)(&OperationType)) 252DataPointer = ((IntPtr)(&ActionCount))
System\Threading\Tasks\ParallelRangeManager.cs (2)
114if (IntPtr.Size == 4 && _use32BitCurrentIndex) 254_use32BitCurrentIndex = IntPtr.Size == 4 && nRangeSize <= int.MaxValue;
System.Transactions.Local (2)
System\Transactions\IDtcTransaction.cs (2)
15void Abort(IntPtr reason, int retaining, int async); 17void GetTransactionInfo(IntPtr transactionInformation);
System.Web.HttpUtility (1)
src\libraries\Common\src\System\HexConverter.cs (1)
414if (IntPtr.Size == 8)
System.Windows.Controls.Ribbon (26)
Microsoft\Windows\Controls\Ribbon\NativeMethods.cs (16)
206public IntPtr handle; 208public IntPtr wParam; 209public IntPtr lParam; 296public IntPtr hwnd; 297public IntPtr hwndInsertAfter; 318public static extern IntPtr MonitorFromRect(ref RECT rect, int flags); 331public static extern IntPtr GetCapture(); 351private static extern IntPtr IntGetDC(HandleRef hWnd); 352public static IntPtr GetDC(HandleRef hWnd) 354IntPtr hDc = IntGetDC(hWnd); 355if (hDc == IntPtr.Zero) 367HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 448internal static IntPtr Add(IntPtr handle, int type) 481internal static IntPtr Remove(IntPtr handle, int type)
Microsoft\Windows\Controls\Ribbon\Ribbon.cs (2)
1581IntPtr monitorPtr = NativeMethods.MonitorFromRect(ref popupPlacementTargetRect, NativeMethods.MONITOR_DEFAULTTONEAREST); 1582if (monitorPtr != IntPtr.Zero)
Microsoft\Windows\Controls\Ribbon\RibbonDropDownHelper.cs (2)
167IntPtr monitor = NativeMethods.MonitorFromRect(ref nativeBounds, NativeMethods.MONITOR_DEFAULTTONEAREST); 168if (monitor != IntPtr.Zero)
Microsoft\Windows\Controls\Ribbon\RibbonHelper.cs (6)
994public static bool IsOurWindow(IntPtr hwnd, DependencyObject element) 997if (hwnd != IntPtr.Zero) 1020IntPtr capturedHwnd = IntPtr.Zero; 1027if (capturedHwnd != IntPtr.Zero && 1042(capturedHwnd == IntPtr.Zero ||
System.Windows.Extensions (2)
artifacts\obj\System.Windows.Extensions\Debug\net10.0\System.Windows.Extensions.notsupported.cs (2)
59public static void DisplayCertificate(System.Security.Cryptography.X509Certificates.X509Certificate2 certificate, System.IntPtr hwndParent) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions); } 61public static System.Security.Cryptography.X509Certificates.X509Certificate2Collection SelectFromCollection(System.Security.Cryptography.X509Certificates.X509Certificate2Collection certificates, string? title, string? message, System.Security.Cryptography.X509Certificates.X509SelectionFlag selectionFlag, System.IntPtr hwndParent) { throw new System.PlatformNotSupportedException(System.SR.PlatformNotSupported_System_Windows_Extensions); }
System.Windows.Forms (276)
System\Windows\Forms\Accessibility\AccessibleObject.cs (2)
2720protected void UseStdAccessibleObjects(IntPtr handle) 2725protected unsafe void UseStdAccessibleObjects(IntPtr handle, int objid)
System\Windows\Forms\Accessibility\Control.ControlAccessibleObject.cs (2)
226/// An <see cref="IntPtr"/> that represents the handle of the associated <see cref="Owner"/> control. 234public IntPtr Handle
System\Windows\Forms\ActiveX\AxHost.cs (7)
110private IntPtr _wndprocAddr = IntPtr.Zero; 1244if (!IsHandleCreated || _wndprocAddr == IntPtr.Zero) 1250IntPtr currentWndproc = PInvokeCore.GetWindowLong(this, WINDOW_LONG_PTR_INDEX.GWL_WNDPROC); 2952Marshal.FreeCoTaskMem((IntPtr)uuids.pElems); 3052Marshal.FreeCoTaskMem((IntPtr)uuids.pElems); 3447_wndprocAddr = IntPtr.Zero;
System\Windows\Forms\ActiveX\Control.ActiveXFontMarshaler.cs (1)
24public void CleanUpNativeData(IntPtr pObj) => Marshal.Release(pObj);
System\Windows\Forms\ActiveX\Control.ActiveXImpl.cs (2)
56private IntPtr ActiveXHWNDParent 2098void IWindowTarget.OnHandleChange(IntPtr newHandle) => _controlWindowTarget.OnHandleChange(newHandle);
System\Windows\Forms\ComponentModel\COM2Interop\COM2ComponentEditor.cs (1)
41Marshal.FreeCoTaskMem((IntPtr)uuids.pElems);
System\Windows\Forms\ComponentModel\COM2Interop\COM2IManagedPerPropertyBrowsingHandler.cs (1)
240Marshal.FreeCoTaskMem((IntPtr)values);
System\Windows\Forms\ComponentModel\COM2Interop\ICOM2PropertyPageDisplayService.cs (1)
29void ShowPropertyPage(string title, object component, int dispid, Guid pageGuid, IntPtr parentHandle);
System\Windows\Forms\Control.ControlNativeWindow.cs (1)
32public void OnHandleChange(IntPtr newHandle)
System\Windows\Forms\Control.cs (18)
1330cp.Parent = _parent is null ? IntPtr.Zero : _parent.InternalHandle; 1335cp.Parent = IntPtr.Zero; 1357if (cp.Parent == IntPtr.Zero && IsActiveX) 2112public IntPtr Handle 2130internal IntPtr HandleInternal => _window.Handle; 4509if (cp.Parent == IntPtr.Zero && (cp.Style & (int)WINDOW_STYLE.WS_CHILD) != 0) 5134public static Control? FromChildHandle(IntPtr handle) 5161public static Control? FromHandle(IntPtr handle) 7279IntPtr handle = Handle; 7431accObj.Handle = IntPtr.Zero; 7438nonClientAccessibleObject.Handle = IntPtr.Zero; 8702private unsafe void PrintToMetaFile(HDC hDC, IntPtr lParam) 8735private protected virtual void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds) 9206if (_window.Handle == IntPtr.Zero) 9264if (PInvoke.SetParent(this, parentHandle) == IntPtr.Zero) 9308protected static bool ReflectMessage(IntPtr hWnd, ref Message m) 10145private void SetHandle(IntPtr value) 10147if (value == IntPtr.Zero)
System\Windows\Forms\Control.Ime.cs (17)
449internal void OnImeContextStatusChanged(IntPtr handle) 684public static void Disable(IntPtr handle) 698HIMC oldContext = PInvoke.ImmAssociateContext((HWND)handle, (HIMC)IntPtr.Zero); 699if (oldContext != IntPtr.Zero) 708public static void Enable(IntPtr handle) 715if (inputContext == IntPtr.Zero) 717if (s_originalImeContext == IntPtr.Zero) 720if (inputContext != IntPtr.Zero) 746public static unsafe ImeMode GetImeMode(IntPtr handle) 748HIMC inputContext = (HIMC)IntPtr.Zero; 762if (inputContext == IntPtr.Zero) 808if (inputContext != IntPtr.Zero) 819public static bool IsOpen(IntPtr handle) 825if (inputContext != IntPtr.Zero) 837public static unsafe void SetImeStatus(ImeMode imeMode, IntPtr handle) 925public static void SetOpenStatus(bool open, IntPtr handle) 934if (inputContext != IntPtr.Zero)
System\Windows\Forms\Controls\ComboBox\ComboBox.ChildAccessibleObject.cs (1)
12public ChildAccessibleObject(ComboBox owner, IntPtr handle)
System\Windows\Forms\Controls\ComboBox\ComboBox.cs (1)
3767using Graphics g = Graphics.FromHdcInternal((IntPtr)dc);
System\Windows\Forms\Controls\DataGridView\DataGridView.Methods.cs (1)
5443region.ReleaseHrgn((IntPtr)hrgn);
System\Windows\Forms\Controls\DataGridView\DataGridViewComboBoxCell.cs (1)
1264IntPtr h;
System\Windows\Forms\Controls\DateTimePicker\DateTimePicker.cs (1)
1506if (handle != IntPtr.Zero)
System\Windows\Forms\Controls\ImageList\ImageList.cs (5)
108public IntPtr Handle 377HBITMAP hBitmap = (HBITMAP)ControlPaint.CreateHBitmapColorMask(bitmap, (IntPtr)hMask); 562IntPtr srcPtr = sourceData.Scan0 + offsetSrc; 563IntPtr destPtr = targetData.Scan0 + offsetDest; 623tmpBitmap = Image.FromHbitmap((IntPtr)imageInfo.hbmImage);
System\Windows\Forms\Controls\Labels\Label.cs (1)
1351private protected override void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds)
System\Windows\Forms\Controls\ListView\ListView.cs (11)
4104IntPtr hGlobalColumns = IntPtr.Zero; 4138IntPtr result = PInvokeCore.SendMessage(this, PInvoke.LVM_ISGROUPVIEWENABLED); 4139Debug.Assert(result != IntPtr.Zero, "Groups not enabled"); 4141Debug.Assert(result != IntPtr.Zero, $"Doesn't contain group id: {lvItem.iGroupId}"); 4146if (lvItem.cColumns > maxColumns || hGlobalColumns == IntPtr.Zero) 4148if (hGlobalColumns != IntPtr.Zero) 4226if (hGlobalColumns != IntPtr.Zero) 5221IntPtr result; 5232if (result == IntPtr.Zero) 5536IntPtr callbackPointer = Marshal.GetFunctionPointerForDelegate(callback);
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\GridToolTip.cs (1)
87Parent = IntPtr.Zero,
System\Windows\Forms\Controls\PropertyGrid\PropertyGridInternal\PropertyGridView.MouseHook.cs (2)
94IntPtr hook = Marshal.GetFunctionPointerForDelegate(_callBack); 161IntPtr handle = _control.HandleInternal;
System\Windows\Forms\Controls\RichTextBox\RichTextBox.cs (4)
41private static IntPtr s_moduleHandle; 257if (s_moduleHandle == IntPtr.Zero) 2094if (txrg.lpstrText != IntPtr.Zero) 3222PInvokeCore.SendMessage(this, PInvokeCore.EM_EXLIMITTEXT, 0, (IntPtr)MaxLength);
System\Windows\Forms\Controls\TabControl\TabControl.cs (2)
472IntPtr handle = (value is not null) ? value.Handle : IntPtr.Zero;
System\Windows\Forms\Controls\TabControl\TabPage.TabAccessibleObject.cs (1)
71? (int)IntPtr.Zero
System\Windows\Forms\Controls\TextBox\MaskedTextBox.cs (1)
1073if (inputContext != IntPtr.Zero)
System\Windows\Forms\Controls\ToolStrips\ToolStrip.cs (3)
673if (_dropDownOwnerWindow.Handle == IntPtr.Zero) 1750if (_hwndThatLostFocus == IntPtr.Zero) 2649private protected override void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.cs (1)
86if (_activeHwnd.Handle != IntPtr.Zero)
System\Windows\Forms\Controls\ToolStrips\ToolStripManager.ModalMenuFilter.HostedWindowsFormsMessageHook.cs (4)
33_messageHookHandle == IntPtr.Zero, 65IntPtr hook = Marshal.GetFunctionPointerForDelegate(_callBack); 72if (_messageHookHandle != IntPtr.Zero) 77Debug.Assert(_messageHookHandle != IntPtr.Zero, "Failed to install mouse hook");
System\Windows\Forms\Controls\ToolStrips\ToolStripMenuItem.cs (2)
585if (_nativeMenuCommandID == -1 || _nativeMenuHandle == IntPtr.Zero) 605if (_nativeMenuCommandID == -1 || _nativeMenuHandle == IntPtr.Zero)
System\Windows\Forms\Controls\TrackBar\TrackBar.cs (1)
799LRESULT lresult = PInvokeCore.SendMessage(this, PInvoke.TBM_SETTIC, lParam: (IntPtr)i);
System\Windows\Forms\Controls\TreeView\TreeNode.cs (14)
239{ *((IntPtr*)&rc.left) = Handle; } 262{ *((IntPtr*)&rc.left) = Handle; } 294if (HTREEITEMInternal == IntPtr.Zero) 328if (HTREEITEMInternal != IntPtr.Zero && _treeView is not null && !_treeView.IsDisposed) 477public IntPtr Handle => (nint)HTREEITEM; 484if (HTREEITEMInternal == IntPtr.Zero && TreeView is not null) 613if (HTREEITEMInternal == IntPtr.Zero) 626{ *((IntPtr*)&rc.left) = Handle; } 954if (HTREEITEMInternal == IntPtr.Zero) 1191public static TreeNode? FromHandle(TreeView tree, IntPtr handle) => tree.NodeFromHandle(handle); 1277if (HTREEITEMInternal != IntPtr.Zero) 1980if (HTREEITEMInternal != IntPtr.Zero) 1988HTREEITEMInternal = (HTREEITEM)IntPtr.Zero; 2125if (HTREEITEMInternal == IntPtr.Zero)
System\Windows\Forms\Controls\TreeView\TreeNodeCollection.cs (2)
300if (node.HTREEITEMInternal != IntPtr.Zero) 436if (node.HTREEITEMInternal != IntPtr.Zero)
System\Windows\Forms\Controls\TreeView\TreeView.cs (27)
129internal Dictionary<IntPtr, TreeNode> _nodesByHandle = []; 1092IntPtr hItem = PInvokeCore.SendMessage(this, PInvoke.TVM_GETNEXTITEM, (WPARAM)PInvoke.TVGN_CARET); 1093if (hItem == IntPtr.Zero) 1305IntPtr hitem = PInvokeCore.SendMessage(this, PInvoke.TVM_GETNEXTITEM, (WPARAM)PInvoke.TVGN_FIRSTVISIBLE); 1306return (hitem == IntPtr.Zero ? null : NodeFromHandle(hitem)); 1693IntPtr handle = (ImageList is null) ? IntPtr.Zero : ImageList.Handle; 1746IntPtr handle = IntPtr.Zero; 1830internal TreeNode? NodeFromHandle(IntPtr handle) 1997private void SetStateImageList(IntPtr handle) 2001IntPtr handleOld = PInvokeCore.SendMessage(this, PInvoke.TVM_SETIMAGELIST, (WPARAM)PInvoke.TVSIL_STATE, (LPARAM)handle); 2002if ((handleOld != IntPtr.Zero) && (handleOld != handle)) 2012IntPtr handle = PInvokeCore.SendMessage(this, PInvoke.TVM_GETIMAGELIST, (WPARAM)PInvoke.TVSIL_STATE); 2013if (handle != IntPtr.Zero) 2422if (item.hItem == IntPtr.Zero) 2437if (item.hItem == IntPtr.Zero) 2462if (item.hItem == IntPtr.Zero) 2491if (nmtv->itemNew.hItem == IntPtr.Zero) 2524if (nmtv->itemNew.hItem != IntPtr.Zero) 2544*((IntPtr*)&rc.left) = nmtv->itemOld.hItem; 2545if (nmtv->itemOld.hItem != IntPtr.Zero) 2557if (nmtvdi.item.hItem == IntPtr.Zero) 2559return (LRESULT)IntPtr.Zero; 2593if (nmtvdi.item.hItem == IntPtr.Zero) 3197if (item->hItem != IntPtr.Zero) 3352_mouseDownNode = IntPtr.Zero;
System\Windows\Forms\Controls\Unsupported\ContextMenu\Menu.cs (3)
32public IntPtr Handle => throw null; 67protected virtual IntPtr CreateMenuHandle() => throw null; 69public MenuItem FindMenuItem(int type, IntPtr value) => throw null;
System\Windows\Forms\Controls\WebBrowser\WebBrowserBase.cs (2)
581internal IntPtr GetHandleNoCreate() => IsHandleCreated ? Handle : IntPtr.Zero;
System\Windows\Forms\CreateParams.cs (1)
63public IntPtr Parent { get; set; }
System\Windows\Forms\Dialogs\CommonDialogs\ColorDialog.cs (1)
157protected override unsafe bool RunDialog(IntPtr hwndOwner)
System\Windows\Forms\Dialogs\CommonDialogs\CommonDialog.cs (11)
64protected virtual IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) 87return IntPtr.Zero; 123protected virtual unsafe IntPtr OwnerWndProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) 143return IntPtr.Zero; 158protected abstract bool RunDialog(IntPtr hwndOwner);
System\Windows\Forms\Dialogs\CommonDialogs\FileDialog.cs (7)
492protected override unsafe IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) 496return IntPtr.Zero; 573return IntPtr.Zero; 725protected override bool RunDialog(IntPtr hWndOwner)
System\Windows\Forms\Dialogs\CommonDialogs\FolderBrowserDialog.cs (1)
275protected override bool RunDialog(IntPtr hwndOwner) =>
System\Windows\Forms\Dialogs\CommonDialogs\FontDialog.cs (5)
302protected override IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) 380protected override unsafe bool RunDialog(IntPtr hWndOwner)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialog.cs (28)
82/// The <see cref="IntPtr"/> of a <see cref="GCHandle"/> that represents this 85private IntPtr _instanceHandlePtr; 145/// so that <see cref="ShowDialog(IntPtr, TaskDialogPage, TaskDialogStartupLocation)"/> can then return it. 205/// Gets the window handle of the task dialog window, or <see cref="IntPtr.Zero"/> 208public IntPtr Handle 226/// Gets a value that indicates whether <see cref="ShowDialog(IntPtr, TaskDialogPage, TaskDialogStartupLocation)"/> is 229internal bool IsShown => _instanceHandlePtr != IntPtr.Zero; 244internal bool IsHandleCreated => _handle != IntPtr.Zero; 264private static void FreeConfig(IntPtr ptrToFree) => Marshal.FreeHGlobal(ptrToFree); 331=> ShowDialogAsync(IntPtr.Zero, page.OrThrowIfNull(), startupLocation); 374/// The handle of the owner window, or <see cref="IntPtr.Zero"/> to show a modeless dialog. 462=> ShowDialog(IntPtr.Zero, page.OrThrowIfNull(), startupLocation); 504/// The handle of the owner window, or <see cref="IntPtr.Zero"/> to show a 526IntPtr hwndOwner, 549IntPtr hwndOwner, 566_instanceHandlePtr = (IntPtr)instanceHandle; 573out IntPtr ptrToFree, 654Debug.Assert(_handle == IntPtr.Zero); 694_instanceHandlePtr = IntPtr.Zero; 873internal void UpdateIconElement(TASKDIALOG_ICON_ELEMENTS element, IntPtr icon) 1158_boundPage.Expander!.HandleExpandoButtonClicked((nint)wParam != IntPtr.Zero); 1162_boundPage.Verification!.HandleCheckBoxClicked((nint)wParam != IntPtr.Zero); 1293IntPtr.Zero, 1295out IntPtr ptrToFree, 1351IntPtr hwndOwner, 1431ptrToFree = Marshal.AllocHGlobal((nint)(sizeToAllocate + (IntPtr.Size - 1))); 1571nuint add = (nuint)(alignment ?? IntPtr.Size) - 1; 1625if (Handle == IntPtr.Zero)
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogFootnote.cs (1)
132_boundIconIsFromHandle ? icon.hFooterIcon : (IntPtr)(char*)icon.pszFooterIcon);
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogIcon.cs (4)
96private readonly IntPtr? _iconHandle; 138/// <param name="iconHandle">A handle to an instance of an icon, or <see cref="IntPtr.Zero"/> to not show an icon.</param> 145public TaskDialogIcon(IntPtr iconHandle) 180public IntPtr IconHandle => _iconHandle ?? throw new InvalidOperationException();
System\Windows\Forms\Dialogs\TaskDialog\TaskDialogPage.cs (1)
416_boundIconIsFromHandle ? icon.hMainIcon : (IntPtr)(char*)icon.pszMainIcon);
System\Windows\Forms\ErrorProvider\ErrorProvider.ControlItem.cs (2)
29public ControlItem(ErrorProvider provider, Control control, IntPtr id) 73public IntPtr Id { get; }
System\Windows\Forms\ErrorProvider\ErrorProvider.ErrorWindow.cs (1)
230private void OnToolTipVisibilityChanging(IntPtr id, bool toolTipShown)
System\Windows\Forms\Form.cs (3)
318IntPtr hwnd = PInvokeCore.SendMessage(_ctlClient, PInvokeCore.WM_MDIGETACTIVE); 1932if (_ownerWindow.Handle == IntPtr.Zero) 4668if (_ctlClient is not null && _ctlClient.Handle != IntPtr.Zero &&
System\Windows\Forms\Input\Cursor.cs (3)
56public Cursor(IntPtr handle) 156public IntPtr Handle 222public IntPtr CopyHandle()
System\Windows\Forms\Input\InputLanguage.cs (2)
20internal InputLanguage(IntPtr handle) 71public IntPtr Handle => _handle;
System\Windows\Forms\IWin32window.cs (1)
13IntPtr Handle { get; }
System\Windows\Forms\IWindowTarget.cs (1)
16void OnHandleChange(IntPtr newHandle);
System\Windows\Forms\MDI\MDIClient.cs (3)
144if (Handle == IntPtr.Zero) 173if (site is not null && site.DesignMode && Handle != IntPtr.Zero) 333if (ParentInternal is not null && ParentInternal.Site is not null && ParentInternal.Site.DesignMode && Handle != IntPtr.Zero)
System\Windows\Forms\NativeWindow.cs (7)
52private static IntPtr s_defaultWindowProc; 151public IntPtr Handle => HWND; 292public void AssignHandle(IntPtr handle) => AssignHandle((HWND)handle, assignUniqueID: true); 554public static NativeWindow? FromHandle(IntPtr handle) 555=> handle != IntPtr.Zero ? GetWindowFromTable((HWND)handle) : null; 567/// <see cref="IntPtr.Zero"/>. 609Debug.Assert(DefaultWindowProc != IntPtr.Zero, "We have active windows but no user window proc?");
System\Windows\Forms\NativeWindow.WindowClass.cs (1)
25private IntPtr _defaultWindProc;
System\Windows\Forms\NotifyIcon.cs (2)
573if (_window.Handle == IntPtr.Zero) 646if (_window.Handle == IntPtr.Zero)
System\Windows\Forms\Panels\Panel.cs (1)
228private protected override void PrintToMetaFileRecursive(HDC hDC, IntPtr lParam, Rectangle bounds)
System\Windows\Forms\Printing\PageSetupDialog.cs (1)
264protected override unsafe bool RunDialog(IntPtr hwndOwner)
System\Windows\Forms\Printing\PrintDialog.cs (3)
219protected override bool RunDialog(IntPtr hwndOwner) => 467IntPtr hDevMode, 468IntPtr hDevNames,
System\Windows\Forms\Rendering\ControlPaint.cs (9)
145public static unsafe IntPtr CreateHBitmap16Bit(Bitmap bitmap, Color background) 234return (IntPtr)hbitmap; 241public static unsafe IntPtr CreateHBitmapTransparencyMask(Bitmap bitmap) 292return (IntPtr)PInvokeCore.CreateBitmap(size.Width, size.Height, nPlanes: 1, nBitCount: 1, pBits); 300public static IntPtr CreateHBitmapColorMask(Bitmap bitmap, IntPtr monochromeMask) 323return (IntPtr)colorMask; 340lbHatch = (nuint)(IntPtr)hBitmap 1470IntPtr.Zero);
System\Windows\Forms\Rendering\DrawingEventArgs.cs (1)
110_graphics = Graphics.FromHdcInternal((IntPtr)_hdc);
System\Windows\Forms\Rendering\DrawItemEventArgs.cs (2)
161IntPtr IDeviceContext.GetHdc() => Graphics?.GetHdc() ?? IntPtr.Zero;
System\Windows\Forms\Rendering\PaintEventArgs.cs (2)
134IntPtr IDeviceContext.GetHdc() => Graphics?.GetHdc() ?? IntPtr.Zero;
System\Windows\Forms\Rendering\ScreenDcCache.cs (10)
27private readonly IntPtr[] _itemsCache; 36_itemsCache = new IntPtr[cacheSpace]; 44IntPtr item; 48item = Interlocked.Exchange(ref _itemsCache[i], IntPtr.Zero); 49if (item != IntPtr.Zero) 67IntPtr temp = (IntPtr)hdc; 73if (temp == IntPtr.Zero) 89IntPtr hdc = _itemsCache[i]; 90if (hdc != IntPtr.Zero)
System\Windows\Forms\Rendering\TextRenderer.cs (1)
637|| graphics.Clip.GetHrgn(graphics) == IntPtr.Zero,
System\Windows\Forms\Screen.cs (1)
275public static Screen FromHandle(IntPtr hwnd)
System\Windows\Forms\ToolTip\ToolTip.cs (7)
261internal IntPtr Handle 829IntPtr result = GetTOOLINFO(control, caption).SendMessage(this, PInvoke.TTM_ADDTOOLW); 837if (result == IntPtr.Zero) 967internal bool GetHandleCreated() => _window is not null && _window.Handle != IntPtr.Zero; 1796if (toolInfo.SendMessage(this, PInvoke.TTM_GETTOOLINFOW) != IntPtr.Zero) 1821IntPtr result = toolInfo.SendMessage(this, PInvoke.TTM_SETTOOLINFOW); 1857IntPtr result = toolInfo.SendMessage(this, PInvoke.TTM_ADDTOOLW);
System\Windows\Forms\ToolTip\ToolTipBuffer.cs (2)
10public unsafe IntPtr Buffer 16return (IntPtr)c;
System\Windows\Forms\VisualStyles\VisualStyleRenderer.cs (5)
60IntPtr hTheme = GetHandle("BUTTON", false); // Button is an arbitrary choice. 61supported = hTheme != IntPtr.Zero; 172public IntPtr Handle 743IntPtr hRgn = region.GetHrgn(g); 750public HitTestCode HitTestBackground(IDeviceContext dc, Rectangle backgroundRectangle, IntPtr hRgn, Point pt, HitTestOptions options)
System.Windows.Forms.Design (35)
System\ComponentModel\Design\DesignerActionPanel.EditorPropertyLine.FlyoutDialog.cs (1)
157PInvokeCore.SetWindowLong(this, WINDOW_LONG_PTR_INDEX.GWL_HWNDPARENT, IntPtr.Zero);
System\ComponentModel\Design\DesignerActionUI.DesignerActionToolStripDropDown.cs (1)
218private bool IsWindowEnabled(IntPtr handle)
System\Drawing\Design\ColorEditor.CustomColorDialog.cs (9)
17private IntPtr _hInstance; 32protected override IntPtr Instance 36Debug.Assert(_hInstance != IntPtr.Zero, "Dialog has been disposed"); 47if (_hInstance != IntPtr.Zero) 50_hInstance = IntPtr.Zero; 59protected override unsafe IntPtr HookProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam)
System\Runtime\InteropServices\UCOMITypeLib.cs (2)
19void GetLibAttr(out IntPtr ppTLibAttr); 27void ReleaseTLibAttr(IntPtr pTLibAttr);
System\Windows\Forms\Design\Behavior\BehaviorService.AdornerWindow.MouseHook.cs (1)
78IntPtr hook = Marshal.GetFunctionPointerForDelegate(_callBack);
System\Windows\Forms\Design\Behavior\BehaviorService.cs (1)
285public Point MapAdornerWindowPoint(IntPtr handle, Point pt)
System\Windows\Forms\Design\Behavior\DropSourceBehavior.cs (3)
175return _behaviorServiceTarget.MapAdornerWindowPoint(IntPtr.Zero, pt); 188return _behaviorServiceSource.MapAdornerWindowPoint(IntPtr.Zero, pt); 698controlRect.Location = _behaviorServiceTarget.MapAdornerWindowPoint(IntPtr.Zero, controlRect.Location);
System\Windows\Forms\Design\ControlDesigner.ChildSubClass.cs (1)
13public ChildSubClass(ControlDesigner designer, IntPtr hwnd)
System\Windows\Forms\Design\ControlDesigner.ChildWindowTarget.cs (2)
30public void OnHandleChange(IntPtr newHandle) 79Debug.Assert(_handle != IntPtr.Zero, "Handle for control not created");
System\Windows\Forms\Design\ControlDesigner.cs (3)
71private Dictionary<IntPtr, bool>? _subclassedChildren; 191private Dictionary<IntPtr, bool> SubclassedChildWindows => _subclassedChildren ??= []; 2479internal void RemoveSubclassedWindow(IntPtr hwnd) =>
System\Windows\Forms\Design\ControlDesigner.DesignerWindowTarget.cs (2)
35public void OnHandleChange(IntPtr newHandle) 38if (newHandle != IntPtr.Zero)
System\Windows\Forms\Design\DesignerUtils.cs (1)
442IntPtr hDc = g.GetHdc();
System\Windows\Forms\Design\ISupportInSituService.cs (1)
26IntPtr GetEditWindow();
System\Windows\Forms\Design\PbrsForward.cs (1)
56void IWindowTarget.OnHandleChange(IntPtr newHandle)
System\Windows\Forms\Design\RichTextBoxDesigner.cs (1)
31if (control is not null && control.Handle != IntPtr.Zero)
System\Windows\Forms\Design\ThemedScrollbarWindow.cs (1)
8public IntPtr Handle;
System\Windows\Forms\Design\ToolStripInSituService.cs (3)
213public IntPtr GetEditWindow() 215IntPtr hWnd = IntPtr.Zero;
System\Windows\Forms\Design\ToolStripTemplateNode.cs (1)
1511private bool IsParentWindow(IntPtr hWnd)
System.Windows.Forms.Design.Tests (14)
ControlDesignerTests.cs (2)
369var msg = Message.Create(_designer._control.Handle, 0x0202, IntPtr.Zero, IntPtr.Zero);
System\ComponentModel\Design\ByteViewerTests.cs (10)
144Assert.Equal(IntPtr.Zero, createParams.Parent); 234Assert.NotEqual(IntPtr.Zero, control.Handle); 287Assert.NotEqual(IntPtr.Zero, control.Handle); 359Assert.NotEqual(IntPtr.Zero, control.Handle); 475Assert.NotEqual(IntPtr.Zero, control.Handle); 550Assert.NotEqual(IntPtr.Zero, control.Handle); 653Assert.NotEqual(IntPtr.Zero, control.Handle); 766Assert.NotEqual(IntPtr.Zero, control.Handle); 950Assert.NotEqual(IntPtr.Zero, control.Handle); 978Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\Design\ToolStripInSituServiceTests.cs (2)
102IntPtr result = _inSituService.GetEditWindow(); 103result.Should().Be(IntPtr.Zero);
System.Windows.Forms.IntegrationTests.Common (1)
TestHelpers.cs (1)
454(!switchToMainWindow && foregroundWindow != IntPtr.Zero))
System.Windows.Forms.Interop.Tests (7)
AccessibleObjectTests.cs (4)
502AssertSuccess(Test_IOleWindowGetWindow(o, IntPtr.Zero, HRESULT.E_FAIL)); 512AssertSuccess(Test_IOleWindowGetWindow(o, IntPtr.Zero, HRESULT.E_FAIL)); 779public new void UseStdAccessibleObjects(IntPtr handle) => base.UseStdAccessibleObjects(handle); 1024IntPtr expected,
PropertyGridTests.cs (2)
91if (handle == IntPtr.Zero) 147private static extern void ReleaseActCtx(IntPtr hActCtx);
RichTextBoxTests.cs (1)
83Assert.Equal("Fine Text", Marshal.PtrToStringUni((IntPtr)value.lpstrText));
System.Windows.Forms.Primitives (33)
Interop\Richedit\Interop.EDITSTREAM.cs (1)
15public IntPtr pfnCallback;
Interop\Richedit\Interop.EDITSTREAMCALLBACK.cs (2)
8public delegate int EDITSTREAMCALLBACK(IntPtr dwCookie, IntPtr pbBuff, int cb, out int pcb);
Interop\Richedit\Interop.ENDROPFILES.cs (1)
14public IntPtr hDrop;
Interop\Richedit\Interop.GETTEXTEX.cs (2)
17public IntPtr lpDefaultChar; 18public IntPtr lpUsedDefChar;
Interop\Richedit\Interop.TEXTRANGE.cs (1)
15public IntPtr lpstrText; // allocated by caller, zero terminated by RichEdit
Microsoft\Win32\SafeHandles\CoTaskMemSafeHandle.cs (3)
10internal CoTaskMemSafeHandle() : base(IntPtr.Zero, true) 14public override bool IsInvalid => IsClosed || handle == IntPtr.Zero; 19handle = IntPtr.Zero;
System\Windows\Forms\Internals\NativeMethods.cs (3)
8public delegate int ListViewCompareCallback(IntPtr lParam1, IntPtr lParam2, IntPtr lParamSort);
System\Windows\Forms\Internals\ScaleHelper.DpiAwarenessScope.cs (1)
83&& PInvoke.SetThreadDpiAwarenessContext(_originalDpiAwarenessContext) == IntPtr.Zero)
System\Windows\Forms\Internals\UnicodeCharBuffer.cs (3)
18public IntPtr AllocCoTaskMem() 20IntPtr result = Marshal.AllocCoTaskMem(_buffer.Length * 2); 43public void PutCoTaskMem(IntPtr ptr)
System\Windows\Forms\Message.cs (7)
17public IntPtr HWnd { get; set; } 54public IntPtr WParam 65public IntPtr LParam 76public IntPtr Result 100public static Message Create(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam)
Windows\Win32\Foundation\ATOM.cs (1)
27public static implicit operator ATOM(IntPtr atom) => new((ushort)atom);
Windows\Win32\PInvoke.EndDialog.cs (1)
9public static BOOL EndDialog<T>(T hDlg, IntPtr nResult)
Windows\Win32\PInvoke.KillTimer.cs (1)
9public static BOOL KillTimer<T>(T hWnd, IntPtr uIDEvent)
Windows\Win32\PInvoke.LoadLibrary.cs (1)
40/// <returns>A handle to the loaded module, if successful; <see cref="IntPtr.Zero"/> otherwise.</returns>
Windows\Win32\PInvoke.SetCapture.cs (2)
9public static IntPtr SetCapture<T>(T hWnd) where T : IHandle<HWND> 11IntPtr result = SetCapture(hWnd.Handle);
Windows\Win32\UI\Controls\ToolInfoWrapper.cs (1)
14private static uint TTTOOLINFO_V2_Size => IntPtr.Size == 4 ? 44u : 64u;
Windows\Win32\UI\Shell\NOTIFYICONDATAW.cs (2)
12public IntPtr hWnd; 16public IntPtr hIcon;
System.Windows.Forms.Primitives.Tests (21)
Interop\Ole32\CADWORDTests.cs (2)
33private static unsafe CADWORD CreateIntVector(IList<IntPtr>? allocations, params uint[] values) 41allocations?.Add((IntPtr)ca.pElems);
Interop\Ole32\CALPOLESTRTests.cs (5)
33private static unsafe CALPOLESTR CreateStringVector(IList<IntPtr>? allocations, params string[] values) 38pElems = (PWSTR*)Marshal.AllocCoTaskMem(IntPtr.Size * values.Length) 41allocations?.Add((IntPtr)ca.pElems); 43Span<IntPtr> elements = new(ca.pElems, values.Length); 46IntPtr nativeCopy = Marshal.StringToCoTaskMemUni(values[i]);
Interop\Oleaut32\ITypeInfoTests.cs (5)
114Assert.NotEqual(IntPtr.Zero, (IntPtr)pFuncDesc->lprgelemdescParam); 257Assert.Equal((uint)IntPtr.Size, pTypeAttr->cbSizeInstance); 262Assert.Equal(7 * IntPtr.Size, pTypeAttr->cbSizeVft); 263Assert.Equal((ushort)IntPtr.Size, pTypeAttr->cbAlignment);
Interop\Oleaut32\SAFEARRAYTests.cs (3)
45yield return new object[] { VT_BSTR, FADF_HAVEVARTYPE | FADF_BSTR, IntPtr.Size }; 46yield return new object[] { VT_UNKNOWN, FADF_HAVEIID | FADF_UNKNOWN, IntPtr.Size }; 47yield return new object[] { VT_DISPATCH, FADF_HAVEIID | FADF_DISPATCH, IntPtr.Size };
Interop\Richedit\EDITSTREAMTests.cs (1)
13if (IntPtr.Size == 4)
System\Windows\Forms\DeviceContextScopeTests.cs (1)
74IntPtr hdc = graphics.GetHdc();
System\Windows\Forms\Internals\ArgumentValidationTests.cs (4)
66nint param = IntPtr.Zero; 75nint param = IntPtr.Zero; 91HDC param = new(IntPtr.Zero); 106HDC param = new(IntPtr.Zero);
System.Windows.Forms.Primitives.TestUtilities (10)
ArchitectureDetection.cs (2)
8public static bool Is32bit => IntPtr.Size == 4; 9public static bool Is64bit => IntPtr.Size == 8;
HdcDeviceContextAdapter.cs (2)
18public IntPtr GetHdc() => (IntPtr)_hdc;
Metafiles\EmfScope.cs (1)
82IntPtr callback = Marshal.GetFunctionPointerForDelegate(CallBack);
PlatformDetection.Windows.cs (4)
156Assert.True(OpenProcessToken(PInvoke.GetCurrentProcess(), TOKEN_READ, out IntPtr processToken)); 223IntPtr TokenHandle, 278private static extern bool OpenProcessToken(IntPtr ProcessHandle, uint DesiredAccess, out IntPtr TokenHandle);
Win32\WindowClass.cs (1)
126public IntPtr CreateWindow(
System.Windows.Forms.Tests (3705)
CheckedListBoxTests.cs (4)
192Assert.NotEqual(IntPtr.Zero, control.Handle); 300Assert.NotEqual(IntPtr.Zero, control.Handle); 330Assert.NotEqual(IntPtr.Zero, control.Handle); 435Assert.NotEqual(IntPtr.Zero, control.Handle);
MaskedTextBoxTests.cs (5)
104control.Handle.Should().NotBe(IntPtr.Zero); 177control.Handle.Should().NotBe(IntPtr.Zero); 236control.Handle.Should().NotBe(IntPtr.Zero); 277control.Handle.Should().NotBe(IntPtr.Zero); 351control.Handle.Should().NotBe(IntPtr.Zero);
System\Windows\Forms\AccessibleObjects\AccessibleObjectTests.cs (10)
608yield return new object[] { IntPtr.Zero }; 609yield return new object[] { (IntPtr)1 }; 614public void AccessibleObject_UseStdAccessibleObjects_InvokeIntPtrInvalidHandle_Success(IntPtr handle) 672yield return new object[] { IntPtr.Zero, 0 }; 673yield return new object[] { (IntPtr)1, 0 }; 674yield return new object[] { IntPtr.Zero, unchecked((int)0xFFFFFFFC) }; 675yield return new object[] { (IntPtr)1, unchecked((int)0xFFFFFFFC) }; 680public void AccessibleObject_UseStdAccessibleObjects_InvokeIntPtrIntInvalidHandle_Success(IntPtr handle, int objid) 2777public new void UseStdAccessibleObjects(IntPtr handle) => base.UseStdAccessibleObjects(handle); 2779public new void UseStdAccessibleObjects(IntPtr handle, int objid) => base.UseStdAccessibleObjects(handle, objid);
System\Windows\Forms\AccessibleObjects\ComboBox.ChildAccessibleObjectTests.cs (3)
13Assert.Throws<ArgumentNullException>(() => new ComboBox.ChildAccessibleObject(null, IntPtr.Zero)); 22var accessibleObject = new ComboBox.ChildAccessibleObject(control, IntPtr.Zero); 38var accessibleObject = new ComboBox.ChildAccessibleObject(control, IntPtr.Zero);
System\Windows\Forms\AccessibleObjects\Control.ControlAccessibleObjectTests.cs (11)
71Assert.Equal(IntPtr.Zero, accessibleObject.HandleInternal); 88Assert.NotEqual(IntPtr.Zero, ownerControl.Handle); 135Assert.Equal(IntPtr.Zero, controlAccessibleObject.HandleInternal); 160Assert.Equal(IntPtr.Zero, controlAccessibleObject.Handle); 169Assert.Equal(IntPtr.Zero, accessibleObject.HandleInternal); 193Assert.NotEqual(IntPtr.Zero, controlAccessibleObject.Handle); 244IntPtr.Zero, 255IntPtr value; 263value = (IntPtr)testValue; 1077Assert.NotEqual(IntPtr.Zero, ownerControl.Handle); 1096Assert.NotEqual(IntPtr.Zero, ownerControl.Handle);
System\Windows\Forms\AccessibleObjects\ListViewGroup.ListViewGroupAccessibleObjectTests.cs (11)
157Assert.NotEqual(IntPtr.Zero, listView.Handle); 226Assert.NotEqual(IntPtr.Zero, listView.Handle); 395Assert.NotEqual(IntPtr.Zero, listView.Handle); 487Assert.NotEqual(IntPtr.Zero, listView.Handle); 521Assert.NotEqual(IntPtr.Zero, listView.Handle); 604Assert.NotEqual(IntPtr.Zero, listView.Handle); 690Assert.NotEqual(IntPtr.Zero, listView.Handle); 728Assert.NotEqual(IntPtr.Zero, listView.Handle); 760Assert.NotEqual(IntPtr.Zero, listView.Handle); 1277Assert.NotEqual(IntPtr.Zero, listView.Handle); 1465Assert.NotEqual(IntPtr.Zero, listView.Handle);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemAccessibleObjectTests.cs (6)
74Assert.NotEqual(IntPtr.Zero, listView.Handle); 654Assert.NotEqual(IntPtr.Zero, listView.Handle); 716Assert.NotEqual(IntPtr.Zero, listView.Handle); 850Assert.NotEqual(IntPtr.Zero, listView.Handle); 898Assert.NotEqual(IntPtr.Zero, listView.Handle); 933Assert.NotEqual(IntPtr.Zero, listView.Handle);
System\Windows\Forms\AccessibleObjects\ListViewItem.ListViewItemWithImageAccessibleObjectTests.cs (1)
44Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\AccessibleObjects\TabControl.TabControlAccessibleObjectTests.cs (1)
630Assert.Equal(tabControl.InternalHandle, (IntPtr)tabControl.AccessibilityObject.RuntimeId[1]);
System\Windows\Forms\ApplicationContextTests.cs (4)
81Assert.NotEqual(IntPtr.Zero, mainForm.Handle); 110Assert.NotEqual(IntPtr.Zero, mainForm.Handle); 113Assert.NotEqual(IntPtr.Zero, newMainForm.Handle); 144Assert.NotEqual(IntPtr.Zero, mainForm.Handle);
System\Windows\Forms\AxHost.AxPropertyDescriptorTests.cs (20)
158Assert.NotEqual(IntPtr.Zero, control.Handle); 406Assert.NotEqual(IntPtr.Zero, control.Handle); 429Assert.NotEqual(IntPtr.Zero, control.Handle); 455Assert.NotEqual(IntPtr.Zero, control.Handle); 558Assert.NotEqual(IntPtr.Zero, control.Handle); 594Assert.NotEqual(IntPtr.Zero, control.Handle); 625Assert.NotEqual(IntPtr.Zero, control.Handle); 673Assert.NotEqual(IntPtr.Zero, control.Handle); 721Assert.NotEqual(IntPtr.Zero, control.Handle); 839Assert.NotEqual(IntPtr.Zero, control.Handle); 870Assert.NotEqual(IntPtr.Zero, control.Handle); 899Assert.NotEqual(IntPtr.Zero, control.Handle); 931Assert.NotEqual(IntPtr.Zero, control.Handle); 960Assert.NotEqual(IntPtr.Zero, control.Handle); 1003Assert.NotEqual(IntPtr.Zero, control.Handle); 1047Assert.NotEqual(IntPtr.Zero, control.Handle); 1099Assert.NotEqual(IntPtr.Zero, control.Handle); 1147Assert.NotEqual(IntPtr.Zero, control.Handle); 1195Assert.NotEqual(IntPtr.Zero, control.Handle); 1249Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\AxHostTests.cs (33)
240Assert.Equal(IntPtr.Zero, createParams.Parent); 280Assert.Equal(IntPtr.Zero, createParams.Parent); 454Assert.NotEqual(IntPtr.Zero, control.Handle); 810Assert.NotEqual(IntPtr.Zero, control.Handle); 904Assert.NotEqual(IntPtr.Zero, control.Handle); 1297Assert.NotEqual(IntPtr.Zero, control.Handle); 1312Assert.NotEqual(IntPtr.Zero, control.Handle); 1325Assert.NotEqual(IntPtr.Zero, control.Handle); 1375Assert.NotEqual(IntPtr.Zero, control.Handle); 1417Assert.NotEqual(IntPtr.Zero, control.Handle); 1459Assert.NotEqual(IntPtr.Zero, iFont.hFont); 1488Assert.NotEqual(IntPtr.Zero, iFont.hFont); 1534Assert.NotEqual(IntPtr.Zero, iFont.hFont); 1555Assert.NotEqual(IntPtr.Zero, iFont.hFont); 2092Assert.NotEqual(IntPtr.Zero, control.Handle); 2158Assert.NotEqual(IntPtr.Zero, control.Handle); 2228Assert.NotEqual(IntPtr.Zero, control.Handle); 2347Assert.NotEqual(IntPtr.Zero, control.Handle); 2389Assert.NotEqual(IntPtr.Zero, control.Handle); 2429Assert.NotEqual(IntPtr.Zero, control.Handle); 2469Assert.NotEqual(IntPtr.Zero, control.Handle); 2511Assert.NotEqual(IntPtr.Zero, control.Handle); 2555Assert.NotEqual(IntPtr.Zero, control.Handle); 2605Assert.NotEqual(IntPtr.Zero, control.Handle); 2649Assert.NotEqual(IntPtr.Zero, control.Handle); 2706Assert.NotEqual(IntPtr.Zero, control.Handle); 2754Assert.NotEqual(IntPtr.Zero, control.Handle); 2802Assert.NotEqual(IntPtr.Zero, control.Handle); 2848Assert.NotEqual(IntPtr.Zero, control.Handle); 2905Assert.NotEqual(IntPtr.Zero, control.Handle); 2953Assert.NotEqual(IntPtr.Zero, control.Handle); 3001Assert.NotEqual(IntPtr.Zero, control.Handle); 3055Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\ButtonBaseTests.cs (265)
137Assert.Equal(IntPtr.Zero, createParams.Parent); 170Assert.Equal(IntPtr.Zero, createParams.Parent); 240Assert.Equal(IntPtr.Zero, createParams.Parent); 278Assert.NotEqual(IntPtr.Zero, control.Handle); 376Assert.NotEqual(IntPtr.Zero, control.Handle); 425Assert.NotEqual(IntPtr.Zero, control.Handle); 705Assert.NotEqual(IntPtr.Zero, control.Handle); 908Assert.NotEqual(IntPtr.Zero, control.Handle); 963Assert.NotEqual(IntPtr.Zero, control.Handle); 1204Assert.NotEqual(IntPtr.Zero, control.Handle); 1265Assert.NotEqual(IntPtr.Zero, control.Handle); 1328Assert.NotEqual(IntPtr.Zero, parent.Handle); 1329Assert.NotEqual(IntPtr.Zero, control.Handle); 1619Assert.NotEqual(IntPtr.Zero, control.Handle); 1671Assert.NotEqual(IntPtr.Zero, control.Handle); 1725Assert.NotEqual(IntPtr.Zero, parent.Handle); 1726Assert.NotEqual(IntPtr.Zero, control.Handle); 1806Assert.NotEqual(IntPtr.Zero, control.Handle); 1949Assert.NotEqual(IntPtr.Zero, control.Handle); 1997Assert.NotEqual(IntPtr.Zero, parent.Handle); 1998Assert.NotEqual(IntPtr.Zero, control.Handle); 2182Assert.NotEqual(IntPtr.Zero, control.Handle); 2333Assert.NotEqual(IntPtr.Zero, control.Handle); 2440Assert.NotEqual(IntPtr.Zero, control.Handle); 2481Assert.NotEqual(IntPtr.Zero, control.Handle); 2545Assert.NotEqual(IntPtr.Zero, control.Handle); 2590Assert.NotEqual(IntPtr.Zero, imageList1.Handle); 2613Assert.NotEqual(IntPtr.Zero, control.Handle); 2620Assert.NotEqual(IntPtr.Zero, imageList1.Handle); 2762Assert.NotEqual(IntPtr.Zero, control.Handle); 2917Assert.NotEqual(IntPtr.Zero, control.Handle); 2965Assert.NotEqual(IntPtr.Zero, control.Handle); 3137Assert.NotEqual(IntPtr.Zero, control.Handle); 3178Assert.NotEqual(IntPtr.Zero, parent.Handle); 3179Assert.NotEqual(IntPtr.Zero, control.Handle); 3384Assert.NotEqual(IntPtr.Zero, control.Handle); 3440Assert.NotEqual(IntPtr.Zero, parent.Handle); 3441Assert.NotEqual(IntPtr.Zero, control.Handle); 3613Assert.NotEqual(IntPtr.Zero, control.Handle); 3666Assert.NotEqual(IntPtr.Zero, parent.Handle); 3667Assert.NotEqual(IntPtr.Zero, control.Handle); 3819Assert.NotEqual(IntPtr.Zero, control.Handle); 3864Assert.NotEqual(IntPtr.Zero, control.Handle); 4038Assert.NotEqual(IntPtr.Zero, control.Handle); 4093Assert.NotEqual(IntPtr.Zero, parent.Handle); 4094Assert.NotEqual(IntPtr.Zero, control.Handle); 4206Assert.NotEqual(IntPtr.Zero, control.Handle); 4247Assert.NotEqual(IntPtr.Zero, control.Handle); 4308Assert.NotEqual(IntPtr.Zero, control.Handle); 4435Assert.NotEqual(IntPtr.Zero, control.Handle); 4490Assert.NotEqual(IntPtr.Zero, control.Handle); 5039Assert.NotEqual(IntPtr.Zero, control.Handle); 5215Assert.NotEqual(IntPtr.Zero, control.Handle); 5273Assert.NotEqual(IntPtr.Zero, control.Handle); 5338Assert.NotEqual(IntPtr.Zero, control.Handle); 5403Assert.NotEqual(IntPtr.Zero, control.Handle); 5456Assert.NotEqual(IntPtr.Zero, control.Handle); 5592Assert.NotEqual(IntPtr.Zero, control.Handle); 5651Assert.NotEqual(IntPtr.Zero, control.Handle); 5706Assert.NotEqual(IntPtr.Zero, control.Handle); 5730Assert.NotEqual(IntPtr.Zero, control.Handle); 5857Assert.NotEqual(IntPtr.Zero, control.Handle); 5921Assert.NotEqual(IntPtr.Zero, control.Handle); 5985Assert.NotEqual(IntPtr.Zero, control.Handle); 6009Assert.NotEqual(IntPtr.Zero, control.Handle); 6056Assert.NotEqual(IntPtr.Zero, control.Handle); 6169Assert.NotEqual(IntPtr.Zero, control.Handle); 6317Assert.NotEqual(IntPtr.Zero, control.Handle); 6376Assert.NotEqual(IntPtr.Zero, control.Handle); 6471Assert.NotEqual(IntPtr.Zero, control.Handle); 6649Assert.NotEqual(IntPtr.Zero, control.Handle); 6716Assert.NotEqual(IntPtr.Zero, control.Handle); 6784Assert.NotEqual(IntPtr.Zero, control.Handle); 6886Assert.NotEqual(IntPtr.Zero, control.Handle); 7044Assert.NotEqual(IntPtr.Zero, control.Handle); 7102Assert.NotEqual(IntPtr.Zero, control.Handle); 7250Assert.NotEqual(IntPtr.Zero, control.Handle); 7298Assert.NotEqual(IntPtr.Zero, parent.Handle); 7299Assert.NotEqual(IntPtr.Zero, control.Handle); 7474Assert.NotEqual(IntPtr.Zero, control.Handle); 7532Assert.NotEqual(IntPtr.Zero, control.Handle); 7582Assert.NotEqual(IntPtr.Zero, control.Handle); 7622Assert.Equal(IntPtr.Zero, m.Result); 7628Assert.Equal(IntPtr.Zero, m.Result); 7653Assert.Equal(IntPtr.Zero, m.Result); 7659Assert.Equal(IntPtr.Zero, m.Result); 7685Assert.Equal(IntPtr.Zero, m.Result); 7691Assert.Equal(IntPtr.Zero, m.Result); 7724Assert.Equal(IntPtr.Zero, m.Result); 7730Assert.Equal(IntPtr.Zero, m.Result); 7749Assert.NotEqual(IntPtr.Zero, control.Handle); 7765Assert.Equal(IntPtr.Zero, m.Result); 7774Assert.Equal(IntPtr.Zero, m.Result); 7794Assert.NotEqual(IntPtr.Zero, control.Handle); 7810Assert.Equal(IntPtr.Zero, m.Result); 7819Assert.Equal(IntPtr.Zero, m.Result); 7837Assert.NotEqual(IntPtr.Zero, control.Handle); 7853Assert.Equal(IntPtr.Zero, m.Result); 7862Assert.Equal(IntPtr.Zero, m.Result); 7879Assert.NotEqual(IntPtr.Zero, control.Handle); 7902Assert.Equal(IntPtr.Zero, m.Result); 7911Assert.Equal(IntPtr.Zero, m.Result); 7947Assert.Equal(IntPtr.Zero, m.Result); 7953Assert.Equal(IntPtr.Zero, m.Result); 7983Assert.Equal(IntPtr.Zero, m.Result); 7989Assert.Equal(IntPtr.Zero, m.Result); 8020Assert.Equal(IntPtr.Zero, m.Result); 8026Assert.Equal(IntPtr.Zero, m.Result); 8064Assert.Equal(IntPtr.Zero, m.Result); 8070Assert.Equal(IntPtr.Zero, m.Result); 8089Assert.NotEqual(IntPtr.Zero, control.Handle); 8110Assert.Equal(IntPtr.Zero, m.Result); 8119Assert.Equal(IntPtr.Zero, m.Result); 8139Assert.NotEqual(IntPtr.Zero, control.Handle); 8160Assert.Equal(IntPtr.Zero, m.Result); 8169Assert.Equal(IntPtr.Zero, m.Result); 8187Assert.NotEqual(IntPtr.Zero, control.Handle); 8208Assert.Equal(IntPtr.Zero, m.Result); 8217Assert.Equal(IntPtr.Zero, m.Result); 8234Assert.NotEqual(IntPtr.Zero, control.Handle); 8262Assert.Equal(IntPtr.Zero, m.Result); 8271Assert.Equal(IntPtr.Zero, m.Result); 8355Assert.NotEqual(IntPtr.Zero, control.Handle); 8395Assert.NotEqual(IntPtr.Zero, control.Handle); 8452Assert.Equal(IntPtr.Zero, m.Result); 8458Assert.Equal(IntPtr.Zero, m.Result); 8488Assert.Equal(IntPtr.Zero, m.Result); 8494Assert.Equal(IntPtr.Zero, m.Result); 8525Assert.Equal(IntPtr.Zero, m.Result); 8531Assert.Equal(IntPtr.Zero, m.Result); 8569Assert.Equal(IntPtr.Zero, m.Result); 8575Assert.Equal(IntPtr.Zero, m.Result); 8594Assert.NotEqual(IntPtr.Zero, control.Handle); 8615Assert.Equal(IntPtr.Zero, m.Result); 8624Assert.Equal(IntPtr.Zero, m.Result); 8644Assert.NotEqual(IntPtr.Zero, control.Handle); 8665Assert.Equal(IntPtr.Zero, m.Result); 8674Assert.Equal(IntPtr.Zero, m.Result); 8692Assert.NotEqual(IntPtr.Zero, control.Handle); 8713Assert.Equal(IntPtr.Zero, m.Result); 8722Assert.Equal(IntPtr.Zero, m.Result); 8739Assert.NotEqual(IntPtr.Zero, control.Handle); 8767Assert.Equal(IntPtr.Zero, m.Result); 8776Assert.Equal(IntPtr.Zero, m.Result); 8797Assert.NotEqual(IntPtr.Zero, control.Handle); 8818Assert.Equal(IntPtr.Zero, m.Result); 8828yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 0, 0 }; 8829yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 1, 2 }; 8830yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, -1, -2 }; 8831yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 0, 0 }; 8832yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 1, 2 }; 8833yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, -1, -2 }; 8835yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 0, 0 }; 8836yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 1, 2 }; 8837yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, -1, -2 }; 8838yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 0, 0 }; 8839yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 1, 2 }; 8840yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, -1, -2 }; 8842yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 0, 0 }; 8843yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 1, 2 }; 8844yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, -1, -2 }; 8845yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 0, 0 }; 8846yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 1, 2 }; 8847yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, -1, -2 }; 8849yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 0, 0 }; 8850yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 1, 2 }; 8851yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, -1, -2 }; 8852yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 0, 0 }; 8853yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 1, 2 }; 8854yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, -1, -2 }; 8856yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 0, 0 }; 8857yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 1, 2 }; 8858yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, -1, -2 }; 8859yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 0, 0 }; 8860yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 1, 2 }; 8861yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, -1, -2 }; 8863yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 0, 0 }; 8864yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 1, 2 }; 8865yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, -1, -2 }; 8866yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 0, 0 }; 8867yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 1, 2 }; 8868yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, -1, -2 }; 8873public void ButtonBase_WndProc_InvokeMouseUpWithoutHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 8908public void ButtonBase_WndProc_InvokeMouseUpWithoutHandleNotSelectable_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 8973public void ButtonBase_WndProc_InvokeMouseUpWithHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 8977Assert.NotEqual(IntPtr.Zero, control.Handle); 9016public void ButtonBase_WndProc_InvokeMouseUpWithHandleNotSelectable_DoesNotCallMouseUp(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 9021Assert.NotEqual(IntPtr.Zero, control.Handle); 9069Assert.NotEqual(IntPtr.Zero, control.Handle); 9097yield return new object[] { FlatStyle.Flat, IntPtr.Zero, IntPtr.Zero, 0 }; 9098yield return new object[] { FlatStyle.Flat, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), IntPtr.Zero, 0 }; 9099yield return new object[] { FlatStyle.Flat, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), IntPtr.Zero, 0 }; 9100yield return new object[] { FlatStyle.Flat, PARAM.FromLowHigh(123, 456), IntPtr.Zero, 0 }; 9102yield return new object[] { FlatStyle.Popup, IntPtr.Zero, IntPtr.Zero, 0 }; 9103yield return new object[] { FlatStyle.Popup, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), IntPtr.Zero, 0 }; 9104yield return new object[] { FlatStyle.Popup, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), IntPtr.Zero, 0 }; 9105yield return new object[] { FlatStyle.Popup, PARAM.FromLowHigh(123, 456), IntPtr.Zero, 0 }; 9107yield return new object[] { FlatStyle.Standard, IntPtr.Zero, IntPtr.Zero, 0 }; 9108yield return new object[] { FlatStyle.Standard, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), IntPtr.Zero, 0 }; 9109yield return new object[] { FlatStyle.Standard, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), IntPtr.Zero, 0 }; 9110yield return new object[] { FlatStyle.Standard, PARAM.FromLowHigh(123, 456), IntPtr.Zero, 0 }; 9112yield return new object[] { FlatStyle.System, IntPtr.Zero, (IntPtr)250, 1 }; 9113yield return new object[] { FlatStyle.System, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 }; 9114yield return new object[] { FlatStyle.System, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 }; 9115yield return new object[] { FlatStyle.System, PARAM.FromLowHigh(123, 456), (IntPtr)250, 0 }; 9120public void ButtonBase_WndProc_InvokeReflectCommandWithoutHandle_Success(FlatStyle flatStyle, IntPtr wParam, IntPtr expectedResult, int expectedCallCount) 9151public void ButtonBase_WndProc_InvokeReflectCommandWithHandle_Success(FlatStyle flatStyle, IntPtr wParam, IntPtr expectedResult, int expectedCallCount) 9157Assert.NotEqual(IntPtr.Zero, control.Handle); 9189yield return new object[] { FlatStyle.Flat, (IntPtr)250 }; 9190yield return new object[] { FlatStyle.Popup, (IntPtr)250 }; 9191yield return new object[] { FlatStyle.Standard, (IntPtr)250 }; 9192yield return new object[] { FlatStyle.System, IntPtr.Zero }; 9197public void ButtonBase_WndProc_InvokeSetStateWithoutHandle_Success(FlatStyle flatStyle, IntPtr expectedResult) 9220public void ButtonBase_WndProc_InvokeSetStateWithHandle_Success(FlatStyle flatStyle, IntPtr expectedResult) 9227Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\ButtonTests.cs (66)
135Assert.Equal(IntPtr.Zero, createParams.Parent); 159Assert.Equal(IntPtr.Zero, createParams.Parent); 192Assert.Equal(IntPtr.Zero, createParams.Parent); 262Assert.Equal(IntPtr.Zero, createParams.Parent); 416Assert.NotEqual(IntPtr.Zero, control.Handle); 464Assert.NotEqual(IntPtr.Zero, parent.Handle); 537Assert.NotEqual(IntPtr.Zero, parent.Handle); 636Assert.NotEqual(IntPtr.Zero, control.Handle); 853Assert.NotEqual(IntPtr.Zero, control.Handle); 894Assert.NotEqual(IntPtr.Zero, parent.Handle); 895Assert.NotEqual(IntPtr.Zero, control.Handle); 1859Assert.NotEqual(IntPtr.Zero, control.Handle); 1980Assert.NotEqual(IntPtr.Zero, control.Handle); 2028Assert.NotEqual(IntPtr.Zero, control.Handle); 2149Assert.NotEqual(IntPtr.Zero, control.Handle); 2202Assert.NotEqual(IntPtr.Zero, control.Handle); 2317Assert.NotEqual(IntPtr.Zero, control.Handle); 2459Assert.NotEqual(IntPtr.Zero, control.Handle); 2517Assert.NotEqual(IntPtr.Zero, control.Handle); 2607Assert.NotEqual(IntPtr.Zero, control.Handle); 2754Assert.NotEqual(IntPtr.Zero, control.Handle); 2821Assert.NotEqual(IntPtr.Zero, control.Handle); 2984Assert.NotEqual(IntPtr.Zero, control.Handle); 3032Assert.NotEqual(IntPtr.Zero, parent.Handle); 3033Assert.NotEqual(IntPtr.Zero, control.Handle); 3161Assert.NotEqual(IntPtr.Zero, control.Handle); 3208Assert.NotEqual(IntPtr.Zero, control.Handle); 3366yield return new object[] { true, true, opaque, IntPtr.Zero }; 3367yield return new object[] { true, false, opaque, IntPtr.Zero }; 3368yield return new object[] { false, true, opaque, IntPtr.Zero }; 3369yield return new object[] { false, false, opaque, IntPtr.Zero }; 3375public void Button_WndProc_InvokeEraseBkgndWithoutHandleWithoutWParam_Success(bool userPaint, bool allPaintingInWmPaint, bool opaque, IntPtr expectedResult) 3427IntPtr hdc = graphics.GetHdc(); 3437Assert.Equal(IntPtr.Zero, m.Result); 3456Assert.NotEqual(IntPtr.Zero, control.Handle); 3472Assert.Equal(IntPtr.Zero, m.Result); 3488Assert.NotEqual(IntPtr.Zero, control.Handle); 3500IntPtr hdc = graphics.GetHdc(); 3510Assert.Equal(IntPtr.Zero, m.Result); 3531Assert.NotEqual(IntPtr.Zero, control.Handle); 3552Assert.Equal(IntPtr.Zero, m.Result); 3562yield return new object[] { FlatStyle.Flat, IntPtr.Zero, (IntPtr)250, 1 }; 3563yield return new object[] { FlatStyle.Flat, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 }; 3564yield return new object[] { FlatStyle.Flat, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 }; 3565yield return new object[] { FlatStyle.Flat, PARAM.FromLowHigh(123, 456), (IntPtr)250, 0 }; 3567yield return new object[] { FlatStyle.Popup, IntPtr.Zero, (IntPtr)250, 1 }; 3568yield return new object[] { FlatStyle.Popup, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 }; 3569yield return new object[] { FlatStyle.Popup, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 }; 3570yield return new object[] { FlatStyle.Popup, PARAM.FromLowHigh(123, 456), (IntPtr)250, 0 }; 3572yield return new object[] { FlatStyle.Standard, IntPtr.Zero, (IntPtr)250, 1 }; 3573yield return new object[] { FlatStyle.Standard, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 }; 3574yield return new object[] { FlatStyle.Standard, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 }; 3575yield return new object[] { FlatStyle.Standard, PARAM.FromLowHigh(123, 456), (IntPtr)250, 0 }; 3577yield return new object[] { FlatStyle.System, IntPtr.Zero, (IntPtr)250, 1 }; 3578yield return new object[] { FlatStyle.System, PARAM.FromLowHigh(0, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 }; 3579yield return new object[] { FlatStyle.System, PARAM.FromLowHigh(123, (int)PInvoke.BN_CLICKED), (IntPtr)250, 1 }; 3580yield return new object[] { FlatStyle.System, PARAM.FromLowHigh(123, 456), (IntPtr)250, 0 }; 3596public void Button_WndProc_InvokeReflectCommandWithoutHandle_Success(FlatStyle flatStyle, IntPtr wParam, IntPtr expectedResult, int expectedCallCount) 3629public void Button_WndProc_InvokeReflectCommandWithHandle_Success(FlatStyle flatStyle, IntPtr wParam, IntPtr expectedResult, int expectedCallCount) 3635Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\CheckBoxRendererTests.cs (8)
24form.Handle.Should().NotBe(IntPtr.Zero); 28using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 60form.Handle.Should().NotBe(IntPtr.Zero); 64using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 97form.Handle.Should().NotBe(IntPtr.Zero); 101using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 132form.Handle.Should().NotBe(IntPtr.Zero); 136using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC);
System\Windows\Forms\CheckBoxTests.cs (7)
138Assert.Equal(IntPtr.Zero, createParams.Parent); 321control.Handle.Should().NotBe(IntPtr.Zero); 340control.Handle.Should().NotBe(IntPtr.Zero); 350control.Handle.Should().NotBe(IntPtr.Zero); 386control.Handle.Should().NotBe(IntPtr.Zero); 405control.Handle.Should().NotBe(IntPtr.Zero); 415control.Handle.Should().NotBe(IntPtr.Zero);
System\Windows\Forms\ColorDialogTests.cs (4)
27Assert.NotEqual(IntPtr.Zero, dialog.Instance); 52Assert.NotEqual(IntPtr.Zero, dialog.Instance); 349Assert.NotEqual(IntPtr.Zero, dialog.Instance); 373public new IntPtr Instance => base.Instance;
System\Windows\Forms\ColumnHeaderCollectionTests.cs (4)
460Assert.NotEqual(IntPtr.Zero, listView.Handle); 511Assert.NotEqual(IntPtr.Zero, listView.Handle); 977Assert.NotEqual(IntPtr.Zero, listView.Handle); 1016Assert.NotEqual(IntPtr.Zero, listView.Handle);
System\Windows\Forms\ColumnHeaderTests.cs (22)
165Assert.NotEqual(IntPtr.Zero, listView.Handle); 220Assert.NotEqual(IntPtr.Zero, listView.Handle); 407Assert.NotEqual(IntPtr.Zero, listView.Handle); 443Assert.NotEqual(IntPtr.Zero, listView.Handle); 472Assert.NotEqual(IntPtr.Zero, listView.Handle); 497Assert.NotEqual(IntPtr.Zero, listView.Handle); 624Assert.NotEqual(IntPtr.Zero, listView.Handle); 663Assert.NotEqual(IntPtr.Zero, listView.Handle); 694Assert.NotEqual(IntPtr.Zero, listView.Handle); 711Assert.NotEqual(IntPtr.Zero, listView.Handle); 815Assert.NotEqual(IntPtr.Zero, listView.Handle); 990Assert.NotEqual(IntPtr.Zero, listView.Handle); 1008Assert.NotEqual(IntPtr.Zero, listView.Handle); 1161Assert.NotEqual(IntPtr.Zero, listView.Handle); 1200Assert.NotEqual(IntPtr.Zero, listView.Handle); 1234Assert.NotEqual(IntPtr.Zero, listView.Handle); 1258Assert.NotEqual(IntPtr.Zero, listView.Handle); 1324Assert.NotEqual(IntPtr.Zero, listView.Handle); 1362Assert.NotEqual(IntPtr.Zero, listView.Handle); 1380Assert.NotEqual(IntPtr.Zero, listView.Handle); 1423Assert.NotEqual(IntPtr.Zero, listView.Handle); 1617m.Result = IntPtr.Zero;
System\Windows\Forms\ColumnStyleTests.cs (1)
103Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\ComboBoxTests.cs (22)
147Assert.Equal(IntPtr.Zero, createParams.Parent); 199Assert.NotEqual(IntPtr.Zero, control.Handle); 235if (control.Handle != IntPtr.Zero) 338control.TriggerMeasureItem(new MeasureItemEventArgs(Graphics.FromHwnd(IntPtr.Zero), 0, 0)); 343control.TriggerMeasureItem(new MeasureItemEventArgs(Graphics.FromHwnd(IntPtr.Zero), 0, 0)); 919Assert.NotEqual(IntPtr.Zero, control.Handle); 1087Assert.NotEqual(IntPtr.Zero, control.Handle); 1200Assert.NotEqual(IntPtr.Zero, control.Handle); 1384Assert.NotEqual(IntPtr.Zero, control.Handle); 1410Assert.NotEqual(IntPtr.Zero, control.Handle); 1437Assert.NotEqual(IntPtr.Zero, control.Handle); 1883Assert.NotEqual(IntPtr.Zero, control.Handle); 1917Assert.NotEqual(IntPtr.Zero, control.Handle); 1971IntPtr hdc = graphics.GetHdc(); 2008IntPtr hdc = graphics.GetHdc(); 2068IntPtr hdc = graphics.GetHdc(); 2078Assert.NotEqual(IntPtr.Zero, control.Handle); 2112IntPtr hdc = graphics.GetHdc(); 2123Assert.NotEqual(IntPtr.Zero, control.Handle); 2687Assert.NotEqual(IntPtr.Zero, control.Handle); 2700control.Handle.Should().NotBe(IntPtr.Zero); 2711control.Handle.Should().NotBe(IntPtr.Zero);
System\Windows\Forms\CommonDialogTests.cs (25)
89Assert.Equal(IntPtr.Zero, dialog.HookProc(IntPtr.Zero, msg, IntPtr.Zero, IntPtr.Zero)); 117.Returns(IntPtr.Zero); 141.Returns(IntPtr.Zero); 191Assert.NotEqual(IntPtr.Zero, owner.Handle); 213Assert.NotEqual(IntPtr.Zero, owner.Handle); 245Assert.Equal(IntPtr.Zero, dialog.OwnerWndProc(IntPtr.Zero, (int)(MessageId)field.GetValue(null), IntPtr.Zero, IntPtr.Zero)); 265Assert.Equal(IntPtr.Zero, dialog.OwnerWndProc(IntPtr.Zero, (int)(MessageId)field.GetValue(null) + 1, IntPtr.Zero, IntPtr.Zero)); 283protected override bool RunDialog(IntPtr hwndOwner) => RunDialogResult; 287public new IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) 292public new IntPtr OwnerWndProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam)
System\Windows\Forms\ContainerControlTests.cs (6)
138Assert.Equal(IntPtr.Zero, createParams.Parent); 1224Assert.NotEqual(IntPtr.Zero, control.Handle); 1245Assert.Equal(IntPtr.Zero, m.Result); 1261Assert.NotEqual(IntPtr.Zero, control.Handle); 1275Assert.Equal(IntPtr.Zero, m.Result); 1292Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\ControlPaintTests.cs (14)
42using Bitmap result = Image.FromHbitmap((IntPtr)hBitmap); 67using Bitmap result = Image.FromHbitmap((IntPtr)hBitmap); 89foreach (IntPtr monochromeMask in new IntPtr[] { IntPtr.Zero, 1 }) 105public void ControlPaint_CreateHBitmapColorMask_Invoke_ReturnsExpected(Bitmap bitmap, IntPtr monochromeMask) 113using Bitmap result = Image.FromHbitmap((IntPtr)hBitmap); 139HBITMAP hBitmap = (HBITMAP)ControlPaint.CreateHBitmapColorMask(bitmap, (IntPtr)monochromeMask); 145using Bitmap result = Image.FromHbitmap((IntPtr)hBitmap); 172HBITMAP hBitmap = (HBITMAP)ControlPaint.CreateHBitmapColorMask(bitmap, IntPtr.Zero); 178using Bitmap result = Image.FromHbitmap((IntPtr)hBitmap); 195Assert.Throws<ArgumentNullException>(() => ControlPaint.CreateHBitmapColorMask(null, IntPtr.Zero)); 221using Bitmap result = Image.FromHbitmap((IntPtr)hBitmap); 246using Bitmap result = Image.FromHbitmap((IntPtr)hBitmap);
System\Windows\Forms\ControlPaintTests.Rendering.cs (7)
21using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 40using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 100using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 175using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 249using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 323using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 351using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC);
System\Windows\Forms\ControlTests.ControlCollection.cs (19)
337Assert.NotEqual(IntPtr.Zero, owner.Handle); 366Assert.NotEqual(IntPtr.Zero, control.Handle); 395Assert.NotEqual(IntPtr.Zero, owner.Handle); 402Assert.NotEqual(IntPtr.Zero, control.Handle); 434Assert.NotEqual(IntPtr.Zero, owner.Handle); 441Assert.NotEqual(IntPtr.Zero, control.Handle); 591Assert.NotEqual(IntPtr.Zero, control.Handle); 813Assert.NotEqual(IntPtr.Zero, control.Handle); 1039Assert.NotEqual(IntPtr.Zero, control.Handle); 1129Assert.NotEqual(IntPtr.Zero, owner.Handle); 1153Assert.NotEqual(IntPtr.Zero, control.Handle); 2063Assert.NotEqual(IntPtr.Zero, child1.Handle); 2139Assert.NotEqual(IntPtr.Zero, owner.Handle); 2291Assert.NotEqual(IntPtr.Zero, control.Handle); 2510Assert.NotEqual(IntPtr.Zero, control.Handle); 2706Assert.NotEqual(IntPtr.Zero, control.Handle); 3181Assert.NotEqual(IntPtr.Zero, child1.Handle); 3260Assert.NotEqual(IntPtr.Zero, owner.Handle); 3354Assert.NotEqual(IntPtr.Zero, owner.Handle);
System\Windows\Forms\ControlTests.cs (9)
510Assert.Equal(IntPtr.Zero, createParams.Parent); 534Assert.Equal(IntPtr.Zero, createParams.Parent); 560Assert.Equal(IntPtr.Zero, createParams.Parent); 585Assert.Equal(IntPtr.Zero, createParams.Parent); 599Assert.NotEqual(IntPtr.Zero, parent.Handle); 633Assert.Equal(IntPtr.Zero, createParams.Parent); 660Assert.Equal(IntPtr.Zero, createParams.Parent); 686Assert.Equal(IntPtr.Zero, createParams.Parent); 712Assert.Equal(IntPtr.Zero, createParams.Parent);
System\Windows\Forms\ControlTests.Handlers.cs (45)
70Assert.NotEqual(IntPtr.Zero, control.Handle); 109Assert.NotEqual(IntPtr.Zero, control.Handle); 260Assert.NotEqual(IntPtr.Zero, control.Handle); 304Assert.NotEqual(IntPtr.Zero, control.Handle); 463Assert.NotEqual(IntPtr.Zero, control.Handle); 609Assert.NotEqual(IntPtr.Zero, control.Handle); 877Assert.NotEqual(IntPtr.Zero, control.Handle); 935Assert.NotEqual(IntPtr.Zero, control.Handle); 1438Assert.NotEqual(IntPtr.Zero, control.Handle); 1472Assert.NotEqual(IntPtr.Zero, control.Handle); 1698Assert.NotEqual(IntPtr.Zero, control.Handle); 1841Assert.NotEqual(IntPtr.Zero, control.Handle); 1892Assert.NotEqual(IntPtr.Zero, control.Handle); 1936Assert.NotEqual(IntPtr.Zero, control.Handle); 2155Assert.NotEqual(IntPtr.Zero, control.Handle); 2197Assert.NotEqual(IntPtr.Zero, control.Handle); 2242Assert.NotEqual(IntPtr.Zero, control.Handle); 2277Assert.NotEqual(IntPtr.Zero, control.Handle); 2455Assert.NotEqual(IntPtr.Zero, control.Handle); 2488Assert.NotEqual(IntPtr.Zero, control.Handle); 2523Assert.NotEqual(IntPtr.Zero, control.Handle); 2558Assert.NotEqual(IntPtr.Zero, control.Handle); 2850Assert.NotEqual(IntPtr.Zero, control.Handle); 2920Assert.NotEqual(IntPtr.Zero, control.Handle); 2987Assert.NotEqual(IntPtr.Zero, control.Handle); 3099Assert.NotEqual(IntPtr.Zero, control.Handle); 3225Assert.NotEqual(IntPtr.Zero, control.Handle); 3280Assert.NotEqual(IntPtr.Zero, control.Handle); 3676Assert.NotEqual(IntPtr.Zero, control.Handle); 3711Assert.NotEqual(IntPtr.Zero, control.Handle); 3785Assert.NotEqual(IntPtr.Zero, control.Handle); 4044Assert.NotEqual(IntPtr.Zero, control.Handle); 4137Assert.NotEqual(IntPtr.Zero, parent.Handle); 4686Assert.NotEqual(IntPtr.Zero, control.Handle); 4717Assert.NotEqual(IntPtr.Zero, control.Handle); 4758Assert.NotEqual(IntPtr.Zero, control.Handle); 4811Assert.NotEqual(IntPtr.Zero, control.Handle); 4900Assert.NotEqual(IntPtr.Zero, control.Handle); 4964Assert.NotEqual(IntPtr.Zero, control.Handle); 5007Assert.NotEqual(IntPtr.Zero, control.Handle); 5161Assert.NotEqual(IntPtr.Zero, control.Handle); 5218Assert.NotEqual(IntPtr.Zero, control.Handle); 5324Assert.NotEqual(IntPtr.Zero, control.Handle); 5628Assert.NotEqual(IntPtr.Zero, control.Handle); 5674Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\ControlTests.Internals.cs (3)
18IntPtr intptr = control.HandleInternal; 20Assert.Equal(IntPtr.Zero, intptr); 94Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\ControlTests.Methods.ClipboardTests.cs (1)
44Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\ControlTests.Methods.cs (526)
55Assert.NotEqual(IntPtr.Zero, control.Handle); 102Assert.NotEqual(IntPtr.Zero, control.Handle); 196Assert.NotEqual(IntPtr.Zero, child1.Handle); 251Assert.NotEqual(IntPtr.Zero, parent.Handle); 318Assert.NotEqual(IntPtr.Zero, parent.Handle); 368Assert.NotEqual(IntPtr.Zero, control.Handle); 424IntPtr handle1 = control.Handle; 425Assert.NotEqual(IntPtr.Zero, handle1); 431IntPtr handle2 = control.Handle; 432Assert.NotEqual(IntPtr.Zero, handle2); 446Assert.NotEqual(IntPtr.Zero, control.Handle); 467Assert.NotEqual(IntPtr.Zero, control.Handle); 483Assert.NotEqual(IntPtr.Zero, control.Handle); 498Assert.NotEqual(IntPtr.Zero, control.Handle); 515Assert.NotEqual(IntPtr.Zero, control.Handle); 527IntPtr handle1 = control.Handle; 530Assert.NotEqual(IntPtr.Zero, handle1); 538IntPtr handle2 = control.Handle; 541Assert.NotEqual(IntPtr.Zero, handle2); 559Assert.NotEqual(IntPtr.Zero, parent.Handle); 560Assert.NotEqual(IntPtr.Zero, control.Handle); 591Assert.NotEqual(IntPtr.Zero, control.Handle); 632Assert.NotEqual(IntPtr.Zero, control.Handle); 654Assert.NotEqual(IntPtr.Zero, control.Handle); 670Assert.NotEqual(IntPtr.Zero, control.Handle); 685Assert.NotEqual(IntPtr.Zero, control.Handle); 702Assert.NotEqual(IntPtr.Zero, control.Handle); 718Assert.NotEqual(IntPtr.Zero, parent.Handle); 719Assert.NotEqual(IntPtr.Zero, control.Handle); 731Assert.NotEqual(IntPtr.Zero, control.Handle); 751Assert.NotEqual(IntPtr.Zero, control.Handle); 826IntPtr handle1 = control.Handle; 829Assert.NotEqual(IntPtr.Zero, handle1); 835IntPtr handle2 = control.Handle; 838Assert.NotEqual(IntPtr.Zero, handle2); 850Assert.NotEqual(IntPtr.Zero, parent.Handle); 873IntPtr handle1 = control.Handle; 876Assert.NotEqual(IntPtr.Zero, handle1); 884IntPtr handle2 = control.Handle; 887Assert.NotEqual(IntPtr.Zero, handle2); 900IntPtr handle1 = control.Handle; 903Assert.NotEqual(IntPtr.Zero, handle1); 911IntPtr handle2 = control.Handle; 914Assert.NotEqual(IntPtr.Zero, handle2); 944IntPtr handle = control.Handle; 947Assert.NotEqual(IntPtr.Zero, handle); 963Assert.NotEqual(IntPtr.Zero, handle); 1199Assert.NotEqual(IntPtr.Zero, control.Handle); 1685Assert.NotEqual(IntPtr.Zero, control.Handle); 1748Assert.NotEqual(IntPtr.Zero, control.Handle); 1863Assert.NotEqual(IntPtr.Zero, control.Handle); 1952IntPtr handle = control.Handle; 1953Assert.NotEqual(IntPtr.Zero, handle); 1966IntPtr handle = window.Handle; 1967Assert.NotEqual(IntPtr.Zero, handle); 1983IntPtr parentHandle = parent.Handle; 1984Assert.NotEqual(IntPtr.Zero, parentHandle); 1999Assert.Null(Control.FromChildHandle(IntPtr.Zero)); 2007IntPtr handle = control.Handle; 2008Assert.NotEqual(IntPtr.Zero, handle); 2021IntPtr handle = window.Handle; 2022Assert.NotEqual(IntPtr.Zero, handle); 2038IntPtr parentHandle = parent.Handle; 2039Assert.NotEqual(IntPtr.Zero, parentHandle); 2054Assert.Null(Control.FromHandle(IntPtr.Zero)); 2997Assert.NotEqual(IntPtr.Zero, control.Handle); 3038Assert.NotEqual(IntPtr.Zero, control.Handle); 3112Assert.NotEqual(IntPtr.Zero, control.Handle); 3156Assert.NotEqual(IntPtr.Zero, control.Handle); 3250Assert.NotEqual(IntPtr.Zero, control.Handle); 3291Assert.NotEqual(IntPtr.Zero, control.Handle); 3391Assert.NotEqual(IntPtr.Zero, control.Handle); 3432Assert.NotEqual(IntPtr.Zero, control.Handle); 3528Assert.NotEqual(IntPtr.Zero, control.Handle); 3569Assert.NotEqual(IntPtr.Zero, control.Handle); 3671Assert.NotEqual(IntPtr.Zero, control.Handle); 3712Assert.NotEqual(IntPtr.Zero, control.Handle); 3757Assert.NotEqual(IntPtr.Zero, control.Handle); 3782Assert.NotEqual(IntPtr.Zero, control.Handle); 3808Assert.NotEqual(IntPtr.Zero, control.Handle); 3973Assert.NotEqual(IntPtr.Zero, control.Handle); 3999Assert.NotEqual(IntPtr.Zero, control.Handle); 4061Assert.NotEqual(IntPtr.Zero, control.Handle); 4142Assert.NotEqual(IntPtr.Zero, control.Handle); 4348Assert.NotEqual(IntPtr.Zero, control.Handle); 4460Assert.NotEqual(IntPtr.Zero, control.Handle); 4608Assert.NotEqual(IntPtr.Zero, control.Handle); 4678Assert.NotEqual(IntPtr.Zero, control.Handle); 4949Assert.NotEqual(IntPtr.Zero, control.Handle); 5223Assert.NotEqual(IntPtr.Zero, control.Handle); 5322WParam = (IntPtr)keys 5340WParam = (IntPtr)keys 5401Assert.Equal((IntPtr)keys, actualM.WParam); 5454WParam = (IntPtr)keys 5649yield return new object[] { (int)PInvokeCore.WM_CHAR, '2', handled, 1, 0, 0, (IntPtr)50 }; 5650yield return new object[] { (int)PInvokeCore.WM_CHAR, '1', handled, 1, 0, 0, (IntPtr)49 }; 5651yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, '2', handled, 1, 0, 0, (IntPtr)50 }; 5652yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, '1', handled, 1, 0, 0, (IntPtr)49 }; 5653yield return new object[] { (int)PInvokeCore.WM_IME_CHAR, '2', handled, 1, 0, 0, (IntPtr)50 }; 5654yield return new object[] { (int)PInvokeCore.WM_IME_CHAR, '1', handled, 1, 0, 0, (IntPtr)49 }; 5655yield return new object[] { (int)PInvokeCore.WM_KEYDOWN, '2', handled, 0, 1, 0, (IntPtr)2 }; 5656yield return new object[] { (int)PInvokeCore.WM_SYSKEYDOWN, '2', handled, 0, 1, 0, (IntPtr)2 }; 5657yield return new object[] { (int)PInvokeCore.WM_KEYUP, '2', handled, 0, 0, 1, (IntPtr)2 }; 5658yield return new object[] { (int)PInvokeCore.WM_SYSKEYUP, '2', handled, 0, 0, 1, (IntPtr)2 }; 5659yield return new object[] { 0, '2', handled, 0, 0, 1, (IntPtr)2 }; 5665public void Control_ProcessKeyEventArgs_InvokeWithoutParent_ReturnsFalse(int msg, char newChar, bool handled, int expectedKeyPressCallCount, int expectedKeyDownCallCount, int expectedKeyUpCallCount, IntPtr expectedWParam) 5708public void Control_ProcessKeyEventArgs_InvokeWithParent_ReturnsFalse(int msg, char newChar, bool handled, int expectedKeyPressCallCount, int expectedKeyDownCallCount, int expectedKeyUpCallCount, IntPtr expectedWParam) 5755public void Control_ProcessKeyEventArgs_InvokeWithCustomParent_ReturnsFalse(int msg, char newChar, bool handled, int expectedKeyPressCallCount, int expectedKeyDownCallCount, int expectedKeyUpCallCount, IntPtr expectedWParam) 5956public void Control_ProcessKeyMessage_InvokeWithoutParent_ReturnsFalse(int msg, char newChar, bool handled, int expectedKeyPressCallCount, int expectedKeyDownCallCount, int expectedKeyUpCallCount, IntPtr expectedWParam) 5999public void Control_ProcessKeyMessage_InvokeWithParent_ReturnsFalse(int msg, char newChar, bool handled, int expectedKeyPressCallCount, int expectedKeyDownCallCount, int expectedKeyUpCallCount, IntPtr expectedWParam) 6046public void Control_ProcessKeyMessage_InvokeWithCustomParent_ReturnsFalse(int msg, char newChar, bool handled, int expectedKeyPressCallCount, int expectedKeyDownCallCount, int expectedKeyUpCallCount, IntPtr expectedWParam) 6262IntPtr handle1 = control.Handle; 6263Assert.NotEqual(IntPtr.Zero, handle1); 6267IntPtr handle2 = control.Handle; 6268Assert.NotEqual(IntPtr.Zero, handle2); 6274IntPtr handle3 = control.Handle; 6275Assert.NotEqual(IntPtr.Zero, handle3); 6308Assert.NotEqual(IntPtr.Zero, control.Handle); 6477Assert.NotEqual(IntPtr.Zero, control.Handle); 6790Assert.NotEqual(IntPtr.Zero, control.Handle); 7050Assert.NotEqual(IntPtr.Zero, child1.Handle); 7105Assert.NotEqual(IntPtr.Zero, parent.Handle); 7172Assert.NotEqual(IntPtr.Zero, parent.Handle); 7222Assert.NotEqual(IntPtr.Zero, control.Handle); 7300Assert.NotEqual(IntPtr.Zero, control.Handle); 7826Assert.NotEqual(IntPtr.Zero, control.Handle); 7966Assert.NotEqual(IntPtr.Zero, parent.Handle); 8683Assert.NotEqual(IntPtr.Zero, control.Handle); 8823Assert.NotEqual(IntPtr.Zero, parent.Handle); 9474Assert.NotEqual(IntPtr.Zero, control.Handle); 9606Assert.NotEqual(IntPtr.Zero, parent.Handle); 9857Assert.NotEqual(IntPtr.Zero, control.Handle); 9977Assert.NotEqual(IntPtr.Zero, control.Handle); 10051Assert.NotEqual(IntPtr.Zero, control.Handle); 10163Assert.NotEqual(IntPtr.Zero, control.Handle); 10211Assert.NotEqual(IntPtr.Zero, control.Handle); 10258Assert.NotEqual(IntPtr.Zero, control.Handle); 10305Assert.NotEqual(IntPtr.Zero, control.Handle); 10689Assert.NotEqual(IntPtr.Zero, control.Handle); 10756Assert.NotEqual(IntPtr.Zero, control.Handle); 10828Assert.NotEqual(IntPtr.Zero, parent.Handle); 11387Assert.NotEqual(IntPtr.Zero, control.Handle); 11508Assert.NotEqual(IntPtr.Zero, parent.Handle); 11885Assert.NotEqual(IntPtr.Zero, control.Handle); 12006Assert.NotEqual(IntPtr.Zero, parent.Handle); 12110IntPtr handle = control.Handle; 12111Assert.NotEqual(IntPtr.Zero, handle); 12174Assert.NotEqual(IntPtr.Zero, control.Handle); 12206Assert.NotEqual(IntPtr.Zero, parent.Handle); 12239Assert.NotEqual(IntPtr.Zero, parent.Handle); 12284Assert.NotEqual(IntPtr.Zero, parent.Handle); 12331Assert.NotEqual(IntPtr.Zero, parent.Handle); 12389Assert.Equal(IntPtr.Zero, m.Result); 12399Assert.NotEqual(IntPtr.Zero, control.Handle); 12420Assert.Equal(IntPtr.Zero, m.Result); 12443Assert.Equal(IntPtr.Zero, m.Result); 12453Assert.NotEqual(IntPtr.Zero, control.Handle); 12469Assert.Equal(IntPtr.Zero, m.Result); 12479yield return new object[] { new Size(10, 20), (IntPtr)(-1) }; 12484yield return new object[] { Size.Empty, (IntPtr)(-1) }; 12492public void Control_WndProc_InvokeContextMenuWithoutContextMenuStripWithoutHandle_Success(Size size, IntPtr lParam) 12507Assert.Equal(IntPtr.Zero, m.Result); 12517yield return new object[] { new Size(10, 20), (IntPtr)(-1), (IntPtr)250, true }; 12518yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(0, 0), IntPtr.Zero, true }; 12519yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(1, 2), IntPtr.Zero, true }; 12520yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true }; 12521yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(-1, -2), IntPtr.Zero, true }; 12523yield return new object[] { Size.Empty, (IntPtr)(-1), IntPtr.Zero, false }; 12524yield return new object[] { Size.Empty, PARAM.FromLowHigh(0, 0), IntPtr.Zero, true }; 12525yield return new object[] { Size.Empty, PARAM.FromLowHigh(1, 2), IntPtr.Zero, true }; 12526yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero, true }; 12527yield return new object[] { Size.Empty, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, true }; 12532public void Control_WndProc_InvokeContextMenuWithContextMenuStripWithoutHandle_Success(Size size, IntPtr lParam, IntPtr expectedResult, bool expectedHandleCreated) 12558public void Control_WndProc_InvokeContextMenuWithoutContextMenuStripWithHandle_Success(Size size, IntPtr lParam) 12564Assert.NotEqual(IntPtr.Zero, control.Handle); 12579Assert.Equal(IntPtr.Zero, m.Result); 12591yield return new object[] { new Size(10, 20), (IntPtr)(-1), (IntPtr)250 }; 12592yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(0, 0), IntPtr.Zero }; 12593yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(1, 2), IntPtr.Zero }; 12594yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250 }; 12595yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(-1, -2), IntPtr.Zero }; 12597yield return new object[] { Size.Empty, (IntPtr)(-1), IntPtr.Zero }; 12598yield return new object[] { Size.Empty, PARAM.FromLowHigh(0, 0), IntPtr.Zero }; 12599yield return new object[] { Size.Empty, PARAM.FromLowHigh(1, 2), IntPtr.Zero }; 12600yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero }; 12601yield return new object[] { Size.Empty, PARAM.FromLowHigh(-1, -2), IntPtr.Zero }; 12606public void Control_WndProc_InvokeContextMenuWithContextMenuStripWithHandle_Success(Size size, IntPtr lParam, IntPtr expectedResult) 12614Assert.NotEqual(IntPtr.Zero, control.Handle); 12806yield return new object[] { true, true, opaque, (IntPtr)1, false }; 12807yield return new object[] { true, false, opaque, IntPtr.Zero, false }; 12808yield return new object[] { false, true, opaque, IntPtr.Zero, false }; 12809yield return new object[] { false, false, opaque, IntPtr.Zero, false }; 12815public void Control_WndProc_InvokeEraseBkgndWithoutHandleWithoutWParam_Success(bool userPaint, bool allPaintingInWmPaint, bool opaque, IntPtr expectedResult, bool expectedIsHandleCreated) 12842yield return new object[] { true, true, opaque, (IntPtr)1, false }; 12843yield return new object[] { true, false, opaque, (IntPtr)1, true }; 12844yield return new object[] { false, true, opaque, IntPtr.Zero, false }; 12845yield return new object[] { false, false, opaque, IntPtr.Zero, false }; 12851public void Control_WndProc_InvokeEraseBkgndWithoutHandleWithWParam_Success(bool userPaint, bool allPaintingInWmPaint, bool opaque, IntPtr expectedResult, bool expectedIsHandleCreated) 12864IntPtr hdc = graphics.GetHdc(); 12889yield return new object[] { true, true, opaque, (IntPtr)1 }; 12890yield return new object[] { true, false, opaque, IntPtr.Zero }; 12891yield return new object[] { false, true, opaque, IntPtr.Zero }; 12892yield return new object[] { false, false, opaque, IntPtr.Zero }; 12898public void Control_WndProc_InvokeEraseBkgndWithHandleWithoutWParam_Success(bool userPaint, bool allPaintingInWmPaint, bool opaque, IntPtr expectedResult) 12904Assert.NotEqual(IntPtr.Zero, control.Handle); 12932yield return new object[] { true, true, opaque, (IntPtr)1 }; 12933yield return new object[] { true, false, opaque, (IntPtr)1 }; 12934yield return new object[] { false, true, opaque, IntPtr.Zero }; 12935yield return new object[] { false, false, opaque, IntPtr.Zero }; 12941public void Control_WndProc_InvokeEraseBkgndWithHandleWithWParam_Success(bool userPaint, bool allPaintingInWmPaint, bool opaque, IntPtr expectedResult) 12947Assert.NotEqual(IntPtr.Zero, control.Handle); 12959IntPtr hdc = graphics.GetHdc(); 12994Assert.Equal(IntPtr.Zero, m.Result); 13003Assert.NotEqual(IntPtr.Zero, control.Handle); 13017Assert.Equal(IntPtr.Zero, m.Result); 13038Assert.Equal(IntPtr.Zero, m.Result); 13048Assert.NotEqual(IntPtr.Zero, control.Handle); 13064Assert.Equal(IntPtr.Zero, m.Result); 13091Assert.Equal(IntPtr.Zero, m.Result); 13101Assert.NotEqual(IntPtr.Zero, control.Handle); 13122Assert.Equal(IntPtr.Zero, m.Result); 13132yield return new object[] { true, true, (IntPtr)250, 0 }; 13133yield return new object[] { false, true, IntPtr.Zero, 0 }; 13134yield return new object[] { false, false, IntPtr.Zero, 0 }; 13139public void Control_WndProc_InvokePrintClientWithoutHandleWithoutWParam_Success(bool userPaint, bool opaque, IntPtr expectedResult, int expectedPaintCallCount) 13186yield return new object[] { true, true, (IntPtr)250, 1 }; 13187yield return new object[] { true, false, (IntPtr)250, 1 }; 13188yield return new object[] { false, true, IntPtr.Zero, 0 }; 13189yield return new object[] { false, false, IntPtr.Zero, 0 }; 13194public void Control_WndProc_InvokePrintClientWithoutHandleWithWParam_Success(bool userPaint, bool opaque, IntPtr expectedResult, int expectedPaintCallCount) 13206IntPtr hdc = graphics.GetHdc(); 13229yield return new object[] { true, true, (IntPtr)250, 0 }; 13230yield return new object[] { false, true, IntPtr.Zero, 0 }; 13231yield return new object[] { false, false, IntPtr.Zero, 0 }; 13236public void Control_WndProc_InvokePrintClientWithHandleWithoutWParam_Success(bool userPaint, bool opaque, IntPtr expectedResult, int expectedPaintCallCount) 13243Assert.NotEqual(IntPtr.Zero, control.Handle); 13273Assert.NotEqual(IntPtr.Zero, control.Handle); 13298yield return new object[] { true, true, (IntPtr)250, 1 }; 13299yield return new object[] { true, false, (IntPtr)250, 1 }; 13300yield return new object[] { false, true, IntPtr.Zero, 0 }; 13301yield return new object[] { false, false, IntPtr.Zero, 0 }; 13306public void Control_WndProc_InvokePrintClientWithHandleWithWParam_Success(bool userPaint, bool opaque, IntPtr expectedResult, int expectedPaintCallCount) 13313Assert.NotEqual(IntPtr.Zero, control.Handle); 13323IntPtr hdc = graphics.GetHdc(); 13348yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 0, 0 }; 13349yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 1, 2 }; 13350yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, -1, -2 }; 13351yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 0, 0 }; 13352yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 1, 2 }; 13353yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, -1, -2 }; 13355yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, 0, 0 }; 13356yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, 1, 2 }; 13357yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, -1, -2 }; 13358yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, 0, 0 }; 13359yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, 1, 2 }; 13360yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, -1, -2 }; 13362yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 0, 0 }; 13363yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 1, 2 }; 13364yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, -1, -2 }; 13365yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 0, 0 }; 13366yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 1, 2 }; 13367yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, -1, -2 }; 13369yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 2, 0, 0 }; 13370yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 2, 1, 2 }; 13371yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 2, -1, -2 }; 13372yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 2, 0, 0 }; 13373yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 2, 1, 2 }; 13374yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 2, -1, -2 }; 13376yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 0, 0 }; 13377yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 1, 2 }; 13378yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, -1, -2 }; 13379yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 0, 0 }; 13380yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 1, 2 }; 13381yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, -1, -2 }; 13383yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, 0, 0 }; 13384yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, 1, 2 }; 13385yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, -1, -2 }; 13386yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, 0, 0 }; 13387yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, 1, 2 }; 13388yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, -1, -2 }; 13390yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 0, 0 }; 13391yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 1, 2 }; 13392yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, -1, -2 }; 13393yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 0, 0 }; 13394yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 1, 2 }; 13395yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, -1, -2 }; 13397yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 0, 0 }; 13398yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 1, 2 }; 13399yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, -1, -2 }; 13400yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 0, 0 }; 13401yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 1, 2 }; 13402yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, -1, -2 }; 13404yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 0, 0 }; 13405yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 1, 2 }; 13406yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, -1, -2 }; 13407yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 0, 0 }; 13408yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 1, 2 }; 13409yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, -1, -2 }; 13411yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.None, 2, 0, 0 }; 13412yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 2, 1, 2 }; 13413yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 2, -1, -2 }; 13414yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 2, 0, 0 }; 13415yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 2, 1, 2 }; 13416yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 2, -1, -2 }; 13418yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 2, 0, 0 }; 13419yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 2, 1, 2 }; 13420yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 2, -1, -2 }; 13421yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 2, 0, 0 }; 13422yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 2, 1, 2 }; 13423yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 2, -1, -2 }; 13425yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 2, 0, 0 }; 13426yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 2, 1, 2 }; 13427yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 2, -1, -2 }; 13428yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 2, 0, 0 }; 13429yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 2, 1, 2 }; 13430yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 2, -1, -2 }; 13435public void Control_WndProc_InvokeMouseDownWithoutHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13470public void Control_WndProc_InvokeMouseDownWithoutHandleNotSelectable_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13529Assert.Equal(IntPtr.Zero, m.Result); 13539public void Control_WndProc_InvokeMouseDownWithHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13543Assert.NotEqual(IntPtr.Zero, control.Handle); 13582public void Control_WndProc_InvokeMouseDownWithHandleNotSelectable_DoesNotCallMouseDown(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13587Assert.NotEqual(IntPtr.Zero, control.Handle); 13639Assert.NotEqual(IntPtr.Zero, control.Handle); 13655Assert.Equal(IntPtr.Zero, m.Result); 13684Assert.Equal(IntPtr.Zero, m.Result); 13694Assert.NotEqual(IntPtr.Zero, control.Handle); 13715Assert.Equal(IntPtr.Zero, m.Result); 13725yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 0, 0 }; 13726yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 1, 2 }; 13727yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, -1, -2 }; 13728yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 0, 0 }; 13729yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 1, 2 }; 13730yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, -1, -2 }; 13732yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 0, 0 }; 13733yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 1, 2 }; 13734yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, -1, -2 }; 13735yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 0, 0 }; 13736yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 1, 2 }; 13737yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, -1, -2 }; 13739yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 0, 0 }; 13740yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 1, 2 }; 13741yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, -1, -2 }; 13742yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 0, 0 }; 13743yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 1, 2 }; 13744yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, -1, -2 }; 13746yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 0, 0 }; 13747yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 1, 2 }; 13748yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, -1, -2 }; 13749yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 0, 0 }; 13750yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 1, 2 }; 13751yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, -1, -2 }; 13753yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 0, 0 }; 13754yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 1, 2 }; 13755yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, -1, -2 }; 13756yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 0, 0 }; 13757yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 1, 2 }; 13758yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, -1, -2 }; 13760yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 0, 0 }; 13761yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 1, 2 }; 13762yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, -1, -2 }; 13763yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, IntPtr.Zero, PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 0, 0 }; 13764yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 1, 2 }; 13765yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONUP, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, -1, -2 }; 13770public void Control_WndProc_InvokeMouseUpWithoutHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13805public void Control_WndProc_InvokeMouseUpWithoutHandleNotSelectable_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13860Assert.Equal(IntPtr.Zero, m.Result); 13870public void Control_WndProc_InvokeMouseUpWithHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13874Assert.NotEqual(IntPtr.Zero, control.Handle); 13913public void Control_WndProc_InvokeMouseUpWithHandleNotSelectable_DoesNotCallMouseUp(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 13918Assert.NotEqual(IntPtr.Zero, control.Handle); 13966Assert.NotEqual(IntPtr.Zero, control.Handle); 13982Assert.Equal(IntPtr.Zero, m.Result); 14011Assert.Equal(IntPtr.Zero, m.Result); 14021Assert.NotEqual(IntPtr.Zero, control.Handle); 14042Assert.Equal(IntPtr.Zero, m.Result); 14059Assert.NotEqual(IntPtr.Zero, control.Handle); 14080Assert.Equal(IntPtr.Zero, m.Result); 14091yield return new object[] { true, true, IntPtr.Zero, 1, 1 }; 14092yield return new object[] { true, false, (IntPtr)250, 1, 0 }; 14093yield return new object[] { false, true, IntPtr.Zero, 0, 1 }; 14094yield return new object[] { false, false, IntPtr.Zero, 0, 1 }; 14099public void Control_WndProc_InvokeSetFocusWithParentIContainerControlWithHandle_Success(bool containerControl, bool enabled, IntPtr expectedResult, int expectedActivateControlCallCount, int expectedCallCount) 14108Assert.NotEqual(IntPtr.Zero, control.Handle); 14175Assert.NotEqual(IntPtr.Zero, control.Handle); 14196Assert.Equal(IntPtr.Zero, m.Result); 14219Assert.NotEqual(IntPtr.Zero, control.Handle); 14240Assert.Equal(IntPtr.Zero, m.Result); 14263Assert.NotEqual(IntPtr.Zero, control.Handle); 14284Assert.Equal(IntPtr.Zero, m.Result); 14307Assert.NotEqual(IntPtr.Zero, control.Handle); 14328Assert.Equal(IntPtr.Zero, m.Result); 14349Assert.Equal(IntPtr.Zero, m.Result); 14358Assert.NotEqual(IntPtr.Zero, control.Handle); 14372Assert.Equal(IntPtr.Zero, m.Result); 14385m.Result = IntPtr.Zero;
System\Windows\Forms\ControlTests.Properties.cs (85)
40Assert.NotEqual(IntPtr.Zero, control.Handle); 208Assert.NotEqual(IntPtr.Zero, control.Handle); 245Assert.NotEqual(IntPtr.Zero, control.Handle); 285Assert.NotEqual(IntPtr.Zero, control.Handle); 872Assert.NotEqual(IntPtr.Zero, control.Handle); 1067Assert.NotEqual(IntPtr.Zero, control.Handle); 1114Assert.NotEqual(IntPtr.Zero, parent.Handle); 1352Assert.NotEqual(IntPtr.Zero, control.Handle); 1415Assert.NotEqual(IntPtr.Zero, control.Handle); 1663Assert.NotEqual(IntPtr.Zero, control.Handle); 1785Assert.NotEqual(IntPtr.Zero, control.Handle); 2013Assert.NotEqual(IntPtr.Zero, control.Handle); 2111Assert.NotEqual(IntPtr.Zero, control.Handle); 2850Assert.NotEqual(IntPtr.Zero, control.Handle); 2967Assert.NotEqual(IntPtr.Zero, parent.Handle); 3054Assert.NotEqual(IntPtr.Zero, control.Handle); 3104Assert.NotEqual(IntPtr.Zero, control.Handle); 3124Assert.NotEqual(IntPtr.Zero, parent.Handle); 3155Assert.NotEqual(IntPtr.Zero, control.Handle); 3214Assert.NotEqual(IntPtr.Zero, control.Handle); 3437Assert.NotEqual(IntPtr.Zero, control.Handle); 3828Assert.NotEqual(IntPtr.Zero, control.Handle); 4352Assert.NotEqual(IntPtr.Zero, control.Handle); 4467Assert.NotEqual(IntPtr.Zero, control.Handle); 4533Assert.NotEqual(IntPtr.Zero, control.Handle); 4947Assert.NotEqual(IntPtr.Zero, control.Handle); 4993Assert.NotEqual(IntPtr.Zero, control.Handle); 5393Assert.NotEqual(IntPtr.Zero, control.Handle); 5456Assert.NotEqual(IntPtr.Zero, control.Handle); 5674IntPtr intptr = cont.Handle; 5676Assert.NotEqual(IntPtr.Zero, intptr); 6139Assert.NotEqual(IntPtr.Zero, control.Handle); 6268Assert.NotEqual(IntPtr.Zero, parent.Handle); 6383Assert.NotEqual(IntPtr.Zero, control.Handle); 6490Assert.NotEqual(IntPtr.Zero, control.Handle); 6561Assert.NotEqual(IntPtr.Zero, control.Handle); 6574Assert.NotEqual(IntPtr.Zero, control.Handle); 6629Assert.NotEqual(IntPtr.Zero, control.Handle); 6640Assert.NotEqual(IntPtr.Zero, control.Handle); 6849Assert.NotEqual(IntPtr.Zero, control.Handle); 6942Assert.NotEqual(IntPtr.Zero, parent.Handle); 7066Assert.NotEqual(IntPtr.Zero, control.Handle); 7332Assert.NotEqual(IntPtr.Zero, control.Handle); 7425Assert.NotEqual(IntPtr.Zero, parent.Handle); 7551Assert.NotEqual(IntPtr.Zero, control.Handle); 7768Assert.NotEqual(IntPtr.Zero, control.Handle); 7807Assert.NotEqual(IntPtr.Zero, parent.Handle); 8203Assert.NotEqual(IntPtr.Zero, control.Handle); 8241Assert.NotEqual(IntPtr.Zero, control.Handle); 8279Assert.NotEqual(IntPtr.Zero, control.Handle); 8328Assert.NotEqual(IntPtr.Zero, parent.Handle); 8396Assert.NotEqual(IntPtr.Zero, parent.Handle); 8881Assert.NotEqual(IntPtr.Zero, control.Handle); 8941Assert.NotEqual(IntPtr.Zero, control.Handle); 9007Assert.NotEqual(IntPtr.Zero, control.Handle); 9077Assert.NotEqual(IntPtr.Zero, parent.Handle); 9166Assert.NotEqual(IntPtr.Zero, parent.Handle); 9509Assert.NotEqual(IntPtr.Zero, control.Handle); 9563Assert.NotEqual(IntPtr.Zero, parent.Handle); 9746Assert.NotEqual(IntPtr.Zero, control.Handle); 9921Assert.NotEqual(IntPtr.Zero, control.Handle); 9955Assert.NotEqual(IntPtr.Zero, control.Handle); 10152Assert.NotEqual(IntPtr.Zero, control.Handle); 10186Assert.NotEqual(IntPtr.Zero, control.Handle); 10249Assert.NotEqual(IntPtr.Zero, control.Handle); 10501Assert.NotEqual(IntPtr.Zero, control.Handle); 10529Assert.NotEqual(IntPtr.Zero, control.Handle); 10552Assert.NotEqual(IntPtr.Zero, control.Handle); 10560Assert.NotEqual(IntPtr.Zero, control.Handle); 10588Assert.NotEqual(IntPtr.Zero, control.Handle); 10611Assert.NotEqual(IntPtr.Zero, control.Handle); 10669Assert.NotEqual(IntPtr.Zero, control.Handle); 11543Assert.NotEqual(IntPtr.Zero, control.Handle); 11677Assert.NotEqual(IntPtr.Zero, parent.Handle); 11891Assert.NotEqual(IntPtr.Zero, control.Handle); 11983Assert.NotEqual(IntPtr.Zero, control.Handle); 12283Assert.NotEqual(IntPtr.Zero, control.Handle); 12374Assert.NotEqual(IntPtr.Zero, parent.Handle); 12498Assert.NotEqual(IntPtr.Zero, control.Handle); 12659Assert.NotEqual(IntPtr.Zero, control.Handle); 12777Assert.NotEqual(IntPtr.Zero, control.Handle); 12818Assert.NotEqual(IntPtr.Zero, parent.Handle); 13558Assert.NotEqual(IntPtr.Zero, control.Handle); 13687Assert.NotEqual(IntPtr.Zero, parent.Handle); 13793Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\CreateParamsTests.cs (1)
112public void CreateParams_Parent_Set_GetReturnsExpected(IntPtr value)
System\Windows\Forms\CursorConverterTests.cs (1)
41Assert.NotEqual(IntPtr.Zero, cursor.Handle);
System\Windows\Forms\CursorsTests.cs (1)
54Assert.NotEqual(IntPtr.Zero, cursor.Handle);
System\Windows\Forms\CursorTests.cs (8)
55Assert.Throws<ArgumentException>("handle", () => new Cursor(IntPtr.Zero)); 70Assert.NotEqual(IntPtr.Zero, cursor.Handle); 121Assert.NotEqual(IntPtr.Zero, cursor.Handle); 158Assert.NotEqual(IntPtr.Zero, cursor.Handle); 232Assert.NotEqual(IntPtr.Zero, cursor.Handle); 330IntPtr handle = sourceCursor.CopyHandle(); 331Assert.NotEqual(IntPtr.Zero, handle); 361Assert.NotEqual(IntPtr.Zero, cursor.Handle);
System\Windows\Forms\DataGridViewCellTests.cs (6)
511Assert.NotEqual(IntPtr.Zero, control.Handle); 570Assert.NotEqual(IntPtr.Zero, control.Handle); 1127Assert.NotEqual(IntPtr.Zero, control.Handle); 1171Assert.NotEqual(IntPtr.Zero, control.Handle); 4524Assert.NotEqual(IntPtr.Zero, control.Handle); 4584Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\DataGridViewHeaderCellTests.cs (11)
286Assert.NotEqual(IntPtr.Zero, control.Handle); 321Assert.NotEqual(IntPtr.Zero, control.Handle); 358Assert.NotEqual(IntPtr.Zero, control.Handle); 383Assert.NotEqual(IntPtr.Zero, control.Handle); 420Assert.NotEqual(IntPtr.Zero, control.Handle); 2721Assert.NotEqual(IntPtr.Zero, control.Handle); 2781Assert.NotEqual(IntPtr.Zero, control.Handle); 2810Assert.NotEqual(IntPtr.Zero, control.Handle); 2846Assert.NotEqual(IntPtr.Zero, control.Handle); 2873Assert.NotEqual(IntPtr.Zero, control.Handle); 2934Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\DataGridViewRowTests.cs (1)
1228Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\DataGridViewTests.cs (15)
198Assert.NotEqual(IntPtr.Zero, control.Handle); 265Assert.NotEqual(IntPtr.Zero, control.Handle); 550Assert.NotEqual(IntPtr.Zero, control.Handle); 584Assert.NotEqual(IntPtr.Zero, control.Handle); 888Assert.NotEqual(IntPtr.Zero, control.Handle); 1118Assert.NotEqual(IntPtr.Zero, control.Handle); 1189Assert.NotEqual(IntPtr.Zero, control.Handle); 1479Assert.NotEqual(IntPtr.Zero, control.Handle); 1517Assert.NotEqual(IntPtr.Zero, control.Handle); 1801Assert.NotEqual(IntPtr.Zero, control.Handle); 1892Assert.NotEqual(IntPtr.Zero, control.Handle); 1968Assert.NotEqual(IntPtr.Zero, control.Handle); 2160Assert.NotEqual(IntPtr.Zero, control.Handle); 2442Assert.NotEqual(IntPtr.Zero, control.Handle); 2641Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\DataGridViewTests.Rendering.cs (1)
167Assert.NotEqual(IntPtr.Zero, dataGridView.Handle);
System\Windows\Forms\DataGridViewTextBoxEditingControlTests.cs (33)
145Assert.Equal(IntPtr.Zero, createParams.Parent); 422Assert.NotEqual(IntPtr.Zero, control.Handle); 491Assert.NotEqual(IntPtr.Zero, control.Handle); 1169Assert.NotEqual(IntPtr.Zero, control.Handle); 1278Assert.NotEqual(IntPtr.Zero, control.Handle); 1518foreach (IntPtr wParam in new IntPtr[] { (IntPtr)Keys.Enter, (IntPtr)Keys.LineFeed, (IntPtr)Keys.A, 2 }) 1520if (wParam != (IntPtr)Keys.Enter) 1522yield return new object[] { (int)PInvokeCore.WM_CHAR, wParam, '2', handled, handled, 1, 0, 0, (IntPtr)50 }; 1523yield return new object[] { (int)PInvokeCore.WM_CHAR, wParam, '1', handled, handled, 1, 0, 0, (IntPtr)49 }; 1526yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, wParam, '2', handled, handled, 1, 0, 0, (IntPtr)50 }; 1527yield return new object[] { (int)PInvokeCore.WM_SYSCHAR, wParam, '1', handled, handled, 1, 0, 0, (IntPtr)49 }; 1528yield return new object[] { (int)PInvokeCore.WM_IME_CHAR, wParam, '2', handled, handled, 1, 0, 0, (IntPtr)50 }; 1529yield return new object[] { (int)PInvokeCore.WM_IME_CHAR, wParam, '1', handled, handled, 1, 0, 0, (IntPtr)49 }; 1537yield return new object[] { (int)PInvokeCore.WM_CHAR, (IntPtr)Keys.Enter, '2', handled, true, 0, 0, 0, (IntPtr)Keys.Enter }; 1538yield return new object[] { (int)PInvokeCore.WM_CHAR, (IntPtr)Keys.Enter, '1', handled, true, 0, 0, 0, (IntPtr)Keys.Enter }; 1544public void DataGridViewTextBoxEditingControl_ProcessKeyEventArgs_InvokeWithoutParent_ReturnsFalse(int msg, IntPtr wParam, char newChar, bool handled, bool expected, int expectedKeyPressCallCount, int expectedKeyDownCallCount, int expectedKeyUpCallCount, IntPtr expectedWParam) 1587public void DataGridViewTextBoxEditingControl_ProcessKeyEventArgs_InvokeWithParent_ReturnsFalse(int msg, IntPtr wParam, char newChar, bool handled, bool expected, int expectedKeyPressCallCount, int expectedKeyDownCallCount, int expectedKeyUpCallCount, IntPtr expectedWParam) 1634public void DataGridViewTextBoxEditingControl_ProcessKeyEventArgs_InvokeWithCustomParent_ReturnsFalse(int msg, IntPtr wParam, char newChar, bool handled, bool expected, int expectedKeyPressCallCount, int expectedKeyDownCallCount, int expectedKeyUpCallCount, IntPtr expectedWParam) 1835public void DataGridViewTextBoxEditingControl_ProcessKeyMessage_InvokeWithoutParent_ReturnsFalse(int msg, IntPtr wParam, char newChar, bool handled, bool expected, int expectedKeyPressCallCount, int expectedKeyDownCallCount, int expectedKeyUpCallCount, IntPtr expectedWParam) 1878public void DataGridViewTextBoxEditingControl_ProcessKeyMessage_InvokeWithParent_ReturnsFalse(int msg, IntPtr wParam, char newChar, bool handled, bool expected, int expectedKeyPressCallCount, int expectedKeyDownCallCount, int expectedKeyUpCallCount, IntPtr expectedWParam) 1925public void DataGridViewTextBoxEditingControl_ProcessKeyMessage_InvokeWithCustomParent_ReturnsFalse(int msg, IntPtr wParam, char newChar, bool handled, bool expected, int expectedKeyPressCallCount, int expectedKeyDownCallCount, int expectedKeyUpCallCount, IntPtr expectedWParam)
System\Windows\Forms\DataObjectTests.cs (9)
2167result[0].ptd.Should().Be(IntPtr.Zero); 2177result[0].ptd.Should().Be(IntPtr.Zero); 2260result[0].ptd.Should().Be(IntPtr.Zero); 2270result[0].ptd.Should().Be(IntPtr.Zero); 2280result[0].ptd.Should().Be(IntPtr.Zero); 2357result[0].ptd.Should().Be(IntPtr.Zero); 2367result[0].ptd.Should().Be(IntPtr.Zero); 2611char* text = (char*)IntPtr.Add((IntPtr)pDropFiles, (int)pDropFiles->pFiles);
System\Windows\Forms\DateTimePickerTests.cs (1)
138Assert.Equal(IntPtr.Zero, createParams.Parent);
System\Windows\Forms\Design\ComponentEditorFormTests.cs (3)
181Assert.Equal(IntPtr.Zero, createParams.Parent); 289Assert.NotEqual(IntPtr.Zero, control.Handle); 344Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\Design\ComponentEditorPageTests.cs (2)
141Assert.Equal(IntPtr.Zero, createParams.Parent); 402Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\DomainUpDownTests.cs (6)
179createParams.Parent.Should().Be(IntPtr.Zero); 206_control.Handle.Should().NotBe(IntPtr.Zero); 738_sub.Handle.Should().NotBe(IntPtr.Zero); 788_sub.Handle.Should().NotBe(IntPtr.Zero); 838_sub.Handle.Should().NotBe(IntPtr.Zero); 904_control.Handle.Should().NotBe(IntPtr.Zero);
System\Windows\Forms\DragDropHelperTests.cs (1)
103ptd = IntPtr.Zero,
System\Windows\Forms\DrawToolTipEventArgsTests.cs (1)
87public IntPtr Handle { get; }
System\Windows\Forms\ErrorProviderTests.cs (1)
1183Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\FileDialogTests.cs (6)
36Assert.NotEqual(IntPtr.Zero, dialog.Instance); 74Assert.NotEqual(IntPtr.Zero, dialog.Instance); 630Assert.NotEqual(IntPtr.Zero, dialog.Instance); 714Assert.Equal((IntPtr)1, o.hwndOwner); 836public new IntPtr Instance => base.Instance; 853public new bool RunDialog(IntPtr hWndOwner) => base.RunDialog(hWndOwner);
System\Windows\Forms\FlowLayoutPanelTests.cs (1)
133Assert.Equal(IntPtr.Zero, createParams.Parent);
System\Windows\Forms\FontDialogTests.cs (27)
635yield return new object[] { showColor, (int)PInvokeCore.WM_INITDIALOG, IntPtr.Zero }; 636yield return new object[] { showColor, (int)PInvokeCore.WM_SETFOCUS, IntPtr.Zero }; 637yield return new object[] { showColor, (int)PInvokeCore.WM_COMMAND, IntPtr.Zero }; 640yield return new object[] { showColor, (int)CDM_SETDEFAULTFOCUS, IntPtr.Zero }; 642yield return new object[] { showColor, 0, IntPtr.Zero }; 643yield return new object[] { showColor, -1, IntPtr.Zero }; 649public void FontDialog_HookProc_Invoke_ReturnsZero(bool showColor, int msg, IntPtr wparam) 657Assert.Equal(IntPtr.Zero, dialog.HookProc(IntPtr.Zero, msg, wparam, IntPtr.Zero)); 665yield return new object[] { showColor, (int)PInvokeCore.WM_INITDIALOG, IntPtr.Zero, 0 }; 666yield return new object[] { showColor, (int)PInvokeCore.WM_SETFOCUS, IntPtr.Zero, 0 }; 667yield return new object[] { showColor, (int)PInvokeCore.WM_COMMAND, IntPtr.Zero, 0 }; 668yield return new object[] { showColor, (int)PInvokeCore.WM_COMMAND, (IntPtr)0x402, 1 }; 671yield return new object[] { showColor, (int)CDM_SETDEFAULTFOCUS, IntPtr.Zero, 0 }; 673yield return new object[] { showColor, 0, IntPtr.Zero, 0 }; 674yield return new object[] { showColor, -1, IntPtr.Zero, 0 }; 680public void FontDialog_HookProc_InvokeWithHWnd_ReturnsZero(bool showColor, int msg, IntPtr wparam, int expectedApplyCallCount) 689Assert.Equal(IntPtr.Zero, dialog.HookProc(control.Handle, msg, wparam, IntPtr.Zero)); 720Assert.Throws<ArgumentException>(() => dialog.HookProc(IntPtr.Zero, (int)PInvokeCore.WM_COMMAND, 0x402, IntPtr.Zero)); 764public new IntPtr HookProc(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) => base.HookProc(hWnd, msg, wparam, lparam); 766public new bool RunDialog(IntPtr hWndOwner) => base.RunDialog(hWndOwner);
System\Windows\Forms\FormTests.cs (33)
182Assert.Equal(IntPtr.Zero, createParams.Parent); 196Assert.True(form.Handle != IntPtr.Zero); 407Assert.NotEqual(IntPtr.Zero, control.Handle); 460Assert.NotEqual(IntPtr.Zero, control.Handle); 507Assert.NotEqual(IntPtr.Zero, control.Handle); 715Assert.NotEqual(IntPtr.Zero, control.Handle); 754Assert.NotEqual(IntPtr.Zero, control.Handle); 797Assert.NotEqual(IntPtr.Zero, control.Handle); 842Assert.NotEqual(IntPtr.Zero, control.Handle); 896Assert.NotEqual(IntPtr.Zero, control.Handle); 1054Assert.True(form.Handle != IntPtr.Zero); 1126Assert.NotEqual(IntPtr.Zero, control.Handle); 1237Assert.True(parent.Handle != IntPtr.Zero); 1241Assert.True(control.Handle != IntPtr.Zero); 1424Assert.NotEqual(IntPtr.Zero, control.Handle); 1463Assert.NotEqual(IntPtr.Zero, control.Handle); 1498Assert.NotEqual(IntPtr.Zero, control.Handle); 1540Assert.NotEqual(IntPtr.Zero, control.Handle); 1572Assert.NotEqual(IntPtr.Zero, control.Handle); 1606Assert.NotEqual(IntPtr.Zero, control.Handle); 1642Assert.NotEqual(IntPtr.Zero, control.Handle); 1678Assert.NotEqual(IntPtr.Zero, control.Handle); 1710Assert.NotEqual(IntPtr.Zero, control.Handle); 1744Assert.NotEqual(IntPtr.Zero, control.Handle); 1793Assert.NotEqual(IntPtr.Zero, control.Handle); 1835IntPtr formHandle = form.Handle; 1941Assert.NotEqual(IntPtr.Zero, control.Handle); 1995Assert.NotEqual(IntPtr.Zero, control.Handle); 2047Assert.NotEqual(IntPtr.Zero, control.Handle); 2296Assert.NotEqual(IntPtr.Zero, control.Handle); 2354Assert.NotEqual(IntPtr.Zero, control.Handle); 2498Assert.NotEqual(IntPtr.Zero, control.Handle); 2551Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\GroupBoxTests.cs (25)
118Assert.Equal(IntPtr.Zero, createParams.Parent); 146Assert.Equal(IntPtr.Zero, createParams.Parent); 386Assert.NotEqual(IntPtr.Zero, control.Handle); 434Assert.NotEqual(IntPtr.Zero, parent.Handle); 507Assert.NotEqual(IntPtr.Zero, parent.Handle); 707Assert.NotEqual(IntPtr.Zero, control.Handle); 761Assert.NotEqual(IntPtr.Zero, control.Handle); 824Assert.NotEqual(IntPtr.Zero, control.Handle); 887Assert.NotEqual(IntPtr.Zero, control.Handle); 986Assert.NotEqual(IntPtr.Zero, control.Handle); 1096Assert.NotEqual(IntPtr.Zero, control.Handle); 1128Assert.NotEqual(IntPtr.Zero, control.Handle); 1278Assert.NotEqual(IntPtr.Zero, control.Handle); 1323Assert.NotEqual(IntPtr.Zero, control.Handle); 1544Assert.NotEqual(IntPtr.Zero, control.Handle); 1902Assert.NotEqual(IntPtr.Zero, control.Handle); 2091IntPtr hdc = graphics.GetHdc(); 2119Assert.NotEqual(IntPtr.Zero, control.Handle); 2129IntPtr hdc = graphics.GetHdc(); 2180Assert.NotEqual(IntPtr.Zero, control.Handle); 2192IntPtr hdc = graphics.GetHdc(); 2225Assert.NotEqual(IntPtr.Zero, control.Handle); 2237IntPtr hdc = graphics.GetHdc(); 2268Assert.NotEqual(IntPtr.Zero, control.Handle); 2289Assert.Equal(IntPtr.Zero, m.Result);
System\Windows\Forms\HScrollBarTests.cs (1)
132Assert.Equal(IntPtr.Zero, createParams.Parent);
System\Windows\Forms\ImageList.ImageCollectionTests.cs (20)
20Assert.NotEqual(IntPtr.Zero, list.Handle); 30Assert.NotEqual(IntPtr.Zero, list.Handle); 112Assert.NotEqual(IntPtr.Zero, list.Handle); 288Assert.NotEqual(IntPtr.Zero, list.Handle); 490Assert.NotEqual(IntPtr.Zero, list.Handle); 559Assert.NotEqual(IntPtr.Zero, list.Handle); 628Assert.NotEqual(IntPtr.Zero, list.Handle); 705Assert.NotEqual(IntPtr.Zero, list.Handle); 774Assert.NotEqual(IntPtr.Zero, list.Handle); 847Assert.NotEqual(IntPtr.Zero, list.Handle); 929Assert.NotEqual(IntPtr.Zero, list.Handle); 1017Assert.NotEqual(IntPtr.Zero, list.Handle); 1040Assert.NotEqual(IntPtr.Zero, list.Handle); 1138Assert.NotEqual(IntPtr.Zero, list.Handle); 1201Assert.NotEqual(IntPtr.Zero, list.Handle); 1353Assert.NotEqual(IntPtr.Zero, list.Handle); 1457Assert.NotEqual(IntPtr.Zero, list.Handle); 1509Assert.NotEqual(IntPtr.Zero, list.Handle); 1571Assert.NotEqual(IntPtr.Zero, list.Handle); 1661Assert.NotEqual(IntPtr.Zero, list.Handle);
System\Windows\Forms\ImageListTests.cs (30)
111Assert.NotEqual(IntPtr.Zero, list.Handle); 127Assert.NotEqual(IntPtr.Zero, list.Handle); 142Assert.NotEqual(IntPtr.Zero, list.Handle); 149Assert.NotEqual(IntPtr.Zero, list.Handle); 156IntPtr handle3 = list.Handle; 157Assert.NotEqual(IntPtr.Zero, list.Handle); 165Assert.NotEqual(IntPtr.Zero, list.Handle); 214IntPtr handle = list.Handle; 216Assert.NotEqual(IntPtr.Zero, handle); 292Assert.NotEqual(IntPtr.Zero, list.Handle); 308Assert.NotEqual(IntPtr.Zero, list.Handle); 323Assert.NotEqual(IntPtr.Zero, list.Handle); 330Assert.NotEqual(IntPtr.Zero, list.Handle); 337Assert.NotEqual(IntPtr.Zero, list.Handle); 344Assert.NotEqual(IntPtr.Zero, list.Handle); 351Assert.NotEqual(IntPtr.Zero, list.Handle); 359Assert.NotEqual(IntPtr.Zero, list.Handle); 529Assert.NotEqual(IntPtr.Zero, sourceList.Handle); 554Assert.NotEqual(IntPtr.Zero, sourceList.Handle); 558Assert.NotEqual(IntPtr.Zero, list.Handle); 606Assert.NotEqual(IntPtr.Zero, list.Handle); 637Assert.NotEqual(IntPtr.Zero, list.Handle); 645Assert.NotEqual(IntPtr.Zero, list.Handle); 732Assert.NotEqual(IntPtr.Zero, list.Handle); 748Assert.NotEqual(IntPtr.Zero, list.Handle); 874Assert.NotEqual(IntPtr.Zero, list.Handle); 893Assert.NotEqual(IntPtr.Zero, list.Handle); 945Assert.NotEqual(IntPtr.Zero, list.Handle); 974Assert.NotEqual(IntPtr.Zero, list.Handle); 1012Assert.NotEqual(IntPtr.Zero, list.Handle);
System\Windows\Forms\InputLanguageTests.cs (3)
67InputLanguage language = Assert.IsType<InputLanguage>(Activator.CreateInstance(typeof(InputLanguage), BindingFlags.Instance | BindingFlags.NonPublic, null, [(IntPtr)250], null)); 187language.Handle.Should().NotBe(IntPtr.Zero); 204Assert.NotEqual(IntPtr.Zero, language.Handle);
System\Windows\Forms\LabelTests.cs (4)
129Assert.Equal(IntPtr.Zero, createParams.Parent); 189Assert.NotEqual(IntPtr.Zero, control.Handle); 206Assert.NotEqual(IntPtr.Zero, control.Handle); 235Assert.NotEqual(IntPtr.Zero, toolTip.Handle); // A workaround to create the toolTip native window Handle
System\Windows\Forms\ListBox.IntegerCollectionTests.cs (28)
144Assert.NotEqual(IntPtr.Zero, owner.Handle); 186Assert.NotEqual(IntPtr.Zero, owner.Handle); 346Assert.NotEqual(IntPtr.Zero, owner.Handle); 408Assert.NotEqual(IntPtr.Zero, owner.Handle); 526Assert.NotEqual(IntPtr.Zero, owner.Handle); 567Assert.NotEqual(IntPtr.Zero, owner.Handle); 670Assert.NotEqual(IntPtr.Zero, owner.Handle); 714Assert.NotEqual(IntPtr.Zero, owner.Handle); 881Assert.NotEqual(IntPtr.Zero, owner.Handle); 916Assert.NotEqual(IntPtr.Zero, owner.Handle); 951Assert.NotEqual(IntPtr.Zero, owner.Handle); 987Assert.NotEqual(IntPtr.Zero, owner.Handle); 1195Assert.NotEqual(IntPtr.Zero, owner.Handle); 1258Assert.NotEqual(IntPtr.Zero, owner.Handle); 1395Assert.NotEqual(IntPtr.Zero, owner.Handle); 1448Assert.NotEqual(IntPtr.Zero, owner.Handle); 1625Assert.NotEqual(IntPtr.Zero, owner.Handle); 1670Assert.NotEqual(IntPtr.Zero, owner.Handle); 1844Assert.NotEqual(IntPtr.Zero, owner.Handle); 1906Assert.NotEqual(IntPtr.Zero, owner.Handle); 2098Assert.NotEqual(IntPtr.Zero, owner.Handle); 2133Assert.NotEqual(IntPtr.Zero, owner.Handle); 2168Assert.NotEqual(IntPtr.Zero, owner.Handle); 2204Assert.NotEqual(IntPtr.Zero, owner.Handle); 2440Assert.NotEqual(IntPtr.Zero, owner.Handle); 2506Assert.NotEqual(IntPtr.Zero, owner.Handle); 2666Assert.NotEqual(IntPtr.Zero, owner.Handle); 2722Assert.NotEqual(IntPtr.Zero, owner.Handle);
System\Windows\Forms\ListBox.ObjectCollectionTests.cs (107)
501Assert.NotEqual(IntPtr.Zero, owner.Handle); 590Assert.NotEqual(IntPtr.Zero, owner.Handle); 914Assert.NotEqual(IntPtr.Zero, owner.Handle); 987Assert.NotEqual(IntPtr.Zero, owner.Handle); 1064Assert.NotEqual(IntPtr.Zero, owner.Handle); 1164Assert.NotEqual(IntPtr.Zero, owner.Handle); 1473Assert.NotEqual(IntPtr.Zero, owner.Handle); 1552Assert.NotEqual(IntPtr.Zero, owner.Handle); 1634Assert.NotEqual(IntPtr.Zero, owner.Handle); 1716Assert.NotEqual(IntPtr.Zero, owner.Handle); 1947Assert.NotEqual(IntPtr.Zero, owner.Handle); 1992Assert.NotEqual(IntPtr.Zero, owner.Handle); 2041Assert.NotEqual(IntPtr.Zero, owner.Handle); 2101Assert.NotEqual(IntPtr.Zero, owner.Handle); 2213Assert.NotEqual(IntPtr.Zero, owner.Handle); 2324Assert.NotEqual(IntPtr.Zero, owner.Handle); 2376Assert.NotEqual(IntPtr.Zero, owner.Handle); 2431Assert.NotEqual(IntPtr.Zero, owner.Handle); 2486Assert.NotEqual(IntPtr.Zero, owner.Handle); 2671Assert.NotEqual(IntPtr.Zero, owner.Handle); 2715Assert.NotEqual(IntPtr.Zero, owner.Handle); 2763Assert.NotEqual(IntPtr.Zero, owner.Handle); 2811Assert.NotEqual(IntPtr.Zero, owner.Handle); 2998Assert.NotEqual(IntPtr.Zero, owner.Handle); 3055Assert.NotEqual(IntPtr.Zero, owner.Handle); 3115Assert.NotEqual(IntPtr.Zero, owner.Handle); 3175Assert.NotEqual(IntPtr.Zero, owner.Handle); 3385Assert.NotEqual(IntPtr.Zero, owner.Handle); 3434Assert.NotEqual(IntPtr.Zero, owner.Handle); 3487Assert.NotEqual(IntPtr.Zero, owner.Handle); 3540Assert.NotEqual(IntPtr.Zero, owner.Handle); 3689Assert.NotEqual(IntPtr.Zero, owner.Handle); 3795Assert.NotEqual(IntPtr.Zero, owner.Handle); 3832Assert.NotEqual(IntPtr.Zero, owner.Handle); 3869Assert.NotEqual(IntPtr.Zero, owner.Handle); 3907Assert.NotEqual(IntPtr.Zero, owner.Handle); 4296Assert.NotEqual(IntPtr.Zero, owner.Handle); 4375Assert.NotEqual(IntPtr.Zero, owner.Handle); 4457Assert.NotEqual(IntPtr.Zero, owner.Handle); 4539Assert.NotEqual(IntPtr.Zero, owner.Handle); 4762Assert.NotEqual(IntPtr.Zero, owner.Handle); 4807Assert.NotEqual(IntPtr.Zero, owner.Handle); 4856Assert.NotEqual(IntPtr.Zero, owner.Handle); 4916Assert.NotEqual(IntPtr.Zero, owner.Handle); 5051Assert.NotEqual(IntPtr.Zero, owner.Handle); 5240Assert.NotEqual(IntPtr.Zero, owner.Handle); 5312Assert.NotEqual(IntPtr.Zero, owner.Handle); 5392Assert.NotEqual(IntPtr.Zero, owner.Handle); 5467Assert.NotEqual(IntPtr.Zero, owner.Handle); 5732Assert.NotEqual(IntPtr.Zero, owner.Handle); 5794Assert.NotEqual(IntPtr.Zero, owner.Handle); 5860Assert.NotEqual(IntPtr.Zero, owner.Handle); 5928Assert.NotEqual(IntPtr.Zero, owner.Handle); 6157Assert.NotEqual(IntPtr.Zero, owner.Handle); 6214Assert.NotEqual(IntPtr.Zero, owner.Handle); 6278Assert.NotEqual(IntPtr.Zero, owner.Handle); 6338Assert.NotEqual(IntPtr.Zero, owner.Handle); 6587Assert.NotEqual(IntPtr.Zero, owner.Handle); 6649Assert.NotEqual(IntPtr.Zero, owner.Handle); 6715Assert.NotEqual(IntPtr.Zero, owner.Handle); 6783Assert.NotEqual(IntPtr.Zero, owner.Handle); 7304Assert.NotEqual(IntPtr.Zero, owner.Handle); 7395Assert.NotEqual(IntPtr.Zero, owner.Handle); 7719Assert.NotEqual(IntPtr.Zero, owner.Handle); 7792Assert.NotEqual(IntPtr.Zero, owner.Handle); 7869Assert.NotEqual(IntPtr.Zero, owner.Handle); 7969Assert.NotEqual(IntPtr.Zero, owner.Handle); 8278Assert.NotEqual(IntPtr.Zero, owner.Handle); 8357Assert.NotEqual(IntPtr.Zero, owner.Handle); 8439Assert.NotEqual(IntPtr.Zero, owner.Handle); 8521Assert.NotEqual(IntPtr.Zero, owner.Handle); 8752Assert.NotEqual(IntPtr.Zero, owner.Handle); 8797Assert.NotEqual(IntPtr.Zero, owner.Handle); 8846Assert.NotEqual(IntPtr.Zero, owner.Handle); 8906Assert.NotEqual(IntPtr.Zero, owner.Handle); 9018Assert.NotEqual(IntPtr.Zero, owner.Handle); 9117Assert.NotEqual(IntPtr.Zero, owner.Handle); 9154Assert.NotEqual(IntPtr.Zero, owner.Handle); 9191Assert.NotEqual(IntPtr.Zero, owner.Handle); 9229Assert.NotEqual(IntPtr.Zero, owner.Handle); 9618Assert.NotEqual(IntPtr.Zero, owner.Handle); 9697Assert.NotEqual(IntPtr.Zero, owner.Handle); 9779Assert.NotEqual(IntPtr.Zero, owner.Handle); 9861Assert.NotEqual(IntPtr.Zero, owner.Handle); 10084Assert.NotEqual(IntPtr.Zero, owner.Handle); 10129Assert.NotEqual(IntPtr.Zero, owner.Handle); 10178Assert.NotEqual(IntPtr.Zero, owner.Handle); 10238Assert.NotEqual(IntPtr.Zero, owner.Handle); 10373Assert.NotEqual(IntPtr.Zero, owner.Handle); 10562Assert.NotEqual(IntPtr.Zero, owner.Handle); 10634Assert.NotEqual(IntPtr.Zero, owner.Handle); 10714Assert.NotEqual(IntPtr.Zero, owner.Handle); 10789Assert.NotEqual(IntPtr.Zero, owner.Handle); 11054Assert.NotEqual(IntPtr.Zero, owner.Handle); 11116Assert.NotEqual(IntPtr.Zero, owner.Handle); 11182Assert.NotEqual(IntPtr.Zero, owner.Handle); 11250Assert.NotEqual(IntPtr.Zero, owner.Handle); 11479Assert.NotEqual(IntPtr.Zero, owner.Handle); 11536Assert.NotEqual(IntPtr.Zero, owner.Handle); 11600Assert.NotEqual(IntPtr.Zero, owner.Handle); 11660Assert.NotEqual(IntPtr.Zero, owner.Handle); 11909Assert.NotEqual(IntPtr.Zero, owner.Handle); 11971Assert.NotEqual(IntPtr.Zero, owner.Handle); 12037Assert.NotEqual(IntPtr.Zero, owner.Handle); 12105Assert.NotEqual(IntPtr.Zero, owner.Handle); 12205public IntPtr AddStringResult { get; set; } 12221public IntPtr InsertStringResult { get; set; }
System\Windows\Forms\ListBoxTests.cs (78)
150Assert.Equal(IntPtr.Zero, createParams.Parent); 176Assert.Equal(IntPtr.Zero, createParams.Parent); 202Assert.Equal(IntPtr.Zero, createParams.Parent); 228Assert.Equal(IntPtr.Zero, createParams.Parent); 255Assert.Equal(IntPtr.Zero, createParams.Parent); 284Assert.Equal(IntPtr.Zero, createParams.Parent); 312Assert.Equal(IntPtr.Zero, createParams.Parent); 339Assert.Equal(IntPtr.Zero, createParams.Parent); 383Assert.NotEqual(IntPtr.Zero, control.Handle); 619Assert.NotEqual(IntPtr.Zero, control.Handle); 701Assert.NotEqual(IntPtr.Zero, control.Handle); 735Assert.NotEqual(IntPtr.Zero, control.Handle); 767Assert.NotEqual(IntPtr.Zero, control.Handle); 996Assert.NotEqual(IntPtr.Zero, control.Handle); 1119Assert.NotEqual(IntPtr.Zero, control.Handle); 1168Assert.NotEqual(IntPtr.Zero, control.Handle); 1280Assert.NotEqual(IntPtr.Zero, control.Handle); 1425Assert.NotEqual(IntPtr.Zero, control.Handle); 1462Assert.NotEqual(IntPtr.Zero, control.Handle); 1550Assert.NotEqual(IntPtr.Zero, control.Handle); 1604Assert.NotEqual(IntPtr.Zero, control.Handle); 1670Assert.NotEqual(IntPtr.Zero, control.Handle); 1764Assert.NotEqual(IntPtr.Zero, control.Handle); 1802Assert.NotEqual(IntPtr.Zero, control.Handle); 1921Assert.NotEqual(IntPtr.Zero, control.Handle); 1989Assert.NotEqual(IntPtr.Zero, control.Handle); 2134Assert.NotEqual(IntPtr.Zero, control.Handle); 2160Assert.NotEqual(IntPtr.Zero, control.Handle); 2263Assert.NotEqual(IntPtr.Zero, control.Handle); 2303Assert.NotEqual(IntPtr.Zero, control.Handle); 2317Assert.NotEqual(IntPtr.Zero, control.Handle); 2501Assert.NotEqual(IntPtr.Zero, control.Handle); 2565Assert.NotEqual(IntPtr.Zero, control.Handle); 2630Assert.NotEqual(IntPtr.Zero, control.Handle); 2657Assert.NotEqual(IntPtr.Zero, control.Handle); 2766Assert.NotEqual(IntPtr.Zero, control.Handle); 2780Assert.NotEqual(IntPtr.Zero, control.Handle); 2992Assert.NotEqual(IntPtr.Zero, control.Handle); 3067Assert.NotEqual(IntPtr.Zero, control.Handle); 3143Assert.NotEqual(IntPtr.Zero, control.Handle); 3174Assert.NotEqual(IntPtr.Zero, control.Handle); 3301Assert.NotEqual(IntPtr.Zero, control.Handle); 3335public IntPtr GetSelCountResult { get; set; } 3586Assert.NotEqual(IntPtr.Zero, control.Handle); 3648Assert.NotEqual(IntPtr.Zero, control.Handle); 3690Assert.NotEqual(IntPtr.Zero, control.Handle); 3742Assert.NotEqual(IntPtr.Zero, control.Handle); 3800Assert.NotEqual(IntPtr.Zero, control.Handle); 3858Assert.NotEqual(IntPtr.Zero, control.Handle); 3997Assert.NotEqual(IntPtr.Zero, control.Handle); 4037Assert.NotEqual(IntPtr.Zero, control.Handle); 4080Assert.NotEqual(IntPtr.Zero, control.Handle); 4239Assert.NotEqual(IntPtr.Zero, control.Handle); 4304Assert.NotEqual(IntPtr.Zero, control.Handle); 4362Assert.NotEqual(IntPtr.Zero, control.Handle); 4399Assert.NotEqual(IntPtr.Zero, control.Handle); 4431Assert.NotEqual(IntPtr.Zero, control.Handle); 4464Assert.NotEqual(IntPtr.Zero, control.Handle); 4524Assert.NotEqual(IntPtr.Zero, control.Handle); 4586Assert.NotEqual(IntPtr.Zero, control.Handle); 4651Assert.NotEqual(IntPtr.Zero, control.Handle); 4713Assert.NotEqual(IntPtr.Zero, control.Handle); 4841Assert.NotEqual(IntPtr.Zero, control.Handle); 4874Assert.NotEqual(IntPtr.Zero, control.Handle); 5188Assert.NotEqual(IntPtr.Zero, control.Handle); 5213Assert.NotEqual(IntPtr.Zero, control.Handle); 5253Assert.NotEqual(IntPtr.Zero, control.Handle); 5263public IntPtr GetItemHeightResult { get; set; } 5283Assert.NotEqual(IntPtr.Zero, control.Handle); 5354Assert.NotEqual(IntPtr.Zero, control.Handle); 5399Assert.NotEqual(IntPtr.Zero, control.Handle); 5443m.Result = IntPtr.Zero; 5485Assert.NotEqual(IntPtr.Zero, control.Handle); 5606Assert.NotEqual(IntPtr.Zero, control.Handle); 5760Assert.NotEqual(IntPtr.Zero, control.Handle); 5919Assert.NotEqual(IntPtr.Zero, control.Handle); 5949Assert.NotEqual(IntPtr.Zero, control.Handle); 6037Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\ListControlTests.cs (1)
126Assert.Equal(IntPtr.Zero, createParams.Parent);
System\Windows\Forms\ListViewGroupCollectionTests.cs (8)
63Assert.NotEqual(IntPtr.Zero, listView.Handle); 97Assert.NotEqual(IntPtr.Zero, listView.Handle); 390Assert.NotEqual(IntPtr.Zero, listView.Handle); 426Assert.NotEqual(IntPtr.Zero, listView.Handle); 616Assert.NotEqual(IntPtr.Zero, listView.Handle); 755Assert.NotEqual(IntPtr.Zero, listView.Handle); 787Assert.NotEqual(IntPtr.Zero, listView.Handle); 940Assert.NotEqual(IntPtr.Zero, listView.Handle);
System\Windows\Forms\ListViewGroupTests.cs (18)
179Assert.NotEqual(IntPtr.Zero, listView.Handle); 227Assert.NotEqual(IntPtr.Zero, listView.Handle); 320Assert.NotEqual(IntPtr.Zero, listView.Handle); 367Assert.NotEqual(IntPtr.Zero, listView.Handle); 452Assert.NotEqual(IntPtr.Zero, listView.Handle); 504Assert.NotEqual(IntPtr.Zero, listView.Handle); 574Assert.NotEqual(IntPtr.Zero, listView.Handle); 617Assert.NotEqual(IntPtr.Zero, listView.Handle); 704Assert.NotEqual(IntPtr.Zero, listView.Handle); 760Assert.NotEqual(IntPtr.Zero, listView.Handle); 835Assert.NotEqual(IntPtr.Zero, listView.Handle); 878Assert.NotEqual(IntPtr.Zero, listView.Handle); 956Assert.NotEqual(IntPtr.Zero, listView.Handle); 1012Assert.NotEqual(IntPtr.Zero, listView.Handle); 1097Assert.NotEqual(IntPtr.Zero, listView.Handle); 1134Assert.NotEqual(IntPtr.Zero, listView.Handle); 1239Assert.NotEqual(IntPtr.Zero, listView.Handle); 1283Assert.NotEqual(IntPtr.Zero, listView.Handle);
System\Windows\Forms\ListViewInsertionMarkTests.cs (16)
51Assert.NotEqual(IntPtr.Zero, control.Handle); 95Assert.NotEqual(IntPtr.Zero, control.Handle); 146Assert.NotEqual(IntPtr.Zero, control.Handle); 199Assert.NotEqual(IntPtr.Zero, control.Handle); 230Assert.NotEqual(IntPtr.Zero, control.Handle); 257Assert.NotEqual(IntPtr.Zero, control.Handle); 273m.Result = IntPtr.Zero; 296Assert.NotEqual(IntPtr.Zero, control.Handle); 334Assert.NotEqual(IntPtr.Zero, control.Handle); 369Assert.NotEqual(IntPtr.Zero, control.Handle); 428Assert.NotEqual(IntPtr.Zero, control.Handle); 468Assert.NotEqual(IntPtr.Zero, control.Handle); 481Assert.NotEqual(IntPtr.Zero, control.Handle); 523Assert.NotEqual(IntPtr.Zero, control.Handle); 536Assert.NotEqual(IntPtr.Zero, control.Handle); 576Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\ListViewSubItemTests.cs (1)
210Assert.NotEqual(IntPtr.Zero, listView.Handle);
System\Windows\Forms\ListViewTests.cs (68)
168Assert.Equal(IntPtr.Zero, createParams.Parent); 202Assert.NotEqual(IntPtr.Zero, listView.Handle); 300Assert.NotEqual(IntPtr.Zero, listView.Handle); 360Assert.NotEqual(IntPtr.Zero, listView.Handle); 420Assert.NotEqual(IntPtr.Zero, listView.Handle); 486Assert.NotEqual(IntPtr.Zero, control.Handle); 515Assert.NotEqual(IntPtr.Zero, control.Handle); 667Assert.NotEqual(IntPtr.Zero, listView.Handle); 707Assert.NotEqual(IntPtr.Zero, listView.Handle); 763Assert.NotEqual(IntPtr.Zero, listView.Handle); 965Assert.NotEqual(IntPtr.Zero, listView.Handle); 1009Assert.NotEqual(IntPtr.Zero, listView.Handle); 1054Assert.NotEqual(IntPtr.Zero, listView.Handle); 1183Assert.NotEqual(IntPtr.Zero, control.Handle); 1273Assert.NotEqual(IntPtr.Zero, control.Handle); 1291Assert.NotEqual(IntPtr.Zero, control.Handle); 1348Assert.NotEqual(IntPtr.Zero, control.Handle); 1377Assert.NotEqual(IntPtr.Zero, control.Handle); 1445Assert.NotEqual(IntPtr.Zero, listView.Handle); 1505Assert.NotEqual(IntPtr.Zero, listView.Handle); 1663Assert.NotEqual(IntPtr.Zero, listView.Handle); 1749Assert.NotEqual(IntPtr.Zero, listView.Handle); 1809Assert.NotEqual(IntPtr.Zero, listView.Handle); 1848Assert.NotEqual(IntPtr.Zero, control.Handle); 1859Assert.NotEqual(IntPtr.Zero, control.Handle); 1976Assert.NotEqual(IntPtr.Zero, control.Handle); 1986Assert.NotEqual(IntPtr.Zero, control.Handle); 1993yield return new object[] { IntPtr.Zero, 1 }; 1994yield return new object[] { (IntPtr)4, 1 }; 1995yield return new object[] { (IntPtr)5, 0 }; 1996yield return new object[] { (IntPtr)6, 0 }; 2001public void ListView_Handle_CustomGetVersion_Success(IntPtr getVersionResult, int expectedSetVersionCallCount) 2007Assert.NotEqual(IntPtr.Zero, control.Handle); 2013public IntPtr GetVersionResult { get; set; } 2020Assert.Equal(IntPtr.Zero, m.WParam); 2021Assert.Equal(IntPtr.Zero, m.LParam); 2028Assert.Equal(IntPtr.Zero, m.LParam); 2061Assert.NotEqual(IntPtr.Zero, listView.Handle); 2095Assert.NotEqual(IntPtr.Zero, listView.Handle); 2155Assert.NotEqual(IntPtr.Zero, listView.Handle); 2215Assert.NotEqual(IntPtr.Zero, listView.Handle); 2302Assert.NotEqual(IntPtr.Zero, listView.Handle); 2390Assert.NotEqual(IntPtr.Zero, listView.Handle); 2450Assert.NotEqual(IntPtr.Zero, listView.Handle); 2606Assert.NotEqual(IntPtr.Zero, listView.Handle); 2693Assert.NotEqual(IntPtr.Zero, listView.Handle); 2751Assert.NotEqual(IntPtr.Zero, listView.Handle); 2811Assert.NotEqual(IntPtr.Zero, listView.Handle); 2871Assert.NotEqual(IntPtr.Zero, listView.Handle); 2931Assert.NotEqual(IntPtr.Zero, listView.Handle); 3013Assert.NotEqual(IntPtr.Zero, listView.Handle); 3054Assert.NotEqual(IntPtr.Zero, listView.Handle); 3114Assert.NotEqual(IntPtr.Zero, listView.Handle); 3296Assert.NotEqual(IntPtr.Zero, listView.Handle); 3409Assert.NotEqual(IntPtr.Zero, listView.Handle); 3467Assert.NotEqual(IntPtr.Zero, listView.Handle); 3737Assert.NotEqual(IntPtr.Zero, listView.Handle); 3927Assert.NotEqual(IntPtr.Zero, listView.Handle); 3992Assert.NotEqual(IntPtr.Zero, listView.Handle); 4051Assert.NotEqual(IntPtr.Zero, listView.Handle); 4114Assert.NotEqual(IntPtr.Zero, control.Handle); 4159Assert.NotEqual(IntPtr.Zero, control.Handle); 4188Assert.NotEqual(IntPtr.Zero, control.Handle); 4204m.Result = IntPtr.Zero; 4248Assert.NotEqual(IntPtr.Zero, control.Handle); 4741Assert.NotEqual(IntPtr.Zero, listView.Handle); 4818Assert.NotEqual(IntPtr.Zero, listView.Handle); 5126Assert.NotEqual(IntPtr.Zero, toolTip.Handle); // A workaround to create the toolTip native window Handle
System\Windows\Forms\MdiClientTests.cs (9)
335Assert.NotEqual(IntPtr.Zero, control.Handle); 360Assert.NotEqual(IntPtr.Zero, control.Handle); 385Assert.NotEqual(IntPtr.Zero, control.Handle); 430Assert.NotEqual(IntPtr.Zero, control.Handle); 632Assert.NotEqual(IntPtr.Zero, control.Handle); 758Assert.NotEqual(IntPtr.Zero, parent.Handle); 910Assert.NotEqual(IntPtr.Zero, parent.Handle); 1072Assert.NotEqual(IntPtr.Zero, parent.Handle); 1211Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\MdiControlStripTests.cs (1)
308IntPtr menuHandle = PInvoke.GetMenu((HWND)mdiParent.Handle);
System\Windows\Forms\MenuStripTests.cs (10)
186Assert.NotEqual(IntPtr.Zero, control.Handle); 272Assert.NotEqual(IntPtr.Zero, control.Handle); 379Assert.NotEqual(IntPtr.Zero, control.Handle); 580Assert.NotEqual(IntPtr.Zero, control.Handle); 646Assert.NotEqual(IntPtr.Zero, control.Handle); 760Assert.Equal(IntPtr.Zero, m.Result); 771Assert.NotEqual(IntPtr.Zero, control.Handle); 785Assert.Equal(IntPtr.Zero, m.Result); 796Assert.NotEqual(IntPtr.Zero, control.Handle); 817Assert.Equal(IntPtr.Zero, m.Result);
System\Windows\Forms\MessageTests.cs (22)
15public void Message_HWnd_Set_GetReturnsExpected(IntPtr value) 45public void Message_WParam_Set_GetReturnsExpected(IntPtr value) 56public void Message_LParam_Set_GetReturnsExpected(IntPtr value) 71public void Message_Result_Set_GetReturnsExpected(IntPtr value) 86yield return new object[] { (IntPtr)(-1), -1, (IntPtr)(-1), (IntPtr)(-1) }; 87yield return new object[] { IntPtr.Zero, 1, IntPtr.Zero, IntPtr.Zero }; 88yield return new object[] { (IntPtr)1, 1, (IntPtr)1, (IntPtr)1 }; 93public void Message_Create_Invoke_ReturnsExpected(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam) 100Assert.Equal(IntPtr.Zero, message.Result); 105static Message Create(IntPtr hWnd, int msg, IntPtr wparam, IntPtr lparam, IntPtr result) 187IntPtr ptr = Marshal.AllocHGlobal(Marshal.SizeOf<TestStruct>());
System\Windows\Forms\MonthCalendarTests.cs (66)
157Assert.Equal(IntPtr.Zero, createParams.Parent); 237Assert.NotEqual(IntPtr.Zero, calendar.Handle); 315Assert.NotEqual(IntPtr.Zero, control.Handle); 565Assert.NotEqual(IntPtr.Zero, calendar.Handle); 667Assert.NotEqual(IntPtr.Zero, calendar.Handle); 698Assert.NotEqual(IntPtr.Zero, calendar.Handle); 774Assert.NotEqual(IntPtr.Zero, control.Handle); 850Assert.NotEqual(IntPtr.Zero, calendar.Handle); 889Assert.NotEqual(IntPtr.Zero, calendar.Handle); 961Assert.NotEqual(IntPtr.Zero, control.Handle); 1029Assert.NotEqual(IntPtr.Zero, control.Handle); 1057Assert.NotEqual(IntPtr.Zero, control.Handle); 1068Assert.NotEqual(IntPtr.Zero, control.Handle); 1088Assert.NotEqual(IntPtr.Zero, control.Handle); 1099Assert.NotEqual(IntPtr.Zero, control.Handle); 1110Assert.NotEqual(IntPtr.Zero, control.Handle); 1121Assert.NotEqual(IntPtr.Zero, control.Handle); 1132Assert.NotEqual(IntPtr.Zero, control.Handle); 1143Assert.NotEqual(IntPtr.Zero, control.Handle); 1160Assert.NotEqual(IntPtr.Zero, control.Handle); 1172Assert.NotEqual(IntPtr.Zero, control.Handle); 1200Assert.NotEqual(IntPtr.Zero, control.Handle); 1244Assert.NotEqual(IntPtr.Zero, control.Handle); 1346Assert.NotEqual(IntPtr.Zero, calendar.Handle); 1412Assert.NotEqual(IntPtr.Zero, calendar.Handle); 1479Assert.NotEqual(IntPtr.Zero, calendar.Handle); 1591Assert.NotEqual(IntPtr.Zero, calendar.Handle); 1657Assert.NotEqual(IntPtr.Zero, control.Handle); 1771Assert.NotEqual(IntPtr.Zero, control.Handle); 1859Assert.NotEqual(IntPtr.Zero, control.Handle); 1910Assert.NotEqual(IntPtr.Zero, calendar.Handle); 1979Assert.NotEqual(IntPtr.Zero, calendar.Handle); 2061Assert.NotEqual(IntPtr.Zero, calendar.Handle); 2164Assert.NotEqual(IntPtr.Zero, calendar.Handle); 2258Assert.NotEqual(IntPtr.Zero, control.Handle); 2330Assert.NotEqual(IntPtr.Zero, control.Handle); 2390Assert.NotEqual(IntPtr.Zero, control.Handle); 2426Assert.NotEqual(IntPtr.Zero, control.Handle); 2462Assert.NotEqual(IntPtr.Zero, control.Handle); 2489Assert.NotEqual(IntPtr.Zero, control.Handle); 2503m.Result = IntPtr.Zero; 2550Assert.NotEqual(IntPtr.Zero, control.Handle); 2655Assert.NotEqual(IntPtr.Zero, control.Handle); 2742Assert.NotEqual(IntPtr.Zero, calendar.Handle); 2801Assert.NotEqual(IntPtr.Zero, calendar.Handle); 2836Assert.NotEqual(IntPtr.Zero, control.Handle); 2879Assert.NotEqual(IntPtr.Zero, calendar.Handle); 2955Assert.NotEqual(IntPtr.Zero, calendar.Handle); 3029Assert.NotEqual(IntPtr.Zero, calendar.Handle); 3136Assert.NotEqual(IntPtr.Zero, calendar.Handle); 3243Assert.NotEqual(IntPtr.Zero, calendar.Handle); 3314Assert.NotEqual(IntPtr.Zero, control.Handle); 3392Assert.NotEqual(IntPtr.Zero, control.Handle); 3565Assert.NotEqual(IntPtr.Zero, control.Handle); 3636Assert.NotEqual(IntPtr.Zero, control.Handle); 3689Assert.NotEqual(IntPtr.Zero, control.Handle); 3840Assert.NotEqual(IntPtr.Zero, control.Handle); 3881Assert.NotEqual(IntPtr.Zero, control.Handle); 3905IntPtr handle1 = control.Handle; 3906Assert.NotEqual(IntPtr.Zero, handle1); 3910IntPtr handle2 = control.Handle; 3911Assert.NotEqual(IntPtr.Zero, handle2); 3917IntPtr handle3 = control.Handle; 3918Assert.NotEqual(IntPtr.Zero, handle3); 3990Assert.NotEqual(IntPtr.Zero, calendar.Handle); 4097Assert.NotEqual(IntPtr.Zero, calendar.Handle);
System\Windows\Forms\NativeWindowTests.cs (29)
16Assert.Equal(IntPtr.Zero, window.Handle); 57Assert.Equal(IntPtr.Zero, window.Handle); 69window.AssignHandle(IntPtr.Zero); 70Assert.Equal(IntPtr.Zero, window.Handle); 111Assert.NotEqual(IntPtr.Zero, window1.Handle); 119Assert.NotEqual(IntPtr.Zero, window2.Handle); 154Assert.NotEqual(IntPtr.Zero, window.Handle); 168Assert.Equal(IntPtr.Zero, window.Handle); 177IntPtr handle = window.Handle; 195Assert.Equal(IntPtr.Zero, window.Handle); 209Assert.NotEqual(IntPtr.Zero, window1.Handle); 217Assert.Equal(IntPtr.Zero, window2.Handle); 232Assert.Equal(IntPtr.Zero, window.Handle); 242Assert.Equal(IntPtr.Zero, window.Handle); 253Assert.Equal(IntPtr.Zero, window.Handle); 262Assert.Equal(IntPtr.Zero, window.Handle); 281Assert.Equal(IntPtr.Zero, m.Result); 282Assert.NotEqual(IntPtr.Zero, window.Handle); 307Assert.Equal(IntPtr.Zero, m.Result); 332Assert.Equal(IntPtr.Zero, m.Result); 398Assert.Equal(IntPtr.Zero, m.Result); 410Assert.Equal(IntPtr.Zero, window.Handle); 420Assert.Equal(IntPtr.Zero, window.Handle); 432Assert.Equal(IntPtr.Zero, window.Handle); 441Assert.Equal(IntPtr.Zero, window.Handle); 461Assert.Equal(IntPtr.Zero, m.Result); 486Assert.Equal(IntPtr.Zero, m.Result); 511Assert.Equal(IntPtr.Zero, m.Result); 531Assert.Equal(IntPtr.Zero, m.Result);
System\Windows\Forms\PanelTests.cs (10)
131Assert.Equal(IntPtr.Zero, createParams.Parent); 157Assert.Equal(IntPtr.Zero, createParams.Parent); 374Assert.NotEqual(IntPtr.Zero, control.Handle); 422Assert.NotEqual(IntPtr.Zero, parent.Handle); 495Assert.NotEqual(IntPtr.Zero, parent.Handle); 578Assert.NotEqual(IntPtr.Zero, control.Handle); 680Assert.NotEqual(IntPtr.Zero, control.Handle); 772Assert.NotEqual(IntPtr.Zero, control.Handle); 1027Assert.NotEqual(IntPtr.Zero, control.Handle); 1093Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\PictureBoxTests.cs (22)
132Assert.Equal(IntPtr.Zero, createParams.Parent); 161Assert.NotEqual(IntPtr.Zero, pictureBox.Handle); 260Assert.NotEqual(IntPtr.Zero, control.Handle); 353Assert.NotEqual(IntPtr.Zero, pictureBox.Handle); 373Assert.NotEqual(IntPtr.Zero, pictureBox.Handle); 567Assert.NotEqual(IntPtr.Zero, pictureBox.Handle); 585Assert.NotEqual(IntPtr.Zero, pictureBox.Handle); 672Assert.NotEqual(IntPtr.Zero, pictureBox.Handle); 693Assert.NotEqual(IntPtr.Zero, pictureBox.Handle); 942Assert.NotEqual(IntPtr.Zero, control.Handle); 1050Assert.NotEqual(IntPtr.Zero, pictureBox.Handle); 1070Assert.NotEqual(IntPtr.Zero, pictureBox.Handle); 1312Assert.NotEqual(IntPtr.Zero, pictureBox.Handle); 1335Assert.NotEqual(IntPtr.Zero, pictureBox.Handle); 1485Assert.NotEqual(IntPtr.Zero, control.Handle); 1575Assert.NotEqual(IntPtr.Zero, control.Handle); 1658Assert.NotEqual(IntPtr.Zero, control.Handle); 1950Assert.NotEqual(IntPtr.Zero, pictureBox.Handle); 2219Assert.NotEqual(IntPtr.Zero, control.Handle); 2278Assert.NotEqual(IntPtr.Zero, control.Handle); 2700Assert.NotEqual(IntPtr.Zero, control.Handle); 2756Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\PopupEventArgsTests.cs (1)
51public IntPtr Handle { get; }
System\Windows\Forms\ProgressBarTests.cs (28)
118Assert.Equal(IntPtr.Zero, createParams.Parent); 157Assert.Equal(IntPtr.Zero, createParams.Parent); 186Assert.Equal(IntPtr.Zero, createParams.Parent); 439Assert.NotEqual(IntPtr.Zero, control.Handle); 564Assert.NotEqual(IntPtr.Zero, control.Handle); 695Assert.NotEqual(IntPtr.Zero, control.Handle); 828Assert.NotEqual(IntPtr.Zero, control.Handle); 871Assert.NotEqual(IntPtr.Zero, control.Handle); 966Assert.NotEqual(IntPtr.Zero, control.Handle); 1065Assert.NotEqual(IntPtr.Zero, control.Handle); 1122Assert.NotEqual(IntPtr.Zero, control.Handle); 1236Assert.NotEqual(IntPtr.Zero, control.Handle); 1324Assert.NotEqual(IntPtr.Zero, control.Handle); 1378Assert.NotEqual(IntPtr.Zero, control.Handle); 1444Assert.NotEqual(IntPtr.Zero, control.Handle); 1478Assert.NotEqual(IntPtr.Zero, control.Handle); 1537Assert.NotEqual(IntPtr.Zero, control.Handle); 1629Assert.NotEqual(IntPtr.Zero, control.Handle); 1723Assert.NotEqual(IntPtr.Zero, control.Handle); 1788Assert.NotEqual(IntPtr.Zero, control.Handle); 1873Assert.NotEqual(IntPtr.Zero, control.Handle); 1933Assert.NotEqual(IntPtr.Zero, control.Handle); 2052Assert.NotEqual(IntPtr.Zero, control.Handle); 2142Assert.NotEqual(IntPtr.Zero, control.Handle); 2201Assert.NotEqual(IntPtr.Zero, control.Handle); 2427Assert.NotEqual(IntPtr.Zero, control.Handle); 2468Assert.NotEqual(IntPtr.Zero, control.Handle); 2528Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\PropertyGridInternal\AccessibleObjects\PropertyGridView.GridViewTextBox.GridViewTextBoxAccessibleObjectTests.cs (3)
38Assert.NotEqual(IntPtr.Zero, propertyGridView.TestAccessor().Dynamic.EditTextBox.Handle); 66Assert.NotEqual(IntPtr.Zero, propertyGridView.TestAccessor().Dynamic.EditTextBox.Handle); 202Assert.NotEqual(IntPtr.Zero, propertyGridView.TestAccessor().Dynamic.EditTextBox.Handle);
System\Windows\Forms\PropertyGridTests.cs (37)
186Assert.Equal(IntPtr.Zero, createParams.Parent); 238Assert.NotEqual(IntPtr.Zero, control.Handle); 314Assert.NotEqual(IntPtr.Zero, control.Handle); 611Assert.NotEqual(IntPtr.Zero, control.Handle); 666Assert.NotEqual(IntPtr.Zero, control.Handle); 727Assert.NotEqual(IntPtr.Zero, control.Handle); 805Assert.NotEqual(IntPtr.Zero, control.Handle); 890Assert.NotEqual(IntPtr.Zero, control.Handle); 968Assert.NotEqual(IntPtr.Zero, control.Handle); 1053Assert.NotEqual(IntPtr.Zero, control.Handle); 1138Assert.NotEqual(IntPtr.Zero, control.Handle); 1216Assert.NotEqual(IntPtr.Zero, control.Handle); 1301Assert.NotEqual(IntPtr.Zero, control.Handle); 1405Assert.NotEqual(IntPtr.Zero, control.Handle); 1465Assert.NotEqual(IntPtr.Zero, control.Handle); 1581Assert.NotEqual(IntPtr.Zero, control.Handle); 1642Assert.NotEqual(IntPtr.Zero, control.Handle); 1756Assert.NotEqual(IntPtr.Zero, control.Handle); 1841Assert.NotEqual(IntPtr.Zero, control.Handle); 1919Assert.NotEqual(IntPtr.Zero, control.Handle); 2029Assert.NotEqual(IntPtr.Zero, control.Handle); 2115Assert.NotEqual(IntPtr.Zero, control.Handle); 2175Assert.NotEqual(IntPtr.Zero, control.Handle); 2253Assert.NotEqual(IntPtr.Zero, control.Handle); 2339Assert.NotEqual(IntPtr.Zero, control.Handle); 2422Assert.NotEqual(IntPtr.Zero, control.Handle); 2500Assert.NotEqual(IntPtr.Zero, control.Handle); 2586Assert.NotEqual(IntPtr.Zero, control.Handle); 2676Assert.NotEqual(IntPtr.Zero, control.Handle); 2886Assert.NotEqual(IntPtr.Zero, control.Handle); 3024Assert.NotEqual(IntPtr.Zero, control.Handle); 3138Assert.NotEqual(IntPtr.Zero, control.Handle); 3226Assert.NotEqual(IntPtr.Zero, control.Handle); 3311Assert.NotEqual(IntPtr.Zero, control.Handle); 3396Assert.NotEqual(IntPtr.Zero, control.Handle); 3543Assert.NotEqual(IntPtr.Zero, control.Handle); 3597Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\RadioButtonRendererTests.cs (8)
24form.Handle.Should().NotBe(IntPtr.Zero); 28using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 55form.Handle.Should().NotBe(IntPtr.Zero); 59using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 92form.Handle.Should().NotBe(IntPtr.Zero); 96using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 120form.Handle.Should().NotBe(IntPtr.Zero); 124using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC);
System\Windows\Forms\RadioButtonTests.cs (18)
135Assert.Equal(IntPtr.Zero, createParams.Parent); 159Assert.Equal(IntPtr.Zero, createParams.Parent); 230Assert.NotEqual(IntPtr.Zero, control.Handle); 362Assert.NotEqual(IntPtr.Zero, control.Handle); 691Assert.NotEqual(IntPtr.Zero, control.Handle); 710Assert.NotEqual(IntPtr.Zero, control.Handle); 720Assert.NotEqual(IntPtr.Zero, control.Handle); 784Assert.NotEqual(IntPtr.Zero, control.Handle); 878Assert.NotEqual(IntPtr.Zero, control.Handle); 897Assert.NotEqual(IntPtr.Zero, control.Handle); 907Assert.NotEqual(IntPtr.Zero, control.Handle); 945Assert.NotEqual(IntPtr.Zero, control.Handle); 998Assert.NotEqual(IntPtr.Zero, control.Handle); 1160Assert.NotEqual(IntPtr.Zero, control.Handle); 1226Assert.NotEqual(IntPtr.Zero, control.Handle); 1304Assert.NotEqual(IntPtr.Zero, control.Handle); 1419Assert.NotEqual(IntPtr.Zero, control.Handle); 1460Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\RichTextBoxTests.ClipboardTests.cs (1)
20control.Handle.Should().NotBe(IntPtr.Zero);
System\Windows\Forms\RichTextBoxTests.cs (339)
152Assert.Equal(IntPtr.Zero, createParams.Parent); 178Assert.Equal(IntPtr.Zero, createParams.Parent); 232Assert.Equal(IntPtr.Zero, createParams.Parent); 269Assert.NotEqual(IntPtr.Zero, control.Handle); 306Assert.NotEqual(IntPtr.Zero, control.Handle); 347Assert.NotEqual(IntPtr.Zero, control.Handle); 552Assert.NotEqual(IntPtr.Zero, control.Handle); 602Assert.NotEqual(IntPtr.Zero, control.Handle); 641Assert.NotEqual(IntPtr.Zero, control.Handle); 680Assert.NotEqual(IntPtr.Zero, control.Handle); 883Assert.NotEqual(IntPtr.Zero, control.Handle); 920Assert.NotEqual(IntPtr.Zero, control.Handle); 961Assert.NotEqual(IntPtr.Zero, control.Handle); 978yield return new object[] { IntPtr.Zero, false }; 979yield return new object[] { (IntPtr)1, true }; 984public void RichTextBox_CanRedo_CustomCanRedo_ReturnsExpected(IntPtr result, bool expected) 990Assert.NotEqual(IntPtr.Zero, control.Handle); 996public IntPtr Result { get; set; } 1030Assert.NotEqual(IntPtr.Zero, control.Handle); 1047yield return new object[] { IntPtr.Zero, false }; 1048yield return new object[] { (IntPtr)1, true }; 1053public void RichTextBox_CanUndo_CustomCanUndo_ReturnsExpected(IntPtr result, bool expected) 1059Assert.NotEqual(IntPtr.Zero, control.Handle); 1065public IntPtr Result { get; set; } 1099Assert.NotEqual(IntPtr.Zero, control.Handle); 1150Assert.NotEqual(IntPtr.Zero, control.Handle); 1189Assert.NotEqual(IntPtr.Zero, control.Handle); 1221Assert.NotEqual(IntPtr.Zero, control.Handle); 1258Assert.NotEqual(IntPtr.Zero, control.Handle); 1299Assert.NotEqual(IntPtr.Zero, control.Handle); 1430Assert.NotEqual(IntPtr.Zero, control.Handle); 1467Assert.NotEqual(IntPtr.Zero, control.Handle); 1514Assert.NotEqual(IntPtr.Zero, control.Handle); 1553Assert.NotEqual(IntPtr.Zero, control.Handle); 1596Assert.NotEqual(IntPtr.Zero, control.Handle); 1717Assert.NotEqual(IntPtr.Zero, control.Handle); 1746Assert.NotEqual(IntPtr.Zero, control.Handle); 1761Assert.NotEqual(IntPtr.Zero, control.Handle); 1819yield return new object[] { (IntPtr)options, options }; 1822yield return new object[] { IntPtr.Zero, 0 }; 1823yield return new object[] { (IntPtr)(-1), -1 }; 1828public void RichTextBox_LanguageOption_CustomGetLangOptions_ReturnsExpected(IntPtr result, RichTextBoxLanguageOptions expected) 1834Assert.NotEqual(IntPtr.Zero, control.Handle); 1842public IntPtr GetLangOptionsResult { get; set; } 1878Assert.NotEqual(IntPtr.Zero, control.Handle); 1908Assert.NotEqual(IntPtr.Zero, control.Handle); 1917Assert.NotEqual(IntPtr.Zero, control.Handle); 1991Assert.NotEqual(IntPtr.Zero, control.Handle); 2019Assert.NotEqual(IntPtr.Zero, control.Handle); 2047Assert.NotEqual(IntPtr.Zero, control.Handle); 2249Assert.NotEqual(IntPtr.Zero, control.Handle); 2323Assert.NotEqual(IntPtr.Zero, control.Handle); 2340yield return new object[] { IntPtr.Zero, IntPtr.Zero, string.Empty }; 2341yield return new object[] { (IntPtr)1, IntPtr.Zero, "Unknown" }; 2342yield return new object[] { (IntPtr)1, (IntPtr)1, "Typing" }; 2343yield return new object[] { (IntPtr)1, (IntPtr)2, "Delete" }; 2344yield return new object[] { (IntPtr)1, (IntPtr)3, "Drag and Drop" }; 2345yield return new object[] { (IntPtr)1, (IntPtr)4, "Cut" }; 2346yield return new object[] { (IntPtr)1, (IntPtr)5, "Paste" }; 2347yield return new object[] { (IntPtr)1, (IntPtr)6, "Unknown" }; 2348yield return new object[] { (IntPtr)1, (IntPtr)7, "Unknown" }; 2353public void RichTextBox_RedoActionName_CustomGetRedoName_ReturnsExpected(IntPtr canRedoResult, IntPtr getRedoNameResult, string expected) 2360Assert.NotEqual(IntPtr.Zero, control.Handle); 2366public IntPtr CanRedoResult { get; set; } 2367public IntPtr GetRedoNameResult { get; set; } 2429Assert.NotEqual(IntPtr.Zero, control.Handle); 2465Assert.NotEqual(IntPtr.Zero, control.Handle); 2533Assert.NotEqual(IntPtr.Zero, control.Handle); 2569Assert.NotEqual(IntPtr.Zero, control.Handle); 2604Assert.NotEqual(IntPtr.Zero, control.Handle); 2652Assert.NotEqual(IntPtr.Zero, control.Handle); 2747Assert.NotEqual(IntPtr.Zero, control.Handle); 2814Assert.NotEqual(IntPtr.Zero, control.Handle); 3028Assert.NotEqual(IntPtr.Zero, control.Handle); 3093Assert.NotEqual(IntPtr.Zero, control.Handle); 3175Assert.NotEqual(IntPtr.Zero, control.Handle); 3225Assert.NotEqual(IntPtr.Zero, control.Handle); 3292Assert.NotEqual(IntPtr.Zero, control.Handle); 3349Assert.NotEqual(IntPtr.Zero, control.Handle); 3430Assert.NotEqual(IntPtr.Zero, control.Handle); 3480Assert.NotEqual(IntPtr.Zero, control.Handle); 3534Assert.NotEqual(IntPtr.Zero, control.Handle); 3602Assert.NotEqual(IntPtr.Zero, control.Handle); 3651Assert.NotEqual(IntPtr.Zero, control.Handle); 3698Assert.NotEqual(IntPtr.Zero, control.Handle); 3741Assert.NotEqual(IntPtr.Zero, control.Handle); 3777Assert.NotEqual(IntPtr.Zero, control.Handle); 3823Assert.NotEqual(IntPtr.Zero, control.Handle); 3856ExpectedWParam = (IntPtr)PInvoke.SCF_SELECTION, 3865Assert.NotEqual(IntPtr.Zero, control.Handle); 3876ExpectedWParam = (IntPtr)PInvoke.SCF_SELECTION, 3885Assert.NotEqual(IntPtr.Zero, control.Handle); 3943Assert.NotEqual(IntPtr.Zero, control.Handle); 3972Assert.NotEqual(IntPtr.Zero, control.Handle); 4037Assert.NotEqual(IntPtr.Zero, control.Handle); 4087Assert.NotEqual(IntPtr.Zero, control.Handle); 4141Assert.NotEqual(IntPtr.Zero, control.Handle); 4184Assert.NotEqual(IntPtr.Zero, control.Handle); 4234Assert.NotEqual(IntPtr.Zero, control.Handle); 4290Assert.NotEqual(IntPtr.Zero, control.Handle); 4340ExpectedWParam = (IntPtr)PInvoke.SCF_SELECTION, 4348Assert.NotEqual(IntPtr.Zero, control.Handle); 4399Assert.NotEqual(IntPtr.Zero, control.Handle); 4428Assert.NotEqual(IntPtr.Zero, control.Handle); 4491Assert.NotEqual(IntPtr.Zero, control.Handle); 4530ExpectedWParam = (IntPtr)PInvoke.SCF_SELECTION, 4538Assert.NotEqual(IntPtr.Zero, control.Handle); 4588Assert.NotEqual(IntPtr.Zero, control.Handle); 4617Assert.NotEqual(IntPtr.Zero, control.Handle); 4677Assert.NotEqual(IntPtr.Zero, control.Handle); 4750ExpectedWParam = (IntPtr)PInvoke.SCF_SELECTION, 4754Assert.NotEqual(IntPtr.Zero, control.Handle); 4790ExpectedWParam = (IntPtr)PInvoke.SCF_SELECTION, 4793Assert.NotEqual(IntPtr.Zero, control.Handle); 4853Assert.NotEqual(IntPtr.Zero, control.Handle); 4931Assert.NotEqual(IntPtr.Zero, control.Handle); 4968Assert.NotEqual(IntPtr.Zero, control.Handle); 5013Assert.NotEqual(IntPtr.Zero, control.Handle); 5072Assert.NotEqual(IntPtr.Zero, control.Handle); 5111Assert.NotEqual(IntPtr.Zero, control.Handle); 5152Assert.NotEqual(IntPtr.Zero, control.Handle); 5206Assert.NotEqual(IntPtr.Zero, control.Handle); 5252Assert.NotEqual(IntPtr.Zero, control.Handle); 5307Assert.NotEqual(IntPtr.Zero, control.Handle); 5343Assert.NotEqual(IntPtr.Zero, control.Handle); 5397Assert.NotEqual(IntPtr.Zero, control.Handle); 5505Assert.NotEqual(IntPtr.Zero, control.Handle); 5547Assert.NotEqual(IntPtr.Zero, control.Handle); 5551IntPtr result = PInvokeCore.SendMessage(control, PInvokeCore.EM_GETSEL, (WPARAM)(&selectionStart), (LPARAM)(&selectionEnd)); 5607Assert.NotEqual(IntPtr.Zero, control.Handle); 5647ExpectedWParam = (IntPtr)PInvoke.SCF_SELECTION, 5654Assert.NotEqual(IntPtr.Zero, control.Handle); 5702Assert.NotEqual(IntPtr.Zero, control.Handle); 5740Assert.NotEqual(IntPtr.Zero, control.Handle); 5796Assert.NotEqual(IntPtr.Zero, control.Handle); 5842Assert.NotEqual(IntPtr.Zero, control.Handle); 5893Assert.NotEqual(IntPtr.Zero, control.Handle); 5927Assert.NotEqual(IntPtr.Zero, control.Handle); 5986Assert.NotEqual(IntPtr.Zero, control.Handle); 6095Assert.NotEqual(IntPtr.Zero, control.Handle); 6137Assert.NotEqual(IntPtr.Zero, control.Handle); 6141IntPtr result = PInvokeCore.SendMessage(control, PInvokeCore.EM_GETSEL, (WPARAM)(&selectionStart), (LPARAM)(&selectionEnd)); 6190Assert.NotEqual(IntPtr.Zero, control.Handle); 6240Assert.NotEqual(IntPtr.Zero, control.Handle); 6296Assert.NotEqual(IntPtr.Zero, control.Handle); 6341Assert.NotEqual(IntPtr.Zero, control.Handle); 6374Assert.NotEqual(IntPtr.Zero, control.Handle); 6446Assert.NotEqual(IntPtr.Zero, control.Handle); 6478Assert.NotEqual(IntPtr.Zero, control.Handle); 6502yield return new object[] { 0, (IntPtr)RichTextBoxSelectionTypes.Text, RichTextBoxSelectionTypes.Empty }; 6503yield return new object[] { 0, (IntPtr)RichTextBoxSelectionTypes.MultiObject, RichTextBoxSelectionTypes.Empty }; 6505yield return new object[] { 1, (IntPtr)RichTextBoxSelectionTypes.Text, RichTextBoxSelectionTypes.Text }; 6506yield return new object[] { 1, (IntPtr)RichTextBoxSelectionTypes.MultiObject, RichTextBoxSelectionTypes.MultiObject }; 6507yield return new object[] { 1, (IntPtr)(-1), -1 }; 6509yield return new object[] { 4, (IntPtr)RichTextBoxSelectionTypes.Text, RichTextBoxSelectionTypes.Text }; 6510yield return new object[] { 4, (IntPtr)RichTextBoxSelectionTypes.MultiObject, RichTextBoxSelectionTypes.MultiObject }; 6511yield return new object[] { 4, (IntPtr)(-1), -1 }; 6516public void RichTextBox_SelectionType_CustomSelectionType_ReturnsExpected(int selectionLength, IntPtr result, RichTextBoxSelectionTypes expected) 6524Assert.NotEqual(IntPtr.Zero, control.Handle); 6530public IntPtr SelectionTypeResult { get; set; } 6536Assert.Equal(IntPtr.Zero, m.WParam); 6537Assert.Equal(IntPtr.Zero, m.LParam); 6566Assert.NotEqual(IntPtr.Zero, control.Handle); 6616Assert.NotEqual(IntPtr.Zero, control.Handle); 6655Assert.NotEqual(IntPtr.Zero, control.Handle); 6676Assert.NotEqual(IntPtr.Zero, control.Handle); 6721Assert.NotEqual(IntPtr.Zero, control.Handle); 6739yield return new object[] { IntPtr.Zero, 0 }; 6740yield return new object[] { (IntPtr)(-1), -1 }; 6741yield return new object[] { (IntPtr)1, 1 }; 6746public void RichTextBox_TextLength_GetCustomGetTextLengthEx_Success(IntPtr result, int expected) 6757public IntPtr GetTextLengthExResult { get; set; } 6766Assert.Equal(IntPtr.Zero, m.LParam); 7240Assert.NotEqual(IntPtr.Zero, control.Handle); 7286Assert.NotEqual(IntPtr.Zero, control.Handle); 7336Assert.NotEqual(IntPtr.Zero, control.Handle); 7397Assert.NotEqual(IntPtr.Zero, control.Handle); 7462Assert.NotEqual(IntPtr.Zero, control.Handle); 7537Assert.NotEqual(IntPtr.Zero, control.Handle); 7628Assert.NotEqual(IntPtr.Zero, control.Handle); 7645yield return new object[] { IntPtr.Zero, IntPtr.Zero, string.Empty }; 7646yield return new object[] { (IntPtr)1, IntPtr.Zero, "Unknown" }; 7647yield return new object[] { (IntPtr)1, (IntPtr)1, "Typing" }; 7648yield return new object[] { (IntPtr)1, (IntPtr)2, "Delete" }; 7649yield return new object[] { (IntPtr)1, (IntPtr)3, "Drag and Drop" }; 7650yield return new object[] { (IntPtr)1, (IntPtr)4, "Cut" }; 7651yield return new object[] { (IntPtr)1, (IntPtr)5, "Paste" }; 7652yield return new object[] { (IntPtr)1, (IntPtr)6, "Unknown" }; 7653yield return new object[] { (IntPtr)1, (IntPtr)7, "Unknown" }; 7658public void RichTextBox_UndoActionName_CustomGetUndoName_ReturnsExpected(IntPtr canUndoResult, IntPtr getUndoNameResult, string expected) 7665Assert.NotEqual(IntPtr.Zero, control.Handle); 7671public IntPtr CanUndoResult { get; set; } 7672public IntPtr GetUndoNameResult { get; set; } 7711Assert.NotEqual(IntPtr.Zero, control.Handle); 7749Assert.NotEqual(IntPtr.Zero, control.Handle); 7804Assert.NotEqual(IntPtr.Zero, control.Handle); 7861Assert.NotEqual(IntPtr.Zero, control.Handle); 7878yield return new object[] { IntPtr.Zero, false }; 7879yield return new object[] { (IntPtr)1, true }; 7884public void RichTextBox_CanPaste_CustomCanPaste_ReturnsExpected(IntPtr result, bool expected) 7890Assert.NotEqual(IntPtr.Zero, control.Handle); 7896public IntPtr Result { get; set; } 8148Assert.NotEqual(IntPtr.Zero, control.Handle); 8171Assert.NotEqual(IntPtr.Zero, control.Handle); 8194Assert.NotEqual(IntPtr.Zero, control.Handle); 8217Assert.NotEqual(IntPtr.Zero, control.Handle); 8368Assert.NotEqual(IntPtr.Zero, control.Handle); 8391Assert.NotEqual(IntPtr.Zero, control.Handle); 8414Assert.NotEqual(IntPtr.Zero, control.Handle); 8580Assert.NotEqual(IntPtr.Zero, control.Handle); 8601Assert.NotEqual(IntPtr.Zero, control.Handle); 8667Assert.NotEqual(IntPtr.Zero, control.Handle); 8688Assert.NotEqual(IntPtr.Zero, control.Handle); 8849Assert.NotEqual(IntPtr.Zero, control.Handle); 8876Assert.NotEqual(IntPtr.Zero, control.Handle); 8893yield return new object[] { (IntPtr)(-1) }; 8894yield return new object[] { IntPtr.Zero }; 8895yield return new object[] { (IntPtr)1 }; 8896yield return new object[] { (IntPtr)int.MaxValue }; 8903public void RichTextBox_GetLineFromCharIndex_CustomLineFromChar_Success(IntPtr result) 8909Assert.NotEqual(IntPtr.Zero, control.Handle); 8915public IntPtr LineFromCharResult { get; set; } 8922Assert.Equal(IntPtr.Zero, m.LParam); 8933yield return new object[] { (IntPtr)(-1), -1 }; 8934yield return new object[] { IntPtr.Zero, 0 }; 8935yield return new object[] { (IntPtr)1, 1 }; 8936yield return new object[] { (IntPtr)int.MaxValue, 0x7FFFFFFF }; 8943public void RichTextBox_GetLineFromCharIndex_CustomExLineFromChar_Success(IntPtr result, int expected) 8949Assert.NotEqual(IntPtr.Zero, control.Handle); 8955public IntPtr ExLineFromCharResult { get; set; } 8961Assert.Equal(IntPtr.Zero, m.WParam); 9039Assert.NotEqual(IntPtr.Zero, control.Handle); 9311Assert.NotEqual(IntPtr.Zero, control.Handle); 9361Assert.NotEqual(IntPtr.Zero, control.Handle); 9385Assert.NotEqual(IntPtr.Zero, control.Handle); 9430Assert.NotEqual(IntPtr.Zero, control.Handle); 9454Assert.NotEqual(IntPtr.Zero, control.Handle); 9500Assert.NotEqual(IntPtr.Zero, control.Handle); 9525Assert.NotEqual(IntPtr.Zero, control.Handle); 9572Assert.NotEqual(IntPtr.Zero, control.Handle); 9596Assert.NotEqual(IntPtr.Zero, control.Handle); 9631Assert.NotEqual(IntPtr.Zero, control.Handle); 9656Assert.NotEqual(IntPtr.Zero, control.Handle); 9698Assert.NotEqual(IntPtr.Zero, control.Handle); 9717Assert.NotEqual(IntPtr.Zero, control.Handle); 9769yield return new object[] { true, (IntPtr)2 }; 9770yield return new object[] { false, IntPtr.Zero }; 9775public void RichTextBox_WndProc_InvokeGetDlgCodeWithoutHandle_ReturnsExpected(bool acceptsTabs, IntPtr expectedResult) 9796public void RichTextBox_WndProc_InvokeGetDlgCodeWithHandle_ReturnsExpected(bool acceptsTabs, IntPtr expectedResult) 9802Assert.NotEqual(IntPtr.Zero, control.Handle); 9844Assert.Equal(IntPtr.Zero, m.Result); 9855Assert.NotEqual(IntPtr.Zero, control.Handle); 9878Assert.Equal(IntPtr.Zero, m.Result); 9891Assert.NotEqual(IntPtr.Zero, control.Handle); 9912Assert.Equal(IntPtr.Zero, m.Result); 9922foreach (IntPtr lParam in new IntPtr[] { IntPtr.Zero, 1 }) 9924yield return new object[] { IntPtr.Zero, lParam, 0 }; 9936public void RichTextBox_WndProc_InvokeReflectCommandWithoutHandle_Success(IntPtr wParam, IntPtr lParam, int expectedTextChangedCallCount) 9971public void RichTextBox_WndProc_InvokeReflectCommandWithHandle_Success(IntPtr wParam, IntPtr lParam, int expectedTextChangedCallCount) 9974Assert.NotEqual(IntPtr.Zero, control.Handle); 10016yield return new object[] { IntPtr.Zero, 0, 0, 0 }; 10027public void RichTextBox_WndProc_InvokeReflectCommandWithHandleWithLParam_Success(IntPtr wParam, int expectedTextChangedCallCount, int expectedHScrollCallCount, int expectedVScrollCallCount) 10030Assert.NotEqual(IntPtr.Zero, control.Handle); 10082foreach (IntPtr hWnd in new IntPtr[] { IntPtr.Zero, 1 }) 10095public unsafe void RichTextBox_WndProc_InvokeReflectNotifyWithoutHandle_Success(IntPtr hWnd, int code) 10108LParam = (IntPtr)(&nmhdr), 10136LParam = (IntPtr)(&dropFiles), 10189LParam = (IntPtr)(&selChange), 10202yield return new object[] { 0, (IntPtr)1, 1 }; 10203yield return new object[] { CFM_MASK.CFM_ALLCAPS, (IntPtr)1, 1 }; 10204yield return new object[] { CFM_MASK.CFM_PROTECTED, IntPtr.Zero, 0 }; 10205yield return new object[] { CFM_MASK.CFM_PROTECTED | CFM_MASK.CFM_ALLCAPS, IntPtr.Zero, 0 }; 10210public unsafe void RichTextBox_WndProc_InvokeReflectNotifyWithHWndProtected_Success(int mask, IntPtr expectedResult, int expectedProtectedCallCount) 10225IntPtr ptr = Marshal.AllocCoTaskMem(100); 10228Marshal.WriteInt32(ptr, IntPtr.Size * 2, (int)PInvoke.EN_PROTECTED); 10229Marshal.WriteInt32(ptr, IntPtr.Size * 2 + IntPtr.Size, (int)PInvokeCore.EM_SETCHARFORMAT); 10230Marshal.WriteIntPtr(ptr, IntPtr.Size * 2 + IntPtr.Size + 4 + IntPtr.Size, (IntPtr)(&format)); 10251public unsafe void RichTextBox_WndProc_InvokeReflectNotifyWithHandle_Success(IntPtr hWnd, int code) 10254Assert.NotEqual(IntPtr.Zero, control.Handle); 10271LParam = (IntPtr)(&nmhdr), 10291Assert.NotEqual(IntPtr.Zero, control.Handle); 10310LParam = (IntPtr)(&dropFiles), 10341Assert.NotEqual(IntPtr.Zero, control.Handle); 10372LParam = (IntPtr)(&reqResize), 10391Assert.NotEqual(IntPtr.Zero, control.Handle); 10423LParam = (IntPtr)(&selChange), 10439public unsafe void RichTextBox_WndProc_InvokeReflectNotifyWithHandleWithHWndProtected_Success(int mask, IntPtr expectedResult, int expectedProtectedCallCount) 10442Assert.NotEqual(IntPtr.Zero, control.Handle); 10461IntPtr ptr = Marshal.AllocCoTaskMem(100); 10464Marshal.WriteInt32(ptr, IntPtr.Size * 2, (int)PInvoke.EN_PROTECTED); 10465Marshal.WriteInt32(ptr, IntPtr.Size * 2 + IntPtr.Size, (int)PInvokeCore.EM_SETCHARFORMAT); 10466Marshal.WriteIntPtr(ptr, IntPtr.Size * 2 + IntPtr.Size + 4 + IntPtr.Size, (IntPtr)(&format)); 10507Assert.Equal(IntPtr.Zero, m.Result); 10510IntPtr result = PInvokeCore.SendMessage(control, PInvokeCore.EM_GETMARGINS); 10525Assert.NotEqual(IntPtr.Zero, control.Handle); 10542Assert.Equal(IntPtr.Zero, m.Result); 10544IntPtr result = PInvokeCore.SendMessage(control, PInvokeCore.EM_GETMARGINS); 10877public IntPtr ExpectedWParam { get; set; } 10885Assert.Equal(IntPtr.Zero, m.WParam); 10886Assert.NotEqual(IntPtr.Zero, m.LParam); 10898public IntPtr ExpectedWParam { get; set; } 10907Assert.NotEqual(IntPtr.Zero, m.LParam); 11052private IntPtr _nativeDllHandle = IntPtr.Zero; 11064if (_nativeDllHandle == IntPtr.Zero)
System\Windows\Forms\RowStyleTests.cs (1)
103Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\ScreenTests.cs (2)
71Assert.NotEqual(IntPtr.Zero, createdControl.Handle); 93Screen screen = Screen.FromHandle(IntPtr.Zero);
System\Windows\Forms\ScrollableControlTests.cs (21)
131Assert.Equal(IntPtr.Zero, createParams.Parent); 158Assert.Equal(IntPtr.Zero, createParams.Parent); 185Assert.Equal(IntPtr.Zero, createParams.Parent); 226Assert.NotEqual(IntPtr.Zero, control.Handle); 282Assert.NotEqual(IntPtr.Zero, control.Handle); 379Assert.NotEqual(IntPtr.Zero, control.Handle); 495Assert.NotEqual(IntPtr.Zero, control.Handle); 622Assert.NotEqual(IntPtr.Zero, control.Handle); 755Assert.NotEqual(IntPtr.Zero, control.Handle); 917Assert.NotEqual(IntPtr.Zero, control.Handle); 1194Assert.NotEqual(IntPtr.Zero, control.Handle); 1229Assert.NotEqual(IntPtr.Zero, control.Handle); 1306Assert.NotEqual(IntPtr.Zero, control.Handle); 1479Assert.NotEqual(IntPtr.Zero, control.Handle); 1751Assert.NotEqual(IntPtr.Zero, control.Handle); 1853Assert.NotEqual(IntPtr.Zero, parent.Handle); 1932Assert.NotEqual(IntPtr.Zero, control.Handle); 2025Assert.NotEqual(IntPtr.Zero, control.Handle); 2265Assert.NotEqual(IntPtr.Zero, control.Handle); 2395Assert.NotEqual(IntPtr.Zero, control.Handle); 2456Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\ScrollBarTests.cs (24)
120Assert.Equal(IntPtr.Zero, createParams.Parent); 392Assert.NotEqual(IntPtr.Zero, control.Handle); 438Assert.NotEqual(IntPtr.Zero, control.Handle); 611Assert.NotEqual(IntPtr.Zero, control.Handle); 732Assert.NotEqual(IntPtr.Zero, control.Handle); 782Assert.NotEqual(IntPtr.Zero, control.Handle); 864Assert.NotEqual(IntPtr.Zero, control.Handle); 927Assert.NotEqual(IntPtr.Zero, control.Handle); 1050Assert.NotEqual(IntPtr.Zero, control.Handle); 1113Assert.NotEqual(IntPtr.Zero, control.Handle); 1311Assert.NotEqual(IntPtr.Zero, control.Handle); 1347Assert.NotEqual(IntPtr.Zero, control.Handle); 1406Assert.NotEqual(IntPtr.Zero, control.Handle); 1498Assert.NotEqual(IntPtr.Zero, control.Handle); 1595Assert.NotEqual(IntPtr.Zero, control.Handle); 1659Assert.NotEqual(IntPtr.Zero, control.Handle); 1978Assert.NotEqual(IntPtr.Zero, control.Handle); 2043Assert.NotEqual(IntPtr.Zero, control.Handle); 2626Assert.NotEqual(IntPtr.Zero, control.Handle); 2650Assert.NotEqual(IntPtr.Zero, control.Handle); 2851WParam = (IntPtr)eventType 2877Assert.NotEqual(IntPtr.Zero, control.Handle); 2902Assert.NotEqual(IntPtr.Zero, control.Handle); 2923Assert.Equal(IntPtr.Zero, m.Result);
System\Windows\Forms\SplitterPanelTests.cs (5)
248Assert.NotEqual(IntPtr.Zero, control.Handle); 282Assert.NotEqual(IntPtr.Zero, parent.Handle); 352Assert.NotEqual(IntPtr.Zero, control.Handle); 958Assert.NotEqual(IntPtr.Zero, control.Handle); 1050Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\SplitterTests.cs (17)
118Assert.Equal(IntPtr.Zero, createParams.Parent); 145Assert.Equal(IntPtr.Zero, createParams.Parent); 340Assert.NotEqual(IntPtr.Zero, control.Handle); 652Assert.NotEqual(IntPtr.Zero, control.Handle); 824Assert.NotEqual(IntPtr.Zero, control.Handle); 923Assert.NotEqual(IntPtr.Zero, control.Handle); 1018Assert.NotEqual(IntPtr.Zero, control.Handle); 1070Assert.NotEqual(IntPtr.Zero, control.Handle); 1284Assert.NotEqual(IntPtr.Zero, control.Handle); 1324Assert.NotEqual(IntPtr.Zero, control.Handle); 1378Assert.NotEqual(IntPtr.Zero, parent.Handle); 1483Assert.NotEqual(IntPtr.Zero, control.Handle); 1575Assert.NotEqual(IntPtr.Zero, control.Handle); 1733Assert.NotEqual(IntPtr.Zero, control.Handle); 1786Assert.NotEqual(IntPtr.Zero, control.Handle); 2064Assert.NotEqual(IntPtr.Zero, control.Handle); 2126Assert.NotEqual(IntPtr.Zero, parent.Handle);
System\Windows\Forms\StatusStripTests.cs (2)
167Assert.Equal(IntPtr.Zero, createParams.Parent); 802Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\StatusStripTests.Rendering.cs (2)
27Assert.NotEqual(IntPtr.Zero, form.Handle); 28Assert.NotEqual(IntPtr.Zero, statusStrip.Handle);
System\Windows\Forms\TabControl.ControlCollectionTests.cs (26)
188Assert.NotEqual(IntPtr.Zero, owner.Handle); 348Assert.NotEqual(IntPtr.Zero, value1.Handle); 355Assert.NotEqual(IntPtr.Zero, value2.Handle); 489Assert.NotEqual(IntPtr.Zero, value1.Handle); 496Assert.NotEqual(IntPtr.Zero, value2.Handle); 503Assert.NotEqual(IntPtr.Zero, owner.Handle); 757Assert.NotEqual(IntPtr.Zero, owner.Handle); 782Assert.Equal(IntPtr.Zero, (nint)item.lParam); 790Assert.Equal(IntPtr.Zero, (nint)item.lParam); 798Assert.Equal(IntPtr.Zero, (nint)item.lParam); 825Assert.NotEqual(IntPtr.Zero, owner.Handle); 850Assert.Equal(IntPtr.Zero, (nint)item.lParam); 858Assert.Equal(IntPtr.Zero, (nint)item.lParam); 866Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1016Assert.NotEqual(IntPtr.Zero, value1.Handle); 1023Assert.NotEqual(IntPtr.Zero, value2.Handle); 1141Assert.NotEqual(IntPtr.Zero, owner.Handle); 1253Assert.NotEqual(IntPtr.Zero, value1.Handle); 1260Assert.NotEqual(IntPtr.Zero, value2.Handle); 1403Assert.NotEqual(IntPtr.Zero, owner.Handle); 1480Assert.NotEqual(IntPtr.Zero, owner.Handle); 1494Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1502Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1538Assert.NotEqual(IntPtr.Zero, owner.Handle); 1552Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1560Assert.Equal(IntPtr.Zero, (nint)item.lParam);
System\Windows\Forms\TabControl.TabPageCollectionTests.cs (67)
176Assert.NotEqual(IntPtr.Zero, owner.Handle); 339Assert.NotEqual(IntPtr.Zero, value1.Handle); 346Assert.NotEqual(IntPtr.Zero, value2.Handle); 483Assert.NotEqual(IntPtr.Zero, value1.Handle); 490Assert.NotEqual(IntPtr.Zero, value2.Handle); 497Assert.NotEqual(IntPtr.Zero, owner.Handle); 761Assert.NotEqual(IntPtr.Zero, owner.Handle); 788Assert.Equal(IntPtr.Zero, (nint)item.lParam); 796Assert.Equal(IntPtr.Zero, (nint)item.lParam); 804Assert.Equal(IntPtr.Zero, (nint)item.lParam); 831Assert.NotEqual(IntPtr.Zero, owner.Handle); 858Assert.Equal(IntPtr.Zero, (nint)item.lParam); 866Assert.Equal(IntPtr.Zero, (nint)item.lParam); 874Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1405Assert.NotEqual(IntPtr.Zero, owner.Handle); 1463Assert.NotEqual(IntPtr.Zero, owner.Handle); 1538Assert.NotEqual(IntPtr.Zero, owner.Handle); 2113Assert.NotEqual(IntPtr.Zero, owner.Handle); 2282Assert.NotEqual(IntPtr.Zero, value1.Handle); 2289Assert.NotEqual(IntPtr.Zero, value2.Handle); 2432Assert.NotEqual(IntPtr.Zero, value1.Handle); 2439Assert.NotEqual(IntPtr.Zero, value2.Handle); 2446Assert.NotEqual(IntPtr.Zero, owner.Handle); 2688Assert.NotEqual(IntPtr.Zero, owner.Handle); 2709Assert.NotEqual(IntPtr.Zero, owner.Handle); 2729Assert.NotEqual(IntPtr.Zero, owner.Handle); 2749Assert.NotEqual(IntPtr.Zero, owner.Handle); 2769Assert.NotEqual(IntPtr.Zero, owner.Handle); 2789Assert.NotEqual(IntPtr.Zero, owner.Handle); 2814Assert.Equal(IntPtr.Zero, (nint)item.lParam); 2822Assert.Equal(IntPtr.Zero, (nint)item.lParam); 2830Assert.Equal(IntPtr.Zero, (nint)item.lParam); 2857Assert.NotEqual(IntPtr.Zero, owner.Handle); 2882Assert.Equal(IntPtr.Zero, (nint)item.lParam); 2890Assert.Equal(IntPtr.Zero, (nint)item.lParam); 2898Assert.Equal(IntPtr.Zero, (nint)item.lParam); 2931Assert.NotEqual(IntPtr.Zero, owner.Handle); 2960Assert.NotEqual(IntPtr.Zero, owner.Handle); 2999Assert.NotEqual(IntPtr.Zero, owner.Handle); 3165Assert.NotEqual(IntPtr.Zero, owner.Handle); 3192Assert.NotEqual(IntPtr.Zero, owner.Handle); 3225Assert.NotEqual(IntPtr.Zero, owner.Handle); 3450Assert.NotEqual(IntPtr.Zero, owner.Handle); 3506Assert.NotEqual(IntPtr.Zero, owner.Handle); 3549Assert.NotEqual(IntPtr.Zero, owner.Handle); 3569Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3577Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3585Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3621Assert.NotEqual(IntPtr.Zero, owner.Handle); 3641Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3649Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3657Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3682Assert.NotEqual(IntPtr.Zero, owner.Handle); 3847Assert.NotEqual(IntPtr.Zero, owner.Handle); 3902Assert.NotEqual(IntPtr.Zero, owner.Handle); 4105Assert.NotEqual(IntPtr.Zero, value1.Handle); 4112Assert.NotEqual(IntPtr.Zero, value2.Handle); 4235Assert.NotEqual(IntPtr.Zero, owner.Handle); 4352Assert.NotEqual(IntPtr.Zero, value1.Handle); 4359Assert.NotEqual(IntPtr.Zero, value2.Handle); 4509Assert.NotEqual(IntPtr.Zero, owner.Handle); 4600Assert.NotEqual(IntPtr.Zero, owner.Handle); 4614Assert.Equal(IntPtr.Zero, (nint)item.lParam); 4622Assert.Equal(IntPtr.Zero, (nint)item.lParam); 4660Assert.NotEqual(IntPtr.Zero, owner.Handle); 4674Assert.Equal(IntPtr.Zero, (nint)item.lParam); 4682Assert.Equal(IntPtr.Zero, (nint)item.lParam);
System\Windows\Forms\TabControlTests.cs (91)
129Assert.Equal(IntPtr.Zero, createParams.Parent); 154Assert.Equal(IntPtr.Zero, createParams.Parent); 178Assert.Equal(IntPtr.Zero, createParams.Parent); 215Assert.Equal(IntPtr.Zero, createParams.Parent); 241Assert.Equal(IntPtr.Zero, createParams.Parent); 265Assert.Equal(IntPtr.Zero, createParams.Parent); 300Assert.Equal(IntPtr.Zero, createParams.Parent); 325Assert.Equal(IntPtr.Zero, createParams.Parent); 354Assert.Equal(IntPtr.Zero, createParams.Parent); 417Assert.NotEqual(IntPtr.Zero, control.Handle); 496Assert.NotEqual(IntPtr.Zero, control.Handle); 557Assert.NotEqual(IntPtr.Zero, control.Handle); 757Assert.NotEqual(IntPtr.Zero, control.Handle); 781Assert.NotEqual(IntPtr.Zero, control.Handle); 832Assert.NotEqual(IntPtr.Zero, control.Handle); 890Assert.NotEqual(IntPtr.Zero, control.Handle); 951Assert.NotEqual(IntPtr.Zero, control.Handle); 1015Assert.NotEqual(IntPtr.Zero, control.Handle); 1027Assert.NotEqual(IntPtr.Zero, control.Handle); 1035Assert.NotEqual(IntPtr.Zero, control.Handle); 1057Assert.NotEqual(IntPtr.Zero, control.Handle); 1070Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1078Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1086Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1120Assert.NotEqual(IntPtr.Zero, control.Handle); 1200Assert.NotEqual(IntPtr.Zero, control.Handle); 1233Assert.NotEqual(IntPtr.Zero, control.Handle); 1297Assert.NotEqual(IntPtr.Zero, control.Handle); 1338Assert.NotEqual(IntPtr.Zero, control.Handle); 1405Assert.NotEqual(IntPtr.Zero, control.Handle); 1446Assert.NotEqual(IntPtr.Zero, control.Handle); 1461Assert.NotEqual(IntPtr.Zero, control.Handle); 1506Assert.NotEqual(IntPtr.Zero, control.Handle); 1537Assert.NotEqual(IntPtr.Zero, control.Handle); 1676Assert.NotEqual(IntPtr.Zero, control.Handle); 1741Assert.NotEqual(IntPtr.Zero, control.Handle); 1880Assert.NotEqual(IntPtr.Zero, control.Handle); 1968Assert.NotEqual(IntPtr.Zero, control.Handle); 2001Assert.NotEqual(IntPtr.Zero, control.Handle); 2010Assert.NotEqual(IntPtr.Zero, control.Handle); 2022Assert.NotEqual(IntPtr.Zero, control.Handle); 2086Assert.NotEqual(IntPtr.Zero, control.Handle); 2124Assert.NotEqual(IntPtr.Zero, control.Handle); 2218Assert.NotEqual(IntPtr.Zero, control.Handle); 2331Assert.NotEqual(IntPtr.Zero, control.Handle); 2409Assert.NotEqual(IntPtr.Zero, control.Handle); 2516Assert.NotEqual(IntPtr.Zero, control.Handle); 2528Assert.NotEqual(IntPtr.Zero, control.Handle); 2641Assert.NotEqual(IntPtr.Zero, control.Handle); 2676Assert.NotEqual(IntPtr.Zero, control.Handle); 2818Assert.NotEqual(IntPtr.Zero, control.Handle); 2878Assert.NotEqual(IntPtr.Zero, control.Handle); 2932Assert.NotEqual(IntPtr.Zero, control.Handle); 3010Assert.NotEqual(IntPtr.Zero, control.Handle); 3072Assert.NotEqual(IntPtr.Zero, control.Handle); 3263Assert.NotEqual(IntPtr.Zero, control.Handle); 3451Assert.NotEqual(IntPtr.Zero, control.Handle); 3685Assert.NotEqual(IntPtr.Zero, control.Handle); 3728Assert.NotEqual(IntPtr.Zero, control.Handle); 3757Assert.NotEqual(IntPtr.Zero, control.Handle); 3773m.Result = IntPtr.Zero; 3817Assert.NotEqual(IntPtr.Zero, control.Handle); 4104Assert.NotEqual(IntPtr.Zero, control.Handle); 4351Assert.NotEqual(IntPtr.Zero, control.Handle); 4404Assert.NotEqual(IntPtr.Zero, control.Handle); 4552Assert.NotEqual(IntPtr.Zero, control.Handle); 4593Assert.NotEqual(IntPtr.Zero, control.Handle); 4727Assert.NotEqual(IntPtr.Zero, control.Handle); 4778Assert.NotEqual(IntPtr.Zero, control.Handle); 4856IntPtr handle1 = control.Handle; 4857Assert.NotEqual(IntPtr.Zero, handle1); 4863IntPtr handle2 = control.Handle; 4864Assert.NotEqual(IntPtr.Zero, handle2); 4872IntPtr handle3 = control.Handle; 4873Assert.NotEqual(IntPtr.Zero, handle3); 4889IntPtr handle1 = control.Handle; 4890Assert.NotEqual(IntPtr.Zero, handle1); 4896IntPtr handle2 = control.Handle; 4897Assert.NotEqual(IntPtr.Zero, handle2); 4905IntPtr handle3 = control.Handle; 4906Assert.NotEqual(IntPtr.Zero, handle3); 4945Assert.Equal(IntPtr.Zero, (nint)item.lParam); 4953Assert.Equal(IntPtr.Zero, (nint)item.lParam); 4961Assert.Equal(IntPtr.Zero, (nint)item.lParam); 5065Assert.NotEqual(IntPtr.Zero, control.Handle); 5118Assert.NotEqual(IntPtr.Zero, control.Handle); 5188Assert.NotEqual(IntPtr.Zero, control.Handle); 5241Assert.NotEqual(IntPtr.Zero, control.Handle); 5408Assert.NotEqual(IntPtr.Zero, control.Handle); 5566Assert.NotEqual(IntPtr.Zero, control.Handle); 5699Assert.NotEqual(IntPtr.Zero, toolTip.Handle); // A workaround to create the toolTip native window Handle
System\Windows\Forms\TableLayoutPanelTests.cs (6)
142Assert.Equal(IntPtr.Zero, createParams.Parent); 176Assert.NotEqual(IntPtr.Zero, control.Handle); 257Assert.NotEqual(IntPtr.Zero, control.Handle); 1244Assert.NotEqual(IntPtr.Zero, control.Handle); 1297Assert.NotEqual(IntPtr.Zero, control.Handle); 1369Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\TableLayoutStyleTests.cs (1)
80Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\TabPageTests.cs (63)
247Assert.Equal(IntPtr.Zero, createParams.Parent); 444Assert.NotEqual(IntPtr.Zero, control.Handle); 480Assert.NotEqual(IntPtr.Zero, parent.Handle); 837Assert.NotEqual(IntPtr.Zero, control.Handle); 1028Assert.NotEqual(IntPtr.Zero, control.Handle); 1220Assert.NotEqual(IntPtr.Zero, control.Handle); 1259Assert.NotEqual(IntPtr.Zero, parent.Handle); 1325Assert.NotEqual(IntPtr.Zero, parent.Handle); 1384Assert.NotEqual(IntPtr.Zero, owner.Handle); 1399Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1407Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1415Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1451Assert.NotEqual(IntPtr.Zero, owner.Handle); 1466Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1474Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1482Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1602Assert.NotEqual(IntPtr.Zero, control.Handle); 1639Assert.NotEqual(IntPtr.Zero, parent.Handle); 1703Assert.NotEqual(IntPtr.Zero, parent.Handle); 1759Assert.NotEqual(IntPtr.Zero, owner.Handle); 1774Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1782Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1790Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1823Assert.NotEqual(IntPtr.Zero, owner.Handle); 1838Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1846Assert.Equal(IntPtr.Zero, (nint)item.lParam); 1854Assert.Equal(IntPtr.Zero, (nint)item.lParam); 2082Assert.NotEqual(IntPtr.Zero, control.Handle); 2162Assert.NotEqual(IntPtr.Zero, parent.Handle); 2289Assert.NotEqual(IntPtr.Zero, control.Handle); 2544Assert.NotEqual(IntPtr.Zero, control.Handle); 2712Assert.NotEqual(IntPtr.Zero, control.Handle); 2863Assert.NotEqual(IntPtr.Zero, control.Handle); 2896Assert.NotEqual(IntPtr.Zero, parent.Handle); 2958Assert.NotEqual(IntPtr.Zero, parent.Handle); 3015Assert.NotEqual(IntPtr.Zero, owner.Handle); 3030Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3038Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3046Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3082Assert.NotEqual(IntPtr.Zero, owner.Handle); 3097Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3105Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3113Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3235Assert.NotEqual(IntPtr.Zero, control.Handle); 3270Assert.NotEqual(IntPtr.Zero, parent.Handle); 3334Assert.NotEqual(IntPtr.Zero, parent.Handle); 3388Assert.NotEqual(IntPtr.Zero, owner.Handle); 3403Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3411Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3419Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3452Assert.NotEqual(IntPtr.Zero, owner.Handle); 3467Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3475Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3483Assert.Equal(IntPtr.Zero, (nint)item.lParam); 3517Assert.NotEqual(IntPtr.Zero, control.Handle); 3613Assert.NotEqual(IntPtr.Zero, control.Handle); 3654Assert.NotEqual(IntPtr.Zero, parent.Handle); 4120Assert.NotEqual(IntPtr.Zero, control.Handle); 4221Assert.NotEqual(IntPtr.Zero, parent.Handle); 4564Assert.NotEqual(IntPtr.Zero, control.Handle); 4715Assert.NotEqual(IntPtr.Zero, parent.Handle); 4922Assert.NotEqual(IntPtr.Zero, toolTip.Handle); // A workaround to create the tooltip native window Handle 5020Assert.NotEqual(IntPtr.Zero, toolTip.Handle); // A workaround to create the tooltip native window Handle
System\Windows\Forms\TextBoxBase.TextBoxBaseUiaTextProviderTests.cs (1)
924Assert.NotEqual(IntPtr.Zero, textBoxBase.Handle);
System\Windows\Forms\TextBoxRendererTests.cs (9)
31form.Handle.Should().NotBe(IntPtr.Zero); 32textbox.Handle.Should().NotBe(IntPtr.Zero); 36using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 60form.Handle.Should().NotBe(IntPtr.Zero); 61textbox.Handle.Should().NotBe(IntPtr.Zero); 65using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC); 95form.Handle.Should().NotBe(IntPtr.Zero); 96textbox.Handle.Should().NotBe(IntPtr.Zero); 100using Graphics graphics = Graphics.FromHdc((IntPtr)emf.HDC);
System\Windows\Forms\TextRendererTests.cs (2)
665public IntPtr GetHdc() => IntPtr.Zero;
System\Windows\Forms\ToolStripButtonTests.cs (3)
698Assert.NotEqual(IntPtr.Zero, owner.Handle); 771Assert.NotEqual(IntPtr.Zero, parent.Handle); 910Assert.NotEqual(IntPtr.Zero, owner.Handle);
System\Windows\Forms\ToolStripContentPanelTests.cs (10)
187Assert.NotEqual(IntPtr.Zero, control.Handle); 284Assert.NotEqual(IntPtr.Zero, control.Handle); 372Assert.NotEqual(IntPtr.Zero, control.Handle); 528Assert.NotEqual(IntPtr.Zero, control.Handle); 562Assert.NotEqual(IntPtr.Zero, parent.Handle); 746Assert.NotEqual(IntPtr.Zero, control.Handle); 1184Assert.NotEqual(IntPtr.Zero, control.Handle); 1371Assert.NotEqual(IntPtr.Zero, control.Handle); 1581Assert.NotEqual(IntPtr.Zero, control.Handle); 1947Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\ToolStripDropDownTests.cs (31)
174Assert.Equal(IntPtr.Zero, createParams.Parent); 205Assert.Equal(IntPtr.Zero, createParams.Parent); 239Assert.Equal(IntPtr.Zero, createParams.Parent); 275Assert.NotEqual(IntPtr.Zero, control.Handle); 304Assert.NotEqual(IntPtr.Zero, control.Handle); 439Assert.NotEqual(IntPtr.Zero, control.Handle); 488Assert.NotEqual(IntPtr.Zero, control.Handle); 532Assert.NotEqual(IntPtr.Zero, control.Handle); 1004Assert.NotEqual(IntPtr.Zero, control.Handle); 1406Assert.NotEqual(IntPtr.Zero, control.Handle); 1851Assert.NotEqual(IntPtr.Zero, control.Handle); 2076Assert.NotEqual(IntPtr.Zero, control.Handle); 2113Assert.NotEqual(IntPtr.Zero, control.Handle); 2154Assert.NotEqual(IntPtr.Zero, control.Handle); 2204Assert.NotEqual(IntPtr.Zero, control.Handle); 2259Assert.NotEqual(IntPtr.Zero, control.Handle); 2475Assert.NotEqual(IntPtr.Zero, control.Handle); 2598Assert.NotEqual(IntPtr.Zero, control.Handle); 2690Assert.NotEqual(IntPtr.Zero, control.Handle); 2786Assert.NotEqual(IntPtr.Zero, control.Handle); 2874Assert.NotEqual(IntPtr.Zero, control.Handle); 3771Assert.NotEqual(IntPtr.Zero, control.Handle); 3948Assert.NotEqual(IntPtr.Zero, control.Handle); 4010Assert.NotEqual(IntPtr.Zero, control.Handle); 4346Assert.NotEqual(IntPtr.Zero, control.Handle); 4397Assert.NotEqual(IntPtr.Zero, control.Handle); 4449Assert.NotEqual(IntPtr.Zero, control.Handle); 4515Assert.NotEqual(IntPtr.Zero, control.Handle); 4656Assert.NotEqual(IntPtr.Zero, control.Handle); 4853Assert.NotEqual(IntPtr.Zero, control.Handle); 4874Assert.Equal(IntPtr.Zero, m.Result);
System\Windows\Forms\ToolStripItemTests.cs (93)
436Assert.NotEqual(IntPtr.Zero, parent.Handle); 520Assert.NotEqual(IntPtr.Zero, owner.Handle); 619Assert.NotEqual(IntPtr.Zero, owner.Handle); 690Assert.NotEqual(IntPtr.Zero, parent.Handle); 757Assert.NotEqual(IntPtr.Zero, parent.Handle); 945Assert.NotEqual(IntPtr.Zero, owner.Handle); 1044Assert.NotEqual(IntPtr.Zero, parent.Handle); 1311Assert.NotEqual(IntPtr.Zero, owner.Handle); 1437Assert.NotEqual(IntPtr.Zero, parent.Handle); 1617Assert.NotEqual(IntPtr.Zero, owner.Handle); 1676Assert.NotEqual(IntPtr.Zero, parent.Handle); 1819Assert.NotEqual(IntPtr.Zero, owner.Handle); 1880Assert.NotEqual(IntPtr.Zero, parent.Handle); 1948Assert.NotEqual(IntPtr.Zero, owner.Handle); 2005Assert.NotEqual(IntPtr.Zero, parent.Handle); 2181Assert.NotEqual(IntPtr.Zero, owner.Handle); 2257Assert.NotEqual(IntPtr.Zero, parent.Handle); 2718Assert.NotEqual(IntPtr.Zero, owner.Handle); 2865Assert.NotEqual(IntPtr.Zero, parent.Handle); 3054Assert.NotEqual(IntPtr.Zero, owner.Handle); 3141Assert.NotEqual(IntPtr.Zero, parent.Handle); 3307Assert.NotEqual(IntPtr.Zero, owner.Handle); 3369Assert.NotEqual(IntPtr.Zero, parent.Handle); 3523Assert.NotEqual(IntPtr.Zero, owner.Handle); 3621Assert.NotEqual(IntPtr.Zero, parent.Handle); 3951Assert.NotEqual(IntPtr.Zero, owner.Handle); 4044Assert.NotEqual(IntPtr.Zero, parent.Handle); 4251Assert.NotEqual(IntPtr.Zero, owner.Handle); 4335Assert.NotEqual(IntPtr.Zero, parent.Handle); 4556Assert.NotEqual(IntPtr.Zero, owner.Handle); 4690Assert.NotEqual(IntPtr.Zero, parent.Handle); 5056Assert.NotEqual(IntPtr.Zero, owner.Handle); 5184Assert.NotEqual(IntPtr.Zero, parent.Handle); 5471Assert.NotEqual(IntPtr.Zero, owner.Handle); 5555Assert.NotEqual(IntPtr.Zero, parent.Handle); 5688Assert.NotEqual(IntPtr.Zero, owner.Handle); 5755Assert.NotEqual(IntPtr.Zero, parent.Handle); 5962Assert.NotEqual(IntPtr.Zero, owner.Handle); 6053Assert.NotEqual(IntPtr.Zero, parent.Handle); 6300Assert.NotEqual(IntPtr.Zero, owner.Handle); 6392Assert.NotEqual(IntPtr.Zero, parent.Handle); 6791Assert.NotEqual(IntPtr.Zero, owner.Handle); 6875Assert.NotEqual(IntPtr.Zero, parent.Handle); 7231Assert.NotEqual(IntPtr.Zero, owner.Handle); 7334Assert.NotEqual(IntPtr.Zero, parent.Handle); 7535Assert.NotEqual(IntPtr.Zero, owner.Handle); 7635Assert.NotEqual(IntPtr.Zero, parent.Handle); 7900Assert.NotEqual(IntPtr.Zero, owner.Handle); 8002Assert.NotEqual(IntPtr.Zero, parent.Handle); 8132Assert.NotEqual(IntPtr.Zero, owner.Handle); 8217Assert.NotEqual(IntPtr.Zero, parent.Handle); 8367Assert.NotEqual(IntPtr.Zero, owner.Handle); 8451Assert.NotEqual(IntPtr.Zero, parent.Handle); 8637Assert.NotEqual(IntPtr.Zero, owner.Handle); 8727Assert.NotEqual(IntPtr.Zero, parent.Handle); 8890Assert.NotEqual(IntPtr.Zero, owner.Handle); 8974Assert.NotEqual(IntPtr.Zero, parent.Handle); 9361Assert.NotEqual(IntPtr.Zero, owner.Handle); 9487Assert.NotEqual(IntPtr.Zero, parent.Handle); 9690Assert.NotEqual(IntPtr.Zero, owner.Handle); 9788Assert.NotEqual(IntPtr.Zero, parent.Handle); 10403Assert.NotEqual(IntPtr.Zero, owner.Handle); 10449Assert.NotEqual(IntPtr.Zero, parent.Handle); 10514Assert.NotEqual(IntPtr.Zero, owner.Handle); 10562Assert.NotEqual(IntPtr.Zero, parent.Handle); 10671Assert.NotEqual(IntPtr.Zero, owner.Handle); 10745Assert.NotEqual(IntPtr.Zero, parent.Handle); 10819Assert.NotEqual(IntPtr.Zero, owner.Handle); 10884Assert.NotEqual(IntPtr.Zero, parent.Handle); 11210Assert.NotEqual(IntPtr.Zero, owner.Handle); 11289Assert.NotEqual(IntPtr.Zero, parent.Handle); 11407Assert.NotEqual(IntPtr.Zero, owner.Handle); 11489Assert.NotEqual(IntPtr.Zero, parent.Handle); 11586Assert.NotEqual(IntPtr.Zero, owner.Handle); 11660Assert.NotEqual(IntPtr.Zero, parent.Handle); 12325Assert.NotEqual(IntPtr.Zero, owner.Handle); 12427Assert.NotEqual(IntPtr.Zero, parent.Handle); 12796Assert.NotEqual(IntPtr.Zero, owner.Handle); 12902Assert.NotEqual(IntPtr.Zero, parent.Handle); 13032Assert.NotEqual(IntPtr.Zero, owner.Handle); 13138Assert.NotEqual(IntPtr.Zero, parent.Handle); 13314Assert.NotEqual(IntPtr.Zero, owner.Handle); 13380Assert.NotEqual(IntPtr.Zero, owner.Handle); 13446Assert.NotEqual(IntPtr.Zero, owner.Handle); 13550Assert.NotEqual(IntPtr.Zero, parent.Handle); 13799Assert.NotEqual(IntPtr.Zero, owner.Handle); 13904Assert.NotEqual(IntPtr.Zero, parent.Handle); 14382Assert.NotEqual(IntPtr.Zero, owner.Handle); 14471Assert.NotEqual(IntPtr.Zero, parent.Handle); 14632Assert.NotEqual(IntPtr.Zero, owner.Handle); 14760Assert.NotEqual(IntPtr.Zero, parent.Handle); 15023Assert.NotEqual(IntPtr.Zero, owner.Handle); 15149Assert.NotEqual(IntPtr.Zero, parent.Handle);
System\Windows\Forms\ToolStripPanelTests.cs (1)
135Assert.Equal(IntPtr.Zero, createParams.Parent);
System\Windows\Forms\ToolStripSeparatorTests.cs (2)
980Assert.NotEqual(IntPtr.Zero, owner.Handle); 1055Assert.NotEqual(IntPtr.Zero, parent.Handle);
System\Windows\Forms\ToolStripTests.cs (37)
347Assert.Equal(IntPtr.Zero, createParams.Parent); 416Assert.NotEqual(IntPtr.Zero, control.Handle); 453Assert.NotEqual(IntPtr.Zero, control.Handle); 500Assert.NotEqual(IntPtr.Zero, control.Handle); 537Assert.NotEqual(IntPtr.Zero, control.Handle); 612Assert.NotEqual(IntPtr.Zero, control.Handle); 641Assert.NotEqual(IntPtr.Zero, control.Handle); 714Assert.NotEqual(IntPtr.Zero, control.Handle); 1228Assert.NotEqual(IntPtr.Zero, control.Handle); 2179Assert.NotEqual(IntPtr.Zero, control.Handle); 2827Assert.NotEqual(IntPtr.Zero, control.Handle); 3154Assert.NotEqual(IntPtr.Zero, control.Handle); 3681Assert.NotEqual(IntPtr.Zero, control.Handle); 3743Assert.NotEqual(IntPtr.Zero, control.Handle); 3853Assert.NotEqual(IntPtr.Zero, control.Handle); 3979Assert.NotEqual(IntPtr.Zero, control.Handle); 4044Assert.NotEqual(IntPtr.Zero, control.Handle); 4136Assert.NotEqual(IntPtr.Zero, control.Handle); 4992Assert.NotEqual(IntPtr.Zero, control.Handle); 5170Assert.NotEqual(IntPtr.Zero, control.Handle); 5213Assert.NotEqual(IntPtr.Zero, control.Handle); 5510Assert.NotEqual(IntPtr.Zero, control.Handle); 5559Assert.NotEqual(IntPtr.Zero, control.Handle); 5608Assert.NotEqual(IntPtr.Zero, control.Handle); 5660Assert.NotEqual(IntPtr.Zero, control.Handle); 6091Assert.NotEqual(IntPtr.Zero, control.Handle); 6192Assert.NotEqual(IntPtr.Zero, parent.Handle); 6267Assert.NotEqual(IntPtr.Zero, control.Handle); 6350Assert.NotEqual(IntPtr.Zero, control.Handle); 6630Assert.NotEqual(IntPtr.Zero, control.Handle); 6746Assert.NotEqual(IntPtr.Zero, control.Handle); 7049Assert.NotEqual(IntPtr.Zero, control.Handle); 7158Assert.Equal(IntPtr.Zero, m.Result); 7169Assert.NotEqual(IntPtr.Zero, control.Handle); 7186Assert.Equal(IntPtr.Zero, m.Result); 7197Assert.NotEqual(IntPtr.Zero, control.Handle); 7221Assert.Equal(IntPtr.Zero, m.Result);
System\Windows\Forms\ToolStripTests.Rendering.cs (2)
25Assert.NotEqual(IntPtr.Zero, form.Handle); 26Assert.NotEqual(IntPtr.Zero, toolStrip.Handle);
System\Windows\Forms\ToolTipBufferTests.cs (11)
16Assert.Equal(IntPtr.Zero, buffer.Buffer); 23IntPtr memory1 = buffer.Buffer; 27IntPtr memory2 = buffer.Buffer; 38IntPtr memory1 = buffer.Buffer; 42IntPtr memory2 = buffer.Buffer; 58IntPtr memory2 = buffer.Buffer; 59Assert.NotEqual(IntPtr.Zero, memory2); 73IntPtr memory1 = buffer.Buffer; 78IntPtr memory2 = buffer.Buffer; 90IntPtr memory1 = buffer.Buffer; 95IntPtr memory2 = buffer.Buffer;
System\Windows\Forms\ToolTipTests.cs (5)
91Assert.Equal(IntPtr.Zero, createParams.Parent); 794Assert.NotEqual(IntPtr.Zero, toolTip.Handle); // A workaround to create the toolTip native window Handle 814Assert.True(toolTip.Handle != IntPtr.Zero); // A workaround to create the toolTip native window Handle 848Assert.NotEqual(IntPtr.Zero, tabControl.InternalHandle); 891Assert.NotEqual(IntPtr.Zero, tabControl.InternalHandle);
System\Windows\Forms\TreeNodeCollectionTests.cs (1)
130IntPtr forcedHandle = treeView.Handle;
System\Windows\Forms\TreeNodeTests.cs (112)
309Assert.NotEqual(IntPtr.Zero, control.Handle); 395Assert.NotEqual(IntPtr.Zero, control.Handle); 472Assert.NotEqual(IntPtr.Zero, control.Handle); 524Assert.NotEqual(IntPtr.Zero, control.Handle); 535Assert.NotEqual(IntPtr.Zero, control.Handle); 547Assert.NotEqual(IntPtr.Zero, control.Handle); 615Assert.NotEqual(IntPtr.Zero, control.Handle); 660Assert.NotEqual(IntPtr.Zero, control.Handle); 686Assert.NotEqual(IntPtr.Zero, control.Handle); 750Assert.NotEqual(IntPtr.Zero, control.Handle); 836Assert.NotEqual(IntPtr.Zero, control.Handle); 896IntPtr handle = node.Handle; 897Assert.Equal(IntPtr.Zero, handle); 907IntPtr handle = node.Handle; 908Assert.NotEqual(IntPtr.Zero, handle); 929Assert.NotEqual(IntPtr.Zero, control.Handle); 953Assert.NotEqual(IntPtr.Zero, control.Handle); 955IntPtr handle = node.Handle; 956Assert.NotEqual(IntPtr.Zero, handle); 1152Assert.NotEqual(IntPtr.Zero, control.Handle); 1209Assert.NotEqual(IntPtr.Zero, control.Handle); 1236Assert.NotEqual(IntPtr.Zero, control.Handle); 1267Assert.NotEqual(IntPtr.Zero, control.Handle); 1288Assert.NotEqual(IntPtr.Zero, control.Handle); 1315Assert.NotEqual(IntPtr.Zero, control.Handle); 1443Assert.NotEqual(IntPtr.Zero, control.Handle); 1482Assert.NotEqual(IntPtr.Zero, control.Handle); 1512Assert.NotEqual(IntPtr.Zero, control.Handle); 1544Assert.NotEqual(IntPtr.Zero, control.Handle); 1562Assert.NotEqual(IntPtr.Zero, control.Handle); 1581Assert.NotEqual(IntPtr.Zero, control.Handle); 1605Assert.NotEqual(IntPtr.Zero, control.Handle); 1674Assert.NotEqual(IntPtr.Zero, control.Handle); 1709Assert.NotEqual(IntPtr.Zero, control.Handle); 1730Assert.NotEqual(IntPtr.Zero, control.Handle); 1754Assert.NotEqual(IntPtr.Zero, control.Handle); 1783Assert.NotEqual(IntPtr.Zero, control.Handle); 1802Assert.NotEqual(IntPtr.Zero, control.Handle); 1814Assert.NotEqual(IntPtr.Zero, control.Handle); 1838Assert.NotEqual(IntPtr.Zero, control.Handle); 1866Assert.NotEqual(IntPtr.Zero, control.Handle); 1884Assert.NotEqual(IntPtr.Zero, control.Handle); 1896Assert.NotEqual(IntPtr.Zero, control.Handle); 1920Assert.NotEqual(IntPtr.Zero, control.Handle); 1968Assert.NotEqual(IntPtr.Zero, control.Handle); 1979Assert.NotEqual(IntPtr.Zero, control.Handle); 1991Assert.NotEqual(IntPtr.Zero, control.Handle); 2015Assert.NotEqual(IntPtr.Zero, control.Handle); 2084Assert.NotEqual(IntPtr.Zero, control.Handle); 2134Assert.NotEqual(IntPtr.Zero, control.Handle); 2203Assert.NotEqual(IntPtr.Zero, control.Handle); 2238Assert.NotEqual(IntPtr.Zero, control.Handle); 2259Assert.NotEqual(IntPtr.Zero, control.Handle); 2320Assert.NotEqual(IntPtr.Zero, control.Handle); 2344Assert.NotEqual(IntPtr.Zero, control.Handle); 2360yield return new object[] { IntPtr.Zero }; 2361yield return new object[] { (IntPtr)1 }; 2366public void TreeNode_NextVisibleNode_GetInvalidGetNextItem_ReturnsExpected(IntPtr getNextItemResult) 2374Assert.NotEqual(IntPtr.Zero, control.Handle); 2389public IntPtr GetNextItemResult { get; set; } 2396Assert.Equal((IntPtr)PInvoke.TVGN_NEXTVISIBLE, m.WParam); 2397Assert.NotEqual(IntPtr.Zero, m.LParam); 2423Assert.NotEqual(IntPtr.Zero, control.Handle); 2492Assert.NotEqual(IntPtr.Zero, control.Handle); 2527Assert.NotEqual(IntPtr.Zero, control.Handle); 2596Assert.NotEqual(IntPtr.Zero, control.Handle); 2631Assert.NotEqual(IntPtr.Zero, control.Handle); 2652Assert.NotEqual(IntPtr.Zero, control.Handle); 2713Assert.NotEqual(IntPtr.Zero, control.Handle); 2737Assert.NotEqual(IntPtr.Zero, control.Handle); 2753yield return new object[] { IntPtr.Zero }; 2754yield return new object[] { (IntPtr)1 }; 2759public void TreeNode_PrevVisibleNode_InvalidGetPreviousItemResult_ReturnsExpected(IntPtr getPreviousItemResult) 2767Assert.NotEqual(IntPtr.Zero, control.Handle); 2782public IntPtr GetPreviousItemResult { get; set; } 2789Assert.Equal((IntPtr)PInvoke.TVGN_PREVIOUSVISIBLE, m.WParam); 2790Assert.NotEqual(IntPtr.Zero, m.LParam); 2845Assert.NotEqual(IntPtr.Zero, control.Handle); 2926Assert.NotEqual(IntPtr.Zero, control.Handle); 3134Assert.NotEqual(IntPtr.Zero, control.Handle); 3191Assert.NotEqual(IntPtr.Zero, control.Handle); 3220Assert.NotEqual(IntPtr.Zero, control.Handle); 3251Assert.NotEqual(IntPtr.Zero, control.Handle); 3272Assert.NotEqual(IntPtr.Zero, control.Handle); 3299Assert.NotEqual(IntPtr.Zero, control.Handle); 3427Assert.NotEqual(IntPtr.Zero, control.Handle); 3466Assert.NotEqual(IntPtr.Zero, control.Handle); 3496Assert.NotEqual(IntPtr.Zero, control.Handle); 3528Assert.NotEqual(IntPtr.Zero, control.Handle); 3546Assert.NotEqual(IntPtr.Zero, control.Handle); 3565Assert.NotEqual(IntPtr.Zero, control.Handle); 3801Assert.NotEqual(IntPtr.Zero, control.Handle); 3855Assert.NotEqual(IntPtr.Zero, control.Handle); 3885Assert.NotEqual(IntPtr.Zero, control.Handle); 3917Assert.NotEqual(IntPtr.Zero, control.Handle); 3946Assert.NotEqual(IntPtr.Zero, control.Handle); 3990Assert.NotEqual(IntPtr.Zero, control.Handle); 4179Assert.NotEqual(IntPtr.Zero, control.Handle); 4218Assert.NotEqual(IntPtr.Zero, control.Handle); 4256Assert.NotEqual(IntPtr.Zero, control.Handle); 4296Assert.NotEqual(IntPtr.Zero, control.Handle); 4318Assert.NotEqual(IntPtr.Zero, control.Handle); 4337Assert.NotEqual(IntPtr.Zero, control.Handle); 4415Assert.NotEqual(IntPtr.Zero, control.Handle); 4453Assert.NotEqual(IntPtr.Zero, control.Handle); 4476Assert.NotEqual(IntPtr.Zero, control.Handle); 4521Assert.NotEqual(IntPtr.Zero, control.Handle); 4590Assert.NotEqual(IntPtr.Zero, control.Handle); 4865m.Result = IntPtr.Zero; 4883Assert.Equal(IntPtr.Zero, m.WParam); 4904Assert.Equal(IntPtr.Zero, m.WParam); 4942m.Result = IntPtr.Zero;
System\Windows\Forms\TreeViewTests.cs (127)
145Assert.Equal(IntPtr.Zero, createParams.Parent); 159Assert.NotEqual(IntPtr.Zero, control.Handle); 173Assert.Equal(IntPtr.Zero, createParams.Parent); 203Assert.Equal(IntPtr.Zero, createParams.Parent); 229Assert.Equal(IntPtr.Zero, createParams.Parent); 255Assert.Equal(IntPtr.Zero, createParams.Parent); 281Assert.Equal(IntPtr.Zero, createParams.Parent); 307Assert.Equal(IntPtr.Zero, createParams.Parent); 333Assert.Equal(IntPtr.Zero, createParams.Parent); 359Assert.Equal(IntPtr.Zero, createParams.Parent); 385Assert.Equal(IntPtr.Zero, createParams.Parent); 411Assert.Equal(IntPtr.Zero, createParams.Parent); 437Assert.Equal(IntPtr.Zero, createParams.Parent); 456Assert.NotEqual(IntPtr.Zero, control.Handle); 470Assert.Equal(IntPtr.Zero, createParams.Parent); 489Assert.NotEqual(IntPtr.Zero, control.Handle); 503Assert.Equal(IntPtr.Zero, createParams.Parent); 549Assert.Equal(IntPtr.Zero, createParams.Parent); 581Assert.NotEqual(IntPtr.Zero, control.Handle); 595Assert.Equal(IntPtr.Zero, createParams.Parent); 623Assert.Equal(IntPtr.Zero, createParams.Parent); 642Assert.NotEqual(IntPtr.Zero, control.Handle); 656Assert.Equal(IntPtr.Zero, createParams.Parent); 689Assert.Equal(IntPtr.Zero, createParams.Parent); 732Assert.NotEqual(IntPtr.Zero, control.Handle); 999Assert.NotEqual(IntPtr.Zero, treeView.Handle); 1060Assert.NotEqual(IntPtr.Zero, treeView.Handle); 1148Assert.NotEqual(IntPtr.Zero, treeView.Handle); 1201Assert.NotEqual(IntPtr.Zero, treeView.Handle); 1289Assert.NotEqual(IntPtr.Zero, treeView.Handle); 1338Assert.NotEqual(IntPtr.Zero, treeView.Handle); 1422Assert.NotEqual(IntPtr.Zero, treeView.Handle); 1488Assert.NotEqual(IntPtr.Zero, control.Handle); 1557Assert.NotEqual(IntPtr.Zero, treeView.Handle); 1645Assert.NotEqual(IntPtr.Zero, treeView.Handle); 1679Assert.NotEqual(IntPtr.Zero, control.Handle); 1686yield return new object[] { IntPtr.Zero, 1 }; 1687yield return new object[] { (IntPtr)4, 1 }; 1688yield return new object[] { (IntPtr)5, 0 }; 1689yield return new object[] { (IntPtr)6, 0 }; 1694public void TreeView_Handle_CustomGetVersion_Success(IntPtr getVersionResult, int expectedSetVersionCallCount) 1700Assert.NotEqual(IntPtr.Zero, control.Handle); 1706public IntPtr GetVersionResult { get; set; } 1713Assert.Equal(IntPtr.Zero, m.WParam); 1714Assert.Equal(IntPtr.Zero, m.LParam); 1721Assert.Equal(IntPtr.Zero, m.LParam); 1754Assert.NotEqual(IntPtr.Zero, treeView.Handle); 1842Assert.NotEqual(IntPtr.Zero, treeView.Handle); 1895Assert.NotEqual(IntPtr.Zero, treeView.Handle); 1983Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2152Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2176Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2202Assert.NotEqual(IntPtr.Zero, imageList.Handle); 2361Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2382Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2405Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2497Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2515Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2534Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2552Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2591Assert.NotEqual(IntPtr.Zero, imageList.Handle); 2603Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2604Assert.NotEqual(IntPtr.Zero, imageList.Handle); 2616Assert.NotEqual(IntPtr.Zero, imageList.Handle); 2619Assert.NotEqual(IntPtr.Zero, imageList.Handle); 2631Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2632Assert.NotEqual(IntPtr.Zero, imageList.Handle); 2635Assert.NotEqual(IntPtr.Zero, imageList.Handle); 2670Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2767Assert.NotEqual(IntPtr.Zero, control.Handle); 2839Assert.NotEqual(IntPtr.Zero, treeView.Handle); 2927Assert.NotEqual(IntPtr.Zero, treeView.Handle); 3008Assert.NotEqual(IntPtr.Zero, control.Handle); 3122Assert.NotEqual(IntPtr.Zero, control.Handle); 3210Assert.NotEqual(IntPtr.Zero, control.Handle); 3255Assert.NotEqual(IntPtr.Zero, treeView.Handle); 3343Assert.NotEqual(IntPtr.Zero, treeView.Handle); 3512Assert.NotEqual(IntPtr.Zero, treeView.Handle); 3536Assert.NotEqual(IntPtr.Zero, treeView.Handle); 3562Assert.NotEqual(IntPtr.Zero, imageList.Handle); 3711Assert.NotEqual(IntPtr.Zero, treeView.Handle); 3732Assert.NotEqual(IntPtr.Zero, treeView.Handle); 3755Assert.NotEqual(IntPtr.Zero, treeView.Handle); 3791Assert.NotEqual(IntPtr.Zero, treeView.Handle); 3879Assert.NotEqual(IntPtr.Zero, treeView.Handle); 3932Assert.NotEqual(IntPtr.Zero, treeView.Handle); 4020Assert.NotEqual(IntPtr.Zero, treeView.Handle); 4073Assert.NotEqual(IntPtr.Zero, treeView.Handle); 4161Assert.NotEqual(IntPtr.Zero, treeView.Handle); 4214Assert.NotEqual(IntPtr.Zero, treeView.Handle); 4302Assert.NotEqual(IntPtr.Zero, treeView.Handle); 4355Assert.NotEqual(IntPtr.Zero, treeView.Handle); 4443Assert.NotEqual(IntPtr.Zero, treeView.Handle); 4510Assert.NotEqual(IntPtr.Zero, treeView.Handle); 4529Assert.NotEqual(IntPtr.Zero, treeView.Handle); 4568Assert.NotEqual(IntPtr.Zero, imageList.Handle); 4580Assert.NotEqual(IntPtr.Zero, treeView.Handle); 4581Assert.NotEqual(IntPtr.Zero, imageList.Handle); 4593Assert.NotEqual(IntPtr.Zero, imageList.Handle); 4596Assert.NotEqual(IntPtr.Zero, imageList.Handle); 4608Assert.NotEqual(IntPtr.Zero, treeView.Handle); 4609Assert.NotEqual(IntPtr.Zero, imageList.Handle); 4612Assert.NotEqual(IntPtr.Zero, imageList.Handle); 4637Assert.NotEqual(IntPtr.Zero, control.Handle); 4837Assert.NotEqual(IntPtr.Zero, control.Handle); 4866Assert.NotEqual(IntPtr.Zero, control.Handle); 4895Assert.NotEqual(IntPtr.Zero, control.Handle); 4965Assert.NotEqual(IntPtr.Zero, control.Handle); 4994Assert.NotEqual(IntPtr.Zero, control.Handle); 5023Assert.NotEqual(IntPtr.Zero, control.Handle); 5173Assert.NotEqual(IntPtr.Zero, control.Handle); 5206Assert.NotEqual(IntPtr.Zero, control.Handle); 5239Assert.NotEqual(IntPtr.Zero, control.Handle); 5325Assert.NotEqual(IntPtr.Zero, control.Handle); 5358Assert.NotEqual(IntPtr.Zero, control.Handle); 5391Assert.NotEqual(IntPtr.Zero, control.Handle); 5977Assert.NotEqual(IntPtr.Zero, control.Handle); 6033Assert.NotEqual(IntPtr.Zero, control.Handle); 6114Assert.NotEqual(IntPtr.Zero, control.Handle); 6195Assert.NotEqual(IntPtr.Zero, control.Handle); 6227Assert.NotEqual(IntPtr.Zero, control.Handle); 6260Assert.NotEqual(IntPtr.Zero, imageList.Handle); 6266Assert.NotEqual(IntPtr.Zero, control.Handle); 6350Assert.NotEqual(IntPtr.Zero, control.Handle); 6559Assert.NotEqual(IntPtr.Zero, control.Handle); 6600Assert.NotEqual(IntPtr.Zero, control.Handle); 6821Assert.NotEqual(IntPtr.Zero, toolTip.Handle); // A workaround to create the toolTip native window Handle
System\Windows\Forms\UpDownBaseTests.cs (29)
162Assert.Equal(IntPtr.Zero, createParams.Parent); 192Assert.Equal(IntPtr.Zero, createParams.Parent); 235Assert.NotEqual(IntPtr.Zero, control.Handle); 326Assert.NotEqual(IntPtr.Zero, control.Handle); 411Assert.NotEqual(IntPtr.Zero, control.Handle); 543Assert.NotEqual(IntPtr.Zero, control.Handle); 775Assert.NotEqual(IntPtr.Zero, control.Handle); 838Assert.NotEqual(IntPtr.Zero, control.Handle); 966Assert.NotEqual(IntPtr.Zero, control.Handle); 1052Assert.NotEqual(IntPtr.Zero, control.Handle); 1199Assert.NotEqual(IntPtr.Zero, control.Handle); 1307Assert.NotEqual(IntPtr.Zero, control.Handle); 1397Assert.NotEqual(IntPtr.Zero, control.Handle); 1481Assert.NotEqual(IntPtr.Zero, control.Handle); 1540Assert.NotEqual(IntPtr.Zero, control.Handle); 1743Assert.NotEqual(IntPtr.Zero, control.Handle); 1873Assert.NotEqual(IntPtr.Zero, control.Handle); 1931Assert.NotEqual(IntPtr.Zero, control.Handle); 2294Assert.NotEqual(IntPtr.Zero, control.Handle); 2643Assert.NotEqual(IntPtr.Zero, control.Handle); 2833Assert.NotEqual(IntPtr.Zero, control.Handle); 2869Assert.Equal(IntPtr.Zero, m.Result); 2879Assert.NotEqual(IntPtr.Zero, control.Handle); 2895Assert.Equal(IntPtr.Zero, m.Result); 2922Assert.Equal(IntPtr.Zero, m.Result); 2932Assert.NotEqual(IntPtr.Zero, control.Handle); 2953Assert.Equal(IntPtr.Zero, m.Result); 2987Assert.NotEqual(IntPtr.Zero, control.Handle); 3028toolTip.Handle.Should().NotBe(IntPtr.Zero); // A workaround to create the toolTip native window Handle
System\Windows\Forms\UserControlTests.cs (14)
138Assert.Equal(IntPtr.Zero, createParams.Parent); 164Assert.Equal(IntPtr.Zero, createParams.Parent); 489Assert.NotEqual(IntPtr.Zero, control.Handle); 537Assert.NotEqual(IntPtr.Zero, parent.Handle); 610Assert.NotEqual(IntPtr.Zero, parent.Handle); 761Assert.NotEqual(IntPtr.Zero, control.Handle); 815Assert.NotEqual(IntPtr.Zero, control.Handle); 1022Assert.NotEqual(IntPtr.Zero, control.Handle); 1161Assert.NotEqual(IntPtr.Zero, control.Handle); 1215Assert.NotEqual(IntPtr.Zero, control.Handle); 1690Assert.NotEqual(IntPtr.Zero, control.Handle); 1711Assert.Equal(IntPtr.Zero, m.Result); 1727Assert.NotEqual(IntPtr.Zero, control.Handle); 1758Assert.NotEqual(IntPtr.Zero, control.Handle);
System\Windows\Forms\VisualStyles\VisualStyleRendererTests.cs (5)
35Assert.NotEqual(IntPtr.Zero, renderer.Handle); 69Assert.NotEqual(IntPtr.Zero, renderer.Handle); 384Assert.NotEqual(IntPtr.Zero, childControl.Handle); 523Assert.NotEqual(IntPtr.Zero, renderer.Handle); 544Assert.NotEqual(IntPtr.Zero, renderer.Handle);
System\Windows\Forms\VScrollBarTests.cs (1)
131Assert.Equal(IntPtr.Zero, createParams.Parent);
System\Windows\Forms\WebBrowserTests.cs (47)
114Assert.Equal(IntPtr.Zero, createParams.Parent); 128Assert.NotEqual(IntPtr.Zero, control.Handle); 1081Assert.NotEqual(IntPtr.Zero, control.Handle); 1338Assert.NotEqual(IntPtr.Zero, control.Handle); 1482Assert.NotEqual(IntPtr.Zero, control.Handle); 1504Assert.NotEqual(IntPtr.Zero, control.Handle); 1522Assert.NotEqual(IntPtr.Zero, parent.Handle); 2179Assert.NotEqual(IntPtr.Zero, control.Handle); 2197Assert.NotEqual(IntPtr.Zero, control.Handle); 4459Assert.NotEqual(IntPtr.Zero, control.Handle); 4480Assert.Equal(IntPtr.Zero, m.Result); 4490yield return new object[] { new Size(10, 20), (IntPtr)(-1) }; 4495yield return new object[] { Size.Empty, (IntPtr)(-1) }; 4503public void WebBrowser_WndProc_InvokeContextMenuWithoutContextMenuStripWithoutHandle_Success(Size size, IntPtr lParam) 4518Assert.Equal(IntPtr.Zero, m.Result); 4528yield return new object[] { new Size(10, 20), (IntPtr)(-1), (IntPtr)250, true }; 4529yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(0, 0), IntPtr.Zero, true }; 4530yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(1, 2), IntPtr.Zero, true }; 4531yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true }; 4532yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(-1, -2), (IntPtr)250, true }; 4534yield return new object[] { Size.Empty, (IntPtr)(-1), IntPtr.Zero, false }; 4535yield return new object[] { Size.Empty, PARAM.FromLowHigh(0, 0), IntPtr.Zero, true }; 4536yield return new object[] { Size.Empty, PARAM.FromLowHigh(1, 2), IntPtr.Zero, true }; 4537yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero, true }; 4538yield return new object[] { Size.Empty, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, false }; 4543public void WebBrowser_WndProc_InvokeContextMenuWithContextMenuStripWithoutHandle_Success(Size size, IntPtr lParam, IntPtr expectedResult, bool expectedHandleCreated) 4569public void WebBrowser_WndProc_InvokeContextMenuWithoutContextMenuStripWithHandle_Success(Size size, IntPtr lParam) 4575Assert.NotEqual(IntPtr.Zero, control.Handle); 4590Assert.Equal(IntPtr.Zero, m.Result); 4602yield return new object[] { new Size(10, 20), (IntPtr)(-1), (IntPtr)250 }; 4603yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(0, 0), IntPtr.Zero }; 4604yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(1, 2), IntPtr.Zero }; 4605yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250 }; 4606yield return new object[] { new Size(10, 20), PARAM.FromLowHigh(-1, -2), (IntPtr)250 }; 4608yield return new object[] { Size.Empty, (IntPtr)(-1), IntPtr.Zero }; 4609yield return new object[] { Size.Empty, PARAM.FromLowHigh(0, 0), IntPtr.Zero }; 4610yield return new object[] { Size.Empty, PARAM.FromLowHigh(1, 2), IntPtr.Zero }; 4611yield return new object[] { Size.Empty, PARAM.FromLowHigh(p.X, p.Y), IntPtr.Zero }; 4612yield return new object[] { Size.Empty, PARAM.FromLowHigh(-1, -2), IntPtr.Zero }; 4617public void WebBrowser_WndProc_InvokeContextMenuWithContextMenuStripWithHandle_Success(Size size, IntPtr lParam, IntPtr expectedResult) 4625Assert.NotEqual(IntPtr.Zero, control.Handle);
TextBoxBaseTests.ClipboardTests.cs (3)
69control.Handle.Should().NotBe(IntPtr.Zero); 129control.Handle.Should().NotBe(IntPtr.Zero); 221control.Handle.Should().NotBe(IntPtr.Zero);
TextBoxBaseTests.cs (347)
30Assert.Equal(IntPtr.Zero, createParams.Parent); 56Assert.Equal(IntPtr.Zero, createParams.Parent); 82Assert.Equal(IntPtr.Zero, createParams.Parent); 108Assert.Equal(IntPtr.Zero, createParams.Parent); 137Assert.Equal(IntPtr.Zero, createParams.Parent); 626Assert.NotEqual(IntPtr.Zero, control.Handle); 697Assert.NotEqual(IntPtr.Zero, control.Handle); 714yield return new object[] { IntPtr.Zero, false }; 715yield return new object[] { (IntPtr)1, true }; 720public void TextBoxBase_CanUndo_CustomCanUndo_ReturnsExpected(IntPtr result, bool expected) 726Assert.NotEqual(IntPtr.Zero, control.Handle); 732public IntPtr Result { get; set; } 834Assert.NotEqual(IntPtr.Zero, control.Handle); 968Assert.NotEqual(IntPtr.Zero, control.Handle); 1005Assert.NotEqual(IntPtr.Zero, control.Handle); 1052Assert.NotEqual(IntPtr.Zero, control.Handle); 1091Assert.NotEqual(IntPtr.Zero, control.Handle); 1201Assert.NotEqual(IntPtr.Zero, control.Handle); 1270IntPtr result = PInvokeCore.SendMessage(control, PInvokeCore.EM_GETMARGINS); 1287Assert.NotEqual(IntPtr.Zero, control.Handle); 1288IntPtr result = PInvokeCore.SendMessage(control, PInvokeCore.EM_GETMARGINS); 1303Assert.NotEqual(IntPtr.Zero, control.Handle); 1335Assert.NotEqual(IntPtr.Zero, control.Handle); 1526Assert.NotEqual(IntPtr.Zero, control.Handle); 1659Assert.NotEqual(IntPtr.Zero, control.Handle); 1725Assert.NotEqual(IntPtr.Zero, control.Handle); 1753Assert.NotEqual(IntPtr.Zero, control.Handle); 1781Assert.NotEqual(IntPtr.Zero, control.Handle); 1797Assert.NotEqual(IntPtr.Zero, control.Handle); 1858Assert.NotEqual(IntPtr.Zero, control.Handle); 1897Assert.NotEqual(IntPtr.Zero, control.Handle); 2120Assert.NotEqual(IntPtr.Zero, control.Handle); 2214Assert.NotEqual(IntPtr.Zero, control.Handle); 2299Assert.NotEqual(IntPtr.Zero, control.Handle); 2365Assert.NotEqual(IntPtr.Zero, control.Handle); 2403Assert.NotEqual(IntPtr.Zero, control.Handle); 2542Assert.NotEqual(IntPtr.Zero, control.Handle); 2712Assert.NotEqual(IntPtr.Zero, control.Handle); 2762Assert.NotEqual(IntPtr.Zero, control.Handle); 2870Assert.NotEqual(IntPtr.Zero, control.Handle); 2912Assert.NotEqual(IntPtr.Zero, control.Handle); 2938Assert.NotEqual(IntPtr.Zero, control.Handle); 3047Assert.NotEqual(IntPtr.Zero, control.Handle); 3089Assert.NotEqual(IntPtr.Zero, control.Handle); 3176Assert.NotEqual(IntPtr.Zero, control.Handle); 3332Assert.NotEqual(IntPtr.Zero, control.Handle); 3376Assert.NotEqual(IntPtr.Zero, control.Handle); 3441Assert.NotEqual(IntPtr.Zero, control.Handle); 3516Assert.NotEqual(IntPtr.Zero, control.Handle); 3619Assert.NotEqual(IntPtr.Zero, control.Handle); 3664Assert.NotEqual(IntPtr.Zero, control.Handle); 3826Assert.NotEqual(IntPtr.Zero, control.Handle); 3961Assert.NotEqual(IntPtr.Zero, control.Handle); 3990Assert.NotEqual(IntPtr.Zero, control.Handle); 4043Assert.NotEqual(IntPtr.Zero, control.Handle); 4073Assert.NotEqual(IntPtr.Zero, control.Handle); 4113Assert.NotEqual(IntPtr.Zero, control.Handle); 4143Assert.NotEqual(IntPtr.Zero, control.Handle); 4188Assert.NotEqual(IntPtr.Zero, control.Handle); 4299Assert.NotEqual(IntPtr.Zero, control.Handle); 4321Assert.NotEqual(IntPtr.Zero, control.Handle); 4344Assert.NotEqual(IntPtr.Zero, control.Handle); 4413Assert.NotEqual(IntPtr.Zero, control.Handle); 4435Assert.NotEqual(IntPtr.Zero, control.Handle); 4459Assert.NotEqual(IntPtr.Zero, control.Handle); 4476yield return new object[] { string.Empty, (IntPtr)(-1), 0 }; 4477yield return new object[] { string.Empty, (IntPtr)0, 0 }; 4478yield return new object[] { string.Empty, (IntPtr)1, 0 }; 4479yield return new object[] { string.Empty, (IntPtr)short.MaxValue, 0 }; 4480yield return new object[] { string.Empty, (IntPtr)int.MaxValue, 0 }; 4482yield return new object[] { "text", (IntPtr)(-1), 3 }; 4483yield return new object[] { "text", (IntPtr)0, 0 }; 4484yield return new object[] { "text", (IntPtr)1, 1 }; 4485yield return new object[] { "text", (IntPtr)3, 3 }; 4486yield return new object[] { "text", (IntPtr)4, 3 }; 4488yield return new object[] { "text", (IntPtr)short.MaxValue, 3 }; 4489yield return new object[] { "text", (IntPtr)int.MaxValue, 3 }; 4494public void TextBoxBase_GetCharIndexFromPosition_CustomCharFromPos_Success(string text, IntPtr result, int expected) 4501Assert.NotEqual(IntPtr.Zero, control.Handle); 4507public IntPtr CharFromPosResult { get; set; } 4513Assert.Equal(IntPtr.Zero, m.WParam); 4550Assert.NotEqual(IntPtr.Zero, control.Handle); 4571Assert.NotEqual(IntPtr.Zero, control.Handle); 4588yield return new object[] { (IntPtr)(-1), -1 }; 4589yield return new object[] { IntPtr.Zero, 0 }; 4590yield return new object[] { (IntPtr)1, 1 }; 4591yield return new object[] { (IntPtr)int.MaxValue, 0x7FFFFFFF }; 4598public void TextBoxBase_GetFirstCharIndexFromLine_CustomLineIndex_Success(IntPtr result, int expected) 4605Assert.NotEqual(IntPtr.Zero, control.Handle); 4639Assert.NotEqual(IntPtr.Zero, control.Handle); 4661Assert.NotEqual(IntPtr.Zero, control.Handle); 4678yield return new object[] { (IntPtr)(-1), -1 }; 4679yield return new object[] { IntPtr.Zero, 0 }; 4680yield return new object[] { (IntPtr)1, 1 }; 4681yield return new object[] { (IntPtr)int.MaxValue, 0x7FFFFFFF }; 4688public void TextBoxBase_GetFirstCharIndexOfCurrentLine_CustomLineIndex_Success(IntPtr result, int expected) 4695Assert.NotEqual(IntPtr.Zero, control.Handle); 4701public IntPtr ExpectedWParam { get; set; } 4702public IntPtr LineIndexResult { get; set; } 4709Assert.Equal(IntPtr.Zero, m.LParam); 4797yield return new object[] { (IntPtr)(-1), -1 }; 4798yield return new object[] { IntPtr.Zero, 0 }; 4799yield return new object[] { (IntPtr)1, 1 }; 4800yield return new object[] { (IntPtr)int.MaxValue, 0x7FFFFFFF }; 4807public void TextBoxBase_GetLineFromCharIndex_CustomLineFromChar_Success(IntPtr result, int expected) 4813Assert.NotEqual(IntPtr.Zero, control.Handle); 4819public IntPtr LineFromCharResult { get; set; } 4826Assert.Equal(IntPtr.Zero, m.LParam); 4884Assert.NotEqual(IntPtr.Zero, control.Handle); 4910Assert.NotEqual(IntPtr.Zero, control.Handle); 4937Assert.NotEqual(IntPtr.Zero, control.Handle); 4954yield return new object[] { IntPtr.Zero, Point.Empty }; 4955yield return new object[] { (IntPtr)1, new Point(1, 0) }; 4963public void TextBoxBase_GetPositionFromCharIndex_CustomPosFromChar_Success(IntPtr result, Point expected) 4970Assert.NotEqual(IntPtr.Zero, control.Handle); 4976public IntPtr PosFromCharResult { get; set; } 4983Assert.Equal(IntPtr.Zero, m.LParam); 5264Assert.NotEqual(IntPtr.Zero, control.Handle); 5400Assert.NotEqual(IntPtr.Zero, control.Handle); 5470Assert.NotEqual(IntPtr.Zero, control.Handle); 5637Assert.NotEqual(IntPtr.Zero, control.Handle); 6103Assert.NotEqual(IntPtr.Zero, control.Handle); 6125Assert.NotEqual(IntPtr.Zero, control.Handle); 6142yield return new object[] { IntPtr.Zero }; 6148public void TextBoxBase_ScrollToCaret_InvokeWithHandleCustomGetOleInterfaceTextBox_Success(IntPtr lParam) 6152GetOleInterfaceResult = IntPtr.Zero, 6156Assert.NotEqual(IntPtr.Zero, control.Handle); 6174IntPtr pUnk = Marshal.GetIUnknownForObject(new object()); 6182Assert.NotEqual(IntPtr.Zero, control.Handle); 6188public IntPtr GetOleInterfaceResult { get; set; } 6190public IntPtr GetOleInterfaceLParam { get; set; } 6196IntPtr* pParam = (IntPtr*)m.LParam; 6255Assert.NotEqual(IntPtr.Zero, control.Handle); 6297Assert.NotEqual(IntPtr.Zero, control.Handle); 6362Assert.NotEqual(IntPtr.Zero, control.Handle); 6397Assert.NotEqual(IntPtr.Zero, control.Handle); 6433Assert.NotEqual(IntPtr.Zero, control.Handle); 6887Assert.NotEqual(IntPtr.Zero, control.Handle); 6914Assert.NotEqual(IntPtr.Zero, control.Handle); 6936IntPtr expectedResult = shortcutsEnabled ? IntPtr.Zero : 250; 6937yield return new object[] { new Size(10, 20), shortcutsEnabled, (IntPtr)(-1), expectedResult }; 6942yield return new object[] { Size.Empty, shortcutsEnabled, (IntPtr)(-1), expectedResult }; 6951public void TextBoxBase_WndProc_InvokeContextMenuWithoutContextMenuStripWithoutHandle_Success(Size size, bool shortcutsEnabled, IntPtr lParam, IntPtr expectedResult) 6979IntPtr expectedResult = shortcutsEnabled ? IntPtr.Zero : 250; 6981yield return new object[] { new Size(10, 20), shortcutsEnabled, (IntPtr)(-1), (IntPtr)250, true, true }; 6984yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true, true }; 6987yield return new object[] { Size.Empty, shortcutsEnabled, (IntPtr)(-1), expectedResult, false, false }; 6997public void TextBoxBase_WndProc_InvokeContextMenuWithContextMenuStripWithoutHandle_Success(Size size, bool shortcutsEnabled, IntPtr lParam, IntPtr expectedResult, bool expectedHasSourceControl, bool expectedHandleCreated) 7024public void TextBoxBase_WndProc_InvokeContextMenuWithoutContextMenuStripWithHandle_Success(Size size, bool shortcutsEnabled, IntPtr lParam, IntPtr expectedResult) 7031Assert.NotEqual(IntPtr.Zero, control.Handle); 7060IntPtr expectedResult = shortcutsEnabled ? IntPtr.Zero : 250; 7062yield return new object[] { new Size(10, 20), shortcutsEnabled, (IntPtr)(-1), (IntPtr)250, true }; 7065yield return new object[] { new Size(10, 20), shortcutsEnabled, PARAM.FromLowHigh(p.X, p.Y), (IntPtr)250, true }; 7068yield return new object[] { Size.Empty, shortcutsEnabled, (IntPtr)(-1), expectedResult, false }; 7078public void TextBoxBase_WndProc_InvokeContextMenuWithContextMenuStripWithHandle_Success(Size size, bool shortcutsEnabled, IntPtr lParam, IntPtr expectedResult, bool expectedHasSourceControl) 7087Assert.NotEqual(IntPtr.Zero, control.Handle); 7113yield return new object[] { true, (IntPtr)2 }; 7114yield return new object[] { false, IntPtr.Zero }; 7119public void TextBoxBase_WndProc_InvokeGetDlgCodeWithoutHandle_ReturnsExpected(bool acceptsTabs, IntPtr expectedResult) 7140public void TextBoxBase_WndProc_InvokeGetDlgCodeWithHandle_ReturnsExpected(bool acceptsTabs, IntPtr expectedResult) 7146Assert.NotEqual(IntPtr.Zero, control.Handle); 7169yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 0, 0 }; 7170yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, 1, 2 }; 7171yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 1, -1, -2 }; 7172yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 0, 0 }; 7173yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, 1, 2 }; 7174yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 1, -1, -2 }; 7176yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, 0, 0 }; 7177yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, 1, 2 }; 7178yield return new object[] { true, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Left, 2, -1, -2 }; 7179yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, 0, 0 }; 7180yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, 1, 2 }; 7181yield return new object[] { false, (int)PInvokeCore.WM_LBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Left, 2, -1, -2 }; 7183yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 0, 0 }; 7184yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, 1, 2 }; 7185yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 1, -1, -2 }; 7186yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 0, 0 }; 7187yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, 1, 2 }; 7188yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 1, -1, -2 }; 7190yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 2, 0, 0 }; 7191yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 2, 1, 2 }; 7192yield return new object[] { true, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Middle, 2, -1, -2 }; 7193yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 2, 0, 0 }; 7194yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 2, 1, 2 }; 7195yield return new object[] { false, (int)PInvokeCore.WM_MBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Middle, 2, -1, -2 }; 7197yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 0, 0 }; 7198yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, 1, 2 }; 7199yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 1, -1, -2 }; 7200yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 0, 0 }; 7201yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, 1, 2 }; 7202yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 1, -1, -2 }; 7204yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, 0, 0 }; 7205yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, 1, 2 }; 7206yield return new object[] { true, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.Right, 2, -1, -2 }; 7207yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, 0, 0 }; 7208yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, 1, 2 }; 7209yield return new object[] { false, (int)PInvokeCore.WM_RBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.Right, 2, -1, -2 }; 7211yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 0, 0 }; 7212yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, 1, 2 }; 7213yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 1, -1, -2 }; 7214yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 0, 0 }; 7215yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, 1, 2 }; 7216yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 1, -1, -2 }; 7218yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 0, 0 }; 7219yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, 1, 2 }; 7220yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 1, -1, -2 }; 7221yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 0, 0 }; 7222yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, 1, 2 }; 7223yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 1, -1, -2 }; 7225yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 0, 0 }; 7226yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, 1, 2 }; 7227yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 1, -1, -2 }; 7228yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, IntPtr.Zero, PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 0, 0 }; 7229yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, 1, 2 }; 7230yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDOWN, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 1, -1, -2 }; 7232yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, (IntPtr)250, MouseButtons.None, 2, 0, 0 }; 7233yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 2, 1, 2 }; 7234yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, (IntPtr)250, MouseButtons.None, 2, -1, -2 }; 7235yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 2, 0, 0 }; 7236yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 2, 1, 2 }; 7237yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), IntPtr.Zero, IntPtr.Zero, MouseButtons.None, 2, -1, -2 }; 7239yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 2, 0, 0 }; 7240yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 2, 1, 2 }; 7241yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), (IntPtr)250, MouseButtons.XButton1, 2, -1, -2 }; 7242yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 2, 0, 0 }; 7243yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 2, 1, 2 }; 7244yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(2, 1), IntPtr.Zero, MouseButtons.XButton1, 2, -1, -2 }; 7246yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 2, 0, 0 }; 7247yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 2, 1, 2 }; 7248yield return new object[] { true, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), (IntPtr)250, MouseButtons.XButton2, 2, -1, -2 }; 7249yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, IntPtr.Zero, PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 2, 0, 0 }; 7250yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(1, 2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 2, 1, 2 }; 7251yield return new object[] { false, (int)PInvokeCore.WM_XBUTTONDBLCLK, PARAM.FromLowHigh(-1, -2), PARAM.FromLowHigh(1, 2), IntPtr.Zero, MouseButtons.XButton2, 2, -1, -2 }; 7256public void TextBoxBase_WndProc_InvokeMouseDownWithoutHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 7291public void TextBoxBase_WndProc_InvokeMouseDownWithoutHandleNotSelectable_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 7350Assert.Equal(IntPtr.Zero, m.Result); 7360public void TextBoxBase_WndProc_InvokeMouseDownWithHandle_Success(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 7364Assert.NotEqual(IntPtr.Zero, control.Handle); 7403public void TextBoxBase_WndProc_InvokeMouseDownWithHandleNotSelectable_DoesNotCallMouseDown(bool userMouse, int msg, IntPtr lParam, IntPtr wParam, IntPtr expectedResult, MouseButtons expectedButton, int expectedClicks, int expectedX, int expectedY) 7408Assert.NotEqual(IntPtr.Zero, control.Handle); 7460Assert.NotEqual(IntPtr.Zero, control.Handle); 7476Assert.Equal(IntPtr.Zero, m.Result); 7490Assert.NotEqual(IntPtr.Zero, control.Handle); 7511Assert.Equal(IntPtr.Zero, m.Result); 7521foreach (IntPtr lParam in new IntPtr[] { IntPtr.Zero, 1 }) 7523yield return new object[] { IntPtr.Zero, lParam, 0 }; 7535public void TextBoxBase_WndProc_InvokeReflectCommandWithoutHandle_Success(IntPtr wParam, IntPtr lParam, int expectedTextChangedCallCount) 7564public void TextBoxBase_WndProc_InvokeReflectCommandWithHandle_Success(IntPtr wParam, IntPtr lParam, int expectedTextChangedCallCount) 7567Assert.NotEqual(IntPtr.Zero, control.Handle); 7622Assert.Equal(IntPtr.Zero, m.Result); 7642Assert.NotEqual(IntPtr.Zero, control.Handle); 7664Assert.Equal(IntPtr.Zero, m.Result); 7666IntPtr result = PInvokeCore.SendMessage(control, PInvokeCore.EM_GETMARGINS);
TextBoxTests.cs (7)
138Assert.Equal(IntPtr.Zero, createParams.Parent); 164Assert.NotEqual(IntPtr.Zero, control.Handle); 202Assert.NotEqual(IntPtr.Zero, control.Handle); 240Assert.NotEqual(IntPtr.Zero, control.Handle); 313Assert.NotEqual(IntPtr.Zero, control.Handle); 565Assert.NotEqual(IntPtr.Zero, control.Handle); 635Assert.NotEqual(IntPtr.Zero, control.Handle);
TextBoxTests.Rendering.cs (2)
28Assert.NotEqual(IntPtr.Zero, form.Handle); 29Assert.NotEqual(IntPtr.Zero, textBox.Handle);
TrackBarTests.cs (44)
125Assert.Equal(IntPtr.Zero, createParams.Parent); 153Assert.Equal(IntPtr.Zero, createParams.Parent); 179Assert.Equal(IntPtr.Zero, createParams.Parent); 210Assert.Equal(IntPtr.Zero, createParams.Parent); 298Assert.NotEqual(IntPtr.Zero, control.Handle); 352Assert.NotEqual(IntPtr.Zero, control.Handle); 588Assert.NotEqual(IntPtr.Zero, control.Handle); 715Assert.NotEqual(IntPtr.Zero, control.Handle); 781Assert.NotEqual(IntPtr.Zero, control.Handle); 792Assert.NotEqual(IntPtr.Zero, control.Handle); 811Assert.NotEqual(IntPtr.Zero, control.Handle); 823Assert.NotEqual(IntPtr.Zero, control.Handle); 834Assert.NotEqual(IntPtr.Zero, control.Handle); 845Assert.NotEqual(IntPtr.Zero, control.Handle); 866Assert.NotEqual(IntPtr.Zero, control.Handle); 910Assert.NotEqual(IntPtr.Zero, control.Handle); 1005Assert.NotEqual(IntPtr.Zero, control.Handle); 1075Assert.NotEqual(IntPtr.Zero, control.Handle); 1138Assert.NotEqual(IntPtr.Zero, control.Handle); 1214Assert.NotEqual(IntPtr.Zero, control.Handle); 1276Assert.NotEqual(IntPtr.Zero, control.Handle); 1381Assert.NotEqual(IntPtr.Zero, control.Handle); 1428Assert.NotEqual(IntPtr.Zero, control.Handle); 1488Assert.NotEqual(IntPtr.Zero, control.Handle); 1602Assert.NotEqual(IntPtr.Zero, control.Handle); 1690Assert.NotEqual(IntPtr.Zero, control.Handle); 1739Assert.NotEqual(IntPtr.Zero, control.Handle); 1795Assert.NotEqual(IntPtr.Zero, control.Handle); 1884Assert.NotEqual(IntPtr.Zero, control.Handle); 1933Assert.NotEqual(IntPtr.Zero, control.Handle); 2120Assert.NotEqual(IntPtr.Zero, control.Handle); 2216Assert.NotEqual(IntPtr.Zero, control.Handle); 2356Assert.NotEqual(IntPtr.Zero, control.Handle); 2470Assert.NotEqual(IntPtr.Zero, control.Handle); 2662Assert.NotEqual(IntPtr.Zero, control.Handle); 2703Assert.NotEqual(IntPtr.Zero, control.Handle); 2778Assert.NotEqual(IntPtr.Zero, control.Handle); 3089Assert.NotEqual(IntPtr.Zero, control.Handle); 3121Assert.NotEqual(IntPtr.Zero, control.Handle); 3142Assert.Equal(IntPtr.Zero, m.Result); 3152yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_HSCROLL, IntPtr.Zero }; 3165yield return new object[] { MessageId.WM_REFLECT | PInvokeCore.WM_VSCROLL, IntPtr.Zero }; 3181public void TrackBar_WndProc_InvokeScrollWithHandle_Success(int msg, IntPtr wParam) 3187Assert.NotEqual(IntPtr.Zero, control.Handle);
WebBrowserBaseTests.cs (2)
184Assert.NotEqual(IntPtr.Zero, control.Handle); 688Assert.NotEqual(IntPtr.Zero, control.Handle);
System.Xaml (2)
System\Xaml\Schema\XamlTypeInvoker.cs (2)
259typeof(Action<object>).GetConstructor(new Type[] { typeof(object), typeof(IntPtr) }); 327IntPtr constPtr = tConstInfo.MethodHandle.GetFunctionPointer();
TlsFeaturesObserve (7)
HttpSys\HttpSysConfigurator.cs (4)
30var pIpPort = sockAddrHandle.AddrOfPinnedObject(); 54var pInputConfigInfo = Marshal.AllocCoTaskMem( 103var retVal = HttpInitialize(HttpApiVersion, flags, IntPtr.Zero); 113IntPtr pReserved);
HttpSys\Native.cs (3)
44public IntPtr pIpPort; 46public HTTP_SERVICE_CONFIG_SSL_KEY(IntPtr pIpPort) 56public IntPtr pSslHash;
UIAutomationClient (259)
MS\Internal\Automation\Accessible.cs (9)
23internal static Accessible Create( IntPtr hwnd, int idObject, int idChild ) 53internal IntPtr Window 57if (_hwnd == IntPtr.Zero) 63_hwnd = IntPtr.Zero; 71_hwnd = IntPtr.Zero; 80internal static bool CompareClass(IntPtr hwnd, string szClass) 85internal static bool IsComboDropdown(IntPtr hwnd) 90internal static bool IsStatic(IntPtr hwnd) 108private IntPtr _hwnd;
MS\Internal\Automation\BoundingRectTracker.cs (6)
42internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 45if ( hwnd == IntPtr.Zero || idObject != UnsafeNativeMethods.OBJID_WINDOW ) 66private void OnHide(IntPtr hwnd, int idObject, int idChild) 73private void OnLocationChange(IntPtr hwnd, int idObject, int idChild) 82private void HandleBoundingRectChange(IntPtr hwnd) 149private IntPtr _lastHwnd; // and hwnd for dup checking
MS\Internal\Automation\ClickablePoint.cs (1)
33if (SafeNativeMethods.MonitorFromRect( ref winRect, SafeNativeMethods.MONITOR_DEFAULTTONULL ) == IntPtr.Zero)
MS\Internal\Automation\ClientEventManager.cs (2)
546private static void OnWindowHideOrClose( IntPtr hwnd, AutomationElement rawEl, int [] runtimeId ) 609private static void OnWindowShowOrOpen( IntPtr hwnd, AutomationElement rawEl )
MS\Internal\Automation\EventListenerClientSide.cs (1)
59internal void OnEvent(IntPtr argsAddr, object[,] requestedData, string treeStructure)
MS\Internal\Automation\FocusTracker.cs (19)
45internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 47if (hwnd != IntPtr.Zero) 77private void HandleFocusChange(IntPtr hwnd, Accessible acc, int idObject, int idChild, uint eventTime) 80if (hwnd != IntPtr.Zero) 119private AutomationElement GetFocusedElementFromWinEvent(IntPtr hwnd, int idObject, int idChild) 199private void OnEventObjectFocus(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 220private void OnEventSystemMenuStart(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 227private void OnEventSystemMenuEnd(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 242private void OnEventObjectDestroy(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 252IntPtr hwndCur = _accCurrent.Window; 253if (hwndCur == IntPtr.Zero || !SafeNativeMethods.IsWindow(NativeMethods.HWND.Cast(hwndCur))) 269HandleFocusChange(IntPtr.Zero, null, 0, 0, eventTime); 275private void OnEventSystemMenuPopupStart(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 285private void OnEventSystemCaptureStart(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 293IntPtr i = Misc.SendMessageTimeout(NativeMethods.HWND.Cast(hwnd), UnsafeNativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 308private void OnEventSystemCaptureEnd(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 353private IntPtr _hwndLastBeforeMenu; // the last hwnd before a menu got focus
MS\Internal\Automation\HwndProxyElementProvider.cs (40)
116IntPtr len = Misc.SendMessageTimeout( _hwnd, UnsafeNativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero ); 126if (Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETTEXT, new IntPtr(ilen + 1), str) == IntPtr.Zero) 154return ((IntPtr) _hwnd).ToInt32(); 344if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_MINIMIZE, IntPtr.Zero)) 365if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_MAXIMIZE, IntPtr.Zero)) 387if (!Misc.PostMessage(_hwnd, UnsafeNativeMethods.WM_SYSCOMMAND, (IntPtr)UnsafeNativeMethods.SC_CLOSE, IntPtr.Zero)) 571IntPtr dwResult; 572IntPtr ret = UnsafeNativeMethods.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_NULL, IntPtr.Zero, IntPtr.Zero, UnsafeNativeMethods.SMTO_ABORTIFHUNG, 0, out dwResult); 573if ( ret == IntPtr.Zero ) 794Misc.SendMessageTimeout(_hwnd, UnsafeNativeMethods.WM_GETMINMAXINFO, IntPtr.Zero, ref minMaxInfo); 860IntPtr hmenu = GetSystemMenuHandle(); 861if (hmenu != IntPtr.Zero) 905IntPtr hmenu = GetSystemMenuHandle(); 906if (hmenu != IntPtr.Zero) 990private IntPtr GetSystemMenuHandle() 994if (GetMenuBarInfo(_hwnd, UnsafeNativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero) 999return IntPtr.Zero; 1448IntPtr visibilityOverride = UnsafeNativeMethods.GetProp(hwnd, "UIA_WindowVisibilityOverridden"); 1638private bool IsMenuItemSelectable(IntPtr hmenu, int item) 1703private static IntPtr MAKELPARAM( int low, int high ) 1705return (IntPtr)((high << 16) | (low & 0xffff)); 1719IntPtr hrgn = Misc.CreateRectRgn(0, 0, 0, 0); // NOTE: Must be deleted before returning 1720if (hrgn == IntPtr.Zero) 1778IntPtr hwndCompare = UnsafeNativeMethods.WindowFromPhysicalPoint(x1, y1); 1785if (hwndCompare != (IntPtr)hwnd) 1816IntPtr lr = Misc.SendMessageTimeout( hChild, UnsafeNativeMethods.WM_NCHITTEST, IntPtr.Zero, MAKELPARAM( (int)x, (int)y ) ); 1993if (parent == IntPtr.Zero) 1997IntPtr lresult = Misc.SendMessageTimeout(parent, UnsafeNativeMethods.WM_MDIACTIVATE, (IntPtr)hwnd, IntPtr.Zero); 1998return lresult == IntPtr.Zero; 2070&& msg.wParam == (IntPtr) atom)
MS\Internal\Automation\MenuTracker.cs (2)
43internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 56if( hwnd == IntPtr.Zero )
MS\Internal\Automation\Misc.cs (34)
260private static int IntPtrToInt32(IntPtr intPtr) 269internal static IntPtr CreateRectRgn(int left, int top, int right, int bottom) 271IntPtr result = SafeNativeMethods.CreateRectRgn(left, top, right, bottom); 274if (result == IntPtr.Zero) 282internal static bool CloseHandle(IntPtr handle) 295internal static bool DeleteObject(IntPtr hrgn) 356internal static int GetModuleFileNameEx(MS.Internal.Automation.SafeProcessHandle hProcess, IntPtr hModule, StringBuilder buffer, int length) 398IntPtr result = IntPtr.Zero; 401if (IntPtr.Size == 4) 416if ((result == IntPtr.Zero) && (error != 0)) 484IntPtr[] handles = { handle.DangerousGetHandle() }; 510internal static IntPtr OpenProcess(int dwDesiredAccess, bool fInherit, int dwProcessId, NativeMethods.HWND hwnd) 512IntPtr processHandle = UnsafeNativeMethods.OpenProcess(dwDesiredAccess, fInherit, dwProcessId); 517if (processHandle == IntPtr.Zero 532if (processHandle == IntPtr.Zero) 540internal static bool PostMessage(NativeMethods.HWND hWnd, int nMsg, IntPtr wParam, IntPtr lParam) 579internal static IntPtr SendMessageTimeout(NativeMethods.HWND hwnd, int Msg, IntPtr wParam, IntPtr lParam) 584IntPtr lresult; 585IntPtr smtoRetVal = UnsafeNativeMethods.SendMessageTimeout(hwnd, Msg, wParam, lParam, 0, 10000, out lresult); 588if (smtoRetVal == IntPtr.Zero) 596internal static IntPtr SendMessageTimeout(NativeMethods.HWND hwnd, int Msg, IntPtr wParam, ref UnsafeNativeMethods.MINMAXINFO lParam) 601IntPtr lresult; 602IntPtr smtoRetVal = UnsafeNativeMethods.SendMessageTimeout(hwnd, Msg, wParam, ref lParam, 0, 10000, out lresult); 605if (smtoRetVal == IntPtr.Zero) 613internal static IntPtr SendMessageTimeout(NativeMethods.HWND hwnd, int Msg, IntPtr wParam, StringBuilder lParam) 618IntPtr lresult; 619IntPtr smtoRetVal = UnsafeNativeMethods.SendMessageTimeout(hwnd, Msg, wParam, lParam, 0, 10000, out lresult); 622if (smtoRetVal == IntPtr.Zero)
MS\Internal\Automation\ProxyManager.cs (6)
197internal static IRawElementProviderSimple GetNonClientProvider( IntPtr hwnd ) 207internal static IRawElementProviderSimple GetUser32FocusedMenuProvider( IntPtr hwnd ) 311if (Misc.GetModuleFileNameEx(processHandle, (IntPtr)instance, sb, NativeMethods.MAX_PATH) == 0) 791IntPtr result = Misc.SendMessageTimeout(hwnd, UnsafeNativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX);
MS\Internal\Automation\SafeHandles.cs (6)
20: base(IntPtr.Zero, true) 28get { return handle == IntPtr.Zero; } 44: base(IntPtr.Zero, true) 51get { return handle == IntPtr.Zero; } 65: base(IntPtr.Zero, true) 71get { return handle == IntPtr.Zero; }
MS\Internal\Automation\UiaCoreApi.cs (42)
73public IntPtr _conditions; // ptr to array-of-ptrs to conditions 76internal UiaAndOrCondition(ConditionType conditionType, IntPtr conditions, int conditionCount) 88public IntPtr _condition; 90internal UiaNotCondition(IntPtr condition) 111internal IntPtr _pProperties; 113internal IntPtr _pPatterns; 139IntPtr dataStart = Marshal.AllocCoTaskMem((properties.Length + patterns.Length) * sizeof(int)); 143_pProperties = (IntPtr)pdata; 150_pPatterns = (IntPtr)pdata; 161if (_pProperties != IntPtr.Zero) 265private IntPtr _pCondition; 267private IntPtr _pProperties; 269private IntPtr _pPatterns; 274internal UiaMiniCacheRequest(UiaCacheRequest cr, IntPtr conditionPtr) 302internal IntPtr pFindCondition; 326internal delegate void UiaEventCallback(IntPtr args, 478internal static SafeNodeHandle UiaNodeFromHandle(IntPtr hwnd) 557internal static extern bool UiaHasServerSideProvider(IntPtr hwnd); 559internal static bool UiaNodeRelease(IntPtr hnode) 564internal static bool UiaPatternRelease(IntPtr hobj) 569internal static bool UiaTextRangeRelease(IntPtr hobj) 592internal static void UiaRemoveEvent(IntPtr hevent) 597internal static void UiaEventAddWindow(SafeEventHandle hevent, IntPtr hwnd) 602internal static void UiaEventRemoveWindow(SafeEventHandle hevent, IntPtr hwnd) 617private static int[] ArrayFromIntPtr(IntPtr pInts, int cInts) 619if (pInts == IntPtr.Zero) 636internal static AutomationEventArgs GetUiaEventArgs(IntPtr argsAddr) 1139IntPtr errorInfoAsIntPtr = Marshal.GetIUnknownForObject(errorInfo); 1163private static extern int SetErrorInfo(int dwReserved, IntPtr errorInfo); 1234private static extern int RawUiaNodeFromHandle(IntPtr hwnd, out SafeNodeHandle hnode); 1261private static extern bool RawUiaNodeRelease(IntPtr hnode); 1264private static extern bool RawUiaPatternRelease(IntPtr hobj); 1267private static extern bool RawUiaTextRangeRelease(IntPtr hobj); 1274private static extern int RawUiaRemoveEvent(IntPtr hevent); 1277private static extern int RawUiaEventAddWindow(SafeEventHandle hevent, IntPtr hwnd); 1280private static extern int RawUiaEventRemoveWindow(SafeEventHandle hevent, IntPtr hwnd); 1491internal IntPtr _pRuntimeId; 1509internal IntPtr _pRuntimeId; 1520internal IntPtr _displayString; 1521internal IntPtr _activityId; 1550private delegate IRawElementProviderSimple[] UiaProviderCallback(IntPtr hwnd, ProviderType providerType); 1565IRawElementProviderSimple [] OnGetProvider(IntPtr hwnd, ProviderType providerType)
MS\Internal\Automation\WindowHideOrCloseTracker.cs (3)
16internal delegate void WindowHideOrCloseHandler( IntPtr hwnd, AutomationElement rawEl, int[] runtimeId ); 48internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 55if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WindowInteractionStateTracker.cs (4)
43internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 52if (hwnd == IntPtr.Zero) 71private void OnStateChange(IntPtr hwnd, int idObject, int idChild) 133private IntPtr _lastHwnd; // and hwnd for dup checking
MS\Internal\Automation\WindowShowOrOpenTracker.cs (3)
16internal delegate void WindowShowOrOpenHandler( IntPtr hwnd, AutomationElement rawEl ); 48internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 55if (hwnd == IntPtr.Zero)
MS\Internal\Automation\WindowVisualStateTracker.cs (4)
43internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 52if (hwnd == IntPtr.Zero) 71private void OnStateChange(IntPtr hwnd, int idObject, int idChild) 128private IntPtr _lastHwnd; // and hwnd for dup checking
MS\Internal\Automation\WinEventWrap.cs (11)
34_hHooks = new IntPtr[_eventIds.Length]; 54internal virtual void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 109_hHooks[i] = UnsafeNativeMethods.SetWinEventHook(eventId, eventId, IntPtr.Zero, _winEventProc, 0, 0, _fFlags); 110if (_hHooks[i] == IntPtr.Zero) 129if (_hHooks[i] != IntPtr.Zero) 134_hHooks[i] = IntPtr.Zero; 174private void WinEventReentrancyFilter(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime) 214private void PreWinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 260internal WinEvent(int eventId, IntPtr hwnd, int idObject, int idChild, uint eventTime) 269public IntPtr _hwnd; 277private IntPtr [] _hHooks; // the returned handles(s) from SetWinEventHook
MS\Win32\NativeMethods.cs (5)
33public IntPtr h; 35public static HWND Cast(IntPtr h) 44public static implicit operator IntPtr(HWND h) 55h = IntPtr.Zero 153public delegate void WinEventProcDef(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime);
MS\Win32\SafeNativeMethods.cs (7)
126public static extern bool EnumThreadWindows(int dwThreadId, EnumThreadWndProc enumThreadWndProc, IntPtr lParam); 177internal static extern IntPtr CreateRectRgn(int left, int top, int right, int bottom); 180internal static extern int GetWindowRgn(IntPtr hwnd, IntPtr hrgn); 183internal static extern bool PtInRegion(IntPtr hrgn, int x, int y); 199public static extern int GetModuleFileNameEx(MS.Internal.Automation.SafeProcessHandle hProcess, IntPtr hModule, StringBuilder buffer, int length); 207public static extern IntPtr MonitorFromRect( ref NativeMethods.RECT rect, int dwFlags );
MS\Win32\UnsafeNativeMethods.cs (38)
17public static readonly IntPtr INVALID_HANDLE_VALUE = new IntPtr(-1); 25public static extern bool CloseHandle(IntPtr handle); 37public static extern IntPtr OpenProcess( int dwDesiredAccess, bool fInherit, int dwProcessId ); 76public IntPtr dwExtraInfo; 86public IntPtr dwExtraInfo; 136IntPtr hwnd, 143public static extern int WindowFromAccessibleObject ( IAccessible acc, ref IntPtr hwnd ); 146internal static extern IntPtr GetProcessHandleFromHwnd(IntPtr hwnd); 149internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags); 152internal static extern bool UnhookWinEvent(IntPtr winEventHook); 167private static extern IntPtr IntWindowFromPoint(POINT pt); 170private static extern IntPtr IntWindowFromPhysicalPoint(POINT pt); 172public static IntPtr WindowFromPhysicalPoint(int x, int y) 188public static extern IntPtr SendMessageTimeout( 189NativeMethods.HWND hwnd, int Msg, IntPtr wParam, IntPtr lParam, int flags, int uTimeout, out IntPtr pResult ); 192public static extern IntPtr SendMessageTimeout( 193NativeMethods.HWND hwnd, int Msg, IntPtr wParam, ref MINMAXINFO lParam, int flags, int uTimeout, out IntPtr pResult ); 198public static extern IntPtr SendMessageTimeout( 199NativeMethods.HWND hwnd, int Msg, IntPtr wParam, StringBuilder lParam, int flags, int uTimeout, out IntPtr pResult); 209public IntPtr wParam; 210public IntPtr lParam; 230public static extern IntPtr DispatchMessage( 235NativeMethods.HWND hWnd, int nMsg, IntPtr wParam, IntPtr lParam); 262public static readonly IntPtr HTTRANSPARENT = new IntPtr(-1); 263public static readonly IntPtr HTCLIENT = new IntPtr(1); 301public static extern int MsgWaitForMultipleObjects(int nCount, IntPtr[] handles, bool fWaitAll, int dwMilliseconds, int dwWakeMask); 339internal static extern int GetMenuState(IntPtr hMenu, int uId, int uFlags); 352internal IntPtr hMenu; 361internal static extern bool DeleteObject(IntPtr hrgn); 368internal static extern IntPtr GetProp(IntPtr hwnd, string name);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (4)
41public static extern Int32 GetWindowLong(IntPtr hWnd, int nIndex ); 44public static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex ); 52public static extern bool GetMenuBarInfo (IntPtr hwnd, int idObject, uint idItem, ref UnsafeNativeMethods.MENUBARINFO mbi);
System\Windows\Automation\AutomationElement.cs (2)
422public static AutomationElement FromHandle(IntPtr hwnd) 424Misc.ValidateArgument(hwnd != IntPtr.Zero, nameof(SR.HwndMustBeNonNULL));
System\Windows\Automation\ClientSideProviderDescription.cs (1)
45public delegate IRawElementProviderSimple ClientSideProviderFactoryCallback(IntPtr hwnd, int idChild, int idObject);
System\Windows\Automation\Condition.cs (7)
15: base(IntPtr.Zero, true) 23get { return handle == IntPtr.Zero; } 43IntPtr mem = Marshal.AllocCoTaskMem(size); 60IntPtr mem = Marshal.AllocCoTaskMem(conditions.Length * IntPtr.Size); 66IntPtr* pdata = (IntPtr*)sh.handle;
System\Windows\Automation\Text\TextRange.cs (2)
22: base(IntPtr.Zero, true) 29get { return handle == IntPtr.Zero; }
UIAutomationClientSideProviders (1831)
MS\Internal\AutomationProxies\Accessible.cs (13)
153internal static Accessible CreateNativeFromEvent(IntPtr hwnd, int idObject, int idChild) 157IntPtr wParam = IntPtr.Zero; 162IntPtr lResult = Misc.ProxySendMessage(hwnd, NativeMethods.WM_GETOBJECT, wParam, new IntPtr(idObject)); 163if (lResult == IntPtr.Zero) 438internal bool InSameHwnd(IntPtr hwnd) 440bool inSameHwnd = Window != IntPtr.Zero && Window == hwnd; 832internal IntPtr Window 836if (_hwnd == IntPtr.Zero) 843_hwnd = IntPtr.Zero; 855_hwnd = IntPtr.Zero; 865internal static int AccessibleObjectFromWindow(IntPtr hwnd, int idObject, ref Accessible acc) 1480private IntPtr _hwnd;
MS\Internal\AutomationProxies\ClickablePoint.cs (14)
20_hwndProgman = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Progman", null); 21if (_hwndProgman == IntPtr.Zero) 53internal static bool GetPoint(IntPtr hwnd, List<CPRect> listIn, List<CPRect> listOut, ref NativeMethods.Win32Point pt) 55IntPtr hwndStart = hwnd; 56IntPtr hwndCurrent = hwnd; 60for (hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); hwnd != IntPtr.Zero; hwnd = Misc.GetWindow(hwnd, NativeMethods.GW_HWNDNEXT)) 75if (hwnd == IntPtr.Zero) 94if (hwnd == IntPtr.Zero) 104IntPtr hwndClip = hwnd == _hwndDesktop ? _hwndProgman : hwnd; 231private static bool ClickableInRect(IntPtr hwnd, ref NativeMethods.Win32Point pt, bool fRiAsInsideRect, List<CPRect> listIn, List<CPRect> listOut) 259int lr = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 464private static readonly IntPtr _hwndDesktop; 469private static readonly IntPtr _hwndProgman;
MS\Internal\AutomationProxies\CommonGetThemePartSize.cs (10)
20internal ThemePart (IntPtr hwnd, string sClass) 28_hTheme = new SafeThemeHandle(IntPtr.Zero, false); 58fSuccess = GetThemePartSize(_hTheme, IntPtr.Zero, iPartId, iStateId, IntPtr.Zero, (int)THEMESIZE.TS_TRUE, &size) == IntPtr.Zero; 201private static extern unsafe IntPtr GetThemePartSize(SafeThemeHandle hTheme, IntPtr hdc, int iPartId, int iStateId, IntPtr prc, int eSize, NativeMethods.SIZE* psz); 204private static extern IntPtr OpenThemeData(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)]string s);
MS\Internal\AutomationProxies\CommonRemoteMemoryBlock.cs (14)
42SetHandle(Misc.VirtualAllocEx(_processHandle, IntPtr.Zero, new UIntPtr((uint)cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE)); 67internal IntPtr Address 75internal void WriteTo(IntPtr sourceAddress, IntPtr cbSize) 77IntPtr count; 81internal void ReadFrom(IntPtr remoteAddress, IntPtr destAddress, IntPtr cbSize) 83IntPtr count; 87internal void ReadFrom(SafeCoTaskMem destAddress, IntPtr cbSize) 89IntPtr count; 92internal void ReadFrom(IntPtr destAddress, IntPtr cbSize) 94IntPtr count;
MS\Internal\AutomationProxies\CommonXSendMessage.cs (133)
39internal static string GetTextWithinStructure(IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr lParam, int cbSize, IntPtr pszText, int maxLength) 45internal static unsafe string GetTextWithinStructure(IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr lParam, int cbSize, IntPtr pszText, int maxLength, bool ignoreSendResult) 66IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr lParam, int cbSize, 67IntPtr pszText, int maxLength, ProcessorTypes remoteBitness, bool ignoreSendResult) 88IntPtr remoteTextArea = new IntPtr((byte*)rmem.Address.ToPointer() + cbSize); 99*(IntPtr*)((byte*)pszText.ToPointer()) = remoteTextArea; 106IntPtr result = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 109if (!ignoreSendResult && result == IntPtr.Zero) 137internal static void GetProcessTypes(IntPtr hwnd, out ProcessorTypes localBitness, out ProcessorTypes remoteBitness) 139if (IsWOW64Process(IntPtr.Zero)) 154if (IntPtr.Size == sizeof(int)) 177internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr wParam, ref string str, int maxLength) 195if (Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address) == IntPtr.Zero) 207internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr ptrStructure, int cbSize) 214internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr ptrStructure, int cbSize, ErrorValue errorCode) 236IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, wParam, rmem.Address); 239if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 254internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr ptrStructure, int lParam, int cbSize) 261internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr ptrStructure, int lParam, int cbSize, ErrorValue errorCode) 283IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem.Address, new IntPtr(lParam)); 286if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 301internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr ptrStructure1, IntPtr ptrStructure2, int cbSize1, int cbSize2) 308internal static bool XSend (IntPtr hwnd, int uMsg, IntPtr ptrStructure1, IntPtr ptrStructure2, int cbSize1, int cbSize2, ErrorValue errorCode) 339IntPtr res = Misc.ProxySendMessage(hwnd, uMsg, rmem1.Address, rmem2.Address); 342if ((errorCode != ErrorValue.NoCheck) && ((errorCode == ErrorValue.Zero && res == IntPtr.Zero) || (errorCode == ErrorValue.NotZero && res != IntPtr.Zero))) 359internal static int XSendGetIndex(IntPtr hwnd, int uMsg, IntPtr wParam, IntPtr ptrStructure, int cbSize) 400internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVITEM item) 408return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 414return GetTextWithinStructureRemoteBitness(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, 423return GetTextWithinStructure(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 429internal static unsafe bool SetItem(IntPtr hwnd, int index, NativeMethods.LVITEM item) 455internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.LVITEM_V6 item) 465return XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType()), XSendMessage.ErrorValue.NoCheck); 472bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType()), XSendMessage.ErrorValue.NoCheck); 484bool result = XSend(hwnd, NativeMethods.LVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), XSendMessage.ErrorValue.NoCheck); 496internal static unsafe bool SetGroupInfo(IntPtr hwnd, NativeMethods.LVGROUP group) 526internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP group) 571internal static unsafe bool GetGroupInfo(IntPtr hwnd, ref NativeMethods.LVGROUP_V6 group) 616internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP item) 660internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.LVGROUP_V6 item, int mask) 667IntPtr textAddress = IntPtr.Zero; 741internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TCITEM item) 784internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.TCITEM item) 823internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.HDITEM item) 866internal static unsafe string GetItemText(IntPtr hwnd, int index, NativeMethods.HDITEM item) 905internal static unsafe bool GetItem(IntPtr hwnd, ref NativeMethods.TVITEM item) 915return XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(pItem), Marshal.SizeOf(item.GetType())); 922bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 935bool result = XSend(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 948internal static unsafe bool SetItem(IntPtr hwnd, NativeMethods.TVITEM item) 956return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType())); 962return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item32), Marshal.SizeOf(item32.GetType())); 968return XSend(hwnd, NativeMethods.TVM_SETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType())); 973internal static unsafe IntPtr HitTestTreeView(IntPtr hwnd, int x, int y) 978IntPtr hitTestItem = IntPtr.Zero; 983if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref clientPoint, 1)) 989if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo), 998if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo32), 1007if (XSend(hwnd, NativeMethods.TVM_HITTEST, IntPtr.Zero, new IntPtr(&hitTestInfo64), 1019internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TVITEM item) 1027return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item), Marshal.SizeOf(item.GetType()), new IntPtr(&item.pszText), item.cchTextMax); 1034hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item32), 1042return GetTextWithinStructure(hwnd, NativeMethods.TVM_GETITEMW, IntPtr.Zero, new IntPtr(&item64), Marshal.SizeOf(item64.GetType()), new IntPtr(&item64.pszText), item64.cchTextMax); 1058internal static unsafe bool GetItem(IntPtr hwnd, int index, ref NativeMethods.TBBUTTON item) 1110internal static unsafe string GetItemText(IntPtr hwnd, NativeMethods.TOOLINFO item) 1120IntPtr wParam = new IntPtr(maxTextLength); 1160internal static Rect GetItemRect(IntPtr hwnd, int msg, int index) 1183IntPtr localRectStart = new IntPtr(&rectW32.left); 1190Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2); 1233internal static string GetItemText(IntPtr hwnd, int msg, int index, int textLen) 1256if (Misc.ProxySendMessage(hwnd, msg, new IntPtr(index), rmem.Address) != IntPtr.Zero) 1331private static string ListView_V6_GetGroupTextOnWinXp(IntPtr hwnd, NativeMethods.LVGROUP group) 1353if (group.pszHeader != IntPtr.Zero) 1365IntPtr count; 1379private static string ListView_V6_GetGroupTextOnWinXp(IntPtr hwnd, LVGROUP_32 group) 1413IntPtr count; 1427private static string ListView_V6_GetGroupTextOnWinXp(IntPtr hwnd, LVGROUP_64 group) 1461IntPtr count; 1476private static bool IsWOW64Process(IntPtr hwnd) 1622pszText = IntPtr.Zero, 1723pszText = IntPtr.Zero, 1724hbm = IntPtr.Zero, 1731pvFilter = IntPtr.Zero 1829pszText = IntPtr.Zero, 1948pszText = IntPtr.Zero, 1955puColumns = IntPtr.Zero 2027internal IntPtr pszSubtitle; 2029internal IntPtr pszTask; 2031internal IntPtr pszDescriptionTop; 2033internal IntPtr pszDescriptionBottom; 2039internal IntPtr pszSubsetTitle; // NULL if group is not subset 2148pszHeader = IntPtr.Zero, 2150pszFooter = IntPtr.Zero, 2232pszHeader = IntPtr.Zero, 2234pszFooter = IntPtr.Zero, 2242pszSubtitle = IntPtr.Zero, 2244pszTask = IntPtr.Zero, 2246pszDescriptionTop = IntPtr.Zero, 2248pszDescriptionBottom = IntPtr.Zero, 2254pszSubsetTitle = IntPtr.Zero, // NULL if group is not subset 2345iString = IntPtr.Zero 2445hItem = IntPtr.Zero, 2448pszText = IntPtr.Zero, 2593hwnd = IntPtr.Zero, 2596hinst = IntPtr.Zero, 2597pszText = IntPtr.Zero,
MS\Internal\AutomationProxies\EventManager.cs (35)
37internal static void DispatchEvent(ProxySimple el, IntPtr hwnd, int eventId, object idProp, int idObject) 139private static void HandleIsReadOnlyProperty(ProxySimple el, IntPtr hwnd, int eventId) 153private static void HandleStructureChangedEventWindow(ProxySimple el, IntPtr hwnd, int eventId) 161private static void HandleCanMinimizeProperty(ProxySimple el, IntPtr hwnd, int eventId) 172private static void HandleCanMaximizeProperty(ProxySimple el, IntPtr hwnd, int eventId) 183private static void HandleValueProperty(ProxySimple el, IntPtr hwnd, int eventId) 192private static void HandleRangeValueProperty(ProxySimple el, IntPtr hwnd, int eventId) 201private static void HandleIsSelectedProperty(ProxySimple el, IntPtr hwnd, int eventId) 210private static void HandleExpandCollapseStateProperty(ProxySimple el, IntPtr hwnd, int eventId) 219private static void HandleColumnCountProperty(ProxySimple el, IntPtr hwnd, int eventId) 228private static void HandleRowCountProperty(ProxySimple el, IntPtr hwnd, int eventId) 237private static void HandleColumnProperty(ProxySimple el, IntPtr hwnd, int eventId) 246private static void HandleRowProperty(ProxySimple el, IntPtr hwnd, int eventId) 255private static void HandleColumnHeadersProperty(ProxySimple el, IntPtr hwnd, int eventId) 264private static void HandleRowHeadersProperty(ProxySimple el, IntPtr hwnd, int eventId) 273private static void HandleIsSelectionRequiredProperty(ProxySimple el, IntPtr hwnd, int eventId) 282private static void HandleVerticalViewSizeProperty(ProxySimple el, IntPtr hwnd, int eventId) 291private static void HandleHorizontalViewSizeProperty(ProxySimple el, IntPtr hwnd, int eventId) 300private static void HandleToggleStateProperty(ProxySimple el, IntPtr hwnd, int eventId) 309private static void HandleInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId) 323private static void HandleScrollInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId) 335private static void HandleWindowInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId) 347private static void HandleMenuItemInvokedEvent(ProxySimple el, IntPtr hwnd, int eventId) 358private static void HandleElementSelectedEvent(ProxySimple el, IntPtr hwnd, int eventId) 371private static void HandleElementAddedToSelectionEvent(ProxySimple el, IntPtr hwnd, int eventId) 383private static void HandleElementRemovedFromSelectionEvent(ProxySimple el, IntPtr hwnd, int eventId) 395private static void HandleStructureChangedEventClient(ProxySimple el, IntPtr hwnd, int eventId) 414private static void HandleVerticalScrollPercentProperty(ProxySimple el, IntPtr hwnd, int eventId) 423private static void HandleHorizontalScrollPercentProperty(ProxySimple el, IntPtr hwnd, int eventId) 433private static void HandleInvalidatedEvent(ProxySimple el, IntPtr hwnd, int eventId) 446private static WindowVisualState GetWindowVisualState(IntPtr hwnd) 465private static void HandleTextSelectionChangedEvent(ProxySimple el, IntPtr hwnd, int eventId) 571private delegate void RaiseEvent (ProxySimple el, IntPtr hwnd, int eventId); 581private static IntPtr _hwndLast = IntPtr.Zero;
MS\Internal\AutomationProxies\Misc.cs (199)
85internal static void CheckEnabled(IntPtr hwnd) 116internal static bool CloseHandle(IntPtr processHandle) 150internal static IntPtr DispatchMessage(ref NativeMethods.MSG msg) 160internal static unsafe bool EnumChildWindows(IntPtr hwnd, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam) 173internal static IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string className, string wndName) 175IntPtr result = NativeMethodsSetLastError.FindWindowEx(hwndParent, hwndChildAfter, className, wndName); 178if (result == IntPtr.Zero) 186internal static string GetClassName(IntPtr hwnd) 205internal static string GetControlName(IntPtr label, bool stripMnemonic) 207if (label == IntPtr.Zero) 227internal static bool GetClientRectInScreenCoordinates(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 237if (!MapWindowPoints(hwnd, IntPtr.Zero, ref leftTop, 1)) 243if (!MapWindowPoints(hwnd, IntPtr.Zero, ref rightBottom, 1)) 252internal static bool GetClientRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 269internal static bool GetComboBoxInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbi) 298internal static IntPtr GetDC(IntPtr hwnd) 300IntPtr hdc = UnsafeNativeMethods.GetDC(hwnd); 303if (hdc == IntPtr.Zero) 311internal static IntPtr GetFocusedWindow() 315return ProxyGetGUIThreadInfo(0, out gui) ? gui.hwndFocus : IntPtr.Zero; 318internal static string GetItemToolTipText(IntPtr hwnd, IntPtr hwndToolTip, int item) 320if (hwndToolTip != IntPtr.Zero) 368internal static IntPtr GetLabelhwnd(IntPtr hwnd) 373return IntPtr.Zero; 377IntPtr hwndParent = Misc.GetParent(hwnd); 378if (hwndParent == IntPtr.Zero || hwndParent == UnsafeNativeMethods.GetDesktopWindow()) 380return IntPtr.Zero; 383IntPtr peer = hwnd; 386while ((peer = NativeMethodsSetLastError.GetWindow(peer, NativeMethods.GW_HWNDPREV)) != IntPtr.Zero) 391int code = Misc.ProxySendMessageInt(peer, NativeMethods.WM_GETDLGCODE, IntPtr.Zero, IntPtr.Zero); 419return IntPtr.Zero; 422internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint item, ref NativeMethods.MENUBARINFO mbi) 435internal static int GetMenuItemCount(IntPtr hmenu) 448internal static bool GetMenuItemInfo(IntPtr hmenu, int item, bool byPosition, ref NativeMethods.MENUITEMINFO menuItemInfo) 461internal static bool GetMenuItemRect(IntPtr hwnd, IntPtr hmenu, int item, out NativeMethods.Win32Rect rc) 474internal static bool GetMessage(ref NativeMethods.MSG msg, IntPtr hwnd, int msgFilterMin, int msgFilterMax) 488internal static int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf) 501internal static IntPtr GetParent(IntPtr hwnd) 503IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 506if (hwndParent == IntPtr.Zero) 514internal static bool GetScrollBarInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollBarInfo sbi) 527internal static bool GetScrollInfo(IntPtr hwnd, int fnBar, ref NativeMethods.ScrollInfo si) 547internal static int GetTextExtentPoint32(IntPtr hdc, string text, int length, out NativeMethods.SIZE size) 566internal static unsafe string GetUnsafeText(IntPtr hwnd, int uMsg, IntPtr wParam, int maxLength) 569IntPtr memAddr = IntPtr.Zero; // Ptr to remote mem 578memAddr = VirtualAlloc(IntPtr.Zero, new UIntPtr(cbSize), UnsafeNativeMethods.MEM_COMMIT, UnsafeNativeMethods.PAGE_READWRITE); 584if (ProxySendMessage(hwnd, uMsg, wParam, memAddr) == IntPtr.Zero) 605if (memAddr != IntPtr.Zero) 612internal static IntPtr GetWindow(IntPtr hwnd, int cmd) 614IntPtr resultHwnd = NativeMethodsSetLastError.GetWindow(hwnd, cmd); 617if (resultHwnd == IntPtr.Zero) 626internal static int GetWindowExStyle(IntPtr hwnd) 640internal static int GetWindowId(IntPtr hwnd) 654internal static IntPtr GetWindowParent(IntPtr hwnd) 666return (IntPtr)result; 669internal static bool GetWindowRect(IntPtr hwnd, ref NativeMethods.Win32Rect rc) 682internal static int GetWindowStyle(IntPtr hwnd) 695internal static uint GetWindowThreadProcessId(IntPtr hwnd, out uint processId) 739internal static bool IsEnabled(IntPtr hwnd) 752if (hwnd == IntPtr.Zero) 759internal static bool IsControlRTL(IntPtr hwnd) 765internal static bool IsLayoutRTL(IntPtr hwnd) 770internal static bool IsReadingRTL(IntPtr hwnd) 810internal static bool IsItemVisible(IntPtr hwnd, ref NativeMethods.Win32Rect itemRect) 863internal static bool IsProgmanWindow(IntPtr hwnd) 865while (hwnd != IntPtr.Zero) 890internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Rect rect, int cPoints) 898if ((IsProgmanWindow(hWndFrom) && hWndTo == IntPtr.Zero) || 899(hWndFrom == IntPtr.Zero && IsProgmanWindow(hWndTo))) 915internal static bool MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, ref NativeMethods.Win32Point pt, int cPoints) 923if ((IsProgmanWindow(hWndFrom) && hWndTo == IntPtr.Zero) || 924(hWndFrom == IntPtr.Zero && IsProgmanWindow(hWndTo))) 992IntPtr[] handles = { handle.DangerousGetHandle() }; 1011internal static IntPtr OpenProcess(int flags, bool inherit, uint processId, IntPtr hwnd) 1013IntPtr processHandle = UnsafeNativeMethods.OpenProcess(flags, inherit, processId); 1018if (processHandle == IntPtr.Zero 1034if (processHandle == IntPtr.Zero) 1043internal static void PostMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 1054internal static string ProxyGetClassName(IntPtr hwnd) 1062int index = ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 1151internal static string ProxyGetText(IntPtr hwnd) 1156internal static string ProxyGetText(IntPtr hwnd, int length) 1168ProxySendMessage(hwnd, NativeMethods.WM_GETTEXT, (IntPtr)str.Capacity, str); 1175internal static bool ProxyGetTitleBarInfo(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFO ti) 1191internal static bool ProxyGetTitleBarInfoEx(IntPtr hwnd, out UnsafeNativeMethods.TITLEBARINFOEX ti) 1195IntPtr result; 1196IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, NativeMethods.WM_GETTITLEBARINFOEX, IntPtr.Zero, ref ti, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1198if (resultSendMessage == IntPtr.Zero) 1207internal static Rect [] GetTitlebarRects(IntPtr hwnd) 1219internal static Rect GetTitleBarRect(IntPtr hwnd) 1247internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 1249IntPtr result; 1251IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1254if (resultSendMessage == IntPtr.Zero) 1267internal static int ProxySendMessageInt(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam) 1269IntPtr result = ProxySendMessage(hwnd, msg, wParam, lParam); 1275internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, bool ignoreTimeout) 1277IntPtr result; 1279IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1282if (resultSendMessage == IntPtr.Zero) 1295internal static int ProxySendMessageInt(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, bool ignoreTimeout) 1297IntPtr result = ProxySendMessage(hwnd, msg, wParam, lParam, ignoreTimeout); 1301internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, StringBuilder sb) 1303IntPtr result; 1305IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, sb, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1308if (resultSendMessage == IntPtr.Zero) 1321internal static int ProxySendMessageInt(IntPtr hwnd, int msg, IntPtr wParam, StringBuilder sb) 1323IntPtr result = ProxySendMessage(hwnd, msg, wParam, sb); 1327internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, IntPtr wParam, ref NativeMethods.Win32Rect lParam) 1329IntPtr result; 1331IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, wParam, ref lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1334if (resultSendMessage == IntPtr.Zero) 1342internal static IntPtr ProxySendMessage(IntPtr hwnd, int msg, out int wParam, out int lParam) 1344IntPtr result; 1346IntPtr resultSendMessage = UnsafeNativeMethods.SendMessageTimeout(hwnd, msg, out wParam, out lParam, _sendMessageFlags, _sendMessageTimeoutValue, out result); 1349if (resultSendMessage == IntPtr.Zero) 1369internal static bool PtInWindowRect(IntPtr hwnd, int x, int y) 1380internal static bool ReadProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr source, IntPtr dest, IntPtr size, out IntPtr bytesRead) 1393internal static bool ReadProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr source, MS.Internal.AutomationProxies.SafeCoTaskMem destAddress, IntPtr size, out IntPtr bytesRead) 1407internal static string RealGetWindowClass(IntPtr hwnd) 1423internal static bool RegisterHotKey(IntPtr hwnd, short atom, int modifiers, int vk) 1436internal static int ReleaseDC(IntPtr hwnd, IntPtr hdc) 1455internal static IntPtr SelectObject(IntPtr hdc, IntPtr hObject) 1480internal static bool SetFocus(IntPtr hwnd) 1524if (RegisterHotKey(IntPtr.Zero, atom, 0, vk)) 1572if (!GetMessage(ref msg, IntPtr.Zero, 0, 0)) 1590UnregisterHotKey(IntPtr.Zero, atom); 1598internal static int SetScrollPos(IntPtr hwnd, int bar, int pos, bool redraw) 1616internal static IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags) 1709internal static bool UnhookWinEvent(IntPtr winEventHook) 1729internal static bool UnregisterHotKey(IntPtr hwnd, short atom) 1742internal static IntPtr VirtualAlloc(IntPtr address, UIntPtr size, int allocationType, int protect) 1744IntPtr result = UnsafeNativeMethods.VirtualAlloc(address, size, allocationType, protect); 1747if (result == IntPtr.Zero) 1755internal static IntPtr VirtualAllocEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int allocationType, int protect) 1757IntPtr result = UnsafeNativeMethods.VirtualAllocEx(hProcess, address, size, allocationType, protect); 1760if (result == IntPtr.Zero) 1768internal static bool VirtualFree(IntPtr address, UIntPtr size, int freeType) 1781internal static bool VirtualFreeEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int freeType) 1794internal static bool WriteProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr dest, IntPtr sourceAddress, IntPtr size, out IntPtr bytesWritten) 1807internal static bool IsWindowInGivenProcess(IntPtr hwnd, string targetprocess) 1839internal static bool InTheShellProcess(IntPtr hwnd) 1841IntPtr hwndShell = SafeNativeMethods.GetShellWindow(); 1842if (hwndShell == IntPtr.Zero) 1853internal static bool IsComctrlV6OnOsVerV6orHigher(IntPtr hwnd) 1855int commonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 1890private static bool EnumToolTipWindows(IntPtr hwnd, ref UnsafeNativeMethods.ENUMTOOLTIPWINDOWINFO lParam) 1968private static Rect[] GetTitlebarRectsXP(IntPtr hwnd) 2039private static Rect[] GetTitlebarRectsEx(IntPtr hwnd)
MS\Internal\AutomationProxies\MSAAEventDispatcher.cs (6)
56internal void AdviseEventAdded(IntPtr hwnd, AutomationEvent eventId, AutomationProperty[] properties) 103internal void AdviseEventRemoved(IntPtr hwnd, AutomationEvent eventId, AutomationProperty[] properties) 164internal override void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild) 271private void MaybeFireSelectionItemEvent(AutomationEvent eventId, Hashtable eventTable, IntPtr hwnd, int idObject, int idChild) 290private void MaybeFirePropertyChangeEvent(AutomationPattern pattern, AutomationProperty property, Hashtable eventTable, IntPtr hwnd, int idObject, int idChild, bool clientToo) 311private void MaybeFireStructureChangeEvent(int eventId, Hashtable eventTable, IntPtr hwnd, int idObject, int idChild)
MS\Internal\AutomationProxies\MSAANativeProvider.cs (9)
49protected MsaaNativeProvider(Accessible acc, IntPtr hwnd, MsaaNativeProvider parent, MsaaNativeProvider knownRoot, RootStatus isRoot) 52Debug.Assert(hwnd != IntPtr.Zero); 75private static MsaaNativeProvider Wrap(Accessible acc, IntPtr hwnd, MsaaNativeProvider parent, MsaaNativeProvider knownRoot, RootStatus isRoot) 127internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 157int index = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_GETOBJECT, IntPtr.Zero, (IntPtr)OBJID_QUERYCLASSNAMEIDX, true); 1057private static bool IsKnownBadWindow(IntPtr hwnd) 1077Debug.Assert(_hwnd != IntPtr.Zero); 1317protected IntPtr _hwnd; // the window we belong to
MS\Internal\AutomationProxies\MSAAWinEventWrap.cs (10)
35_hHooks = new IntPtr[1]; 55internal virtual void WinEventProc(int eventId, IntPtr hwnd, int idObject, int idChild) 79_hHooks[0] = Misc.SetWinEventHook(_eventMin, _eventMax, IntPtr.Zero, _winEventProc, 0, 0, _fFlags); 80if (_hHooks[0] == IntPtr.Zero) 97if (_hHooks[i] != IntPtr.Zero) 100_hHooks[i] = IntPtr.Zero; 123private void WinEventReentrancyFilter(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime) 202internal WinEvent(int eventId, IntPtr hwnd, int idObject, int idChild) 210public IntPtr _hwnd; 218private IntPtr [] _hHooks; // the returned handles(s) from SetWinEventHook
MS\Internal\AutomationProxies\NonClientArea.cs (17)
27internal NonClientArea (IntPtr hwnd) 96internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 101internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 135internal static IRawElementProviderSimple CreateMenuBarItem(IntPtr hwnd, int idChild, int idObject) 140private static IRawElementProviderSimple CreateMenuBarItem(IntPtr hwnd, int idChild) 142IntPtr menu = UnsafeNativeMethods.GetMenu(hwnd); 144if (menu == IntPtr.Zero) 165internal static IRawElementProviderSimple CreateSystemMenu(IntPtr hwnd, int idChild, int idObject) 170private static IRawElementProviderSimple CreateSystemMenu(IntPtr hwnd) 181internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 208int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 538IntPtr menu = UnsafeNativeMethods.GetMenu(_hwnd); 539if (menu != IntPtr.Zero) 643private static void RaiseMenuEventsOnClient(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 649private static void RaiseEventsOnClient(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 658private static void RaiseEventsOnScroll(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 722private static void RaiseEventsOnWindow(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild)
MS\Internal\AutomationProxies\ProxyFragment.cs (1)
53internal ProxyFragment (IntPtr hwnd, ProxyFragment parent, int item) : base (hwnd, parent, item)
MS\Internal\AutomationProxies\ProxyHwnd.cs (14)
41internal ProxyHwnd (IntPtr hwnd, ProxyFragment parent, int item) 180IntPtr label = Misc.GetLabelhwnd(_hwnd); 212if (_controlLabel == IntPtr.Zero && name != null && GetParent() == null) 220if (_controlLabel != IntPtr.Zero) 232IntPtr hwndParent = Misc.GetParent(_hwnd); 236if (hwndParent != IntPtr.Zero && hwndParent != UnsafeNativeMethods.GetDesktopWindow()) 260string text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, idChild); 263text = Misc.GetItemToolTipText(_hwnd, IntPtr.Zero, 0); 464protected static bool PtInClientRect (IntPtr hwnd, int x, int y) 472if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 491protected static string GetLabelAccessKey(IntPtr hwnd) 494IntPtr label = Misc.GetLabelhwnd(hwnd); 495if (label != IntPtr.Zero) 543private IntPtr _controlLabel;
MS\Internal\AutomationProxies\ProxySimple.cs (7)
57internal ProxySimple(IntPtr hwnd, ProxyFragment parent, int item) 91if (_hwnd == IntPtr.Zero) 165if (_hwnd == IntPtr.Zero || (GetParent() != null && GetParent()._hwnd == _hwnd)) 329return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero; 649internal IntPtr WindowHandle 686internal IntPtr _hwnd; 706internal static IntPtr _hwndDesktop = UnsafeNativeMethods.GetDesktopWindow();
MS\Internal\AutomationProxies\QueueProcessor.cs (1)
102while (UnsafeNativeMethods.PeekMessage (ref msg, IntPtr.Zero, 0, 0, NativeMethods.PM_REMOVE))
MS\Internal\AutomationProxies\SafeProcessHandle.cs (2)
17internal SafeProcessHandle(IntPtr hwnd) : base(true) 21if (hwnd == IntPtr.Zero)
MS\Internal\AutomationProxies\SafeThemeHandle.cs (4)
21internal SafeThemeHandle(IntPtr preexistingHandle, bool ownsHandle) : base(ownsHandle) 30return !IsInvalid ? CloseThemeData(handle) == (IntPtr)NativeMethods.S_OK : true; 34private static extern IntPtr CloseThemeData(IntPtr handle);
MS\Internal\AutomationProxies\WindowsAltTab.cs (8)
27internal WindowsAltTab(IntPtr hwnd, ProxyFragment parent, int item) 45internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 50internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 76internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 126if (Misc.MapWindowPoints(System.IntPtr.Zero, _hwnd, ref pt, 1)) 232GetAltTabInfo(IntPtr hwnd, int item, 318internal WindowsAltTabItem(IntPtr hwnd, WindowsAltTab parent, int item) 386if(!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2))
MS\Internal\AutomationProxies\WindowsButton.cs (34)
30internal WindowsButton (IntPtr hwnd, ProxyFragment parent, ButtonType type, int style, Accessible acc) 84internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 89private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 146internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 190int state = Misc.ProxySendMessageInt(hwnd, NativeMethods.BM_GETSTATE, IntPtr.Zero, IntPtr.Zero); 315IntPtr hwndRadioButton = GetSelection(); 317if (hwndRadioButton == IntPtr.Zero || 389IntPtr hwndParent = Misc.GetParent(_hwnd); 390if (hwndParent != IntPtr.Zero && WindowsFormsHelper.IsWindowsFormsControl(hwndParent)) 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); 515Misc.ProxySendMessage(_hwnd, NativeMethods.BM_CLICK, IntPtr.Zero, IntPtr.Zero, true); 537IntPtr hwndShell = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "Shell_TrayWnd", null); 538if (hwndShell != IntPtr.Zero) 561IntPtr hwndParent = Misc.GetParent(_hwnd); 562if (hwndParent != IntPtr.Zero) 580IntPtr hwndParent = Misc.GetParent(_hwnd); 581if (hwndParent != IntPtr.Zero) 593private IntPtr GetRootAncestor() 595IntPtr hwndParent = _hwnd; 596IntPtr hwndRoot; 610} while (hwndParent != _hwndDesktop && hwndParent != IntPtr.Zero); 640int state = Misc.ProxySendMessageInt(_hwnd, NativeMethods.BM_GETCHECK, IntPtr.Zero, IntPtr.Zero); 670private unsafe bool FindRadioButtonChild(IntPtr hwnd, void* lParam) 697private unsafe IntPtr GetSelection() 702IntPtr selectedRadiobutton = new IntPtr(0); 707return IntPtr.Zero; 710private unsafe bool FindSelectedRadioButtonChild(IntPtr hwnd, void* lParam) 724*(IntPtr*)lParam = hwnd;
MS\Internal\AutomationProxies\WindowsComboBox.cs (48)
42private WindowsComboBox (IntPtr hwnd, ProxyFragment parent, IntPtr hwndEx, int item) 59internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 64internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 254if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2)) 300if (cbInfo.hwndItem != IntPtr.Zero && IsEditableCombo()) 315if (cbInfo.hwndList != IntPtr.Zero) 336if (cbInfo.hwndItem != IntPtr.Zero && IsEditableCombo()) 351if (cbInfo.hwndList != IntPtr.Zero) 382IntPtr hwndParent = Misc.GetParent(_hwnd); 383if (hwndParent != IntPtr.Zero) 386IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.CBN_EDITUPDATE)); 492IntPtr hwndToAsk = IsComboBoxEx32() ? _hwndEx : _hwnd; 501internal static IntPtr HostedByComboEx (IntPtr hwnd) 503IntPtr hwndEx = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 505if ((IntPtr.Zero != hwndEx) && IsComboEx (hwndEx)) 510return IntPtr.Zero; 514internal static bool GetComboInfo(IntPtr hwnd, ref NativeMethods.COMBOBOXINFO cbInfo) 525cbInfo.hwndItem = IntPtr.Zero; 531if (cbInfo.hwndItem == IntPtr.Zero && IsComboEx (NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT))) 533cbInfo.hwndItem = Misc.FindWindowEx(hwnd, IntPtr.Zero, "EDIT", null); 534if (cbInfo.hwndItem != IntPtr.Zero) 553internal static bool GetDroppedState (IntPtr hwnd) 555return Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETDROPPEDSTATE, IntPtr.Zero, IntPtr.Zero) != 0; 558internal static void Expand (IntPtr hwnd) 560IntPtr hwndFocused = Misc.GetFocusedWindow(); 570Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(1), IntPtr.Zero); 573internal static void Collapse (IntPtr hwnd) 575Misc.ProxySendMessage(hwnd, NativeMethods.CB_SHOWDROPDOWN, new IntPtr(0), IntPtr.Zero); 629IntPtr hwnd = IsComboBoxEx32() ? _hwndEx : _hwnd; 651if (GetComboInfo(_hwnd, ref cbInfo) && (IntPtr.Zero != cbInfo.hwndList)) 659private ProxySimple CreateListBox (IntPtr hwndList) 665private static bool IsComboEx (IntPtr hwndEx) 667if (hwndEx == IntPtr.Zero) 686private static string SpecialText (IntPtr hwnd, int index) 691index = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 698int len = Misc.ProxySendMessageInt(hwnd, NativeMethods.CB_GETLBTEXTLEN, new IntPtr(index), IntPtr.Zero); 721private static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 782private static void EditPortionEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 785IntPtr hwndCombo = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 787if (hwndCombo != IntPtr.Zero) 833return _hwndEx != IntPtr.Zero; 847private IntPtr _hwndEx; 874internal WindowsComboButton (IntPtr hwnd, ProxyFragment parent, int item) 913if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref cbInfo.rcButton, 2))
MS\Internal\AutomationProxies\WindowsContainer.cs (13)
24public WindowsContainer (IntPtr hwnd, ProxyHwnd parent, int item) 50internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 55private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 93IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd(IntPtr hwnd) 98IntPtr hwndTab; 131private bool HasTabPageStyle(IntPtr hwnd) 141private bool IsTabPage(IntPtr hwnd, out IntPtr hwndTab, out int item) 143hwndTab = IntPtr.Zero; 172IntPtr hwndParent = Misc.GetParent(hwnd); 173if (hwndParent == IntPtr.Zero) 178hwndTab = Misc.FindWindowEx(hwndParent, IntPtr.Zero, "SysTabControl32", null); 180if (hwndTab == IntPtr.Zero || !SafeNativeMethods.IsWindowVisible(hwndTab))
MS\Internal\AutomationProxies\WindowsEditBox.cs (64)
34internal WindowsEditBox (IntPtr hwnd, ProxyFragment parent, int item) 66internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 71private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 87internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 104IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 105if (hwndParent != IntPtr.Zero) 148for (IntPtr hwnd = _hwnd; 149hwnd != IntPtr.Zero && string.IsNullOrEmpty(accessKey); 216IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(_hwnd); 217if (hwndUpDown != IntPtr.Zero) 227IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(_hwnd); 228if (hwndUpDown != IntPtr.Zero) 238IntPtr hwndUpDown = WindowsSpinner.GetUpDownFromEdit(_hwnd); 239if (hwndUpDown != IntPtr.Zero) 289int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 297result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 351if (!Misc.MapWindowPoints(IntPtr.Zero, WindowHandle, ref clientLocation, 1)) 442IntPtr lParam = NativeMethods.Util.MAKELPARAM(point.x, point.y); 443int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_CHARFROMPOS, IntPtr.Zero, lParam); 490internal static EditboxType GetEditboxtype (IntPtr hwnd) 515return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 522return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETFIRSTVISIBLELINE, IntPtr.Zero, IntPtr.Zero); 526internal IntPtr GetFont() 528IntPtr result = Misc.ProxySendMessage(WindowHandle, NativeMethods.WM_GETFONT, IntPtr.Zero, IntPtr.Zero); 534if (result == IntPtr.Zero) 545return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_GETLINECOUNT, IntPtr.Zero, IntPtr.Zero); 550IntPtr hfont = GetFont(); 551Debug.Assert(hfont != IntPtr.Zero, "WindowsEditBox.GetLogfont got null HFONT"); 565Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_GETRECT, IntPtr.Zero, ref rect); 585return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.WM_GETTEXTLENGTH, IntPtr.Zero, IntPtr.Zero); 680return Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEFROMCHAR, (IntPtr)index, IntPtr.Zero); 686int index = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINEINDEX, (IntPtr)(line), IntPtr.Zero); 693return 0 != Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_LINESCROLL, (IntPtr)charactersHorizontal, (IntPtr)linesVertical); 742int result = Misc.ProxySendMessageInt(WindowHandle, NativeMethods.EM_POSFROMCHAR, (IntPtr)index, IntPtr.Zero); 803Misc.ProxySendMessage(WindowHandle, NativeMethods.EM_SETSEL, (IntPtr)start, (IntPtr)end); 809internal static string Text(IntPtr hwnd) 852IntPtr hdc = Misc.GetDC(_hwnd); 853if (hdc == IntPtr.Zero) 858IntPtr oldFont = IntPtr.Zero; 861IntPtr hfont = GetFont(); 867if (oldFont != IntPtr.Zero) 890IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 892if (hwndParent == IntPtr.Zero) 910IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 912if (hwndParent != IntPtr.Zero) 924private static bool IsInsideOfIPAddress(IntPtr hwnd) 926IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 928if (hwndParent != IntPtr.Zero) 940private static bool IsInsideOfListView(IntPtr hwnd) 942IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 944if (hwndParent != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsEditBoxRange.cs (5)
241if (!Misc.MapWindowPoints(_provider.WindowHandle, IntPtr.Zero, ref w32point, 1)) 769IntPtr hdc = Misc.GetDC(IntPtr.Zero); 770if (hdc == IntPtr.Zero) 775Misc.ReleaseDC(IntPtr.Zero, hdc);
MS\Internal\AutomationProxies\WindowsFormsHelpers.cs (7)
23internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 69internal static IRawElementProviderSimple CreateButton(IntPtr hwnd) 114internal static FormControlState GetControlState(IntPtr hwnd) 128internal static bool IsWindowsFormsControl(IntPtr hwnd) 133internal static bool IsWindowsFormsControl(IntPtr hwnd, ref FormControlState state) 144internal static string WindowsFormsID(IntPtr hwnd) 151internal static string GetControlName(IntPtr hwnd)
MS\Internal\AutomationProxies\WindowsFormsLinkLabel.cs (3)
24internal FormsLink (IntPtr hwnd, ProxyFragment parent, int item) 39internal static IRawElementProviderSimple Create (IntPtr hwnd, int idChild) 48internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild)
MS\Internal\AutomationProxies\WindowsGrip.cs (5)
23public WindowsGrip (IntPtr hwnd, ProxyHwnd parent, int item) 80internal static bool IsGripPresent(IntPtr hwnd, bool onStatusBar) 107int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 115int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 121internal static NativeMethods.SIZE GetGripSize(IntPtr hwnd, bool onStatusBar)
MS\Internal\AutomationProxies\WindowsHyperlink.cs (12)
26private WindowsHyperlink (IntPtr hwnd, ProxyFragment parent, int item) 42internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 47private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 59internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 196if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 211bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 276return XSendMessage.XSend(_hwnd, NativeMethods.LM_GETITEM, IntPtr.Zero, new IntPtr(pLinkItem), sizeof(UnsafeNativeMethods.LITEM)); 353internal WindowsHyperlinkItem(IntPtr hwnd, ProxyFragment parent, int item) 395return XSendMessage.XSend(_hwnd, NativeMethods.LM_SETITEM, IntPtr.Zero, new IntPtr(&linkItem), Marshal.SizeOf(linkItem.GetType())); 492bGetItemResult = XSendMessage.XSend(_hwnd, NativeMethods.LM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 504Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y)); 505Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x, y));
MS\Internal\AutomationProxies\WindowsIPAddress.cs (17)
28private WindowsIPAddress (IntPtr hwnd, ProxyFragment parent, int item) 46internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 51private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 59internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 100IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd (IntPtr hwnd) 137Misc.ProxySendMessage(_hwnd, NativeMethods.IPM_SETADDRESS, IntPtr.Zero, (IntPtr)unchecked((int)ipV4)); 186IntPtr hwndChild = GetChildWindowFromIndex(column); 187if (hwndChild != IntPtr.Zero) 239private int GetIndexOfChildWindow (IntPtr target) 242IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 243while (hwndChild != IntPtr.Zero) 257private IntPtr GetChildWindowFromIndex (int index) 259IntPtr hwndChild = Misc.GetWindow(_hwnd, NativeMethods.GW_CHILD); 260for (int i = 0; ((i < index) && (hwndChild != IntPtr.Zero)); i++) 303internal ByteEditBoxOverride(IntPtr hwnd, int position) : 380Misc.ProxySendMessage(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(i.ToString(CultureInfo.CurrentCulture)));
MS\Internal\AutomationProxies\WindowsListBox.cs (36)
28internal WindowsListBox (IntPtr hwnd, ProxyFragment parent, int item, bool parentedByCombo) 52internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 57internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 77if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && (cbInfo.hwndCombo != IntPtr.Zero)) 105internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 290int ret = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_ITEMFROMPOINT, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(x - listboxrect.left, y - listboxrect.top)); 305int index = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero); 380return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCURSEL, IntPtr.Zero, IntPtr.Zero) >= 0; 430return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCOUNT, IntPtr.Zero, IntPtr.Zero); 439private static void RaiseEventsOnClient(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 509private static void RaiseEventsOnWindow(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 522if (WindowsComboBox.GetComboInfo(hwnd, ref cbInfo) && (cbInfo.hwndCombo != IntPtr.Zero)) 555int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSELCOUNT, IntPtr.Zero, IntPtr.Zero); 596return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(-1)) != NativeMethods.LB_ERR; 654internal ListboxItem (IntPtr hwnd, ProxyFragment parent, int item) 719int iTextLen = Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETTEXTLEN, new IntPtr(_item), IntPtr.Zero); 932Misc.ProxySendMessage(_hwnd, NativeMethods.LB_SETTOPINDEX, new IntPtr(_item), IntPtr.Zero); 976internal static bool IsSelected (IntPtr hwnd, int item) 978return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_GETSEL, new IntPtr(item), IntPtr.Zero) > 0; 981internal static bool Select (IntPtr hwnd, int item, bool fMultipleSelection) 991SendMessageResult = Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(item), IntPtr.Zero); 1031return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETCARETINDEX, IntPtr.Zero, IntPtr.Zero) == _item; 1035return Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_GETSEL, new IntPtr(_item), IntPtr.Zero) >= 0; 1053return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) ? itemRect : NativeMethods.Win32Rect.Empty; 1126Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1141IntPtr wParam = 1144IntPtr hwndListBoxParent = Misc.GetParent(_hwnd); 1156Misc.ProxySendMessageInt(_hwnd, NativeMethods.LB_SETCURSEL, new IntPtr(_item), IntPtr.Zero); 1161IntPtr wParam = new IntPtr(NativeMethods.Util.MAKELONG(id, NativeMethods.LBN_SELCHANGE)); 1172private bool UnSelect (IntPtr hwnd, int item) 1180return Misc.ProxySendMessageInt(hwnd, NativeMethods.LB_SETSEL, IntPtr.Zero, new IntPtr(item)) != NativeMethods.LB_ERR;
MS\Internal\AutomationProxies\WindowsListView.cs (99)
66internal WindowsListView (IntPtr hwnd, ProxyFragment parent, int item) 95internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 100internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 110internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 494IntPtr hwndHeader = ListViewGetHeader (_hwnd); 495if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 523IntPtr hwndHeader = ListViewGetHeader (_hwnd); 524if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 639fScrollSuccess = Scroll(_hwnd, (IntPtr)dx, (IntPtr)dy); 655Scroll(_hwnd, (IntPtr)dx, (IntPtr)dy); 788IntPtr hwndHeader = ListViewGetHeader (_hwnd); 789if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 876internal static bool SetItemFocused (IntPtr hwnd, int item) 882internal static bool IsItemFocused (IntPtr hwnd, int item) 890internal static bool IsDetailMode (IntPtr hwnd) 913IntPtr hwndHeader = ListViewGetHeader(hwnd); 927internal static bool IsListMode (IntPtr hwnd) 938internal static bool IsImplementingGrid (IntPtr hwnd) 960internal static int GetColumnCount (IntPtr hwnd) 973internal static int GetRowCount (IntPtr hwnd) 986internal static int GetColumnCountOtherModes (IntPtr hwnd) 1020internal static int GetRowCountListMode (IntPtr hwnd, int itemCount) 1080internal static bool IsGroupViewEnabled (IntPtr hwnd) 1086internal static void GroupSpecificEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 1175internal static bool InReportView (IntPtr hwnd) 1182internal static void RemoveGroupAndRaiseLogicalChangedEvent (IntPtr hwnd) 1189internal static void RaiseLogicalChangedEvent (IntPtr hwnd) 1205internal static int GetItemCount (IntPtr hwnd) 1207return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1211internal static int GetSelectedItemCount (IntPtr hwnd) 1225internal static int GetStartOfSelectedItems (IntPtr hwnd) 1233internal static int GetItemNext (IntPtr hwnd, int item, int flags) 1238internal static bool IsIconView(IntPtr hwnd) 1244internal static int ListViewGetView (IntPtr hwnd) 1246return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETVIEW, IntPtr.Zero, IntPtr.Zero); 1250internal static int ApproximateViewRect (IntPtr hwnd) 1256internal static bool Scroll (IntPtr hwnd, IntPtr dx, IntPtr dy) 1262internal static unsafe bool GetItemRect (IntPtr hwnd, int item, int lvir, out NativeMethods.Win32Rect itemRectangle) 1271return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1279internal static bool ListViewIsGroupViewEnabled (IntPtr hwnd) 1281return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_ISGROUPVIEWENABLED, IntPtr.Zero, IntPtr.Zero) != 0; 1285internal static bool UnselectAll (IntPtr hwnd) 1291internal static bool SelectItem (IntPtr hwnd, int item) 1297internal static bool UnSelectItem (IntPtr hwnd, int item) 1303internal static bool IsItemSelected (IntPtr hwnd, int listItem) 1309internal static bool ListViewEditable (IntPtr hwnd) 1315internal static bool ListViewInvokable(IntPtr hwnd) 1343internal static IntPtr ListViewEditLabel(IntPtr hwnd, int item) 1345return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_EDITLABEL, new IntPtr(item), IntPtr.Zero); 1349internal static bool ListViewSingleClickActivate (IntPtr hwnd) 1355internal static bool MultiSelected (IntPtr hwnd) 1361internal static bool Scrollable (IntPtr hwnd) 1367internal static bool EnsureVisible (IntPtr hwnd, int item, bool partialOK) 1369IntPtr partialVisible = (partialOK) ? IntPtr.Zero : new IntPtr (1); 1375internal static IntPtr ListViewGetHeader (IntPtr hwnd) 1377return Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETHEADER, IntPtr.Zero, IntPtr.Zero); 1381internal static string GetItemText (IntPtr hwnd, NativeMethods.LVITEM item) 1390internal static NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, NativeMethods.Win32Point pt) 1397internal static NativeMethods.LVHITTESTINFO_INTERNAL SubitemHitTest (IntPtr hwnd, int item, NativeMethods.Win32Point pt) 1410if (Misc.MapWindowPoints(IntPtr.Zero, hwnd, ref hitTest.pt, 1)) 1420result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1429result = XSendMessage.XSendGetIndex(hwnd, NativeMethods.LVM_SUBITEMHITTEST, IntPtr.Zero, new IntPtr(&hitTestNative), Marshal.SizeOf(hitTestNative.GetType())); 1446internal static int HeaderItemCount (IntPtr hwnd) 1448return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 1452internal static bool CheckBoxes (IntPtr hwnd) 1458internal static int GetCheckedState (IntPtr hwnd, int item) 1466internal static bool ListViewAutoArrange (IntPtr hwnd) 1472public static bool FullRowSelect (IntPtr hwnd) 1478public static bool HasJustifyColumnsExStyle(IntPtr hwnd) 1485public static unsafe bool GetSubItemRect (IntPtr hwnd, int item, int subItem, int lvir, out NativeMethods.Win32Rect itemRectangle) 1495return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref itemRectangle, 2); 1502internal static string GetItemToolTipText(IntPtr hwnd) 1504IntPtr hwndToolTip = Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1738private static int GetRowCountOtherModes (IntPtr hwnd) 1779private static bool ListViewList (IntPtr hwnd) 1785private static unsafe bool GetItemPosition (IntPtr hwnd, int item, out NativeMethods.Win32Point pt) 1794return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref pt, 1); 1802private static int GetExtendedListViewStyle (IntPtr hwnd) 1804return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_GETEXTENDEDLISTVIEWSTYLE, IntPtr.Zero, IntPtr.Zero); 1808private static int GetItemState (IntPtr hwnd, int item, int stateMask) 1813private static bool SetItemState (IntPtr hwnd, int item, int stateMask, int state) 1829IntPtr hwndHeader = ListViewGetHeader (_hwnd); 1831if (hwndHeader != IntPtr.Zero && SafeNativeMethods.IsWindowVisible (hwndHeader)) 1843private static void RaiseEventsOnClient(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild)
MS\Internal\AutomationProxies\WindowsListViewGroup.cs (13)
28internal WindowsListViewGroup (IntPtr hwnd, ProxyFragment parent, int groupID) 328int groupIndex = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 420internal static bool IsCollapsed(IntPtr hwnd, int groupID) 461internal static ProxySimple GetFocusInGroup (IntPtr hwnd, ProxyFragment parent) 486int groupIndex = (int)Misc.ProxySendMessage(hwnd, NativeMethods.LVM_GETFOCUSEDGROUP, IntPtr.Zero, IntPtr.Zero); 550internal static int GetColumnCountExternal (IntPtr hwnd, int groupID) 557internal static GroupManager.GroupInfo GetGroupInfo (IntPtr hwnd, int groupID) 660private static bool IsGroupValid (IntPtr hwnd, int groupID) 731private static int GetColumnCount (IntPtr hwnd, int groupID) 752private static int GetRowCount (IntPtr hwnd, int groupID) 776private static int GetCountOfItemsInDimension (IntPtr hwnd, int groupID, IsNewItemInDimension comparer)
MS\Internal\AutomationProxies\WindowsListViewGroupHelper.cs (18)
29internal void EnsureCreation(IntPtr hwnd) 37internal void Remove(IntPtr hwnd) 43internal bool Contains(IntPtr hwnd) 48internal GroupManager this[IntPtr hwnd] 107private GroupManager(int groups, IntPtr hwnd, bool isComctrlV6OnOsVerV6orHigher) 232internal static GroupManager CreateGroupManager(IntPtr hwnd) 238internal static bool ListViewHasGroup(IntPtr hwnd, int groupID) 240return Misc.ProxySendMessageInt(hwnd, NativeMethods.LVM_HASGROUP, new IntPtr(groupID), IntPtr.Zero) != 0; 336internal IntPtr _hwnd; 364private static unsafe GroupManager InitializeManager(IntPtr hwnd) 466XSendMessage.XSend(_hwnd, NativeMethods.LVM_GETGROUPMETRICS, IntPtr.Zero, new IntPtr(&(metric.cbSize)), metric.cbSize, XSendMessage.ErrorValue.NoCheck); 539internal SortGroups(IntPtr hwnd) 574private IntPtr _hwnd; 596internal SortGroupItems(IntPtr hwnd) 646private IntPtr _hwnd; 663internal Group(int id, IntPtr hwnd, bool isComctrlV6OnOsVerV6orHigher) 705Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2); 845private IntPtr _hwnd; // lv hwnd
MS\Internal\AutomationProxies\WindowsListViewGroupSubsetLink.cs (2)
37internal ListViewGroupSubsetLink (IntPtr hwnd, ProxyFragment parent, int item, int groupId) 78Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rect, 2);
MS\Internal\AutomationProxies\WindowsListViewItem.cs (22)
29internal ListViewItem (IntPtr hwnd, ProxyFragment parent, int item) 135if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRectangle, 2)) 365int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero); 682internal static int GetSubItemCount (IntPtr hwnd) 687IntPtr hwndHeader = WindowsListView.ListViewGetHeader (hwnd); 689if (hwndHeader == IntPtr.Zero) 701internal static string GetText (IntPtr hwnd, int item, int subitem) 713internal static bool IsItemWithCheckbox (IntPtr hwnd, int item) 727internal static int GetGroupID (IntPtr hwnd, int lvItem) 745internal static void SetValue (string val, IntPtr hwnd, int item) 760IntPtr hwndEdit = WindowsListView.ListViewEditLabel (hwnd, item); 762if (IntPtr.Zero == hwndEdit) 849IntPtr hwndHeader = WindowsListView.ListViewGetHeader(_hwnd); 850if (hwndHeader != IntPtr.Zero) 895private static bool IsImplementingGrid (IntPtr hwnd) 929if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 959private static void FinishEditing (bool setValueSucceeded, IntPtr hwnd, IntPtr hwndEdit) 962IntPtr key = (IntPtr)((setValueSucceeded) ? NativeMethods.VK_RETURN : NativeMethods.VK_ESCAPE); 969IntPtr keyUpLParam = new IntPtr (scanCode + (1 << 31) + (1 << 30));
MS\Internal\AutomationProxies\WindowsListViewItemCheckBox.cs (6)
29internal ListViewItemCheckbox (IntPtr hwnd, ProxyFragment parent, int item, int checkbox) : 79if (Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref itemRect, 2) && !Misc.IsItemVisible(ref parentRect, ref itemRect)) 144internal static NativeMethods.Win32Rect ListViewCheckBoxRect (IntPtr hwnd, int item) 249if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 252Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 253Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsListViewItemStartMenu.cs (1)
29internal ListViewItemStartMenu(IntPtr hwnd, ProxyFragment parent, int item, IAccessible acc)
MS\Internal\AutomationProxies\WindowsListViewScroll.cs (5)
31internal WindowsListViewScrollBar(IntPtr hwnd, ProxyFragment parent, int item, int sbFlag) 104if (WindowsListView.Scroll (_hwnd, (IntPtr) dx, (IntPtr) dy)) 129WindowsListView.Scroll (_hwnd, (IntPtr) dx, (IntPtr) dy);
MS\Internal\AutomationProxies\WindowsListViewSubItem.cs (8)
27internal ListViewSubItem (IntPtr hwnd, ProxyFragment parent, int item, int itemParent) 167IntPtr ancestor = _hwnd; 168IntPtr desktop = UnsafeNativeMethods.GetDesktopWindow(); 170while (ancestor != IntPtr.Zero && ancestor != desktop) 326IntPtr hwndHeader = WindowsListView.ListViewGetHeader (_hwnd); 346internal static ProxySimple ElementProviderFromPoint (IntPtr hwnd, ProxyFragment parent, int item, int x, int y) 374int column = (int)Misc.ProxySendMessage(_hwnd, NativeMethods.LVM_GETFOCUSEDCOLUMN, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsMenu.cs (139)
34internal WindowsMenu(IntPtr hwnd, ProxyFragment parent, IntPtr hmenu, MenuType type, int item) 65if (!_expandedMenus.Contains(IntPtr.Zero)) 67_expandedMenus[IntPtr.Zero] = new MenuParentInfo(hwnd, item, type); 112internal static ProxySimple CreateMenuItemFromEvent(IntPtr hwndMenu, int eventId, int idChild, int idObject) 149internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 154private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 157IntPtr hmenu; 163if (hmenu == IntPtr.Zero) 166if (hmenu == IntPtr.Zero) 193internal static WindowsMenu CreateSystemMenu (IntPtr hwnd, ProxyFragment parent) 195IntPtr hSysMenu = GetSystemMenuHandle(hwnd); 196if (hSysMenu != IntPtr.Zero) 207internal static IRawElementProviderSimple CreateFocusedMenuItem(IntPtr hwnd, int idChild, int idObject) 230IntPtr hwndPopup = IntPtr.Zero; 233hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 234if (hwndPopup == IntPtr.Zero) 243if (hwndPopup != IntPtr.Zero) 249IntPtr hmenu = HmenuFromHwnd(hwndPopup); 250if (hmenu == IntPtr.Zero) 263IntPtr hSubMenu = UnsafeNativeMethods.GetSubMenu(hmenu, i); 264if (hSubMenu == IntPtr.Zero) 271IntPtr hwndSubMenuPopup = GetPopupHwndForHMenu(hSubMenu); 272if (hwndSubMenuPopup == IntPtr.Zero) 308IntPtr hmenu = UnsafeNativeMethods.GetMenu(gui.hwndActive); 459WinEventTracker.AddToNotificationList(IntPtr.Zero, new WinEventTracker.ProxyRaiseEvents(MenuEvents), _menuEvents); 480WinEventTracker.RemoveToNotificationList(IntPtr.Zero, _menuEvents, new WinEventTracker.ProxyRaiseEvents(MenuEvents)); 501internal static bool GetMenuBarInfo(IntPtr hwnd, int idObject, uint idItem, out NativeMethods.MENUBARINFO mbi) 526internal static MenuItem GetHierarchyParent(IntPtr hwnd) 529IntPtr menuParent = IntPtr.Zero; 530IntPtr hwndParent = IntPtr.Zero; 532IntPtr menu = HmenuFromHwnd(hwnd); 533if (menu == IntPtr.Zero) 571private static bool GetSubMenuParent (IntPtr hwndMenu, out IntPtr menuParent, out IntPtr hwndParent, out int ownerMenuItemPos, out MenuType parentType) 574hwndParent = IntPtr.Zero; 575menuParent = IntPtr.Zero; 578IntPtr hMenu = HmenuFromHwnd (hwndMenu); 579if (hMenu == IntPtr.Zero) 595IntPtr hMenuPossibleParent = UnsafeNativeMethods.GetMenu (gui.hwndActive); 597if (hMenuPossibleParent != IntPtr.Zero) 613for (IntPtr hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndMenu, WindowsMenu.MenuClassName, null); 614hwndPossibleParent != IntPtr.Zero; 615hwndPossibleParent = Misc.FindWindowEx(IntPtr.Zero, hwndPossibleParent, WindowsMenu.MenuClassName, null)) 620if (hMenuPossibleParent != IntPtr.Zero) 639internal static IntPtr WindowFromSubmenu (IntPtr submenu) 641for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 642hwndSubMenu != IntPtr.Zero; 643hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, MenuClassName, null)) 647IntPtr submenuCandidate = HmenuFromHwnd (hwndSubMenu); 656return IntPtr.Zero; 661internal static MenuType GetSubMenuType (IntPtr hwnd, IntPtr hMenu) 668if (IntPtr.Zero != Misc.GetWindow(hwnd, NativeMethods.GW_OWNER)) 679private static int GetMenuItemParent (IntPtr hmenuPossibleParent, IntPtr hmenuChild) 712internal static IntPtr HmenuFromHwnd (IntPtr hwnd) 716return Misc.ProxySendMessage(hwnd, NativeMethods.MN_GETHMENU, IntPtr.Zero, IntPtr.Zero); 719return IntPtr.Zero; 742internal static IntPtr GetSystemMenuHandle(IntPtr hwnd) 746if (GetMenuBarInfo(hwnd, NativeMethods.OBJID_SYSMENU, 0, out mbi) && mbi.hMenu != IntPtr.Zero) 751return IntPtr.Zero; 871private static IntPtr GetSystemPopupMenu (IntPtr hwnd) 878mbi.hMenu != IntPtr.Zero && 884return IntPtr.Zero; 888private static bool IsSystemPopupMenu (IntPtr hmenu) 890if (hmenu == IntPtr.Zero) 909private static bool IsWindowSubMenu(IntPtr hwnd) 914private static int GetHighlightedMenuItem(IntPtr hmenu) 928private static IntPtr GetPopupHwndForHMenu(IntPtr hmenu) 930IntPtr hwndPopup = IntPtr.Zero; 933hwndPopup = Misc.FindWindowEx(IntPtr.Zero, hwndPopup, WindowsMenu.MenuClassName, null); 934if (hwndPopup == IntPtr.Zero) 940IntPtr hmenuTest = HmenuFromHwnd(hwndPopup); 944return IntPtr.Zero; 948private static void MenuEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 1006if (parent == null && _expandedMenus.Contains(IntPtr.Zero)) 1009parentInfo = (MenuParentInfo)_expandedMenus[IntPtr.Zero]; 1106private IntPtr _hmenu; 1134internal IntPtr _hwndParent; // menu's hwnd on which menuItem lives 1138internal MenuParentInfo (IntPtr hwndParent, int menuItem, MenuType type) 1167internal MenuItem (IntPtr hwnd, ProxyFragment parent, int item, IntPtr hmenu, WindowsMenu.MenuType type) 1415return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero; 1440IntPtr hwndFocus = Misc.GetFocusedWindow(); 1444if (hwndFocus != IntPtr.Zero && hwndFocus != _hwnd) 1597IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item); 1598if (submenu == IntPtr.Zero) 1603IntPtr hwndSubmenu = WindowsMenu.WindowFromSubmenu (submenu); 1605if (hwndSubmenu != IntPtr.Zero) 1616IntPtr submenu = _menuType == MenuType.System ? _hmenu : UnsafeNativeMethods.GetSubMenu (_hmenu, _item); 1617if (submenu == IntPtr.Zero) 1622IntPtr hwndSubmenu = WindowsMenu.WindowFromSubmenu(submenu); 1624if (hwndSubmenu != IntPtr.Zero) 1894return (Misc.IsBitSet(menuItemInfo.fType, NativeMethods.MFT_RADIOCHECK) && menuItemInfo.hbmpChecked == IntPtr.Zero); 1898private static bool IsSeparator (IntPtr hmenu, int position) 1950if (menuItemInfo.hSubMenu != IntPtr.Zero) 1977IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, MenuClassName, null); 1978return (hwndSubMenu == IntPtr.Zero || !SafeNativeMethods.IsWindowVisible(hwndSubMenu)); 1982IntPtr submenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item); 1983return (IntPtr.Zero == WindowsMenu.WindowFromSubmenu(submenu)); 2087for (IntPtr hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, WindowsMenu.MenuClassName, null); 2089hwndSubMenu = Misc.FindWindowEx(IntPtr.Zero, hwndSubMenu, WindowsMenu.MenuClassName, null)) 2092if (hwndSubMenu == IntPtr.Zero) 2118Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_KEYMENU, (IntPtr)Convert.ToInt32(' ')); 2134IntPtr hSubmenu = UnsafeNativeMethods.GetSubMenu(_hmenu, _item); 2135if (hSubmenu == IntPtr.Zero) 2139IntPtr hwndSubmenu = WindowsMenu.WindowFromSubmenu(hSubmenu); 2141if (hwndSubmenu != IntPtr.Zero) 2245if (gui.hwndCapture != IntPtr.Zero && Misc.ProxyGetClassName(gui.hwndCapture) == "ListBox") 2396(IntPtr.Zero != UnsafeNativeMethods.GetSubMenu (_hmenu, 0)) && 2534int length = UnsafeNativeMethods.GetMenuString(_hmenu, _item, IntPtr.Zero, 0, NativeMethods.MF_BYPOSITION); 2576private unsafe string TryMSAAMenuWorkAround(IntPtr dwItemData) 2578if (_hwnd == IntPtr.Zero) 2594IntPtr count; 2817internal IntPtr pszWText; // NUL-terminated text, in Unicode 2821private IntPtr _hmenu; 2850internal DestroyedMenuItem(IntPtr hwnd, int item, IntPtr hwndParent) 2985private IntPtr _hwndParent;
MS\Internal\AutomationProxies\WindowsNonControl.cs (3)
24private WindowsNonControl(IntPtr hwnd, ProxyFragment parent, int item) 36internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 41private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild)
MS\Internal\AutomationProxies\WindowsProgressbar.cs (9)
23private WindowsProgressBar (IntPtr hwnd, ProxyFragment parent, int item) 38internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 43private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 54internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 154int cur = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 155int min = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, new IntPtr(1), IntPtr.Zero); 156int max = Misc.ProxySendMessageInt(_hwnd, NativeMethods.PBM_GETRANGE, IntPtr.Zero, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsRebar.cs (25)
25private WindowsRebar (IntPtr hwnd, ProxyFragment parent, int item) 41internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 46private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 55internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 156IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd (IntPtr hwnd) 193return Misc.ProxySendMessageInt(_hwnd, NativeMethods.RB_GETBANDCOUNT, IntPtr.Zero, IntPtr.Zero); 206return XSendMessage.XSendGetIndex(_hwnd, NativeMethods.RB_HITTEST, IntPtr.Zero, new IntPtr(&rbHitTestInfo), Marshal.SizeOf(rbHitTestInfo.GetType())); 256internal RebarBandItem (IntPtr hwnd, ProxyFragment parent, int item) 288IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.RB_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 325IntPtr hwndBand = HwndBand; 327if (hwndBand != IntPtr.Zero) 344IntPtr hwndBand = HwndBand; 346if (hwndBand != IntPtr.Zero && Misc.PtInWindowRect(hwndBand, x, y)) 379Misc.PostMessage(_hwnd, NativeMethods.RB_PUSHCHEVRON, (IntPtr)_item, IntPtr.Zero); 393internal static Rect GetBoundingRectangle (IntPtr hwnd, int item) 405if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rectW32, 2)) 422internal IntPtr HwndBand 426if (_hwndBand == IntPtr.Zero) 455private IntPtr _hwndBand = IntPtr.Zero; 481internal RebarBandChildOverrideProxy (IntPtr hwnd, ProxyFragment parent, int item)
MS\Internal\AutomationProxies\WindowsRichEdit.cs (16)
28private WindowsRichEdit (IntPtr hwnd, ProxyFragment parent, int style) 53internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 58internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 67internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 188int result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.EM_GETLIMITTEXT, IntPtr.Zero, IntPtr.Zero); 195result = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(str)); 609ptd = IntPtr.Zero, 618pUnkForRelease = IntPtr.Zero, 619hGlobal = IntPtr.Zero 624if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 634if (hr != NativeMethods.S_OK || med.hGlobal == IntPtr.Zero) 640IntPtr globalMem = UnsafeNativeMethods.GlobalLock(med.hGlobal); 645if (globalMem == IntPtr.Zero) 680IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 682if (hwndParent != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsScroll.cs (14)
27internal static void SetScrollPercent (IntPtr hwnd, double horizontalPercent, double verticalPercent, bool forceResults) 60internal static void Scroll (IntPtr hwnd, ScrollAmount HorizontalAmount, ScrollAmount VerticalAmount, bool fForceResults) 77internal static object GetPropertyScroll (AutomationProperty idProp, IntPtr hwnd) 109internal static bool Scrollable (IntPtr hwnd, int sbFlag) 154internal static bool HasScrollableStyle(IntPtr hwnd) 172internal static bool IsScrollable(IntPtr hwnd) 188private static double GetScrollInfo(IntPtr hwnd, int sbFlag) 246private static double ScrollViewSize(IntPtr hwnd, int sbFlag) 267private static bool SetScrollPercent(IntPtr hwnd, double fScrollPos, int sbFlag, out bool forceResults) 319bool fRet = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero) == 0; 349private static bool ScrollCursor(IntPtr hwnd, ScrollAmount amount, int sbFlag, bool fForceResults) 433int result = Misc.ProxySendMessageInt(hwnd, message, (IntPtr)wParam, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsScrollBar.cs (13)
29internal WindowsScrollBar (IntPtr hwnd, ProxyFragment parent, int item, int sbFlag) 59internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 64private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 75internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 409internal static bool HasVerticalScrollBar (IntPtr hwnd) 414internal static bool HasHorizontalScrollBar (IntPtr hwnd) 419internal static bool IsScrollBarVertical(IntPtr hwnd, int sbFlag) 428internal static bool IsScrollBarWithThumb (IntPtr hwnd, int sbFlag) 699Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 701Misc.ProxySendMessage(_hwnd, msg, (IntPtr)wParam, IntPtr.Zero); 706private static bool HasValuePattern (IntPtr hwnd, int sbFlag)
MS\Internal\AutomationProxies\WindowsScrollBarBits.cs (11)
36internal WindowsScrollBarBits (IntPtr hwnd, ProxyFragment parent, int item, int sbFlag) 80internal static ProxySimple CreateFromChildId(IntPtr hwnd, ProxyFragment parent, int idChild, int sbFlag) 202internal static Rect GetBoundingRectangle(IntPtr hwnd, ProxyFragment parent, WindowsScrollBar.ScrollBarItem item, int sbFlag) 294internal static Rect GetVerticalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi) 297if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 385internal static Rect GetHorizontalScrollbarBitBoundingRectangle(IntPtr hwnd, WindowsScrollBar.ScrollBarItem item, NativeMethods.ScrollBarInfo sbi) 389if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2)) 516IntPtr parentHwnd = _sbFlag == NativeMethods.SB_CTL ? Misc.GetWindowParent(_hwnd) : _hwnd; 565Misc.ProxySendMessage(parentHwnd, msg, (IntPtr)wParam, (IntPtr)(parentHwnd == _hwnd ? IntPtr.Zero : _hwnd));
MS\Internal\AutomationProxies\WindowsSlider.cs (31)
26private WindowsSlider (IntPtr hwnd, ProxyFragment parent, int item) 45internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 50private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 59internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 167IntPtr parent = Misc.GetParent(_hwnd); 169if (IntPtr.Zero != parent) 178Misc.ProxySendMessage(parent, msg, new IntPtr(wParam), IntPtr.Zero); 260int value = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPOS, IntPtr.Zero, IntPtr.Zero); 265int maxValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 290return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETLINESIZE, IntPtr.Zero, IntPtr.Zero); 298return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMIN, IntPtr.Zero, IntPtr.Zero); 306return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETRANGEMAX, IntPtr.Zero, IntPtr.Zero); 314return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TBM_GETPAGESIZE, IntPtr.Zero, IntPtr.Zero); 358internal SliderItem (IntPtr hwnd, ProxyFragment parent, int item, bool fHorizontal) 408IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TBM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 437IntPtr wParam = (IntPtr) (_item == (int) WindowsSlider.SItem.LargeDecrement ? NativeMethods.VK_PRIOR : NativeMethods.VK_NEXT); 439Misc.ProxySendMessage(_hwnd, NativeMethods.WM_KEYDOWN, wParam, IntPtr.Zero); 453internal static Rect GetBoundingRectangle (IntPtr hwnd, WindowsSlider.SItem item, bool fHorizontal) 460XSendMessage.XSend(hwnd, NativeMethods.TBM_GETCHANNELRECT, IntPtr.Zero, new IntPtr(&rcChannel), Marshal.SizeOf(rcChannel.GetType()), XSendMessage.ErrorValue.NoCheck); 462if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcChannel, 2)) 472XSendMessage.XSend(hwnd, NativeMethods.TBM_GETTHUMBRECT, IntPtr.Zero, new IntPtr(&rcThumb), Marshal.SizeOf(rcThumb.GetType()), XSendMessage.ErrorValue.NoCheck); 474if (!Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rcThumb, 2))
MS\Internal\AutomationProxies\WindowsSpinner.cs (21)
26internal WindowsSpinner(IntPtr hwndUpDown, IntPtr hwndEdit, ProxyFragment parent, int item) 45internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 50internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 55IntPtr hwndBuddy; 60hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 61if (hwndBuddy == IntPtr.Zero) 80internal static void RaiseEvents(IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 263internal static bool IsSpinnerEdit(IntPtr hwnd) 265return GetUpDownFromEdit(hwnd) != IntPtr.Zero; 270internal static IntPtr GetUpDownFromEdit(IntPtr hwnd) 272IntPtr hwndParent = Misc.GetParent(hwnd); 274if (hwndParent != IntPtr.Zero) 276IntPtr hwndChild = Misc.GetWindow(hwndParent, NativeMethods.GW_CHILD); 277while (hwndChild != IntPtr.Zero) 282IntPtr hwndBuddy = Misc.ProxySendMessage(hwndChild, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 292return IntPtr.Zero;
MS\Internal\AutomationProxies\WindowsStartMenu.cs (3)
20public WindowsStartMenu(IntPtr hwnd, ProxyHwnd parent, int item) 31internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 36private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild)
MS\Internal\AutomationProxies\WindowsStatic.cs (5)
23private WindowsStatic (IntPtr hwnd, ProxyFragment parent, StaticType type, int style) 49internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 54private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 106internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 167private static bool IsLinkLabel(IntPtr hwnd)
MS\Internal\AutomationProxies\WindowsStatusBar.cs (25)
25internal WindowsStatusBar(IntPtr hwnd, ProxyFragment parent, int item, Accessible acc) 46internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 51private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 60internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 104IntPtr hwndChild = accChild.Window; 105if (hwndChild == IntPtr.Zero || hwndChild == _hwnd) 110if(hwndChild != IntPtr.Zero && hwndChild != _hwnd) 291IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd(IntPtr hwnd) 300IntPtr hwndChild = IntPtr.Zero; 305if (hwndChild == IntPtr.Zero) 336return Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETPARTS, IntPtr.Zero, IntPtr.Zero); 345private static unsafe IntPtr GetChildHwnd(IntPtr hwnd, Rect rc) 349hwnd = IntPtr.Zero 361private static unsafe bool FindChildFromRect(IntPtr hwnd, void* lParam) 420internal WindowsStatusBarPane (IntPtr hwnd, ProxyFragment parent, int item, Accessible acc) 556internal static Rect GetBoundingRectangle (IntPtr hwnd, int item) 596int retValue = Misc.ProxySendMessageInt(_hwnd, NativeMethods.SB_GETTEXTLENGTHW, new IntPtr(_item), IntPtr.Zero); 645internal WindowsStatusBarPaneChildOverrideProxy(IntPtr hwnd, ProxyFragment parent, int item) 751public StatusBarGrip (IntPtr hwnd, ProxyHwnd parent, int item) 789internal static NativeMethods.Win32Rect GetBoundingRectangle (IntPtr hwnd) 817internal static StatusBarGrip Create(IntPtr hwnd, ProxyHwnd parent, int item) 830internal static bool HasGrip(IntPtr hwnd)
MS\Internal\AutomationProxies\WindowsSysHeader.cs (36)
32internal WindowsSysHeader (IntPtr hwnd) 49internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 54internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 66internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 75IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (hwnd, NativeMethods.GA_PARENT); 76if (hwndParent != IntPtr.Zero) 157if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref HitTestInfo.pt, 1)) 161index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.HDM_HITTEST, IntPtr.Zero, new IntPtr(&HitTestInfo), Marshal.SizeOf(HitTestInfo.GetType())); 177int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 244IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor (_hwnd, NativeMethods.GA_PARENT); 245if (hwndParent != IntPtr.Zero) 284Misc.ProxySendMessage(hwndParent, NativeMethods.LVM_SCROLL, new IntPtr(horizontalScrollAmount), IntPtr.Zero); 290private static bool HeaderIsHidden (IntPtr hwnd) 296private static int OrderToIndex (IntPtr hwnd, int order) 298return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_ORDERTOINDEX, new IntPtr(order), IntPtr.Zero); 301private static int HeaderItemCount (IntPtr hwnd) 303return Misc.ProxySendMessageInt(hwnd, NativeMethods.HDM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 357internal HeaderItem (IntPtr hwnd, ProxyFragment parent, int item) 429IntPtr hwndParent = Misc.GetParent(_hwnd); 430if (hwndParent != IntPtr.Zero) 478IntPtr center = NativeMethods.Util.MAKELPARAM (pt.x, pt.y); 482Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 525int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 573if (!Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2)) 668return Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1); 693int item = Misc.ProxySendMessageInt(_hwnd, NativeMethods.HDM_GETFOCUSEDITEM, IntPtr.Zero, IntPtr.Zero); 719IntPtr center = NativeMethods.Util.MAKELPARAM (rectW32.left + ((rectW32.right - rectW32.left) / 2), rectW32.top + ((rectW32.bottom - rectW32.top) / 2)); 725Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, center); 737IntPtr hwndDropDown = Misc.FindWindowEx(IntPtr.Zero, IntPtr.Zero, "DropDown", null); 738if (hwndDropDown != IntPtr.Zero)
MS\Internal\AutomationProxies\WindowsTab.cs (89)
35public WindowsTab (IntPtr hwnd, ProxyFragment parent, int item) 63internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 68private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 78internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 259if (!Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref hti.pt, 1)) 266IntPtr updownHwnd = this.GetUpDownHwnd (); 268if (updownHwnd != IntPtr.Zero && Misc.PtInWindowRect(updownHwnd, x, y)) 276index = XSendMessage.XSendGetIndex(_hwnd, NativeMethods.TCM_HITTEST, IntPtr.Zero, new IntPtr(&hti), Marshal.SizeOf(hti.GetType())); 290int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero); 313IntPtr upDownHwnd = GetUpDownHwnd(); 314if (upDownHwnd != IntPtr.Zero) 332IntPtr upDownHwnd = GetUpDownHwnd(); 333if (upDownHwnd != IntPtr.Zero) 350IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd (IntPtr hwnd) 496IntPtr updownHwnd = this.GetUpDownHwnd (); 498if (updownHwnd == IntPtr.Zero) 504int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 512Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 513Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, (IntPtr)NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 525IntPtr updownHwnd = this.GetUpDownHwnd (); 527if (updownHwnd == IntPtr.Zero) 533int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 536int posResult = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 583IntPtr updownHwnd = this.GetUpDownHwnd (); 585if (updownHwnd == IntPtr.Zero) 640internal static int GetItemCount(IntPtr hwnd) 645int count = Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETITEMCOUNT, IntPtr.Zero, IntPtr.Zero); 682IntPtr updownHwnd = this.GetUpDownHwnd(); 684if (updownHwnd == IntPtr.Zero) 687int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 691Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 692Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 697return GetUpDownHwnd(_hwnd) != IntPtr.Zero; 701internal static bool IsValidControl(IntPtr hwnd) 717IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 722IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(hwnd, NativeMethods.GA_PARENT); 723if (hwndParent != IntPtr.Zero 744private IntPtr GetUpDownHwnd() 748private static IntPtr GetUpDownHwnd(IntPtr hwnd) 750IntPtr childHwnd = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 757if (childHwnd != IntPtr.Zero) 775return IntPtr.Zero; 799IntPtr updownHwnd = this.GetUpDownHwnd (); 801if (updownHwnd == IntPtr.Zero) 808int newPos = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 809int range = Misc.ProxySendMessageInt(updownHwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 848Misc.ProxySendMessage(updownHwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, (IntPtr)newPos); 849Misc.ProxySendMessage(_hwnd, NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 859internal static bool SupportMultipleSelection (IntPtr hwnd) 900internal WindowsTabItem(IntPtr hwnd, ProxyFragment parent, int item, bool fIsWinform) 966IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 1003Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1034IntPtr hwndChild = GetItemHwndByIndex(); 1035if (hwndChild != IntPtr.Zero && SafeNativeMethods.IsWindowVisible(hwndChild)) 1149Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_DESELECTALL, IntPtr.Zero, IntPtr.Zero); 1229internal static string GetName(IntPtr hwnd, int item, bool fIsWinform) 1237internal static int GetCurrentSelectedItem(IntPtr hwnd) 1239return Misc.ProxySendMessageInt(hwnd, NativeMethods.TCM_GETCURSEL, IntPtr.Zero, IntPtr.Zero); 1255return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TCM_GETCURFOCUS, IntPtr.Zero, IntPtr.Zero) == _item; 1277return Misc.MapWindowPoints(_hwnd, IntPtr.Zero, ref rectW32, 2) ? rectW32 : NativeMethods.Win32Rect.Empty; 1297if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1299Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1300Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1306Misc.ProxySendMessage(_hwnd, NativeMethods.TCM_SETCURFOCUS, new IntPtr(_item), IntPtr.Zero); 1312private IntPtr GetItemHwndByIndex() 1316IntPtr hwndParent = _hwnd; 1322if (hwndParent != IntPtr.Zero) 1330return Misc.FindWindowEx(hwndParent, IntPtr.Zero, null, sName); 1334return IntPtr.Zero; 1338private static string GetItemText(IntPtr hwnd, int itemIndex) 1389internal WindowsTabChildOverrideProxy(IntPtr hwnd, ProxyFragment parent, int item)
MS\Internal\AutomationProxies\WindowsTitleBar.cs (10)
29public WindowsTitleBar (IntPtr hwnd, ProxyFragment parent, int item) 111int hit = Misc.ProxySendMessageInt(_hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, (IntPtr)NativeMethods.Util.MAKELONG(x, y)); 150internal static bool HasTitleBar (IntPtr hwnd) 216private static bool IsTitleBarVisible (IntPtr hwnd) 246public TitleBarButton (IntPtr hwnd, ProxyFragment parent, int item) 431Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)NativeMethods.SC_RESTORE, IntPtr.Zero); 445Misc.PostMessage(_hwnd, NativeMethods.WM_SYSCOMMAND, (IntPtr)command, IntPtr.Zero);
MS\Internal\AutomationProxies\WindowsToolbar.cs (28)
27protected WindowsToolbar (IntPtr hwnd, ProxyFragment parent, int item) 44internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 49internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 76internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 228int focusIndex = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero); 299if (Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_ISBUTTONHIDDEN, new IntPtr(tbb.idCommand), IntPtr.Zero) == 0) 329return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_BUTTONCOUNT, IntPtr.Zero, IntPtr.Zero); 355internal ToolbarItem(IntPtr hwnd, ProxyFragment parent, int item, int idCommand) 368bool hasImageList = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETIMAGELIST, IntPtr.Zero, IntPtr.Zero) != 0; 369int exStyle = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETEXTENDEDSTYLE, IntPtr.Zero, IntPtr.Zero); 380IntPtr hwndParent = Misc.GetParent(_hwnd); 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); 558internal static Rect GetBoundingRectangle(IntPtr hwnd, int item) 576return Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETHOTITEM, IntPtr.Zero, IntPtr.Zero) == _item; 598int len = Misc.ProxySendMessageInt(_hwnd, NativeMethods.TB_GETBUTTONTEXT, new IntPtr(_idCommand), IntPtr.Zero); 635IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TB_GETTOOLTIPS, IntPtr.Zero, 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\WindowsToolbarAsMenu.cs (1)
27internal WindowsToolbarAsMenu(IntPtr hwnd, ProxyFragment parent, int item, Accessible acc)
MS\Internal\AutomationProxies\WindowsToolbarItemAsMenuItem.cs (3)
28internal ToolbarItemAsMenuItem(IntPtr hwnd, ProxyFragment parent, int item, int idCommand, Accessible acc) 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\WindowsTooltip.cs (13)
26private WindowsTooltip (IntPtr hwnd, ProxyFragment parent, int item) 42internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 47private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 58internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 89WinEventTracker.AddToNotificationList(IntPtr.Zero, new WinEventTracker.ProxyRaiseEvents(OnToolTipEvents), _toolTipEventIds); 106WinEventTracker.RemoveToNotificationList(IntPtr.Zero, _toolTipEventIds, new WinEventTracker.ProxyRaiseEvents(OnToolTipEvents)); 139private static void OnToolTipEvents( IntPtr hwnd, int eventId, object idProp, int idObject, int idChild ) 165private static bool IsToolTip( IntPtr hwnd ) 240IntPtr hwnd = UnsafeNativeMethods.WindowFromPhysicalPoint(pt.x, pt.y); 241if (hwnd == IntPtr.Zero) 298IntPtr hwnd = UnsafeNativeMethods.WindowFromPhysicalPoint(pt.x, pt.y); 299if (hwnd == IntPtr.Zero) 304int hit = Misc.ProxySendMessageInt(hwnd, NativeMethods.WM_NCHITTEST, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y));
MS\Internal\AutomationProxies\WindowsTreeView.cs (127)
26internal WindowsTreeView (IntPtr hwnd, ProxyFragment parent, int item) 45internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 50private static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 59internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 156IntPtr hNext = GetNextItem (_hwnd, ((TreeViewItem) child)._hItem); 158if (hNext != IntPtr.Zero) 183IntPtr hPrev = GetPreviousItem (_hwnd, ((TreeViewItem) child)._hItem); 185return hPrev != IntPtr.Zero ? new TreeViewItem (_hwnd, this, hPrev, (int) TVItem.TopLevel) : null; 189IntPtr hChild = GetRoot (_hwnd); 191if (hChild != IntPtr.Zero) 194IntPtr temp; 196for (temp = GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = GetNextItem (_hwnd, hChild)) 210IntPtr hChild = IntPtr.Zero; 213if (hChild != IntPtr.Zero) 233IntPtr hChild = GetRoot (_hwnd); 235if (hChild != IntPtr.Zero) 238for (IntPtr temp = GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = GetNextItem (_hwnd, hChild)) 252IntPtr hItem = XSendMessage.HitTestTreeView(_hwnd, x, y); 253if (hItem != IntPtr.Zero) 263IntPtr treeItem = GetSelection (_hwnd); 265if (treeItem != IntPtr.Zero) 280IntPtr treeItem = GetSelection(_hwnd); 282if (treeItem == IntPtr.Zero) 303return (IntPtr.Zero != GetSelection (_hwnd)); 373private ProxyFragment CreateTreeViewItem (IntPtr hItem, int depth) 378private ProxyFragment CreateTreeViewItemAndParents (IntPtr hItem) 383private ProxyFragment CreateParents (IntPtr hwnd, IntPtr hItem) 385IntPtr hItemParent = Parent (hwnd, hItem); 387if (hItemParent == IntPtr.Zero) 404private static bool Expand (IntPtr hwnd, IntPtr treeItem) 410private static bool Collapse (IntPtr hwnd, IntPtr treeItem) 416private static bool IsItemExpanded (IntPtr hwnd, IntPtr treeItem) 428private static bool SelectItem (IntPtr hwnd, IntPtr treeItem) 444private static IntPtr GetSelection (IntPtr hwnd) 446return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_CARET); 454private static IntPtr Parent (IntPtr hwnd, IntPtr treeItem) 460private static IntPtr GetNextItem (IntPtr hwnd, IntPtr treeItem) 466private static IntPtr GetPreviousItem (IntPtr hwnd, IntPtr treeItem) 472private static IntPtr GetRoot (IntPtr hwnd) 474return GetNext(hwnd, IntPtr.Zero, NativeMethods.TVGN_ROOT); 478private static IntPtr GetFirstChild (IntPtr hwnd, IntPtr treeItem) 488private static int GetCheckState (IntPtr hwnd, IntPtr treeItem) 496private static unsafe bool SetCheckState (IntPtr hwnd, IntPtr item, bool check) 516private static IntPtr GetNext (IntPtr hwnd, IntPtr treeItem, int flag) 522private static int GetItemState (IntPtr hwnd, IntPtr treeItem, int stateMask) 528private static bool TreeViewItem_HasChildren (IntPtr hwnd, IntPtr item) 543private static unsafe NativeMethods.Win32Rect GetItemRect (IntPtr hwnd, IntPtr treeItem, bool labelOnly) 550*((IntPtr *)&(rc.left)) = treeItem; 552IntPtr rectangle = new IntPtr (&(rc.left)); 553IntPtr partialDisplay = (labelOnly) ? new IntPtr (1) : IntPtr.Zero; 564return Misc.MapWindowPoints(hwnd, IntPtr.Zero, ref rc, 2) ? rc : NativeMethods.Win32Rect.Empty; 570private static bool GetItem (IntPtr hwnd, IntPtr item, int mask, out NativeMethods.TVITEM treeItem) 579private static string GetItemText(IntPtr hwnd, IntPtr item) 589private static bool SetItemText(IntPtr hwnd, IntPtr item, string text) 595IntPtr hwndEdit = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_EDITLABELW, IntPtr.Zero, item); 597if (hwndEdit == IntPtr.Zero) 606if (Misc.ProxySendMessageInt(hwndEdit, NativeMethods.WM_SETTEXT, IntPtr.Zero, new StringBuilder(text)) != 1) 609Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, (IntPtr)1, IntPtr.Zero); 617Misc.ProxySendMessage(hwnd, NativeMethods.TVM_ENDEDITLABELNOW, IntPtr.Zero, IntPtr.Zero); 641private static IntPtr TreeItemFromChildID(IntPtr hwnd, int idChild) 643IntPtr hItem = Misc.ProxySendMessage(hwnd, NativeMethods.TVM_MAPACCIDTOHTREEITEM, new IntPtr(idChild), IntPtr.Zero); 645if (hItem != IntPtr.Zero) 654int lCommonControlVersion = Misc.ProxySendMessageInt(hwnd, NativeMethods.CCM_GETVERSION, IntPtr.Zero, IntPtr.Zero); 657return IntPtr.Zero; 717internal TreeViewItem (IntPtr hwnd, ProxyFragment parent, IntPtr hItem, int depth) 863IntPtr hwndToolTip = Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_GETTOOLTIPS, IntPtr.Zero, IntPtr.Zero); 908return UnsafeNativeMethods.MonitorFromRect(ref itemWin32Rect, UnsafeNativeMethods.MONITOR_DEFAULTTONULL) == IntPtr.Zero; 1006if (selectionRequired || WindowsTreeView.GetSelection(_hwnd) != IntPtr.Zero) 1228Misc.ProxySendMessage(_hwnd, NativeMethods.TVM_ENSUREVISIBLE, IntPtr.Zero, _hItem); 1316IntPtr hNext = WindowsTreeView.GetNextItem (_hwnd, ((TreeViewItem) child)._hItem); 1318return hNext != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hNext, _item + 1) : null; 1326IntPtr hPrev = WindowsTreeView.GetPreviousItem (_hwnd, ((TreeViewItem) child)._hItem); 1328return hPrev != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hPrev, _item + 1) : null; 1334IntPtr hChild = WindowsTreeView.GetFirstChild (_hwnd, _hItem); 1336return hChild != IntPtr.Zero ? new TreeViewItem(_hwnd, this, hChild, _item + 1) : null; 1347IntPtr hChild = WindowsTreeView.GetFirstChild (_hwnd, _hItem); 1349if (hChild != IntPtr.Zero) 1352for (IntPtr temp = WindowsTreeView.GetNextItem (_hwnd, hChild); temp != IntPtr.Zero; temp = WindowsTreeView.GetNextItem (_hwnd, hChild)) 1465if (Misc.MapWindowPoints(IntPtr.Zero, _hwnd, ref pt, 1)) 1537Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1538Misc.PostMessage(_hwnd, NativeMethods.WM_LBUTTONUP, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(pt.x, pt.y)); 1565IntPtr address = UnsafeNativeMethods.GetProp(_hwnd, "MSAAStateImageMapAddr"); 1566if (address == IntPtr.Zero) 1593IntPtr count; 1596IntPtr pAddress = new IntPtr((long)address + (image * readSize)); 1626return UnsafeNativeMethods.GetProp(_hwnd, "MSAAStateImageMapAddr") != IntPtr.Zero; 1633if (_hItem == IntPtr.Zero) 1636int childId = Misc.ProxySendMessageInt(_hwnd, TVM_MAPHTREEITEMTOACCID, _hItem, IntPtr.Zero); 1662internal IntPtr _hItem;
MS\Internal\AutomationProxies\WindowsUpDown.cs (36)
26internal WindowsUpDown (IntPtr hwnd, ProxyFragment parent, int item) 45internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 50internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 59internal static void RaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild) 74private static void RaiseInvokedEvent(IntPtr hwnd, int idObject, int idChild) 223Misc.ProxySendMessage(_hwnd, NativeMethods.UDM_SETPOS, IntPtr.Zero, NativeMethods.Util.MAKELPARAM(newPos, 0)); 226Misc.ProxySendMessage(HwndBuddy(_hwnd), NativeMethods.WM_HSCROLL, NativeMethods.Util.MAKELPARAM(NativeMethods.SB_THUMBPOSITION, newPos), IntPtr.Zero); 289IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 291if (hwndParent != IntPtr.Zero) 301internal static bool IsWinformUpdown (IntPtr hwnd) 340int pos = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETPOS, IntPtr.Zero, IntPtr.Zero); 351private static IntPtr HwndBuddy(IntPtr hwnd) 353IntPtr hwndBuddy = Misc.ProxySendMessage(hwnd, NativeMethods.UDM_GETBUDDY, IntPtr.Zero, IntPtr.Zero); 356if (hwndBuddy == IntPtr.Zero) 367IntPtr hwndBuddy = HwndBuddy(_hwnd); 368return hwndBuddy != IntPtr.Zero && Misc.ProxyGetClassName(hwndBuddy).Contains("EDIT", StringComparison.OrdinalIgnoreCase); 377int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 391int range = Misc.ProxySendMessageInt(_hwnd, NativeMethods.UDM_GETRANGE, IntPtr.Zero, IntPtr.Zero); 420internal SpinButtonItem (IntPtr hwnd, ProxyFragment parent, int item) 473IntPtr hwndTabParent = GetTabParent(); 474if (hwndTabParent != IntPtr.Zero) 539IntPtr center = NativeMethods.Util.MAKELPARAM (x, y); 542Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONDOWN, (IntPtr)NativeMethods.MK_LBUTTON, center); 543Misc.ProxySendMessage(_hwnd, NativeMethods.WM_LBUTTONUP, (IntPtr)NativeMethods.MK_LBUTTON, center); 556internal static Rect GetBoundingRectangle(IntPtr hwnd, WindowsUpDown.SpinItem item) 618private IntPtr GetTabParent() 620IntPtr hwndParent = NativeMethodsSetLastError.GetAncestor(_hwnd, NativeMethods.GA_PARENT); 622if (hwndParent != IntPtr.Zero) 625hwndParent = Misc.ProxyGetClassName(hwndParent).Contains("SysTabControl32") ? hwndParent : IntPtr.Zero; 631private static bool IsHorizontal(IntPtr hwnd)
MS\Internal\AutomationProxies\WinEventTracker.cs (15)
46internal static void AddToNotificationList(IntPtr hwnd, ProxyRaiseEvents raiseEvents, ReadOnlySpan<EvtIdProperty> aEvtIdProp) 75internal static void RemoveToNotificationList(IntPtr hwnd, ReadOnlySpan<EvtIdProperty> aEvtIdProp, ProxyRaiseEvents raiseEvents) 92internal delegate void ProxyRaiseEvents (IntPtr hwnd, int eventId, object idProp, int idObject, int idChild); 121internal IntPtr _winEventHook; 174hp._winEventHook = Misc.SetWinEventHook(hp._evtId, hp._evtId, IntPtr.Zero, proc, processId, 0, NativeMethods.WINEVENT_OUTOFCONTEXT); 195private static void WinEventProc(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime) 197if (hwnd == IntPtr.Zero) 240if (ecp._hwnd == hwnd || ecp._hwnd == IntPtr.Zero) 292if ((ecp._hwnd == IntPtr.Zero)) 337private static void BuildEventsList(EventFlag eFlag, IntPtr hwnd, ProxyRaiseEvents raiseEvents, ReadOnlySpan<EvtIdProperty> aEvtIdProp) 352if (hwnd == IntPtr.Zero) 409if ( (hwnd == IntPtr.Zero || ecp._hwnd == hwnd) && 448Debug.Assert (hwnd == IntPtr.Zero, @"BuildEventsList: event is global but hwnd is not null"); 594internal IntPtr _hwnd; 602internal EventCreateParams (IntPtr hwnd, object idProp, ProxyRaiseEvents raiseEvents)
MS\Internal\AutomationProxies\WinFormsSpinner.cs (16)
28internal WinformsSpinner(IntPtr hwnd, IntPtr hwndEdit, IntPtr hwndUpDown, ProxyFragment parent, int item) 107internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild, int idObject) 112internal static IRawElementProviderSimple Create(IntPtr hwnd, int idChild) 129IntPtr hwndFirstChild = Misc.GetWindow(hwnd, NativeMethods.GW_CHILD); 130if (hwndFirstChild == IntPtr.Zero) 136IntPtr hwndLastChild = Misc.GetWindow(hwndFirstChild, NativeMethods.GW_HWNDLAST); 137if (hwndLastChild == IntPtr.Zero) 150IntPtr hwndEdit; 151IntPtr hwndSpin; 301IRawElementProviderSimple IRawElementProviderHwndOverride.GetOverrideProviderForHwnd(IntPtr hwnd) 423private bool IsEdit(IntPtr hwnd) 483internal WinformsSpinnerEdit(IntPtr hwnd, IntPtr hwndEdit, IntPtr hwndUpDown, ProxyFragment parent, int item)
MS\Win32\NativeMethods.cs (90)
620public static int IntPtrToInt32(IntPtr intPtr) 625internal unsafe delegate bool EnumChildrenCallbackVoid(IntPtr hwnd, void* lParam); 630internal IntPtr hwnd; 632internal IntPtr wParam; 633internal IntPtr lParam; 679internal IntPtr hwndFrom; 694internal IntPtr iString; 805internal IntPtr pszText; 808internal IntPtr lParam; 821internal IntPtr pszText; 824internal IntPtr lParam; 828internal IntPtr puColumns; 869internal IntPtr pszHeader; 871internal IntPtr pszFooter; 882pszHeader = pszFooter = IntPtr.Zero; 895internal IntPtr pszHeader; 897internal IntPtr pszFooter; 905internal IntPtr pszSubtitle; 907internal IntPtr pszTask; 909internal IntPtr pszDescriptionTop; 911internal IntPtr pszDescriptionBottom; 917internal IntPtr pszSubsetTitle; // NULL if group is not subset 925pszHeader = pszFooter = IntPtr.Zero; 931pszSubtitle = IntPtr.Zero; 933pszTask = IntPtr.Zero; 935pszDescriptionTop = IntPtr.Zero; 937pszDescriptionBottom = IntPtr.Zero; 943pszSubsetTitle = IntPtr.Zero; // NULL if group is not subset 1044internal static IntPtr MAKELPARAM (int low, int high) 1046return (IntPtr)((high << 16) | (low & 0xffff)); 1289internal IntPtr lpMinimumApplicationAddress; 1290internal IntPtr lpMaximumApplicationAddress; 1291internal IntPtr dwActiveProcessorMask; 1395internal IntPtr dwExtraInfo; 1405internal IntPtr dwExtraInfo; 1471internal IntPtr hwndCombo; 1472internal IntPtr hwndItem; 1473internal IntPtr hwndList; 1481hwndCombo = IntPtr.Zero; 1482hwndItem = IntPtr.Zero; 1483hwndList = IntPtr.Zero; 1493internal IntPtr hMenu; 1494internal IntPtr hwndMenu; 1509internal IntPtr hwndActive; 1510internal IntPtr hwndFocus; 1511internal IntPtr hwndCapture; 1512internal IntPtr hwndMenuOwner; 1513internal IntPtr hwndMoveSize; 1514internal IntPtr hwndCaret; 1555internal IntPtr hSubMenu; 1556internal IntPtr hbmpChecked; 1557internal IntPtr hbmpUnchecked; 1558internal IntPtr dwItemData; 1559internal IntPtr dwTypeData; 1561internal IntPtr hbmpItem; 1582internal IntPtr lpText; 1585internal IntPtr hwndChild; 1589internal IntPtr hbmBack; 1595internal IntPtr lParam; 1633internal IntPtr hItem; 1636internal IntPtr pszText; 1641internal IntPtr lParam; 1643internal void Init (IntPtr item) 1649pszText = IntPtr.Zero; 1654lParam = IntPtr.Zero; 1663internal IntPtr hItem; 1670hItem = IntPtr.Zero; 1781public delegate void WinEventProcDef(int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, uint eventTime); 1805internal IntPtr pszText; 1808internal IntPtr lParam; 1815pszText = IntPtr.Zero; 1818lParam = IntPtr.Zero; 1826pszText = IntPtr.Zero; 1829lParam = IntPtr.Zero; 1856internal IntPtr pszText; 1857internal IntPtr hbm; 1860internal IntPtr lParam; 1864internal IntPtr pvFilter; 1870pszText = IntPtr.Zero; 1871hbm = IntPtr.Zero; 1874lParam = IntPtr.Zero; 1878pvFilter = IntPtr.Zero; 1925internal IntPtr hwnd; 1928internal IntPtr hinst; 1929internal IntPtr pszText; 1930internal IntPtr lParam; 1936hwnd = IntPtr.Zero; 1939hinst = IntPtr.Zero; 1940pszText = IntPtr.Zero; 1941lParam = IntPtr.Zero;
MS\Win32\SafeNativeMethods.cs (3)
21internal static extern bool IsWindowEnabled(IntPtr hWnd); 23internal static extern bool IsWindowVisible(IntPtr hWnd); 31internal static extern IntPtr GetShellWindow();
MS\Win32\UnsafeNativeMethods.cs (116)
18internal static extern int GetDeviceCaps(IntPtr hdc, int nIndex); 20internal static extern int GetObjectW(IntPtr hObject, int size, ref NativeMethods.LOGFONT lf); 22internal static extern IntPtr SelectObject(IntPtr hdc, IntPtr hObject); 24internal static extern IntPtr GetStockObject(int nIndex); 27internal static extern bool CloseHandle(IntPtr h); 29internal static extern IntPtr OpenProcess(int flags, bool inherit, uint dwProcessId); 41internal static extern IntPtr GlobalLock(IntPtr handle); 43internal static extern bool GlobalUnlock(IntPtr handle); 46internal static extern IntPtr VirtualAlloc(IntPtr address, UIntPtr size, int allocationType, int protect); 48internal static extern IntPtr VirtualAllocEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int allocationType, int protect); 50internal static extern bool VirtualFree(IntPtr address, UIntPtr size, int freeType); 52internal static extern bool VirtualFreeEx(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr address, UIntPtr size, int freeType); 62internal static extern bool ReadProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr Source, IntPtr Dest, IntPtr /*SIZE_T*/ size, out IntPtr /*SIZE_T*/ bytesRead); 64internal static extern bool ReadProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr Source, MS.Internal.AutomationProxies.SafeCoTaskMem destAddress, IntPtr /*SIZE_T*/ size, out IntPtr /*SIZE_T*/ bytesRead); 66internal static extern bool WriteProcessMemory(MS.Internal.AutomationProxies.SafeProcessHandle hProcess, IntPtr Dest, IntPtr sourceAddress, IntPtr /*SIZE_T*/ size, out IntPtr /*SIZE_T*/ bytesWritten); 71internal static extern int AccessibleObjectFromWindow(IntPtr hwnd, int idObject, ref Guid iid, [In, Out, MarshalAs(UnmanagedType.IUnknown)] ref object ppvObject); 73internal static extern int ObjectFromLresult(IntPtr lResult, ref Guid iid, IntPtr wParam, [In, Out] ref IAccessible ppvObject); 75public static extern int WindowFromAccessibleObject(IAccessible acc, ref IntPtr hwnd); 83internal static extern IntPtr GetProcessHandleFromHwnd(IntPtr hwnd); 97internal IntPtr ptd; 107internal IntPtr hGlobal; 108internal IntPtr pUnkForRelease; 112internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags); 115internal static extern bool UnhookWinEvent(IntPtr winEventHook); 127internal static extern int MsgWaitForMultipleObjects(int nCount, IntPtr[] handles, bool fWaitAll, int dwMilliseconds, int dwWakeMask); 133public static extern IntPtr GetMenu(IntPtr hwnd); 135public static extern IntPtr GetSubMenu(IntPtr hmenu, int nPos); 137public static extern int GetMenuState(IntPtr hmenu, int uIDCheckItem, int uCheck); 139public static extern int GetMenuString (IntPtr hMenu, int uIDItem, StringBuilder lpString, int nMaxCount, uint uFlag); 141public static extern int GetMenuString (IntPtr hMenu, int uIDItem, IntPtr lpString, int nMaxCount, uint uFlag); 143public static extern int GetMenuItemCount(IntPtr hmenu); 145public static extern int GetMenuItemID(IntPtr hmenu, int uCheck); 147public static extern bool GetMenuItemInfo(IntPtr hMenu, int uItem, bool fByPosition, [In, Out] ref NativeMethods.MENUITEMINFO menuItemInfo); 149public static extern bool GetMenuItemRect(IntPtr hWnd, IntPtr hMenu, int uItem, out NativeMethods.Win32Rect lprcItem); 157internal static extern IntPtr DispatchMessage([In] ref NativeMethods.MSG msg); 159internal static extern int GetMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hWnd, int uMsgFilterMin, int uMsgFilterMax); 161internal static extern bool PeekMessage([In, Out] ref NativeMethods.MSG msg, IntPtr hwnd, int uMsgFilterMin, int uMsgFilterMax, int wRemoveMsg); 163internal static extern bool PostMessage(IntPtr hwnd, int msg, IntPtr wparam, IntPtr lparam); 165internal static extern IntPtr SendMessageTimeout (IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, int flags, int uTimeout, out IntPtr pResult); 167internal static extern IntPtr SendMessageTimeout (IntPtr hwnd, int uMsg, IntPtr wParam, StringBuilder lParam, int flags, int uTimeout, out IntPtr result); 169internal static extern IntPtr SendMessageTimeout(IntPtr hwnd, int uMsg, IntPtr wParam, ref NativeMethods.Win32Rect lParam, int flags, int uTimeout, out IntPtr result); 171internal static extern IntPtr SendMessageTimeout(IntPtr hwnd, int uMsg, IntPtr wParam, ref UnsafeNativeMethods.TITLEBARINFOEX lParam, int flags, int uTimeout, out IntPtr result); 173internal static extern IntPtr SendMessageTimeout(IntPtr hwnd, int uMsg, out int wParam, out int lParam, int flags, int uTimeout, out IntPtr result); 183internal static extern IntPtr MonitorFromRect(ref NativeMethods.Win32Rect rect, int dwFlags); 191internal static extern bool RegisterHotKey(IntPtr hwnd, int atom, int fsModifiers, int vk); 197internal static extern bool UnregisterHotKey(IntPtr hwnd, int atom); 226internal static extern bool GetComboBoxInfo(IntPtr hwnd, [In, Out] ref NativeMethods.COMBOBOXINFO cbInfo); 246internal static extern bool GetScrollBarInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollBarInfo lpsi); 248internal static extern bool GetScrollInfo(IntPtr hwnd, int fnBar, [In, Out] ref NativeMethods.ScrollInfo lpsi); 254internal static extern unsafe bool EnumChildWindows(IntPtr hwndParent, NativeMethods.EnumChildrenCallbackVoid lpEnumFunc, void* lParam); 258internal static extern IntPtr GetDesktopWindow(); 260internal static extern bool GetClientRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect); 264public static extern bool GetTitleBarInfo(IntPtr hwnd, ref TITLEBARINFO pti); 266internal static extern bool GetWindowRect(IntPtr hWnd, [In, Out] ref NativeMethods.Win32Rect rect); 268internal static extern uint GetWindowThreadProcessId(IntPtr hwnd, out uint dwProcessId); 270internal static extern bool IsWindow(IntPtr hWnd); 272internal static extern uint RealGetWindowClass(IntPtr hwnd, StringBuilder className, uint maxCount); 274internal static extern bool SetForegroundWindow(IntPtr hWnd); 277internal static extern bool GetAltTabInfo(IntPtr hwnd, int iItem, ref ALTTABINFO pati, 306private static extern IntPtr IntWindowFromPoint(POINT pt); 309private static extern IntPtr IntWindowFromPhysicalPoint(POINT pt); 311public static IntPtr WindowFromPhysicalPoint(int x, int y) 341internal delegate bool EnumThreadWndProc(IntPtr hwnd, ref ENUMTOOLTIPWINDOWINFO lParam); 346internal IntPtr hwnd; 354internal IntPtr hwnd; 363internal static extern int GetClassName(IntPtr hwnd, StringBuilder className, int maxCount); 368internal static Int32 GetWindowLong(IntPtr hWnd, int nIndex, out int error) 371IntPtr result = IntPtr.Zero; 374if (IntPtr.Size == 4) 389if ((result == IntPtr.Zero) && (error != 0)) 408internal static extern IntPtr GetProp(IntPtr hwnd, string name); 427internal static extern IntPtr GetDC(IntPtr hWnd); 429internal static extern int ReleaseDC(IntPtr hWnd, IntPtr hDC); 463public IntPtr szID; 464public IntPtr szURL;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (18)
41public static extern Int32 GetWindowLong(IntPtr hWnd, int nIndex ); 44public static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex ); 66public static extern IntPtr GetAncestor(IntPtr hwnd, int gaFlags); 69public static extern IntPtr FindWindowEx(IntPtr hwndParent, IntPtr hwndChildAfter, string className, string wndName); 72public static extern bool GetMenuBarInfo (IntPtr hwnd, int idObject, uint idItem, ref NativeMethods.MENUBARINFO mbi); 75public static extern int GetTextExtentPoint32(IntPtr hdc, [MarshalAs(UnmanagedType.LPWStr)]string lpString, int cbString, out NativeMethods.SIZE lpSize); 78public static extern IntPtr GetWindow(IntPtr hWnd, int uCmd); 81public static extern int GetWindowText(IntPtr hWnd, [Out] StringBuilder lpString, int nMaxCount); 84public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Rect rect, int cPoints); 87public static extern int MapWindowPoints(IntPtr hWndFrom, IntPtr hWndTo, [In, Out] ref NativeMethods.Win32Point pt, int cPoints); 90public static extern int SetScrollPos(IntPtr hWnd, int nBar, int nPos, bool bRedraw);
UIAutomationProvider (19)
MS\Internal\Automation\UiaCoreProviderApi.cs (11)
31internal static IntPtr UiaReturnRawElementProvider(IntPtr hwnd, IntPtr wParam, IntPtr lParam, IRawElementProviderSimple el) 36internal static IRawElementProviderSimple UiaHostProviderFromHwnd(IntPtr hwnd) 105Marshal.ThrowExceptionForHR(hr, (IntPtr)(-1)); 117private static extern IntPtr RawUiaReturnRawElementProvider(IntPtr hwnd, IntPtr wParam, IntPtr lParam, IRawElementProviderSimple el); 120private static extern int RawUiaHostProviderFromHwnd(IntPtr hwnd, [MarshalAs(UnmanagedType.Interface)] out IRawElementProviderSimple provider);
System\Windows\Automation\Provider\AutomationInteropProvider.cs (7)
56public static IRawElementProviderSimple HostProviderFromHandle ( IntPtr hwnd ) 58ValidateArgument(hwnd != IntPtr.Zero, nameof(SR.HwndMustBeNonNULL)); 70public static IntPtr ReturnRawElementProvider (IntPtr hwnd, IntPtr wParam, IntPtr lParam, IRawElementProviderSimple el ) 72ValidateArgument( hwnd != IntPtr.Zero, nameof(SR.HwndMustBeNonNULL));
System\Windows\Automation\Provider\IRawElementProviderHwndOverride.cs (1)
30IRawElementProviderSimple GetOverrideProviderForHwnd( IntPtr hwnd );
UIAutomationTypes (269)
MS\Internal\Automation\UiaCoreTypesApi.cs (6)
72IntPtr automationCoreHandle = LoadLibraryHelper.SecureLoadLibraryEx(DllImport.UIAutomationCore, IntPtr.Zero, UnsafeNativeMethods.LoadLibraryFlags.LOAD_LIBRARY_SEARCH_SYSTEM32); 73if (automationCoreHandle != IntPtr.Zero) 75IntPtr entryPoint = UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, automationCoreHandle), StartListeningExportName); 76if (entryPoint != IntPtr.Zero) 102Marshal.ThrowExceptionForHR(hr, (IntPtr)(-1));
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\HandleCollector.cs (4)
21internal static IntPtr Add(IntPtr handle, int type) { 60internal static IntPtr Remove(IntPtr handle, int type) {
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\LoadLibraryHelper.cs (6)
29var hModule = IntPtr.Zero; 34hModule != IntPtr.Zero) 39UnsafeNativeMethods.GetProcAddressNoThrow(new HandleRef(null, hModule), AddDllDirectoryName) != IntPtr.Zero; 70internal static IntPtr SecureLoadLibraryEx(string lpFileName, IntPtr hFile, UnsafeNativeMethods.LoadLibraryFlags dwFlags)
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsCLR.cs (82)
94public static IntPtr InvalidIntPtr = (IntPtr)(-1); 95public static IntPtr LPSTR_TEXTCALLBACK = (IntPtr)(-1); 96public static HandleRef NullHandleRef = new HandleRef(null, IntPtr.Zero); 662public static HandleRef HWND_TOP = new HandleRef(null, (IntPtr)0); 663public static HandleRef HWND_BOTTOM = new HandleRef(null, (IntPtr)1); 1533public IntPtr hwndTrack = IntPtr.Zero; 1558public delegate IntPtr WndProc(IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam); 1614public IntPtr hdc; 1729public IntPtr hSubMenu = IntPtr.Zero; 1730public IntPtr hbmpChecked = IntPtr.Zero; 1731public IntPtr hbmpUnchecked = IntPtr.Zero; 1742public delegate bool EnumThreadWindowsCallback(IntPtr hWnd, IntPtr lParam); 1748internal IntPtr hdr_hwndFrom; 1749internal IntPtr hdr_idFrom; 1752internal IntPtr lpOFN; 1753internal IntPtr pszFile; 1760public IntPtr hwndOwner; 1761public IntPtr hInstance; 1763public IntPtr lpstrCustomFilter; 1766public IntPtr lpstrFile; 1768public IntPtr lpstrFileTitle; 1776public IntPtr lCustData; 1779public IntPtr pvReserved; 1916public IntPtr hwndFrame; 1917public IntPtr hAccel; 1954public IntPtr hAccel; 1979public IntPtr data1; 1981public IntPtr data2; 1990if ((this.vt == (int)tagVT.VT_UNKNOWN || this.vt == (int)tagVT.VT_DISPATCH) && this.data1 != IntPtr.Zero) { 1994if (this.vt == (int)tagVT.VT_BSTR && this.data1 != IntPtr.Zero) { 1998this.data1 = this.data2 = IntPtr.Zero; 2015private static extern IntPtr SysAllocString([In, MarshalAs(UnmanagedType.LPWStr)]string s); 2018private static extern void SysFreeString(IntPtr pbstr); 2020data1 = (IntPtr)(lVal & 0xFFFFFFFF); 2021data2 = (IntPtr)((lVal >> 32) & 0xFFFFFFFF); 2024public IntPtr ToCoTaskMemPtr() { 2025IntPtr mem = Marshal.AllocCoTaskMem(16); 2036IntPtr val = data1; 2049val = (IntPtr) Marshal.ReadByte(val); 2055val = (IntPtr) Marshal.ReadByte(val); 2062val = (IntPtr) Marshal.ReadInt16(val); 2068val = (IntPtr) Marshal.ReadInt16(val); 2075val = (IntPtr) Marshal.ReadInt32(val); 2082val = (IntPtr) Marshal.ReadInt32(val); 2142return (val != IntPtr.Zero); 2182private static IntPtr GetRefInt(IntPtr value) { 2239public delegate void TimerProc(IntPtr hWnd, int msg, IntPtr wParam, IntPtr lParam); 2245public IntPtr lpszDefaultScheme; 2251public IntPtr rgvarg; 2252public IntPtr rgdispidNamedArgs; 2274public IntPtr pvReserved; 2276public IntPtr pfnDeferredFillIn; 2283public IntPtr hwnd; 2284public IntPtr hwndInsertAfter; 2312internal abstract IntPtr AllocCoTaskMem(); 2314internal abstract void PutCoTaskMem(IntPtr ptr); 2334internal override IntPtr AllocCoTaskMem() 2336IntPtr result = Marshal.AllocCoTaskMem(buffer.Length); 2358internal override void PutCoTaskMem(IntPtr ptr) 2392internal override IntPtr AllocCoTaskMem() 2394IntPtr result = Marshal.AllocCoTaskMem(buffer.Length * 2); 2415internal override void PutCoTaskMem(IntPtr ptr) 2510internal delegate void WinEventProcDef (int winEventHook, int eventId, IntPtr hwnd, int idObject, int idChild, int eventThread, int eventTime); 2530public IntPtr hDevice; 2833public static readonly IntPtr WTS_CURRENT_SERVER_HANDLE = IntPtr.Zero; 3048internal delegate bool MonitorEnumProc(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsOther.cs (39)
92void GetWindow( /* [out] */ ref IntPtr phwnd) ; 128IntPtr pCmdText); 195internal static extern IntPtr SetEnhMetaFileBits(uint cbBuffer, byte[] buffer); 247internal static BitmapHandle CreateFromHandle(IntPtr hbitmap, bool ownsHandle=true) 275internal IntPtr CriticalGetHandle() 298public static int SignedHIWORD(IntPtr intPtr) 303public static int SignedLOWORD(IntPtr intPtr) 325public static int IntPtrToInt32(IntPtr intPtr) 336public static IntPtr HWND_MESSAGE = new IntPtr(-3); 346public IntPtr lpfnWndProc = IntPtr.Zero; 352public IntPtr hInstance = IntPtr.Zero; 354public IntPtr hIcon = IntPtr.Zero; 356public IntPtr hCursor = IntPtr.Zero; 358public IntPtr hbrBackground = IntPtr.Zero; 360public IntPtr lpszMenuName = IntPtr.Zero; 362public IntPtr lpszClassName = IntPtr.Zero; 364public IntPtr hIconSm = IntPtr.Zero; 554 public SafeLocalMemHandle(IntPtr existingHandle, bool ownsHandle) : base(ownsHandle) 561 return (LocalFree(base.handle) == IntPtr.Zero); 565 private static extern IntPtr LocalFree(IntPtr hMem); 619public IntPtr hInstance = IntPtr.Zero; 621public IntPtr hIcon = IntPtr.Zero; 623public IntPtr hCursor = IntPtr.Zero; 625public IntPtr hbrBackground = IntPtr.Zero; 631public IntPtr hIconSm = IntPtr.Zero;
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (18)
99public static extern IntPtr GetAncestor(IntPtr hwnd, int gaFlags); 102public static extern int GetKeyboardLayoutList(int size, [Out, MarshalAs(UnmanagedType.LPArray)] IntPtr[] hkls); 105public static extern IntPtr GetParent(HandleRef hWnd); 108public static extern IntPtr GetWindow(IntPtr hWnd, int uCmd); 114public static extern Int32 GetWindowLong(IntPtr hWnd, int nIndex ); 120public static extern IntPtr GetWindowLongPtr(IntPtr hWnd, int nIndex); 123public static extern IntPtr GetWindowLongPtr(HandleRef hWnd, int nIndex); 138public static extern IntPtr SetFocus(HandleRef hWnd); 144public static extern Int32 SetWindowLong(IntPtr hWnd, int nIndex, Int32 dwNewLong); 150public static extern IntPtr SetWindowLongPtr(HandleRef hWnd, int nIndex, IntPtr dwNewLong); 153public static extern IntPtr SetWindowLongPtr(IntPtr hWnd, int nIndex, IntPtr dwNewLong); 156public static extern IntPtr SetWindowLongPtrWndProc(HandleRef hWnd, int nIndex, NativeMethods.WndProc dwNewLong);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\UnsafeNativeMethodsCLR.cs (114)
57public static extern IntPtr GetWindow(HandleRef hWnd, int uCmd); 66public static extern IntPtr OpenProcess(int dwDesiredAccess, bool fInherit, int dwProcessId); 81public static extern IntPtr CriticalCreateCompatibleBitmap(HandleRef hDC, int width, int height); 84public static extern IntPtr CriticalGetStockObject(int stockObject); 87public static extern int CriticalFillRect(IntPtr hdc, ref NativeMethods.RECT rcFill, IntPtr brush); 97HandleCollector.Remove((IntPtr)hObject, NativeMethods.CommonHandles.GDI); 109public static extern IntPtr CriticalSelectObject(HandleRef hdc, IntPtr obj); 115public static extern bool CriticalRedrawWindow(HandleRef hWnd, IntPtr lprcUpdate, IntPtr hrgnUpdate, int flags); 118public static extern IntPtr ShellExecute(HandleRef hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd); 125public IntPtr hwnd; 131public IntPtr hInstApp; 132public IntPtr lpIDList; 134public IntPtr hkeyClass; 136public IntPtr hIcon; 137public IntPtr hProcess; 219internal static extern int ObjectFromLresult(IntPtr lResult, ref Guid iid, IntPtr wParam, [In, Out] ref IAccessible ppvObject); 225private static extern int IntOleInitialize(IntPtr val); 229return IntOleInitialize(IntPtr.Zero); 243HandleCollector.Remove((IntPtr)handle, NativeMethods.CommonHandles.Kernel); 266HandleCollector.Remove((IntPtr)pvBaseAddress, NativeMethods.CommonHandles.Kernel); 307public static extern IntPtr GetFocus(); 445internal static IntPtr SetFocus(HandleRef hWnd) 447IntPtr result = IntPtr.Zero; 459IntPtr result = IntPtr.Zero; 463internal static bool TrySetFocus(HandleRef hWnd, ref IntPtr result) 468if (result == IntPtr.Zero && errorCode != 0) 476internal static IntPtr GetParent(HandleRef hWnd) 478IntPtr retVal = NativeMethodsSetLastError.GetParent(hWnd); 481if (retVal == IntPtr.Zero && errorCode != 0) 490public static extern IntPtr GetAncestor(HandleRef hWnd, int flags); 496public static extern IntPtr SetParent(HandleRef hWnd, HandleRef hWndParent); 499private static extern IntPtr IntGetModuleHandle(string modName); 500internal static IntPtr GetModuleHandle(string modName) 502IntPtr retVal = IntGetModuleHandle(modName); 504if (retVal == IntPtr.Zero) 514public static extern IntPtr CallWindowProc(IntPtr wndProc, IntPtr hWnd, int msg, 515IntPtr wParam, IntPtr lParam); 518public static extern IntPtr IntGetProcAddress(HandleRef hModule, string lpProcName); 520public static IntPtr GetProcAddress(HandleRef hModule, string lpProcName) 522IntPtr result = IntGetProcAddress(hModule, lpProcName); 523if (result == IntPtr.Zero) 539public static extern IntPtr GetProcAddressNoThrow(HandleRef hModule, string lpProcName); 542public static extern IntPtr LoadLibrary(string lpFileName); 708internal static extern IntPtr LoadLibraryEx([In][MarshalAs(UnmanagedType.LPTStr)] string lpFileName, IntPtr hFile, [In] LoadLibraryFlags dwFlags); 739[Out] out IntPtr hModule); 743internal static extern bool FreeLibrary([In] IntPtr hModule); 780public static extern IntPtr GetDesktopWindow(); 783public static extern IntPtr GetForegroundWindow(); 820private static extern IntPtr IntBeginPaint(HandleRef hWnd, [In, Out] ref NativeMethods.PAINTSTRUCT lpPaint); 822public static IntPtr BeginPaint(HandleRef hWnd, [In, Out, MarshalAs(UnmanagedType.LPStruct)] ref NativeMethods.PAINTSTRUCT lpPaint) 836private static extern IntPtr IntGetDC(HandleRef hWnd); 837public static IntPtr GetDC(HandleRef hWnd) 839IntPtr hDc = IntGetDC(hWnd); 840if (hDc == IntPtr.Zero) 852HandleCollector.Remove((IntPtr)hDC, NativeMethods.CommonHandles.HDC); 861public static extern IntPtr GetActiveWindow(); 868public static extern unsafe bool UpdateLayeredWindow(IntPtr hwnd, IntPtr hdcDst, NativeMethods.POINT* pptDst, NativeMethods.POINT* pSizeDst, IntPtr hdcSrc, NativeMethods.POINT* pptSrc, int crKey, ref NativeMethods.BLENDFUNCTION pBlend, int dwFlags); 871public static extern IntPtr SetActiveWindow(HandleRef hWnd); 882private static extern bool IntDestroyCursor(IntPtr hCurs); 884public static bool DestroyCursor(IntPtr hCurs) 890private static extern bool IntDestroyIcon(IntPtr hIcon); 892public static bool DestroyIcon(IntPtr hIcon) 911private static extern bool IntDeleteObject(IntPtr hObject); 913public static bool DeleteObject(IntPtr hObject) 1042public static extern IntPtr IntCreateWindowEx(int dwExStyle, string lpszClassName, 1046public static IntPtr CreateWindowEx(int dwExStyle, string lpszClassName, 1050IntPtr retVal = IntCreateWindowEx(dwExStyle, lpszClassName, 1053if (retVal == IntPtr.Zero) 1071internal static extern IntPtr SetWinEventHook(int eventMin, int eventMax, IntPtr hmodWinEventProc, NativeMethods.WinEventProcDef WinEventReentrancyFilter, uint idProcess, uint idThread, int dwFlags); 1074internal static extern bool UnhookWinEvent(IntPtr winEventHook); 1199IntPtr GetWindow(); 1266IntPtr rgelt, 1267IntPtr pceltFetched); 1310IntPtr GetWindow(); 1340IntPtr hmenuShared, 1347IntPtr hmenuShared, 1349IntPtr holemenu, 1351IntPtr hwndActiveObject); 1356IntPtr hmenuShared); 1437IntPtr GetWindow(); 1471int GetWindow(out IntPtr hwnd); 1502int GetWindow([Out] out IntPtr hwnd); 1512int GetWindow([Out] out IntPtr hwnd); 1582IntPtr lpmsg, 1588IntPtr hwndParent, 1711IntPtr lpmsg, 1717IntPtr hwndParent, 1827IntPtr rgvar, 2144IntPtr pvaOut); 2555public static unsafe IntPtr ArrayToVARIANTVector(object[] args) 2557IntPtr mem = IntPtr.Zero; 2568Marshal.GetNativeVariantForObject(args[i], (IntPtr)(a + VariantSize * i)); 2574if (mem != IntPtr.Zero) 2586public static unsafe void FreeVARIANTVector(IntPtr mem, int len) 2596hrcurrent = VariantClear((IntPtr)(a + VariantSize * i)); 2625private static extern int VariantClear(IntPtr pObject); 2661IntPtr hDevice, 2750IntPtr hdc, 2751IntPtr lprcClip, 2753IntPtr lParam);
vbc (16)
src\Compilers\Core\CommandLine\NativeMethods.cs (14)
29internal IntPtr lpReserved2; 30internal IntPtr hStdInput; 31internal IntPtr hStdOutput; 32internal IntPtr hStdError; 38public IntPtr hProcess; 39public IntPtr hThread; 54internal static readonly IntPtr NullPtr = IntPtr.Zero; 55internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1); 69internal static extern bool CloseHandle(IntPtr hObject); 80IntPtr lpProcessAttributes, 81IntPtr lpThreadAttributes, 85IntPtr lpEnvironment, 92internal static extern IntPtr GetCommandLine();
src\Compilers\Shared\BuildClient.cs (2)
356IntPtr ptr = NativeMethods.GetCommandLine(); 357if (ptr == IntPtr.Zero)
VBCSCompiler (16)
src\Compilers\Core\CommandLine\NativeMethods.cs (14)
29internal IntPtr lpReserved2; 30internal IntPtr hStdInput; 31internal IntPtr hStdOutput; 32internal IntPtr hStdError; 38public IntPtr hProcess; 39public IntPtr hThread; 54internal static readonly IntPtr NullPtr = IntPtr.Zero; 55internal static readonly IntPtr InvalidIntPtr = new IntPtr(-1); 69internal static extern bool CloseHandle(IntPtr hObject); 80IntPtr lpProcessAttributes, 81IntPtr lpThreadAttributes, 85IntPtr lpEnvironment, 92internal static extern IntPtr GetCommandLine();
src\Compilers\Shared\BuildClient.cs (2)
356IntPtr ptr = NativeMethods.GetCommandLine(); 357if (ptr == IntPtr.Zero)
WindowsBase.Tests (14)
System\IO\Packaging\PackageDigitalSignatureManagerTests.cs (5)
28Assert.Equal(IntPtr.Zero, manager.ParentWindow); 141yield return new object[] { (IntPtr)(-1) }; 142yield return new object[] { IntPtr.Zero }; 143yield return new object[] { (IntPtr)1 }; 148public void ParentWindow_Set_GetReturnsExpected(IntPtr value)
System\Windows\Interop\MSGTests.cs (9)
12Assert.Equal(IntPtr.Zero, msg.hwnd); 14Assert.Equal(IntPtr.Zero, msg.wParam); 15Assert.Equal(IntPtr.Zero, msg.lParam); 23yield return new object[] { (IntPtr)(-1) }; 24yield return new object[] { IntPtr.Zero }; 25yield return new object[] { (IntPtr)1 }; 30public void hwnd_Set_GetReturnsExpected(IntPtr value) 64public void wParam_Set_GetReturnsExpected(IntPtr value) 80public void lParam_Set_GetReturnsExpected(IntPtr value)
WindowsFormsIntegration (53)
MS\Win32\NativeMethods.cs (2)
15public static IntPtr HWND_TOP = IntPtr.Zero;
MS\Win32\SafeNativeMethods.cs (2)
34internal static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter,
MS\Win32\UnsafeNativeMethods.cs (13)
14public static extern bool IsChild(IntPtr hWndParent, IntPtr hwnd); 18public static extern IntPtr GetFocus(); 22internal static extern IntPtr SetParent(IntPtr hWnd, IntPtr hWndParent); 30public static extern IntPtr DispatchMessage([In] ref System.Windows.Interop.MSG msg); 34internal static extern IntPtr SendMessage(HandleRef hWnd, int msg, IntPtr wParam, IntPtr lParam); 42private static extern DCSafeHandle IntCreateDC(string lpszDriver, string lpszDeviceName, string lpszOutput, IntPtr devMode); 48return IntCreateDC(lpszDriver, null, null, IntPtr.Zero); 54public static extern bool DeleteDC(IntPtr hDC);
src\Microsoft.DotNet.Wpf\src\Shared\MS\Win32\NativeMethodsSetLastError.cs (1)
36public static extern bool EnableWindow(IntPtr hWnd, bool enable);
System\Windows\Automation\Peers\WindowsFormsHostAutomationPeer.cs (2)
37IntPtr hwnd = wfh.Handle; 39if(hwnd != IntPtr.Zero)
System\Windows\Integration\ElementHost.cs (16)
223IntPtr focusHandle = UnsafeNativeMethods.GetFocus(); 258if (this.HwndSource != null && this.HwndSource.Handle != IntPtr.Zero) 589private IntPtr HwndSourceHook(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 622return IntPtr.Zero; // This value depends on the message being processed, see MSDN for the particular message. 694private void OnHwndSrcWmInputLangChange(int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 723private void OnHwndSrcWmImeNotify(int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 732if (wParam == (IntPtr)NativeMethods.IMN_SETCONVERSIONMODE || wParam == (IntPtr)NativeMethods.IMN_SETOPENSTATUS) 754private void OnHwndSourceMsgNotifyElementHost(int msg, IntPtr wParam, IntPtr lParam) 788if (!DesignMode && m.WParam == IntPtr.Zero)
System\Windows\Integration\HostUtils.cs (1)
395internal static int LOWORD(IntPtr ptr)
System\Windows\Integration\WindowsFormsHost.cs (16)
121protected override IntPtr WndProc(IntPtr hwnd, int msg, IntPtr wParam, IntPtr lParam, ref bool handled) 139private IntPtr OnWmGetObject(IntPtr wparam, IntPtr lparam) 141IntPtr result = IntPtr.Zero; 726private IntPtr _prevFocusHwnd = IntPtr.Zero; 746IntPtr focusHwnd = UnsafeNativeMethods.GetFocus(); 749if (IntPtr.Zero == _prevFocusHwnd ) { return; } 971(IntPtr)(uiAction | (toSet << 16)), 972IntPtr.Zero) != IntPtr.Zero)
WinFormsControlsTest (4)
FormShowInTaskbar.cs (1)
48IntPtr formHandle = form.Handle;
ScalingBeforeChanges.cs (3)
55internal static int LOWORD(IntPtr param) 60internal static int HIWORD(IntPtr param) 105m.Result = IntPtr.Zero;
xunit.assert (1)
Sdk\ArgumentFormatter.cs (1)
115 { typeof(IntPtr).GetTypeInfo(), "nint" },
xunit.console (12)
common\AssemblyResolution\AssemblyHelper.cs (3)
72protected override IntPtr LoadUnmanagedDll(string unmanagedDllName) 74var result = default(IntPtr);
common\AssemblyResolution\DependencyContextAssemblyCache.cs (4)
179public IntPtr LoadUnmanagedLibrary(string unmanagedLibraryName, Func<string, IntPtr> unmanagedAssemblyLoader) 181var result = default(IntPtr);
common\AssemblyResolution\Microsoft.DotNet.PlatformAbstractions\Native\NativeMethods.Darwin.cs (3)
33if (sysctl(name, 2, buf, len, IntPtr.Zero, 0) == 0 && *len < BUFFER_LENGTH) 35return Marshal.PtrToStringAnsi((IntPtr)buf, (int)*len); 51IntPtr newp,
common\AssemblyResolution\Microsoft.DotNet.PlatformAbstractions\RuntimeEnvironment.cs (1)
23return IntPtr.Size == 8 ? "x64" : "x86";
ConsoleRunner.cs (1)
182Console.WriteLine($"Microsoft.DotNet.XUnitConsoleRunner v{typeof(ConsoleRunner).Assembly.GetName().Version} ({IntPtr.Size * 8}-bit {platform})");