protected void EnableOption(NativeConstants.FOS flags) { NativeConstants.FOS oldOptions; this.fileDialog.GetOptions(out oldOptions); NativeConstants.FOS newOptions = oldOptions | flags; this.fileDialog.SetOptions(newOptions); }
public static extern bool DuplicateTokenEx( IntPtr hExistingToken, uint dwDesiredAccess, IntPtr lpTokenAttributes, NativeConstants.SECURITY_IMPERSONATION_LEVEL ImpersonationLevel, NativeConstants.TOKEN_TYPE TokenType, out IntPtr phNewToken);
protected void SetOptions(NativeConstants.FOS flags, bool enable) { if (enable) { EnableOption(flags); } else { DisableOption(flags); } }
protected bool GetOptions(NativeConstants.FOS flags) { NativeConstants.FOS options; this.fileDialog.GetOptions(out options); NativeConstants.FOS masked = options & flags; return masked == flags; }
public static extern int SetWindowLongW(IntPtr hWnd, NativeConstants.GetWindowLong nIndex, int dwNewLong);
public static extern IntPtr SetWindowLongPtrW(IntPtr hWnd, NativeConstants.GetWindowLong nIndex, IntPtr dwNewLong);
public static extern int GetWindowLongW(IntPtr hWnd, NativeConstants.GetWindowLong nIndex);
public static extern long GetWindowLongPtrW(IntPtr hWnd, NativeConstants.GetWindowLong nIndex);
public static extern bool SystemParametersInfo(NativeConstants.SPI uiAction, int uiParam, ref NativeStructs.RECT pvParam, int fWinIni);
public static IntPtr SetWindowLongPtr(IntPtr hWnd, NativeConstants.GetWindowLong nIndex, IntPtr dwNewLong) { return OS.Is64Bit ? WindowLong.SetWindowLongPtrW(hWnd, nIndex, dwNewLong) : new IntPtr(WindowLong.SetWindowLongW(hWnd, nIndex, dwNewLong.ToInt32())); }
public static IntPtr GetWindowLongPtr(IntPtr hWnd, NativeConstants.GetWindowLong nIndex) { return new IntPtr(OS.Is64Bit ? WindowLong.GetWindowLongPtrW(hWnd, nIndex) : WindowLong.GetWindowLongW(hWnd, nIndex)); }
void NativeInterfaces.IFileDialogEvents.OnOverwrite( NativeInterfaces.IFileDialog pfd, NativeInterfaces.IShellItem psi, out NativeConstants.FDE_OVERWRITE_RESPONSE pResponse) { pResponse = NativeConstants.FDE_OVERWRITE_RESPONSE.FDEOR_DEFAULT; }
void NativeInterfaces.IFileDialogEvents.OnShareViolation( NativeInterfaces.IFileDialog pfd, NativeInterfaces.IShellItem psi, out NativeConstants.FDE_SHAREVIOLATION_RESPONSE pResponse) { pResponse = NativeConstants.FDE_SHAREVIOLATION_RESPONSE.FDESVR_DEFAULT; }