503 instantiations of IntPtr
csc (1)
Microsoft.AspNetCore.Http.Extensions.Tests (4)
Microsoft.AspNetCore.Server.HttpSys (8)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Microsoft.AspNetCore.Server.IISIntegration (1)
Microsoft.Build (11)
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)
Microsoft.Build.Tasks.CodeAnalysis (1)
Microsoft.Build.Tasks.Core (7)
Microsoft.Build.Utilities.UnitTests (1)
Microsoft.CodeAnalysis (3)
Microsoft.CodeAnalysis.CodeStyle (1)
Microsoft.CodeAnalysis.EditorFeatures (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ExpressionCompiler (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider.Utilities (2)
Microsoft.CodeAnalysis.Features (1)
Microsoft.CodeAnalysis.Rebuild (1)
Microsoft.CodeAnalysis.Workspaces (1)
Microsoft.DotNet.RemoteExecutor.Tests (2)
Microsoft.ML.Data (14)
Microsoft.VisualStudio.LanguageServices (5)
MSBuildTaskHost (2)
PresentationCore (17)
PresentationFramework (30)
PresentationUI (2)
ReachFramework (7)
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)
System.Data.Odbc (9)
System.Diagnostics.Process (1)
System.Drawing.Common.Tests (2)
System.Formats.Nrbf (2)
System.IO.Compression (2)
System.IO.Hashing (1)
System.IO.MemoryMappedFiles (3)
System.IO.Pipes (3)
System.Net.Ping (1)
System.Net.WebSockets (2)
System.Private.CoreLib (23)
System.Windows.Forms.Primitives.Tests (1)
System.Windows.Forms.Tests (3)
UIAutomationClient (10)
UIAutomationClientSideProviders (307)
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\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\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\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\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\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))
UIAutomationTypes (3)
vbc (1)
VBCSCompiler (1)
16878 references to IntPtr
csc (16)
dotnet-svcutil-lib (1)
IIS.Tests (5)
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)
Microsoft.AspNetCore.Cryptography.Internal (49)
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);
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)
Microsoft.AspNetCore.Cryptography.KeyDerivation (3)
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,
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)
Microsoft.AspNetCore.Http.Extensions.Tests (3)
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)
Microsoft.AspNetCore.OpenApi (4)
Microsoft.AspNetCore.Routing (2)
Microsoft.AspNetCore.Routing.Tests (1)
Microsoft.AspNetCore.Server.HttpSys (65)
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)
Microsoft.AspNetCore.Server.HttpSys.FunctionalTests (1)
Microsoft.AspNetCore.Server.IIS (104)
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)
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)
Microsoft.AspNetCore.Server.IISIntegration (2)
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);
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))
Microsoft.AspNetCore.Server.Kestrel.Core.Tests (1)
Microsoft.AspNetCore.Server.Kestrel.Microbenchmarks (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.NamedPipes (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Quic (1)
Microsoft.AspNetCore.Server.Kestrel.Transport.Sockets (2)
Microsoft.AspNetCore.Shared.Tests (12)
Microsoft.Build (25)
Microsoft.Build.Engine.OM.UnitTests (1)
Microsoft.Build.Engine.UnitTests (3)
Microsoft.Build.Framework (42)
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);
Microsoft.Build.Tasks.CodeAnalysis (15)
Microsoft.Build.Tasks.Core (203)
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))
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);
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);
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);
Microsoft.Build.UnGAC (2)
Microsoft.Build.Utilities.Core (1)
Microsoft.Build.Utilities.UnitTests (13)
Microsoft.CodeAnalysis (66)
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,
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 _);
Microsoft.CodeAnalysis.CodeStyle (6)
Microsoft.CodeAnalysis.Collections.Package (5)
Microsoft.CodeAnalysis.CSharp (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle (1)
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (1)
Microsoft.CodeAnalysis.CSharp.CommandLine.UnitTests (7)
Microsoft.CodeAnalysis.CSharp.Emit.UnitTests (46)
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)
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");
Microsoft.CodeAnalysis.CSharp.Symbol.UnitTests (1)
Microsoft.CodeAnalysis.CSharp.Workspaces (1)
Microsoft.CodeAnalysis.EditorFeatures (10)
Microsoft.CodeAnalysis.EditorFeatures.Test.Utilities (41)
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)
Microsoft.CodeAnalysis.ExpressionEvaluator.FunctionResolver (1)
Microsoft.CodeAnalysis.ExpressionEvaluator.ResultProvider (4)
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)
Microsoft.CodeAnalysis.Features (7)
Microsoft.CodeAnalysis.InteractiveHost (5)
Microsoft.CodeAnalysis.Remote.ServiceHub (2)
Microsoft.CodeAnalysis.Scripting (11)
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);
Microsoft.CodeAnalysis.Test.Utilities (30)
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)
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]);
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\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);
Microsoft.CodeAnalysis.Workspaces (25)
Microsoft.CodeAnalysis.Workspaces.MSBuild (6)
Microsoft.CodeAnalysis.Workspaces.MSBuild.BuildHost (12)
Microsoft.CodeAnalysis.XunitHook (1)
Microsoft.CSharp (1)
Microsoft.Data.Analysis (1)
Microsoft.DotNet.Build.Tasks.Feed (2)
Microsoft.DotNet.RemoteExecutor (6)
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;
Microsoft.DotNet.XUnitAssert.Tests (1)
Microsoft.Extensions.Caching.Hybrid.Tests (1)
Microsoft.Extensions.Caching.Memory (2)
Microsoft.Extensions.Diagnostics.ResourceMonitoring (23)
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)
Microsoft.Extensions.Logging.Console (5)
Microsoft.Extensions.Logging.EventSource (2)
Microsoft.ML.Core (2)
Microsoft.ML.Data (15)
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)
Microsoft.ML.FastTree (8)
Microsoft.ML.LightGbm (21)
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)
Microsoft.ML.Recommender (2)
Microsoft.ML.TensorFlow (15)
Microsoft.ML.TestFrameworkCommon (43)
Microsoft.ML.Tests (2)
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)
Microsoft.ML.Transforms (1)
Microsoft.ML.Vision (14)
Microsoft.VisualStudio.LanguageServices (174)
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)
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;
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)
Microsoft.VisualStudio.LanguageServices.CSharp (17)
Microsoft.VisualStudio.LanguageServices.CSharp.UnitTests (2)
Microsoft.Win32.Registry (1)
Microsoft.Win32.SystemEvents (4)
MSBuild (3)
MSBuildTaskHost (33)
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);
mscorlib (1)
netstandard (1)
PrepareTests (2)
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\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\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\Shared\MS\Internal\MimeTypeMapper.cs (1)
86IntPtr.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\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\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\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\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\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\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\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,
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;
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\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\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\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\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\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\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\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\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\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.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\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\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__);
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\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\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\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\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\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\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)
PresentationUI (26)
ReachFramework (56)
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)
Replay (14)
Roslyn.Test.PdbUtilities (7)
StackDepthTest (1)
System.CodeDom (6)
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.Concurrent (5)
System.Collections.Immutable (1)
System.Console (9)
System.Data.Odbc (152)
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
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\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\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\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.Diagnostics.DiagnosticSource (1)
System.Diagnostics.FileVersionInfo (1)
System.Diagnostics.PerformanceCounter (6)
System.Diagnostics.Process (40)
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.DirectoryServices (1)
System.Drawing.Common.Tests (146)
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\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.Formats.Nrbf (2)
System.Formats.Tar (4)
System.IO.Compression (16)
System.IO.Compression.Brotli (21)
System.IO.Compression.ZipFile (3)
System.IO.FileSystem.DriveInfo (5)
System.IO.FileSystem.Watcher (3)
System.IO.IsolatedStorage (1)
System.IO.MemoryMappedFiles (30)
System.IO.Pipes (12)
System.IO.Ports (5)
System.Linq.Expressions (2)
System.Linq.Parallel (2)
System.Management (1)
System.Net.Http (35)
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.HttpListener (17)
System.Net.Mail (18)
System.Net.NameResolution (15)
System.Net.NetworkInformation (12)
System.Net.Ping (7)
System.Net.Primitives (12)
System.Net.Quic (127)
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.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);
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.Requests (21)
System.Net.Security (295)
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.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.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);
System.Net.Sockets (71)
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);
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.WebClient (1)
System.Net.WebSockets (31)
System.Numerics.Tensors (4)
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\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\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\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\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\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\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\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\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.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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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\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);
System.Private.DataContractSerialization (1)
System.Private.Uri (1)
System.Private.Windows.Core (25)
System.Private.Windows.Core.TestUtilities (2)
System.Private.Xml (1)
System.Reflection.Metadata (14)
System.Runtime (1)
System.Runtime.Caching (1)
System.Runtime.InteropServices (16)
System.Runtime.InteropServices.JavaScript (4)
System.Runtime.Numerics (5)
System.Security.Cryptography (430)
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.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.EvpPkey.Ecdh.cs (1)
17IntPtr 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.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.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);
System.Security.Cryptography.Pkcs (1)
System.Security.Cryptography.ProtectedData (24)
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)
System.Security.Principal.Windows (9)
System.ServiceProcess.ServiceController (2)
System.Speech (6)
System.Text.Encoding.CodePages (5)
System.Text.Encodings.Web (1)
System.Text.Json (2)
System.Text.Json.SourceGeneration (1)
System.Text.RegularExpressions (2)
System.Text.RegularExpressions.Generator (2)
System.Threading (2)
System.Threading.Tasks.Parallel (17)
System.Transactions.Local (2)
System.Web.HttpUtility (1)
System.Windows.Controls.Ribbon (26)
System.Windows.Extensions (2)
System.Windows.Forms (276)
System.Windows.Forms.Design (35)
System.Windows.Forms.Design.Tests (14)
System.Windows.Forms.IntegrationTests.Common (1)
System.Windows.Forms.Interop.Tests (7)
System.Windows.Forms.Primitives (33)
System.Windows.Forms.Primitives.Tests (21)
System.Windows.Forms.Primitives.TestUtilities (10)
System.Windows.Forms.Tests (3705)
System.Xaml (2)
TlsFeaturesObserve (7)
UIAutomationClient (259)
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\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\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\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\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);
UIAutomationClientSideProviders (1831)
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\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\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\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\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\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\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\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\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\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\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)
UIAutomationTypes (269)
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\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)
VBCSCompiler (16)
WindowsBase.Tests (14)
WindowsFormsIntegration (53)
WinFormsControlsTest (4)
xunit.assert (1)
xunit.console (12)