142 references to NativeMethods
System.Workflow.ComponentModel (142)
AuthoringOM\Compiler\XomlCompilerHelpers.cs (6)
829
NativeMethods
.ThrowOnFailure(metaDataDispenser.OpenScope(assemblyLocation, 0, ref guidMetaDataImport, out metaDataImportObj));
844
NativeMethods
.ThrowOnFailure((metaDataImport.EnumTypeRefs(ref enumHandle, typeRefs, (uint)typeRefs.Length, ref typeRefCount)));
851
NativeMethods
.ThrowOnFailure(metaDataImport.GetTypeRefProps(typeRefs[typeRefIndex], out resolutionScopeToken, typeRefNamePtr, 0, out typeRefNameLength));
858
NativeMethods
.ThrowOnFailure(metaDataImport.GetTypeRefProps(typeRefs[typeRefIndex], out resolutionScopeToken, typeRefNamePtr, typeRefNameLength, out typeRefNameLength));
883
NativeMethods
.ThrowOnFailure(metaDataAssemblyImport.GetAssemblyRefProps(resolutionScopeToken, out publicKeyOrToken, out publicKeyOrTokenSize, assemblyName, 0, out assemblyNameSize, out assemblyMetadata, out hashValueBlob, out hashValueSize, out assemblyRefFlags));
895
NativeMethods
.ThrowOnFailure(metaDataAssemblyImport.GetAssemblyRefProps(resolutionScopeToken, out publicKeyOrToken, out publicKeyOrTokenSize, assemblyName, assemblyNameSize, out assemblyNameSize, out assemblyMetadata, out hashValueBlob, out hashValueSize, out assemblyRefFlags));
AuthoringOM\Design\DesignerHelpers.cs (37)
915
NativeMethods
.XFORM xform = new
NativeMethods
.XFORM(this.graphics.Transform);
920
this.oldGraphicsMode =
NativeMethods
.SetGraphicsMode(this.hdc,
NativeMethods
.GM_ADVANCED);
925
int result =
NativeMethods
.SetWorldTransform(this.hdc, xform);
929
IntPtr handle =
NativeMethods
.GetCurrentObject(this.hdc,
NativeMethods
.OBJ_PEN);
935
handle =
NativeMethods
.GetCurrentObject(this.hdc,
NativeMethods
.OBJ_EXTPEN);
941
handle =
NativeMethods
.GetCurrentObject(this.hdc,
NativeMethods
.OBJ_BRUSH);
953
IntPtr objectPtr =
NativeMethods
.SelectObject(this.hdc, this.oldPen);
961
objectPtr =
NativeMethods
.SelectObject(this.hdc, this.oldPenEx);
969
objectPtr =
NativeMethods
.SelectObject(this.hdc, this.oldBrush);
977
int result =
NativeMethods
.SetWorldTransform(this.hdc, new
NativeMethods
.XFORM());
985
result =
NativeMethods
.SetGraphicsMode(this.hdc, this.oldGraphicsMode);
1030
IntPtr objectPtr =
NativeMethods
.SelectObject(this.hdc, majorGridPen.Handle);
1038
if (!
NativeMethods
.MoveToEx(this.hdc, gridCoOrd, viewableRectangle.Top + 1, null))
1041
if (!
NativeMethods
.LineTo(this.hdc, gridCoOrd, viewableRectangle.Bottom - 1))
1047
objectPtr =
NativeMethods
.SelectObject(this.hdc, minorGridPen.Handle);
1051
if (!
NativeMethods
.MoveToEx(this.hdc, gridCoOrd + gridUnit.Width / 2, viewableRectangle.Top + 1, null))
1054
if (!
NativeMethods
.LineTo(this.hdc, gridCoOrd + gridUnit.Width / 2, viewableRectangle.Bottom - 1))
1057
objectPtr =
NativeMethods
.SelectObject(this.hdc, majorGridPen.Handle);
1067
if (!
NativeMethods
.MoveToEx(this.hdc, viewableRectangle.Left + 1, gridCoOrd, null))
1070
if (!
NativeMethods
.LineTo(this.hdc, viewableRectangle.Right - 1, gridCoOrd))
1076
objectPtr =
NativeMethods
.SelectObject(this.hdc, minorGridPen.Handle);
1080
if (!
NativeMethods
.MoveToEx(this.hdc, viewableRectangle.Left + 1, gridCoOrd + gridUnit.Height / 2, null))
1083
if (!
NativeMethods
.LineTo(this.hdc, viewableRectangle.Right - 1, gridCoOrd + gridUnit.Height / 2))
1086
objectPtr =
NativeMethods
.SelectObject(this.hdc, majorGridPen.Handle);
1095
IntPtr objectPtr =
NativeMethods
.SelectObject(this.hdc, this.oldPen);
1114
IntPtr penPtr =
NativeMethods
.ExtCreatePen(
NativeMethods
.PS_COSMETIC |
NativeMethods
.PS_USERSTYLE | penStyle, 1, new
NativeMethods
.LOGBRUSH(
NativeMethods
.BS_SOLID, ColorTranslator.ToWin32(pen.Color), 0), 2, new int[] { 1, 1 });
1127
int result =
NativeMethods
.DeleteObject(this.hpen);
AuthoringOM\Design\DesignerWidgets.cs (51)
17
using NativeMethods = System.Workflow.Interop.
NativeMethods
;
2160
this.infoTip.SetDelay(
NativeMethods
.TTDT_INITIAL, 1000);
2161
this.infoTip.SetDelay(
NativeMethods
.TTDT_RESHOW, 1000);
2162
this.infoTip.SetDelay(
NativeMethods
.TTDT_AUTOPOP, 1000000);
2172
this.inplaceTip.SetDelay(
NativeMethods
.TTDT_INITIAL, 50);
2173
this.inplaceTip.SetDelay(
NativeMethods
.TTDT_RESHOW, 50);
2174
this.inplaceTip.SetDelay(
NativeMethods
.TTDT_AUTOPOP, 1000000);
2217
if (
NativeMethods
.IsWindowVisible(this.infoTip.Handle))
2245
if (
NativeMethods
.IsWindowVisible(this.inplaceTip.Handle))
2256
if (msg.Msg ==
NativeMethods
.WM_NOTIFY && msg.LParam != IntPtr.Zero && !this.inplaceTipRectangle.IsEmpty)
2258
NativeMethods
.NMHDR notifyHeader = Marshal.PtrToStructure(msg.LParam, typeof(
NativeMethods
.NMHDR)) as
NativeMethods
.NMHDR;
2259
if (notifyHeader != null && notifyHeader.hwndFrom == this.inplaceTip.Handle && notifyHeader.code ==
NativeMethods
.TTN_SHOW)
2262
int result =
NativeMethods
.SetWindowPos(this.inplaceTip.Handle, IntPtr.Zero, screenCoOrd.X, screenCoOrd.Y, 0, 0,
NativeMethods
.SWP_NOSIZE |
NativeMethods
.SWP_NOZORDER |
NativeMethods
.SWP_NOACTIVATE);
2287
createParams.Style =
NativeMethods
.WS_POPUP |
NativeMethods
.TTS_ALWAYSTIP |
NativeMethods
.TTS_NOPREFIX;
2288
createParams.ExStyle =
NativeMethods
.WS_EX_TOPMOST;
2294
NativeMethods
.TOOLINFO toolInfo = GetToolInfo();
2295
toolInfo.flags =
NativeMethods
.TTF_TRANSPARENT |
NativeMethods
.TTF_SUBCLASS;
2305
NativeMethods
.TOOLINFO toolInfo = GetToolInfo();
2319
IntPtr lresult =
NativeMethods
.SendMessage(Handle,
NativeMethods
.TTM_ACTIVATE, activateValue, IntPtr.Zero);
2325
IntPtr lresult =
NativeMethods
.SendMessage(Handle,
NativeMethods
.TTM_POP, IntPtr.Zero, IntPtr.Zero);
2330
IntPtr lresult =
NativeMethods
.SendMessage(Handle,
NativeMethods
.TTM_SETMAXTIPWIDTH, IntPtr.Zero, new IntPtr(tipWidth));
2335
IntPtr lresult =
NativeMethods
.SendMessage(Handle,
NativeMethods
.TTM_SETDELAYTIME, new IntPtr(time), new IntPtr(delay));
2344
IntPtr lresult =
NativeMethods
.SendMessage(Handle,
NativeMethods
.TTM_SETTITLE, new IntPtr((int)ToolTipIcon.None), titleStr);
2354
NativeMethods
.TOOLINFO toolInfo = GetToolInfo();
2359
IntPtr lresult =
NativeMethods
.SendMessage(Handle,
NativeMethods
.TTM_UPDATETIPTEXT, IntPtr.Zero, ref toolInfo);
2369
NativeMethods
.TOOLINFO toolInfo = GetToolInfo();
2375
IntPtr lresult =
NativeMethods
.SendMessage(Handle,
NativeMethods
.TTM_NEWTOOLRECT, IntPtr.Zero, ref toolInfo);
2378
private bool AddTool(
NativeMethods
.TOOLINFO toolInfo)
2380
IntPtr retVal =
NativeMethods
.SendMessage(Handle,
NativeMethods
.TTM_ADDTOOL, IntPtr.Zero, ref toolInfo);
2384
private void DelTool(
NativeMethods
.TOOLINFO toolInfo)
2386
IntPtr lresult =
NativeMethods
.SendMessage(Handle,
NativeMethods
.TTM_DELTOOL, IntPtr.Zero, ref toolInfo);
2389
private
NativeMethods
.TOOLINFO GetToolInfo()
2391
NativeMethods
.TOOLINFO toolInfo = new
NativeMethods
.TOOLINFO();
AuthoringOM\Design\Dialogs\TypeBrowserDialog.cs (17)
498
NativeMethods
.DeleteObject(this.bitmapSortUp);
501
NativeMethods
.DeleteObject(this.bitmapSortDown);
993
IntPtr headerWindow =
NativeMethods
.ListView_GetHeader(this.artifactListView.Handle);
994
NativeMethods
.HDITEM headerItem = new
NativeMethods
.HDITEM();
995
headerItem.mask =
NativeMethods
.HDI_FORMAT |
NativeMethods
.HDI_BITMAP;
998
if (
NativeMethods
.Header_GetItem(headerWindow, i, headerItem))
1000
headerItem.fmt &= ~(
NativeMethods
.HDF_BITMAP |
NativeMethods
.HDF_BITMAP_ON_RIGHT);
1002
NativeMethods
.Header_SetItem(headerWindow, i, headerItem);
1006
if (
NativeMethods
.Header_GetItem(headerWindow, columnIndex, headerItem))
1008
headerItem.mask =
NativeMethods
.HDI_FORMAT |
NativeMethods
.HDI_BITMAP;
1009
headerItem.fmt |=
NativeMethods
.HDF_BITMAP |
NativeMethods
.HDF_BITMAP_ON_RIGHT;
1011
NativeMethods
.Header_SetItem(headerWindow, columnIndex, headerItem);
AuthoringOM\Design\WorkflowPrinting.cs (16)
220
Point dpi = new Point(Math.Max(
NativeMethods
.GetDeviceCaps(hDC,
NativeMethods
.LOGPIXELSX), 1), Math.Max(
NativeMethods
.GetDeviceCaps(hDC,
NativeMethods
.LOGPIXELSY), 1));
222
int printAreaHorz = (int)((float)
NativeMethods
.GetDeviceCaps(hDC,
NativeMethods
.HORZRES) * 100.0f / (float)dpi.X);
223
int printAreaVert = (int)((float)
NativeMethods
.GetDeviceCaps(hDC,
NativeMethods
.VERTRES) * 100.0f / (float)dpi.Y);
225
int physicalWidth = (int)((float)
NativeMethods
.GetDeviceCaps(hDC,
NativeMethods
.PHYSICALWIDTH) * 100.0f / (float)dpi.X);
226
int physicalHeight = (int)((float)
NativeMethods
.GetDeviceCaps(hDC,
NativeMethods
.PHYSICALHEIGHT) * 100.0f / (float)dpi.Y);
229
int leftMargin = (int)((float)
NativeMethods
.GetDeviceCaps(hDC,
NativeMethods
.PHYSICALOFFSETX) * 100.0f / (float)dpi.X);
230
int topMargin = (int)((float)
NativeMethods
.GetDeviceCaps(hDC,
NativeMethods
.PHYSICALOFFSETY) * 100.0f / (float)dpi.Y);
AuthoringOM\Design\WorkflowView.cs (7)
1434
if (this.workflowToolTip != null && m.Msg ==
NativeMethods
.WM_NOTIFY)
2224
if (m.Msg ==
NativeMethods
.WM_KEYDOWN || m.Msg ==
NativeMethods
.WM_SYSKEYDOWN ||
2225
m.Msg ==
NativeMethods
.WM_KEYUP || m.Msg ==
NativeMethods
.WM_SYSKEYUP)
2231
if (m.Msg ==
NativeMethods
.WM_KEYDOWN || m.Msg ==
NativeMethods
.WM_SYSKEYDOWN)
Shared\NativeMethods.cs (8)
246
internal static bool Header_GetItem(IntPtr hWndHeader, int index, [In, Out]
NativeMethods
.HDITEM hdi)
252
internal static bool Header_SetItem(IntPtr hWndHeader, int index, [In, Out]
NativeMethods
.HDITEM hdi)
274
public static extern IntPtr SendMessage(IntPtr hWnd, int msg, IntPtr wParam, [In, Out]
NativeMethods
.HDITEM lParam);
378
IntPtr hmod =
NativeMethods
.LoadLibraryFromSystemPathIfAvailable(libName);
381
IntPtr pfnProc =
NativeMethods
.GetProcAddress(new HandleRef(isAvailable, hmod), procName);
388
NativeMethods
.FreeLibrary(new HandleRef(isAvailable, hmod));
403
int status =
NativeMethods
.WldpIsDynamicCodePolicyEnabled(out isEnabled);
404
result = (((status ==
NativeMethods
.S_OK) && (isEnabled != 0)) ? 1 : 0);