예제 #1
0
 public static void SetToZero(void *dst, ulong length)
 {
     SafeNativeMethods.memset(dst, 0, new UIntPtr(length));
 }
예제 #2
0
 // TODO: get rid of this somehow! (this will happen when Layers window is rewritten, post-3.0)
 public static bool HideHorizontalScrollBar(Control c)
 {
     return(SafeNativeMethods.ShowScrollBar(c.Handle, NativeConstants.SB_HORZ, false));
 }
예제 #3
0
 /// <summary>
 /// Copies bytes from one area of memory to another. Since this function only
 /// takes pointers, it can not do any bounds checking.
 /// </summary>
 /// <param name="dst">The starting address of where to copy bytes to.</param>
 /// <param name="src">The starting address of where to copy bytes from.</param>
 /// <param name="length">The number of bytes to copy</param>
 public static void Copy(void *dst, void *src, ulong length)
 {
     SafeNativeMethods.memcpy(dst, src, new UIntPtr(length));
 }
예제 #4
0
 /// <summary>
 /// Sets the control's redraw state.
 /// </summary>
 /// <param name="control">The control whose state should be modified.</param>
 /// <param name="enabled">The new state for redrawing ability.</param>
 /// <remarks>
 /// Note to implementors: This method is used by SuspendControlPainting() and ResumeControlPainting().
 /// This may be implemented as a no-op.
 /// </remarks>
 private static void SetControlRedrawImpl(Control control, bool enabled)
 {
     SafeNativeMethods.SendMessageW(control.Handle, NativeConstants.WM_SETREDRAW, enabled ? new IntPtr(1) : IntPtr.Zero, IntPtr.Zero);
     GC.KeepAlive(control);
 }