This commit is contained in:
NaBian committed 2020-12-06 13:55:22 +08:00
commit 1ab1aae4de
156 files changed
+8279 -8279

No files matched your search

@@ -2,12 +2,12 @@
namespace Microsoft.Windows.Shell namespace Microsoft.Windows.Shell
{ {
public abstract class JumpItem public abstract class JumpItem
{ {
internal JumpItem() internal JumpItem()
{ {
} }
public string CustomCategory { get; set; } public string CustomCategory { get; set; }
} }
} }
@@ -2,11 +2,11 @@
namespace Microsoft.Windows.Shell namespace Microsoft.Windows.Shell
{ {
public enum JumpItemRejectionReason public enum JumpItemRejectionReason
{ {
None, None,
InvalidItem, InvalidItem,
NoRegisteredHandler, NoRegisteredHandler,
RemovedByUser RemovedByUser
} }
} }
@@ -3,30 +3,30 @@ using System.Collections.Generic;
namespace Microsoft.Windows.Shell namespace Microsoft.Windows.Shell
{ {
public sealed class JumpItemsRejectedEventArgs : EventArgs public sealed class JumpItemsRejectedEventArgs : EventArgs
{ {
public JumpItemsRejectedEventArgs() : this(null, null) public JumpItemsRejectedEventArgs() : this(null, null)
{ {
} }
public JumpItemsRejectedEventArgs(IList<JumpItem> rejectedItems, IList<JumpItemRejectionReason> reasons) public JumpItemsRejectedEventArgs(IList<JumpItem> rejectedItems, IList<JumpItemRejectionReason> reasons)
{ {
if ((rejectedItems == null && reasons != null) || (reasons == null && rejectedItems != null) || (rejectedItems != null && reasons != null && rejectedItems.Count != reasons.Count)) if ((rejectedItems == null && reasons != null) || (reasons == null && rejectedItems != null) || (rejectedItems != null && reasons != null && rejectedItems.Count != reasons.Count))
{ {
throw new ArgumentException("The counts of rejected items doesn't match the count of reasons."); throw new ArgumentException("The counts of rejected items doesn't match the count of reasons.");
} }
if (rejectedItems != null) if (rejectedItems != null)
{ {
this.RejectedItems = new List<JumpItem>(rejectedItems).AsReadOnly(); this.RejectedItems = new List<JumpItem>(rejectedItems).AsReadOnly();
this.RejectionReasons = new List<JumpItemRejectionReason>(reasons).AsReadOnly(); this.RejectionReasons = new List<JumpItemRejectionReason>(reasons).AsReadOnly();
return; return;
} }
this.RejectedItems = new List<JumpItem>().AsReadOnly(); this.RejectedItems = new List<JumpItem>().AsReadOnly();
this.RejectionReasons = new List<JumpItemRejectionReason>().AsReadOnly(); this.RejectionReasons = new List<JumpItemRejectionReason>().AsReadOnly();
} }
public IList<JumpItem> RejectedItems { get; private set; } public IList<JumpItem> RejectedItems { get; private set; }
public IList<JumpItemRejectionReason> RejectionReasons { get; private set; } public IList<JumpItemRejectionReason> RejectionReasons { get; private set; }
} }
} }
@@ -3,22 +3,22 @@ using System.Collections.Generic;
namespace Microsoft.Windows.Shell namespace Microsoft.Windows.Shell
{ {
public sealed class JumpItemsRemovedEventArgs : EventArgs public sealed class JumpItemsRemovedEventArgs : EventArgs
{ {
public JumpItemsRemovedEventArgs() : this(null) public JumpItemsRemovedEventArgs() : this(null)
{ {
} }
public JumpItemsRemovedEventArgs(IList<JumpItem> removedItems) public JumpItemsRemovedEventArgs(IList<JumpItem> removedItems)
{ {
if (removedItems != null) if (removedItems != null)
{ {
this.RemovedItems = new List<JumpItem>(removedItems).AsReadOnly(); this.RemovedItems = new List<JumpItem>(removedItems).AsReadOnly();
return; return;
} }
this.RemovedItems = new List<JumpItem>().AsReadOnly(); this.RemovedItems = new List<JumpItem>().AsReadOnly();
} }
public IList<JumpItem> RemovedItems { get; private set; } public IList<JumpItem> RemovedItems { get; private set; }
} }
} }
File diff suppressed because it is too large. Load diff
@@ -2,8 +2,8 @@
namespace Microsoft.Windows.Shell namespace Microsoft.Windows.Shell
{ {
public class JumpPath : JumpItem public class JumpPath : JumpItem
{ {
public string Path { get; set; } public string Path { get; set; }
} }
} }
+10 -10
View File
@@ -2,20 +2,20 @@
namespace Microsoft.Windows.Shell namespace Microsoft.Windows.Shell
{ {
public class JumpTask : JumpItem public class JumpTask : JumpItem
{ {
public string Title { get; set; } public string Title { get; set; }
public string Description { get; set; } public string Description { get; set; }
public string ApplicationPath { get; set; } public string ApplicationPath { get; set; }
public string Arguments { get; set; } public string Arguments { get; set; }
public string WorkingDirectory { get; set; } public string WorkingDirectory { get; set; }
public string IconResourcePath { get; set; } public string IconResourcePath { get; set; }
public int IconResourceIndex { get; set; } public int IconResourceIndex { get; set; }
} }
} }
@@ -2,9 +2,9 @@
namespace Standard namespace Standard
{ {
internal enum AC : byte internal enum AC : byte
{ {
SRC_OVER, SRC_OVER,
SRC_ALPHA SRC_ALPHA
} }
} }
@@ -2,9 +2,9 @@
namespace Standard namespace Standard
{ {
internal enum APPDOCLISTTYPE internal enum APPDOCLISTTYPE
{ {
ADLT_RECENT, ADLT_RECENT,
ADLT_FREQUENT ADLT_FREQUENT
} }
} }
@@ -5,229 +5,229 @@ using System.Windows;
namespace Standard namespace Standard
{ {
internal static class Assert internal static class Assert
{ {
private static void _Break() private static void _Break()
{ {
Debugger.Break(); Debugger.Break();
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void Evaluate(Assert.EvaluateFunction argument) public static void Evaluate(Assert.EvaluateFunction argument)
{ {
argument(); argument();
} }
[Obsolete("Use Assert.AreEqual instead of Assert.Equals", false)] [Obsolete("Use Assert.AreEqual instead of Assert.Equals", false)]
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void Equals<T>(T expected, T actual) public static void Equals<T>(T expected, T actual)
{ {
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void AreEqual<T>(T expected, T actual) public static void AreEqual<T>(T expected, T actual)
{ {
if (expected == null) if (expected == null)
{ {
if (actual != null && !actual.Equals(expected)) if (actual != null && !actual.Equals(expected))
{ {
Assert._Break(); Assert._Break();
return; return;
} }
} }
else if (!expected.Equals(actual)) else if (!expected.Equals(actual))
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void AreNotEqual<T>(T notExpected, T actual) public static void AreNotEqual<T>(T notExpected, T actual)
{ {
if (notExpected == null) if (notExpected == null)
{ {
if (actual == null || actual.Equals(notExpected)) if (actual == null || actual.Equals(notExpected))
{ {
Assert._Break(); Assert._Break();
return; return;
} }
} }
else if (notExpected.Equals(actual)) else if (notExpected.Equals(actual))
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void Implies(bool condition, bool result) public static void Implies(bool condition, bool result)
{ {
if (condition && !result) if (condition && !result)
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void Implies(bool condition, Assert.ImplicationFunction result) public static void Implies(bool condition, Assert.ImplicationFunction result)
{ {
if (condition && !result()) if (condition && !result())
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void IsNeitherNullNorEmpty(string value) public static void IsNeitherNullNorEmpty(string value)
{ {
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void IsNeitherNullNorWhitespace(string value) public static void IsNeitherNullNorWhitespace(string value)
{ {
if (string.IsNullOrEmpty(value)) if (string.IsNullOrEmpty(value))
{ {
Assert._Break(); Assert._Break();
} }
if (value.Trim().Length == 0) if (value.Trim().Length == 0)
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void IsNotNull<T>(T value) where T : class public static void IsNotNull<T>(T value) where T : class
{ {
if (value == null) if (value == null)
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void IsDefault<T>(T value) where T : struct public static void IsDefault<T>(T value) where T : struct
{ {
value.Equals(default(T)); value.Equals(default(T));
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void IsNotDefault<T>(T value) where T : struct public static void IsNotDefault<T>(T value) where T : struct
{ {
value.Equals(default(T)); value.Equals(default(T));
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void IsFalse(bool condition) public static void IsFalse(bool condition)
{ {
if (condition) if (condition)
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void IsFalse(bool condition, string message) public static void IsFalse(bool condition, string message)
{ {
if (condition) if (condition)
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void IsTrue(bool condition) public static void IsTrue(bool condition)
{ {
if (!condition) if (!condition)
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void IsTrue(bool condition, string message) public static void IsTrue(bool condition, string message)
{ {
if (!condition) if (!condition)
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void Fail() public static void Fail()
{ {
Assert._Break(); Assert._Break();
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void Fail(string message) public static void Fail(string message)
{ {
Assert._Break(); Assert._Break();
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void IsNull<T>(T item) where T : class public static void IsNull<T>(T item) where T : class
{ {
if (item != null) if (item != null)
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void BoundedDoubleInc(double lowerBoundInclusive, double value, double upperBoundInclusive) public static void BoundedDoubleInc(double lowerBoundInclusive, double value, double upperBoundInclusive)
{ {
if (value < lowerBoundInclusive || value > upperBoundInclusive) if (value < lowerBoundInclusive || value > upperBoundInclusive)
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void BoundedInteger(int lowerBoundInclusive, int value, int upperBoundExclusive) public static void BoundedInteger(int lowerBoundInclusive, int value, int upperBoundExclusive)
{ {
if (value < lowerBoundInclusive || value >= upperBoundExclusive) if (value < lowerBoundInclusive || value >= upperBoundExclusive)
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void IsApartmentState(ApartmentState expectedState) public static void IsApartmentState(ApartmentState expectedState)
{ {
if (Thread.CurrentThread.GetApartmentState() != expectedState) if (Thread.CurrentThread.GetApartmentState() != expectedState)
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void NullableIsNotNull<T>(T? value) where T : struct public static void NullableIsNotNull<T>(T? value) where T : struct
{ {
if (value == null) if (value == null)
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void NullableIsNull<T>(T? value) where T : struct public static void NullableIsNull<T>(T? value) where T : struct
{ {
if (value != null) if (value != null)
{ {
Assert._Break(); Assert._Break();
} }
} }
[Conditional("DEBUG")] [Conditional("DEBUG")]
public static void IsNotOnMainThread() public static void IsNotOnMainThread()
{ {
if (Application.Current.Dispatcher.CheckAccess()) if (Application.Current.Dispatcher.CheckAccess())
{ {
Assert._Break(); Assert._Break();
} }
} }
public delegate void EvaluateFunction(); public delegate void EvaluateFunction();
public delegate bool ImplicationFunction(); public delegate bool ImplicationFunction();
} }
} }
@@ -2,8 +2,8 @@
namespace Standard namespace Standard
{ {
internal enum BI internal enum BI
{ {
RGB RGB
} }
} }
@@ -2,10 +2,10 @@
namespace Standard namespace Standard
{ {
internal struct BITMAPINFO internal struct BITMAPINFO
{ {
public BITMAPINFOHEADER bmiHeader; public BITMAPINFOHEADER bmiHeader;
public RGBQUAD bmiColors; public RGBQUAD bmiColors;
} }
} }
@@ -3,29 +3,29 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[StructLayout(LayoutKind.Sequential, Pack = 2)] [StructLayout(LayoutKind.Sequential, Pack = 2)]
internal struct BITMAPINFOHEADER internal struct BITMAPINFOHEADER
{ {
public int biSize; public int biSize;
public int biWidth; public int biWidth;
public int biHeight; public int biHeight;
public short biPlanes; public short biPlanes;
public short biBitCount; public short biBitCount;
public BI biCompression; public BI biCompression;
public int biSizeImage; public int biSizeImage;
public int biXPelsPerMeter; public int biXPelsPerMeter;
public int biYPelsPerMeter; public int biYPelsPerMeter;
public int biClrUsed; public int biClrUsed;
public int biClrImportant; public int biClrImportant;
} }
} }
@@ -2,14 +2,14 @@
namespace Standard namespace Standard
{ {
internal struct BLENDFUNCTION internal struct BLENDFUNCTION
{ {
public AC BlendOp; public AC BlendOp;
public byte BlendFlags; public byte BlendFlags;
public byte SourceConstantAlpha; public byte SourceConstantAlpha;
public AC AlphaFormat; public AC AlphaFormat;
} }
} }
@@ -2,10 +2,10 @@
namespace Standard namespace Standard
{ {
internal struct CHANGEFILTERSTRUCT internal struct CHANGEFILTERSTRUCT
{ {
public uint cbSize; public uint cbSize;
public MSGFLTINFO ExtStatus; public MSGFLTINFO ExtStatus;
} }
} }
@@ -2,23 +2,23 @@
namespace Standard namespace Standard
{ {
internal static class CLSID internal static class CLSID
{ {
public static T CoCreateInstance<T>(string clsid) public static T CoCreateInstance<T>(string clsid)
{ {
return (T)((object)Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid(clsid)))); return (T) ((object) Activator.CreateInstance(Type.GetTypeFromCLSID(new Guid(clsid))));
} }
public const string TaskbarList = "56FDF344-FD6D-11d0-958A-006097C9A090"; public const string TaskbarList = "56FDF344-FD6D-11d0-958A-006097C9A090";
public const string EnumerableObjectCollection = "2d3468c1-36a7-43b6-ac24-d3f02fd9607a"; public const string EnumerableObjectCollection = "2d3468c1-36a7-43b6-ac24-d3f02fd9607a";
public const string ShellLink = "00021401-0000-0000-C000-000000000046"; public const string ShellLink = "00021401-0000-0000-C000-000000000046";
public const string DestinationList = "77f10cf0-3db5-4966-b520-b7c54fd35ed6"; public const string DestinationList = "77f10cf0-3db5-4966-b520-b7c54fd35ed6";
public const string ApplicationDestinations = "86c14003-4d6b-4ef3-a7b4-0506663b2e68"; public const string ApplicationDestinations = "86c14003-4d6b-4ef3-a7b4-0506663b2e68";
public const string ApplicationDocumentLists = "86bec222-30f2-47e0-9f25-60d11cd75c28"; public const string ApplicationDocumentLists = "86bec222-30f2-47e0-9f25-60d11cd75c28";
} }
} }
@@ -3,33 +3,33 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
internal struct CREATESTRUCT internal struct CREATESTRUCT
{ {
public IntPtr lpCreateParams; public IntPtr lpCreateParams;
public IntPtr hInstance; public IntPtr hInstance;
public IntPtr hMenu; public IntPtr hMenu;
public IntPtr hwndParent; public IntPtr hwndParent;
public int cy; public int cy;
public int cx; public int cx;
public int y; public int y;
public int x; public int x;
public WS style; public WS style;
[MarshalAs(UnmanagedType.LPWStr)] [MarshalAs(UnmanagedType.LPWStr)]
public string lpszName; public string lpszName;
[MarshalAs(UnmanagedType.LPWStr)] [MarshalAs(UnmanagedType.LPWStr)]
public string lpszClass; public string lpszClass;
public WS_EX dwExStyle; public WS_EX dwExStyle;
} }
} }
@@ -2,21 +2,21 @@
namespace Standard namespace Standard
{ {
[Flags] [Flags]
internal enum CS : uint internal enum CS : uint
{ {
VREDRAW = 1u, VREDRAW = 1u,
HREDRAW = 2u, HREDRAW = 2u,
DBLCLKS = 8u, DBLCLKS = 8u,
OWNDC = 32u, OWNDC = 32u,
CLASSDC = 64u, CLASSDC = 64u,
PARENTDC = 128u, PARENTDC = 128u,
NOCLOSE = 512u, NOCLOSE = 512u,
SAVEBITS = 2048u, SAVEBITS = 2048u,
BYTEALIGNCLIENT = 4096u, BYTEALIGNCLIENT = 4096u,
BYTEALIGNWINDOW = 8192u, BYTEALIGNWINDOW = 8192u,
GLOBALCLASS = 16384u, GLOBALCLASS = 16384u,
IME = 65536u, IME = 65536u,
DROPSHADOW = 131072u DROPSHADOW = 131072u
} }
} }
@@ -2,11 +2,11 @@
namespace Standard namespace Standard
{ {
internal enum CombineRgnResult internal enum CombineRgnResult
{ {
ERROR, ERROR,
NULLREGION, NULLREGION,
SIMPLEREGION, SIMPLEREGION,
COMPLEXREGION COMPLEXREGION
} }
} }
@@ -2,12 +2,12 @@
namespace Standard namespace Standard
{ {
internal enum DOGIF internal enum DOGIF
{ {
DEFAULT, DEFAULT,
TRAVERSE_LINK, TRAVERSE_LINK,
NO_HDROP, NO_HDROP,
NO_URL = 4, NO_URL = 4,
ONLY_IF_ONE = 8 ONLY_IF_ONE = 8
} }
} }
@@ -2,10 +2,10 @@
namespace Standard namespace Standard
{ {
internal enum DWMFLIP3D internal enum DWMFLIP3D
{ {
DEFAULT, DEFAULT,
EXCLUDEBELOW, EXCLUDEBELOW,
EXCLUDEABOVE EXCLUDEABOVE
} }
} }
@@ -2,10 +2,10 @@
namespace Standard namespace Standard
{ {
internal enum DWMNCRP internal enum DWMNCRP
{ {
USEWINDOWSTYLE, USEWINDOWSTYLE,
DISABLED, DISABLED,
ENABLED ENABLED
} }
} }
@@ -2,19 +2,19 @@
namespace Standard namespace Standard
{ {
internal enum DWMWA internal enum DWMWA
{ {
NCRENDERING_ENABLED = 1, NCRENDERING_ENABLED = 1,
NCRENDERING_POLICY, NCRENDERING_POLICY,
TRANSITIONS_FORCEDISABLED, TRANSITIONS_FORCEDISABLED,
ALLOW_NCPAINT, ALLOW_NCPAINT,
CAPTION_BUTTON_BOUNDS, CAPTION_BUTTON_BOUNDS,
NONCLIENT_RTL_LAYOUT, NONCLIENT_RTL_LAYOUT,
FORCE_ICONIC_REPRESENTATION, FORCE_ICONIC_REPRESENTATION,
FLIP3D_POLICY, FLIP3D_POLICY,
EXTENDED_FRAME_BOUNDS, EXTENDED_FRAME_BOUNDS,
HAS_ICONIC_BITMAP, HAS_ICONIC_BITMAP,
DISALLOW_PEEK, DISALLOW_PEEK,
EXCLUDED_FROM_PEEK EXCLUDED_FROM_PEEK
} }
} }
@@ -2,9 +2,9 @@
namespace Standard namespace Standard
{ {
internal enum DWM_SIT internal enum DWM_SIT
{ {
None, None,
DISPLAYFRAME DISPLAYFRAME
} }
} }
@@ -3,87 +3,87 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[StructLayout(LayoutKind.Sequential, Pack = 1)] [StructLayout(LayoutKind.Sequential, Pack = 1)]
internal struct DWM_TIMING_INFO internal struct DWM_TIMING_INFO
{ {
public int cbSize; public int cbSize;
public UNSIGNED_RATIO rateRefresh; public UNSIGNED_RATIO rateRefresh;
public ulong qpcRefreshPeriod; public ulong qpcRefreshPeriod;
public UNSIGNED_RATIO rateCompose; public UNSIGNED_RATIO rateCompose;
public ulong qpcVBlank; public ulong qpcVBlank;
public ulong cRefresh; public ulong cRefresh;
public uint cDXRefresh; public uint cDXRefresh;
public ulong qpcCompose; public ulong qpcCompose;
public ulong cFrame; public ulong cFrame;
public uint cDXPresent; public uint cDXPresent;
public ulong cRefreshFrame; public ulong cRefreshFrame;
public ulong cFrameSubmitted; public ulong cFrameSubmitted;
public uint cDXPresentSubmitted; public uint cDXPresentSubmitted;
public ulong cFrameConfirmed; public ulong cFrameConfirmed;
public uint cDXPresentConfirmed; public uint cDXPresentConfirmed;
public ulong cRefreshConfirmed; public ulong cRefreshConfirmed;
public uint cDXRefreshConfirmed; public uint cDXRefreshConfirmed;
public ulong cFramesLate; public ulong cFramesLate;
public uint cFramesOutstanding; public uint cFramesOutstanding;
public ulong cFrameDisplayed; public ulong cFrameDisplayed;
public ulong qpcFrameDisplayed; public ulong qpcFrameDisplayed;
public ulong cRefreshFrameDisplayed; public ulong cRefreshFrameDisplayed;
public ulong cFrameComplete; public ulong cFrameComplete;
public ulong qpcFrameComplete; public ulong qpcFrameComplete;
public ulong cFramePending; public ulong cFramePending;
public ulong qpcFramePending; public ulong qpcFramePending;
public ulong cFramesDisplayed; public ulong cFramesDisplayed;
public ulong cFramesComplete; public ulong cFramesComplete;
public ulong cFramesPending; public ulong cFramesPending;
public ulong cFramesAvailable; public ulong cFramesAvailable;
public ulong cFramesDropped; public ulong cFramesDropped;
public ulong cFramesMissed; public ulong cFramesMissed;
public ulong cRefreshNextDisplayed; public ulong cRefreshNextDisplayed;
public ulong cRefreshNextPresented; public ulong cRefreshNextPresented;
public ulong cRefreshesDisplayed; public ulong cRefreshesDisplayed;
public ulong cRefreshesPresented; public ulong cRefreshesPresented;
public ulong cRefreshStarted; public ulong cRefreshStarted;
public ulong cPixelsReceived; public ulong cPixelsReceived;
public ulong cPixelsDrawn; public ulong cPixelsDrawn;
public ulong cBuffersEmpty; public ulong cBuffersEmpty;
} }
} }
@@ -2,11 +2,11 @@
namespace Standard namespace Standard
{ {
internal enum DeviceCap internal enum DeviceCap
{ {
BITSPIXEL = 12, BITSPIXEL = 12,
PLANES = 14, PLANES = 14,
LOGPIXELSX = 88, LOGPIXELSX = 88,
LOGPIXELSY = 90 LOGPIXELSY = 90
} }
} }
@@ -3,55 +3,55 @@ using System.Diagnostics.CodeAnalysis;
namespace Standard namespace Standard
{ {
internal static class DoubleUtilities internal static class DoubleUtilities
{ {
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public static bool AreClose(double value1, double value2) public static bool AreClose(double value1, double value2)
{ {
if (value1 == value2) if (value1 == value2)
{ {
return true; return true;
} }
double num = value1 - value2; double num = value1 - value2;
return num < 1.53E-06 && num > -1.53E-06; return num < 1.53E-06 && num > -1.53E-06;
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public static bool LessThan(double value1, double value2) public static bool LessThan(double value1, double value2)
{ {
return value1 < value2 && !DoubleUtilities.AreClose(value1, value2); return value1 < value2 && !DoubleUtilities.AreClose(value1, value2);
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public static bool GreaterThan(double value1, double value2) public static bool GreaterThan(double value1, double value2)
{ {
return value1 > value2 && !DoubleUtilities.AreClose(value1, value2); return value1 > value2 && !DoubleUtilities.AreClose(value1, value2);
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public static bool LessThanOrClose(double value1, double value2) public static bool LessThanOrClose(double value1, double value2)
{ {
return value1 < value2 || DoubleUtilities.AreClose(value1, value2); return value1 < value2 || DoubleUtilities.AreClose(value1, value2);
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public static bool GreaterThanOrClose(double value1, double value2) public static bool GreaterThanOrClose(double value1, double value2)
{ {
return value1 > value2 || DoubleUtilities.AreClose(value1, value2); return value1 > value2 || DoubleUtilities.AreClose(value1, value2);
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public static bool IsFinite(double value) public static bool IsFinite(double value)
{ {
return !double.IsNaN(value) && !double.IsInfinity(value); return !double.IsNaN(value) && !double.IsInfinity(value);
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public static bool IsValidSize(double value) public static bool IsValidSize(double value)
{ {
return DoubleUtilities.IsFinite(value) && DoubleUtilities.GreaterThanOrClose(value, 0.0); return DoubleUtilities.IsFinite(value) && DoubleUtilities.GreaterThanOrClose(value, 0.0);
} }
private const double Epsilon = 1.53E-06; private const double Epsilon = 1.53E-06;
} }
} }
@@ -5,66 +5,66 @@ using System.Windows.Media;
namespace Standard namespace Standard
{ {
internal static class DpiHelper internal static class DpiHelper
{ {
[SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline")] [SuppressMessage("Microsoft.Performance", "CA1810:InitializeReferenceTypeStaticFieldsInline")]
static DpiHelper() static DpiHelper()
{ {
using (SafeDC desktop = SafeDC.GetDesktop()) using (SafeDC desktop = SafeDC.GetDesktop())
{ {
int deviceCaps = NativeMethods.GetDeviceCaps(desktop, DeviceCap.LOGPIXELSX); int deviceCaps = NativeMethods.GetDeviceCaps(desktop, DeviceCap.LOGPIXELSX);
int deviceCaps2 = NativeMethods.GetDeviceCaps(desktop, DeviceCap.LOGPIXELSY); int deviceCaps2 = NativeMethods.GetDeviceCaps(desktop, DeviceCap.LOGPIXELSY);
DpiHelper._transformToDip = Matrix.Identity; DpiHelper._transformToDip = Matrix.Identity;
DpiHelper._transformToDip.Scale(96.0 / (double)deviceCaps, 96.0 / (double)deviceCaps2); DpiHelper._transformToDip.Scale(96.0 / (double) deviceCaps, 96.0 / (double) deviceCaps2);
DpiHelper._transformToDevice = Matrix.Identity; DpiHelper._transformToDevice = Matrix.Identity;
DpiHelper._transformToDevice.Scale((double)deviceCaps / 96.0, (double)deviceCaps2 / 96.0); DpiHelper._transformToDevice.Scale((double) deviceCaps / 96.0, (double) deviceCaps2 / 96.0);
} }
} }
public static Point LogicalPixelsToDevice(Point logicalPoint) public static Point LogicalPixelsToDevice(Point logicalPoint)
{ {
return DpiHelper._transformToDevice.Transform(logicalPoint); return DpiHelper._transformToDevice.Transform(logicalPoint);
} }
public static Point DevicePixelsToLogical(Point devicePoint) public static Point DevicePixelsToLogical(Point devicePoint)
{ {
return DpiHelper._transformToDip.Transform(devicePoint); return DpiHelper._transformToDip.Transform(devicePoint);
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public static Rect LogicalRectToDevice(Rect logicalRectangle) public static Rect LogicalRectToDevice(Rect logicalRectangle)
{ {
Point point = DpiHelper.LogicalPixelsToDevice(new Point(logicalRectangle.Left, logicalRectangle.Top)); Point point = DpiHelper.LogicalPixelsToDevice(new Point(logicalRectangle.Left, logicalRectangle.Top));
Point point2 = DpiHelper.LogicalPixelsToDevice(new Point(logicalRectangle.Right, logicalRectangle.Bottom)); Point point2 = DpiHelper.LogicalPixelsToDevice(new Point(logicalRectangle.Right, logicalRectangle.Bottom));
return new Rect(point, point2); return new Rect(point, point2);
} }
public static Rect DeviceRectToLogical(Rect deviceRectangle) public static Rect DeviceRectToLogical(Rect deviceRectangle)
{ {
Point point = DpiHelper.DevicePixelsToLogical(new Point(deviceRectangle.Left, deviceRectangle.Top)); Point point = DpiHelper.DevicePixelsToLogical(new Point(deviceRectangle.Left, deviceRectangle.Top));
Point point2 = DpiHelper.DevicePixelsToLogical(new Point(deviceRectangle.Right, deviceRectangle.Bottom)); Point point2 = DpiHelper.DevicePixelsToLogical(new Point(deviceRectangle.Right, deviceRectangle.Bottom));
return new Rect(point, point2); return new Rect(point, point2);
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public static Size LogicalSizeToDevice(Size logicalSize) public static Size LogicalSizeToDevice(Size logicalSize)
{ {
Point point = DpiHelper.LogicalPixelsToDevice(new Point(logicalSize.Width, logicalSize.Height)); Point point = DpiHelper.LogicalPixelsToDevice(new Point(logicalSize.Width, logicalSize.Height));
return new Size return new Size
{ {
Width = point.X, Width = point.X,
Height = point.Y Height = point.Y
}; };
} }
public static Size DeviceSizeToLogical(Size deviceSize) public static Size DeviceSizeToLogical(Size deviceSize)
{ {
Point point = DpiHelper.DevicePixelsToLogical(new Point(deviceSize.Width, deviceSize.Height)); Point point = DpiHelper.DevicePixelsToLogical(new Point(deviceSize.Width, deviceSize.Height));
return new Size(point.X, point.Y); return new Size(point.X, point.Y);
} }
private static Matrix _transformToDevice; private static Matrix _transformToDevice;
private static Matrix _transformToDip; private static Matrix _transformToDip;
} }
} }
@@ -2,13 +2,13 @@
namespace Standard namespace Standard
{ {
[Flags] [Flags]
internal enum ErrorModes internal enum ErrorModes
{ {
Default = 0, Default = 0,
FailCriticalErrors = 1, FailCriticalErrors = 1,
NoGpFaultErrorBox = 2, NoGpFaultErrorBox = 2,
NoAlignmentFaultExcept = 4, NoAlignmentFaultExcept = 4,
NoOpenFileErrorBox = 32768 NoOpenFileErrorBox = 32768
} }
} }
@@ -2,11 +2,11 @@
namespace Standard namespace Standard
{ {
internal enum FO internal enum FO
{ {
MOVE = 1, MOVE = 1,
COPY, COPY,
DELETE, DELETE,
RENAME RENAME
} }
} }
@@ -2,23 +2,23 @@
namespace Standard namespace Standard
{ {
internal enum FOF : ushort internal enum FOF : ushort
{ {
MULTIDESTFILES = 1, MULTIDESTFILES = 1,
CONFIRMMOUSE, CONFIRMMOUSE,
SILENT = 4, SILENT = 4,
RENAMEONCOLLISION = 8, RENAMEONCOLLISION = 8,
NOCONFIRMATION = 16, NOCONFIRMATION = 16,
WANTMAPPINGHANDLE = 32, WANTMAPPINGHANDLE = 32,
ALLOWUNDO = 64, ALLOWUNDO = 64,
FILESONLY = 128, FILESONLY = 128,
SIMPLEPROGRESS = 256, SIMPLEPROGRESS = 256,
NOCONFIRMMKDIR = 512, NOCONFIRMMKDIR = 512,
NOERRORUI = 1024, NOERRORUI = 1024,
NOCOPYSECURITYATTRIBS = 2048, NOCOPYSECURITYATTRIBS = 2048,
NORECURSION = 4096, NORECURSION = 4096,
NO_CONNECTED_ELEMENTS = 8192, NO_CONNECTED_ELEMENTS = 8192,
WANTNUKEWARNING = 16384, WANTNUKEWARNING = 16384,
NORECURSEREPARSE = 32768 NORECURSEREPARSE = 32768
} }
} }
@@ -2,18 +2,18 @@
namespace Standard namespace Standard
{ {
[Flags] [Flags]
internal enum Facility internal enum Facility
{ {
Null, Null,
Rpc, Rpc,
Dispatch, Dispatch,
Storage, Storage,
Itf, Itf,
Win32 = 7, Win32 = 7,
Windows, Windows,
Control = 10, Control = 10,
Ese = 3678, Ese = 3678,
WinCodec = 2200 WinCodec = 2200
} }
} }
@@ -2,8 +2,8 @@
namespace Standard namespace Standard
{ {
internal enum GCLP internal enum GCLP
{ {
HBRBACKGROUND = -10 HBRBACKGROUND = -10
} }
} }
@@ -2,17 +2,17 @@
namespace Standard namespace Standard
{ {
internal enum GPS internal enum GPS
{ {
DEFAULT, DEFAULT,
HANDLERPROPERTIESONLY, HANDLERPROPERTIESONLY,
READWRITE, READWRITE,
TEMPORARY = 4, TEMPORARY = 4,
FASTPROPERTIESONLY = 8, FASTPROPERTIESONLY = 8,
OPENSLOWITEM = 16, OPENSLOWITEM = 16,
DELAYCREATION = 32, DELAYCREATION = 32,
BESTEFFORT = 64, BESTEFFORT = 64,
NO_OPLOCK = 128, NO_OPLOCK = 128,
MASK_VALID = 255 MASK_VALID = 255
} }
} }
@@ -2,14 +2,14 @@
namespace Standard namespace Standard
{ {
internal enum GWL internal enum GWL
{ {
WNDPROC = -4, WNDPROC = -4,
HINSTANCE = -6, HINSTANCE = -6,
HWNDPARENT = -8, HWNDPARENT = -8,
STYLE = -16, STYLE = -16,
EXSTYLE = -20, EXSTYLE = -20,
USERDATA = -21, USERDATA = -21,
ID = -12 ID = -12
} }
} }
@@ -2,15 +2,15 @@
namespace Standard namespace Standard
{ {
[Flags] [Flags]
internal enum HCF internal enum HCF
{ {
HIGHCONTRASTON = 1, HIGHCONTRASTON = 1,
AVAILABLE = 2, AVAILABLE = 2,
HOTKEYACTIVE = 4, HOTKEYACTIVE = 4,
CONFIRMHOTKEY = 8, CONFIRMHOTKEY = 8,
HOTKEYSOUND = 16, HOTKEYSOUND = 16,
INDICATOR = 32, INDICATOR = 32,
HOTKEYAVAILABLE = 64 HOTKEYAVAILABLE = 64
} }
} }
@@ -2,12 +2,12 @@
namespace Standard namespace Standard
{ {
internal struct HIGHCONTRAST internal struct HIGHCONTRAST
{ {
public int cbSize; public int cbSize;
public HCF dwFlags; public HCF dwFlags;
public IntPtr lpszDefaultScheme; public IntPtr lpszDefaultScheme;
} }
} }
@@ -7,238 +7,238 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
internal struct HRESULT internal struct HRESULT
{ {
public HRESULT(uint i) public HRESULT(uint i)
{ {
this._value = i; this._value = i;
} }
public static HRESULT Make(bool severe, Facility facility, int code) public static HRESULT Make(bool severe, Facility facility, int code)
{ {
return new HRESULT((uint)((severe ? (Facility)(-2147483648) : Facility.Null) | (Facility) ((int)facility << 16) | (Facility)code)); return new HRESULT((uint) ((severe ? (Facility) (-2147483648) : Facility.Null) | (Facility) ((int) facility << 16) | (Facility) code));
} }
public Facility Facility public Facility Facility
{ {
get get
{ {
return HRESULT.GetFacility((int)this._value); return HRESULT.GetFacility((int) this._value);
} }
} }
public static Facility GetFacility(int errorCode) public static Facility GetFacility(int errorCode)
{ {
return (Facility)(errorCode >> 16 & 8191); return (Facility) (errorCode >> 16 & 8191);
} }
public int Code public int Code
{ {
get get
{ {
return HRESULT.GetCode((int)this._value); return HRESULT.GetCode((int) this._value);
} }
} }
public static int GetCode(int error) public static int GetCode(int error)
{ {
return error & 65535; return error & 65535;
} }
public override string ToString() public override string ToString()
{ {
foreach (FieldInfo fieldInfo in typeof(HRESULT).GetFields(BindingFlags.Static | BindingFlags.Public)) foreach (FieldInfo fieldInfo in typeof(HRESULT).GetFields(BindingFlags.Static | BindingFlags.Public))
{ {
if (fieldInfo.FieldType == typeof(HRESULT)) if (fieldInfo.FieldType == typeof(HRESULT))
{ {
HRESULT hrLeft = (HRESULT)fieldInfo.GetValue(null); HRESULT hrLeft = (HRESULT) fieldInfo.GetValue(null);
if (hrLeft == this) if (hrLeft == this)
{ {
return fieldInfo.Name; return fieldInfo.Name;
} }
} }
} }
if (this.Facility == Facility.Win32) if (this.Facility == Facility.Win32)
{ {
foreach (FieldInfo fieldInfo2 in typeof(Win32Error).GetFields(BindingFlags.Static | BindingFlags.Public)) foreach (FieldInfo fieldInfo2 in typeof(Win32Error).GetFields(BindingFlags.Static | BindingFlags.Public))
{ {
if (fieldInfo2.FieldType == typeof(Win32Error)) if (fieldInfo2.FieldType == typeof(Win32Error))
{ {
Win32Error error = (Win32Error)fieldInfo2.GetValue(null); Win32Error error = (Win32Error) fieldInfo2.GetValue(null);
if ((HRESULT)error == this) if ((HRESULT) error == this)
{ {
return "HRESULT_FROM_WIN32(" + fieldInfo2.Name + ")"; return "HRESULT_FROM_WIN32(" + fieldInfo2.Name + ")";
} }
} }
} }
} }
return string.Format(CultureInfo.InvariantCulture, "0x{0:X8}", new object[] return string.Format(CultureInfo.InvariantCulture, "0x{0:X8}", new object[]
{ {
this._value this._value
}); });
} }
public override bool Equals(object obj) public override bool Equals(object obj)
{ {
bool result; bool result;
try try
{ {
result = (((HRESULT)obj)._value == this._value); result = (((HRESULT) obj)._value == this._value);
} }
catch (InvalidCastException) catch (InvalidCastException)
{ {
result = false; result = false;
} }
return result; return result;
} }
public override int GetHashCode() public override int GetHashCode()
{ {
return this._value.GetHashCode(); return this._value.GetHashCode();
} }
public static bool operator ==(HRESULT hrLeft, HRESULT hrRight) public static bool operator ==(HRESULT hrLeft, HRESULT hrRight)
{ {
return hrLeft._value == hrRight._value; return hrLeft._value == hrRight._value;
} }
public static bool operator !=(HRESULT hrLeft, HRESULT hrRight) public static bool operator !=(HRESULT hrLeft, HRESULT hrRight)
{ {
return !(hrLeft == hrRight); return !(hrLeft == hrRight);
} }
public bool Succeeded public bool Succeeded
{ {
get get
{ {
return this._value >= 0u; return this._value >= 0u;
} }
} }
public bool Failed public bool Failed
{ {
get get
{ {
return this._value < 0u; return this._value < 0u;
} }
} }
public void ThrowIfFailed() public void ThrowIfFailed()
{ {
this.ThrowIfFailed(null); this.ThrowIfFailed(null);
} }
[SuppressMessage("Microsoft.Usage", "CA2201:DoNotRaiseReservedExceptionTypes", Justification = "Only recreating Exceptions that were already raised.")] [SuppressMessage("Microsoft.Usage", "CA2201:DoNotRaiseReservedExceptionTypes", Justification = "Only recreating Exceptions that were already raised.")]
[SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
public void ThrowIfFailed(string message) public void ThrowIfFailed(string message)
{ {
if (this.Failed) if (this.Failed)
{ {
if (string.IsNullOrEmpty(message)) if (string.IsNullOrEmpty(message))
{ {
message = this.ToString(); message = this.ToString();
} }
Exception ex = Marshal.GetExceptionForHR((int)this._value, new IntPtr(-1)); Exception ex = Marshal.GetExceptionForHR((int) this._value, new IntPtr(-1));
if (ex.GetType() == typeof(COMException)) if (ex.GetType() == typeof(COMException))
{ {
Facility facility = this.Facility; Facility facility = this.Facility;
if (facility == Facility.Win32) if (facility == Facility.Win32)
{ {
ex = new Win32Exception(this.Code, message); ex = new Win32Exception(this.Code, message);
} }
else else
{ {
ex = new COMException(message, (int)this._value); ex = new COMException(message, (int) this._value);
} }
} }
else else
{ {
ConstructorInfo constructor = ex.GetType().GetConstructor(new Type[] ConstructorInfo constructor = ex.GetType().GetConstructor(new Type[]
{ {
typeof(string) typeof(string)
}); });
if (null != constructor) if (null != constructor)
{ {
ex = (constructor.Invoke(new object[] ex = (constructor.Invoke(new object[]
{ {
message message
}) as Exception); }) as Exception);
} }
} }
throw ex; throw ex;
} }
} }
public static void ThrowLastError() public static void ThrowLastError()
{ {
((HRESULT)Win32Error.GetLastError()).ThrowIfFailed(); ((HRESULT) Win32Error.GetLastError()).ThrowIfFailed();
} }
[FieldOffset(0)] [FieldOffset(0)]
private readonly uint _value; private readonly uint _value;
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT S_OK = new HRESULT(0u); public static readonly HRESULT S_OK = new HRESULT(0u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT S_FALSE = new HRESULT(1u); public static readonly HRESULT S_FALSE = new HRESULT(1u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT E_PENDING = new HRESULT(2147483658u); public static readonly HRESULT E_PENDING = new HRESULT(2147483658u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT E_NOTIMPL = new HRESULT(2147500033u); public static readonly HRESULT E_NOTIMPL = new HRESULT(2147500033u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT E_NOINTERFACE = new HRESULT(2147500034u); public static readonly HRESULT E_NOINTERFACE = new HRESULT(2147500034u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT E_POINTER = new HRESULT(2147500035u); public static readonly HRESULT E_POINTER = new HRESULT(2147500035u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT E_ABORT = new HRESULT(2147500036u); public static readonly HRESULT E_ABORT = new HRESULT(2147500036u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT E_FAIL = new HRESULT(2147500037u); public static readonly HRESULT E_FAIL = new HRESULT(2147500037u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT E_UNEXPECTED = new HRESULT(2147549183u); public static readonly HRESULT E_UNEXPECTED = new HRESULT(2147549183u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT STG_E_INVALIDFUNCTION = new HRESULT(2147680257u); public static readonly HRESULT STG_E_INVALIDFUNCTION = new HRESULT(2147680257u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT REGDB_E_CLASSNOTREG = new HRESULT(2147746132u); public static readonly HRESULT REGDB_E_CLASSNOTREG = new HRESULT(2147746132u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT DESTS_E_NO_MATCHING_ASSOC_HANDLER = new HRESULT(2147749635u); public static readonly HRESULT DESTS_E_NO_MATCHING_ASSOC_HANDLER = new HRESULT(2147749635u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT DESTS_E_NORECDOCS = new HRESULT(2147749636u); public static readonly HRESULT DESTS_E_NORECDOCS = new HRESULT(2147749636u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT DESTS_E_NOTALLCLEARED = new HRESULT(2147749637u); public static readonly HRESULT DESTS_E_NOTALLCLEARED = new HRESULT(2147749637u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT E_ACCESSDENIED = new HRESULT(2147942405u); public static readonly HRESULT E_ACCESSDENIED = new HRESULT(2147942405u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT E_OUTOFMEMORY = new HRESULT(2147942414u); public static readonly HRESULT E_OUTOFMEMORY = new HRESULT(2147942414u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT E_INVALIDARG = new HRESULT(2147942487u); public static readonly HRESULT E_INVALIDARG = new HRESULT(2147942487u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT INTSAFE_E_ARITHMETIC_OVERFLOW = new HRESULT(2147942934u); public static readonly HRESULT INTSAFE_E_ARITHMETIC_OVERFLOW = new HRESULT(2147942934u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT COR_E_OBJECTDISPOSED = new HRESULT(2148734498u); public static readonly HRESULT COR_E_OBJECTDISPOSED = new HRESULT(2148734498u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT WC_E_GREATERTHAN = new HRESULT(3222072867u); public static readonly HRESULT WC_E_GREATERTHAN = new HRESULT(3222072867u);
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
public static readonly HRESULT WC_E_SYNTAX = new HRESULT(3222072877u); public static readonly HRESULT WC_E_SYNTAX = new HRESULT(3222072877u);
} }
} }
@@ -2,36 +2,36 @@
namespace Standard namespace Standard
{ {
internal enum HT internal enum HT
{ {
ERROR = -2, ERROR = -2,
TRANSPARENT, TRANSPARENT,
NOWHERE, NOWHERE,
CLIENT, CLIENT,
CAPTION, CAPTION,
SYSMENU, SYSMENU,
GROWBOX, GROWBOX,
SIZE = 4, SIZE = 4,
MENU, MENU,
HSCROLL, HSCROLL,
VSCROLL, VSCROLL,
MINBUTTON, MINBUTTON,
MAXBUTTON, MAXBUTTON,
LEFT, LEFT,
RIGHT, RIGHT,
TOP, TOP,
TOPLEFT, TOPLEFT,
TOPRIGHT, TOPRIGHT,
BOTTOM, BOTTOM,
BOTTOMLEFT, BOTTOMLEFT,
BOTTOMRIGHT, BOTTOMRIGHT,
BORDER, BORDER,
REDUCE = 8, REDUCE = 8,
ZOOM, ZOOM,
SIZEFIRST, SIZEFIRST,
SIZELAST = 17, SIZELAST = 17,
OBJECT = 19, OBJECT = 19,
CLOSE, CLOSE,
HELP HELP
} }
} }
@@ -3,15 +3,15 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[Guid("12337d35-94c6-48a0-bce7-6a9c69d4d600")] [Guid("12337d35-94c6-48a0-bce7-6a9c69d4d600")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport] [ComImport]
internal interface IApplicationDestinations internal interface IApplicationDestinations
{ {
void SetAppID([MarshalAs(UnmanagedType.LPWStr)] [In] string pszAppID); void SetAppID([MarshalAs(UnmanagedType.LPWStr)][In] string pszAppID);
void RemoveDestination([MarshalAs(UnmanagedType.IUnknown)] object punk); void RemoveDestination([MarshalAs(UnmanagedType.IUnknown)] object punk);
void RemoveAllDestinations(); void RemoveAllDestinations();
} }
} }
@@ -3,14 +3,14 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[Guid("3c594f9f-9f30-47a1-979a-c9e83d3d0a06")] [Guid("3c594f9f-9f30-47a1-979a-c9e83d3d0a06")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport] [ComImport]
internal interface IApplicationDocumentLists internal interface IApplicationDocumentLists
{ {
void SetAppID([MarshalAs(UnmanagedType.LPWStr)] string pszAppID); void SetAppID([MarshalAs(UnmanagedType.LPWStr)] string pszAppID);
[return: MarshalAs(UnmanagedType.IUnknown)] [return: MarshalAs(UnmanagedType.IUnknown)]
object GetList([In] APPDOCLISTTYPE listtype, [In] uint cItemsDesired, [In] ref Guid riid); object GetList([In] APPDOCLISTTYPE listtype, [In] uint cItemsDesired, [In] ref Guid riid);
} }
} }
@@ -3,31 +3,31 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[Guid("6332debf-87b5-4670-90c0-5e57b408a49e")] [Guid("6332debf-87b5-4670-90c0-5e57b408a49e")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport] [ComImport]
internal interface ICustomDestinationList internal interface ICustomDestinationList
{ {
void SetAppID([MarshalAs(UnmanagedType.LPWStr)] [In] string pszAppID); void SetAppID([MarshalAs(UnmanagedType.LPWStr)][In] string pszAppID);
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object BeginList(out uint pcMaxSlots, [In] ref Guid riid); object BeginList(out uint pcMaxSlots, [In] ref Guid riid);
[PreserveSig] [PreserveSig]
HRESULT AppendCategory([MarshalAs(UnmanagedType.LPWStr)] string pszCategory, IObjectArray poa); HRESULT AppendCategory([MarshalAs(UnmanagedType.LPWStr)] string pszCategory, IObjectArray poa);
void AppendKnownCategory(KDC category); void AppendKnownCategory(KDC category);
[PreserveSig] [PreserveSig]
HRESULT AddUserTasks(IObjectArray poa); HRESULT AddUserTasks(IObjectArray poa);
void CommitList(); void CommitList();
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object GetRemovedDestinations([In] ref Guid riid); object GetRemovedDestinations([In] ref Guid riid);
void DeleteList([MarshalAs(UnmanagedType.LPWStr)] string pszAppID); void DeleteList([MarshalAs(UnmanagedType.LPWStr)] string pszAppID);
void AbortList(); void AbortList();
} }
} }
@@ -3,19 +3,19 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[Guid("000214F2-0000-0000-C000-000000000046")] [Guid("000214F2-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport] [ComImport]
internal interface IEnumIDList internal interface IEnumIDList
{ {
[PreserveSig] [PreserveSig]
HRESULT Next(uint celt, out IntPtr rgelt, out int pceltFetched); HRESULT Next(uint celt, out IntPtr rgelt, out int pceltFetched);
[PreserveSig] [PreserveSig]
HRESULT Skip(uint celt); HRESULT Skip(uint celt);
void Reset(); void Reset();
void Clone([MarshalAs(UnmanagedType.Interface)] out IEnumIDList ppenum); void Clone([MarshalAs(UnmanagedType.Interface)] out IEnumIDList ppenum);
} }
} }
@@ -3,17 +3,17 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[Guid("2c1c7e2e-2d0e-4059-831e-1e6f82335c2e")] [Guid("2c1c7e2e-2d0e-4059-831e-1e6f82335c2e")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport] [ComImport]
internal interface IEnumObjects internal interface IEnumObjects
{ {
void Next(uint celt, [In] ref Guid riid, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.IUnknown, SizeParamIndex = 0)] [Out] object[] rgelt, out uint pceltFetched); void Next(uint celt, [In] ref Guid riid, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.IUnknown, SizeParamIndex = 0)][Out] object[] rgelt, out uint pceltFetched);
void Skip(uint celt); void Skip(uint celt);
void Reset(); void Reset();
IEnumObjects Clone(); IEnumObjects Clone();
} }
} }
@@ -2,54 +2,54 @@
namespace Standard namespace Standard
{ {
internal static class IID internal static class IID
{ {
public const string EnumIdList = "000214F2-0000-0000-C000-000000000046"; public const string EnumIdList = "000214F2-0000-0000-C000-000000000046";
public const string EnumObjects = "2c1c7e2e-2d0e-4059-831e-1e6f82335c2e"; public const string EnumObjects = "2c1c7e2e-2d0e-4059-831e-1e6f82335c2e";
public const string HtmlDocument2 = "332C4425-26CB-11D0-B483-00C04FD90119"; public const string HtmlDocument2 = "332C4425-26CB-11D0-B483-00C04FD90119";
public const string ModalWindow = "b4db1657-70d7-485e-8e3e-6fcb5a5c1802"; public const string ModalWindow = "b4db1657-70d7-485e-8e3e-6fcb5a5c1802";
public const string ObjectArray = "92CA9DCD-5622-4bba-A805-5E9F541BD8C9"; public const string ObjectArray = "92CA9DCD-5622-4bba-A805-5E9F541BD8C9";
public const string ObjectCollection = "5632b1a4-e38a-400a-928a-d4cd63230295"; public const string ObjectCollection = "5632b1a4-e38a-400a-928a-d4cd63230295";
public const string PropertyNotifySink = "9BFBBC02-EFF1-101A-84ED-00AA00341D07"; public const string PropertyNotifySink = "9BFBBC02-EFF1-101A-84ED-00AA00341D07";
public const string PropertyStore = "886d8eeb-8cf2-4446-8d02-cdba1dbdcf99"; public const string PropertyStore = "886d8eeb-8cf2-4446-8d02-cdba1dbdcf99";
public const string ServiceProvider = "6d5140c1-7436-11ce-8034-00aa006009fa"; public const string ServiceProvider = "6d5140c1-7436-11ce-8034-00aa006009fa";
public const string ShellFolder = "000214E6-0000-0000-C000-000000000046"; public const string ShellFolder = "000214E6-0000-0000-C000-000000000046";
public const string ShellLink = "000214F9-0000-0000-C000-000000000046"; public const string ShellLink = "000214F9-0000-0000-C000-000000000046";
public const string ShellItem = "43826d1e-e718-42ee-bc55-a1e261c37bfe"; public const string ShellItem = "43826d1e-e718-42ee-bc55-a1e261c37bfe";
public const string ShellItem2 = "7e9fb0d3-919f-4307-ab2e-9b1860310c93"; public const string ShellItem2 = "7e9fb0d3-919f-4307-ab2e-9b1860310c93";
public const string ShellItemArray = "B63EA76D-1F85-456F-A19C-48159EFA858B"; public const string ShellItemArray = "B63EA76D-1F85-456F-A19C-48159EFA858B";
public const string TaskbarList = "56FDF342-FD6D-11d0-958A-006097C9A090"; public const string TaskbarList = "56FDF342-FD6D-11d0-958A-006097C9A090";
public const string TaskbarList2 = "602D4995-B13A-429b-A66E-1935E44F4317"; public const string TaskbarList2 = "602D4995-B13A-429b-A66E-1935E44F4317";
public const string Unknown = "00000000-0000-0000-C000-000000000046"; public const string Unknown = "00000000-0000-0000-C000-000000000046";
public const string ApplicationDestinations = "12337d35-94c6-48a0-bce7-6a9c69d4d600"; public const string ApplicationDestinations = "12337d35-94c6-48a0-bce7-6a9c69d4d600";
public const string ApplicationDocumentLists = "3c594f9f-9f30-47a1-979a-c9e83d3d0a06"; public const string ApplicationDocumentLists = "3c594f9f-9f30-47a1-979a-c9e83d3d0a06";
public const string CustomDestinationList = "6332debf-87b5-4670-90c0-5e57b408a49e"; public const string CustomDestinationList = "6332debf-87b5-4670-90c0-5e57b408a49e";
public const string ObjectWithAppUserModelId = "36db0196-9665-46d1-9ba7-d3709eecf9ed"; public const string ObjectWithAppUserModelId = "36db0196-9665-46d1-9ba7-d3709eecf9ed";
public const string ObjectWithProgId = "71e806fb-8dee-46fc-bf8c-7748a8a1ae13"; public const string ObjectWithProgId = "71e806fb-8dee-46fc-bf8c-7748a8a1ae13";
public const string TaskbarList3 = "ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf"; public const string TaskbarList3 = "ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf";
public const string TaskbarList4 = "c43dc798-95d1-4bea-9030-bb99e2983a1a"; public const string TaskbarList4 = "c43dc798-95d1-4bea-9030-bb99e2983a1a";
} }
} }
@@ -2,10 +2,10 @@
namespace Standard namespace Standard
{ {
internal struct INPUT internal struct INPUT
{ {
public uint type; public uint type;
public MOUSEINPUT mi; public MOUSEINPUT mi;
} }
} }
@@ -2,8 +2,8 @@
namespace Standard namespace Standard
{ {
internal enum INPUT_TYPE : uint internal enum INPUT_TYPE : uint
{ {
MOUSE MOUSE
} }
} }
@@ -3,14 +3,14 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("92CA9DCD-5622-4bba-A805-5E9F541BD8C9")] [Guid("92CA9DCD-5622-4bba-A805-5E9F541BD8C9")]
[ComImport] [ComImport]
internal interface IObjectArray internal interface IObjectArray
{ {
uint GetCount(); uint GetCount();
[return: MarshalAs(UnmanagedType.IUnknown)] [return: MarshalAs(UnmanagedType.IUnknown)]
object GetAt([In] uint uiIndex, [In] ref Guid riid); object GetAt([In] uint uiIndex, [In] ref Guid riid);
} }
} }
@@ -3,22 +3,22 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("92CA9DCD-5622-4bba-A805-5E9F541BD8C9")] [Guid("92CA9DCD-5622-4bba-A805-5E9F541BD8C9")]
[ComImport] [ComImport]
internal interface IObjectCollection : IObjectArray internal interface IObjectCollection : IObjectArray
{ {
uint GetCount(); uint GetCount();
[return: MarshalAs(UnmanagedType.IUnknown)] [return: MarshalAs(UnmanagedType.IUnknown)]
object GetAt([In] uint uiIndex, [In] ref Guid riid); object GetAt([In] uint uiIndex, [In] ref Guid riid);
void AddObject([MarshalAs(UnmanagedType.IUnknown)] object punk); void AddObject([MarshalAs(UnmanagedType.IUnknown)] object punk);
void AddFromArray(IObjectArray poaSource); void AddFromArray(IObjectArray poaSource);
void RemoveObjectAt(uint uiIndex); void RemoveObjectAt(uint uiIndex);
void Clear(); void Clear();
} }
} }
@@ -3,14 +3,14 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[Guid("36db0196-9665-46d1-9ba7-d3709eecf9ed")] [Guid("36db0196-9665-46d1-9ba7-d3709eecf9ed")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport] [ComImport]
internal interface IObjectWithAppUserModelId internal interface IObjectWithAppUserModelId
{ {
void SetAppID([MarshalAs(UnmanagedType.LPWStr)] string pszAppID); void SetAppID([MarshalAs(UnmanagedType.LPWStr)] string pszAppID);
[return: MarshalAs(UnmanagedType.LPWStr)] [return: MarshalAs(UnmanagedType.LPWStr)]
string GetAppID(); string GetAppID();
} }
} }
@@ -3,14 +3,14 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[Guid("71e806fb-8dee-46fc-bf8c-7748a8a1ae13")] [Guid("71e806fb-8dee-46fc-bf8c-7748a8a1ae13")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport] [ComImport]
internal interface IObjectWithProgId internal interface IObjectWithProgId
{ {
void SetProgID([MarshalAs(UnmanagedType.LPWStr)] string pszProgID); void SetProgID([MarshalAs(UnmanagedType.LPWStr)] string pszProgID);
[return: MarshalAs(UnmanagedType.LPWStr)] [return: MarshalAs(UnmanagedType.LPWStr)]
string GetProgID(); string GetProgID();
} }
} }
@@ -3,19 +3,19 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[Guid("886d8eeb-8cf2-4446-8d02-cdba1dbdcf99")] [Guid("886d8eeb-8cf2-4446-8d02-cdba1dbdcf99")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport] [ComImport]
internal interface IPropertyStore internal interface IPropertyStore
{ {
uint GetCount(); uint GetCount();
PKEY GetAt(uint iProp); PKEY GetAt(uint iProp);
void GetValue([In] ref PKEY pkey, [In] [Out] PROPVARIANT pv); void GetValue([In] ref PKEY pkey, [In][Out] PROPVARIANT pv);
void SetValue([In] ref PKEY pkey, PROPVARIANT pv); void SetValue([In] ref PKEY pkey, PROPVARIANT pv);
void Commit(); void Commit();
} }
} }
@@ -4,34 +4,34 @@ using System.Runtime.InteropServices.ComTypes;
namespace Standard namespace Standard
{ {
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("000214E6-0000-0000-C000-000000000046")] [Guid("000214E6-0000-0000-C000-000000000046")]
[ComImport] [ComImport]
internal interface IShellFolder internal interface IShellFolder
{ {
void ParseDisplayName([In] IntPtr hwnd, [In] IBindCtx pbc, [MarshalAs(UnmanagedType.LPWStr)] [In] string pszDisplayName, [In] [Out] ref int pchEaten, out IntPtr ppidl, [In] [Out] ref uint pdwAttributes); void ParseDisplayName([In] IntPtr hwnd, [In] IBindCtx pbc, [MarshalAs(UnmanagedType.LPWStr)][In] string pszDisplayName, [In][Out] ref int pchEaten, out IntPtr ppidl, [In][Out] ref uint pdwAttributes);
IEnumIDList EnumObjects([In] IntPtr hwnd, [In] SHCONTF grfFlags); IEnumIDList EnumObjects([In] IntPtr hwnd, [In] SHCONTF grfFlags);
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object BindToObject([In] IntPtr pidl, [In] IBindCtx pbc, [In] ref Guid riid); object BindToObject([In] IntPtr pidl, [In] IBindCtx pbc, [In] ref Guid riid);
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object BindToStorage([In] IntPtr pidl, [In] IBindCtx pbc, [In] ref Guid riid); object BindToStorage([In] IntPtr pidl, [In] IBindCtx pbc, [In] ref Guid riid);
[PreserveSig] [PreserveSig]
HRESULT CompareIDs([In] IntPtr lParam, [In] IntPtr pidl1, [In] IntPtr pidl2); HRESULT CompareIDs([In] IntPtr lParam, [In] IntPtr pidl1, [In] IntPtr pidl2);
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object CreateViewObject([In] IntPtr hwndOwner, [In] ref Guid riid); object CreateViewObject([In] IntPtr hwndOwner, [In] ref Guid riid);
void GetAttributesOf([In] uint cidl, [In] IntPtr apidl, [In] [Out] ref SFGAO rgfInOut); void GetAttributesOf([In] uint cidl, [In] IntPtr apidl, [In][Out] ref SFGAO rgfInOut);
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object GetUIObjectOf([In] IntPtr hwndOwner, [In] uint cidl, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.SysInt, SizeParamIndex = 2)] [In] IntPtr apidl, [In] ref Guid riid, [In] [Out] ref uint rgfReserved); object GetUIObjectOf([In] IntPtr hwndOwner, [In] uint cidl, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.SysInt, SizeParamIndex = 2)][In] IntPtr apidl, [In] ref Guid riid, [In][Out] ref uint rgfReserved);
void GetDisplayNameOf([In] IntPtr pidl, [In] SHGDN uFlags, out IntPtr pName); void GetDisplayNameOf([In] IntPtr pidl, [In] SHGDN uFlags, out IntPtr pName);
void SetNameOf([In] IntPtr hwnd, [In] IntPtr pidl, [MarshalAs(UnmanagedType.LPWStr)] [In] string pszName, [In] SHGDN uFlags, out IntPtr ppidlOut); void SetNameOf([In] IntPtr hwnd, [In] IntPtr pidl, [MarshalAs(UnmanagedType.LPWStr)][In] string pszName, [In] SHGDN uFlags, out IntPtr ppidlOut);
} }
} }
@@ -4,21 +4,21 @@ using System.Runtime.InteropServices.ComTypes;
namespace Standard namespace Standard
{ {
[Guid("43826d1e-e718-42ee-bc55-a1e261c37bfe")] [Guid("43826d1e-e718-42ee-bc55-a1e261c37bfe")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport] [ComImport]
internal interface IShellItem internal interface IShellItem
{ {
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object BindToHandler(IBindCtx pbc, [In] ref Guid bhid, [In] ref Guid riid); object BindToHandler(IBindCtx pbc, [In] ref Guid bhid, [In] ref Guid riid);
IShellItem GetParent(); IShellItem GetParent();
[return: MarshalAs(UnmanagedType.LPWStr)] [return: MarshalAs(UnmanagedType.LPWStr)]
string GetDisplayName(SIGDN sigdnName); string GetDisplayName(SIGDN sigdnName);
SFGAO GetAttributes(SFGAO sfgaoMask); SFGAO GetAttributes(SFGAO sfgaoMask);
int Compare(IShellItem psi, SICHINT hint); int Compare(IShellItem psi, SICHINT hint);
} }
} }
@@ -4,53 +4,53 @@ using System.Runtime.InteropServices.ComTypes;
namespace Standard namespace Standard
{ {
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("7e9fb0d3-919f-4307-ab2e-9b1860310c93")] [Guid("7e9fb0d3-919f-4307-ab2e-9b1860310c93")]
[ComImport] [ComImport]
internal interface IShellItem2 : IShellItem internal interface IShellItem2 : IShellItem
{ {
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object BindToHandler([In] IBindCtx pbc, [In] ref Guid bhid, [In] ref Guid riid); object BindToHandler([In] IBindCtx pbc, [In] ref Guid bhid, [In] ref Guid riid);
IShellItem GetParent(); IShellItem GetParent();
[return: MarshalAs(UnmanagedType.LPWStr)] [return: MarshalAs(UnmanagedType.LPWStr)]
string GetDisplayName(SIGDN sigdnName); string GetDisplayName(SIGDN sigdnName);
SFGAO GetAttributes(SFGAO sfgaoMask); SFGAO GetAttributes(SFGAO sfgaoMask);
int Compare(IShellItem psi, SICHINT hint); int Compare(IShellItem psi, SICHINT hint);
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object GetPropertyStore(GPS flags, [In] ref Guid riid); object GetPropertyStore(GPS flags, [In] ref Guid riid);
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object GetPropertyStoreWithCreateObject(GPS flags, [MarshalAs(UnmanagedType.IUnknown)] object punkCreateObject, [In] ref Guid riid); object GetPropertyStoreWithCreateObject(GPS flags, [MarshalAs(UnmanagedType.IUnknown)] object punkCreateObject, [In] ref Guid riid);
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object GetPropertyStoreForKeys(IntPtr rgKeys, uint cKeys, GPS flags, [In] ref Guid riid); object GetPropertyStoreForKeys(IntPtr rgKeys, uint cKeys, GPS flags, [In] ref Guid riid);
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object GetPropertyDescriptionList(IntPtr keyType, [In] ref Guid riid); object GetPropertyDescriptionList(IntPtr keyType, [In] ref Guid riid);
void Update(IBindCtx pbc); void Update(IBindCtx pbc);
PROPVARIANT GetProperty(IntPtr key); PROPVARIANT GetProperty(IntPtr key);
Guid GetCLSID(IntPtr key); Guid GetCLSID(IntPtr key);
System.Runtime.InteropServices.ComTypes.FILETIME GetFileTime(IntPtr key); System.Runtime.InteropServices.ComTypes.FILETIME GetFileTime(IntPtr key);
int GetInt32(IntPtr key); int GetInt32(IntPtr key);
[return: MarshalAs(UnmanagedType.LPWStr)] [return: MarshalAs(UnmanagedType.LPWStr)]
string GetString(IntPtr key); string GetString(IntPtr key);
uint GetUInt32(IntPtr key); uint GetUInt32(IntPtr key);
ulong GetUInt64(IntPtr key); ulong GetUInt64(IntPtr key);
[return: MarshalAs(UnmanagedType.Bool)] [return: MarshalAs(UnmanagedType.Bool)]
void GetBool(IntPtr key); void GetBool(IntPtr key);
} }
} }
@@ -4,27 +4,27 @@ using System.Runtime.InteropServices.ComTypes;
namespace Standard namespace Standard
{ {
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("B63EA76D-1F85-456F-A19C-48159EFA858B")] [Guid("B63EA76D-1F85-456F-A19C-48159EFA858B")]
[ComImport] [ComImport]
internal interface IShellItemArray internal interface IShellItemArray
{ {
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object BindToHandler(IBindCtx pbc, [In] ref Guid rbhid, [In] ref Guid riid); object BindToHandler(IBindCtx pbc, [In] ref Guid rbhid, [In] ref Guid riid);
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object GetPropertyStore(int flags, [In] ref Guid riid); object GetPropertyStore(int flags, [In] ref Guid riid);
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object GetPropertyDescriptionList([In] ref PKEY keyType, [In] ref Guid riid); object GetPropertyDescriptionList([In] ref PKEY keyType, [In] ref Guid riid);
uint GetAttributes(SIATTRIBFLAGS dwAttribFlags, uint sfgaoMask); uint GetAttributes(SIATTRIBFLAGS dwAttribFlags, uint sfgaoMask);
uint GetCount(); uint GetCount();
IShellItem GetItemAt(uint dwIndex); IShellItem GetItemAt(uint dwIndex);
[return: MarshalAs(UnmanagedType.Interface)] [return: MarshalAs(UnmanagedType.Interface)]
object EnumItems(); object EnumItems();
} }
} }
@@ -4,45 +4,45 @@ using System.Text;
namespace Standard namespace Standard
{ {
[Guid("000214F9-0000-0000-C000-000000000046")] [Guid("000214F9-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport] [ComImport]
internal interface IShellLinkW internal interface IShellLinkW
{ {
void GetPath([MarshalAs(UnmanagedType.LPWStr)] [Out] StringBuilder pszFile, int cchMaxPath, [In] [Out] WIN32_FIND_DATAW pfd, SLGP fFlags); void GetPath([MarshalAs(UnmanagedType.LPWStr)][Out] StringBuilder pszFile, int cchMaxPath, [In][Out] WIN32_FIND_DATAW pfd, SLGP fFlags);
void GetIDList(out IntPtr ppidl); void GetIDList(out IntPtr ppidl);
void SetIDList(IntPtr pidl); void SetIDList(IntPtr pidl);
void GetDescription([MarshalAs(UnmanagedType.LPWStr)] [Out] StringBuilder pszFile, int cchMaxName); void GetDescription([MarshalAs(UnmanagedType.LPWStr)][Out] StringBuilder pszFile, int cchMaxName);
void SetDescription([MarshalAs(UnmanagedType.LPWStr)] string pszName); void SetDescription([MarshalAs(UnmanagedType.LPWStr)] string pszName);
void GetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] [Out] StringBuilder pszDir, int cchMaxPath); void GetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)][Out] StringBuilder pszDir, int cchMaxPath);
void SetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] string pszDir); void SetWorkingDirectory([MarshalAs(UnmanagedType.LPWStr)] string pszDir);
void GetArguments([MarshalAs(UnmanagedType.LPWStr)] [Out] StringBuilder pszArgs, int cchMaxPath); void GetArguments([MarshalAs(UnmanagedType.LPWStr)][Out] StringBuilder pszArgs, int cchMaxPath);
void SetArguments([MarshalAs(UnmanagedType.LPWStr)] string pszArgs); void SetArguments([MarshalAs(UnmanagedType.LPWStr)] string pszArgs);
short GetHotKey(); short GetHotKey();
void SetHotKey(short wHotKey); void SetHotKey(short wHotKey);
uint GetShowCmd(); uint GetShowCmd();
void SetShowCmd(uint iShowCmd); void SetShowCmd(uint iShowCmd);
void GetIconLocation([MarshalAs(UnmanagedType.LPWStr)] [Out] StringBuilder pszIconPath, int cchIconPath, out int piIcon); void GetIconLocation([MarshalAs(UnmanagedType.LPWStr)][Out] StringBuilder pszIconPath, int cchIconPath, out int piIcon);
void SetIconLocation([MarshalAs(UnmanagedType.LPWStr)] string pszIconPath, int iIcon); void SetIconLocation([MarshalAs(UnmanagedType.LPWStr)] string pszIconPath, int iIcon);
void SetRelativePath([MarshalAs(UnmanagedType.LPWStr)] string pszPathRel, uint dwReserved); void SetRelativePath([MarshalAs(UnmanagedType.LPWStr)] string pszPathRel, uint dwReserved);
void Resolve(IntPtr hwnd, uint fFlags); void Resolve(IntPtr hwnd, uint fFlags);
void SetPath([MarshalAs(UnmanagedType.LPWStr)] string pszFile); void SetPath([MarshalAs(UnmanagedType.LPWStr)] string pszFile);
} }
} }
@@ -3,19 +3,19 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[Guid("56FDF342-FD6D-11d0-958A-006097C9A090")] [Guid("56FDF342-FD6D-11d0-958A-006097C9A090")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport] [ComImport]
internal interface ITaskbarList internal interface ITaskbarList
{ {
void HrInit(); void HrInit();
void AddTab(IntPtr hwnd); void AddTab(IntPtr hwnd);
void DeleteTab(IntPtr hwnd); void DeleteTab(IntPtr hwnd);
void ActivateTab(IntPtr hwnd); void ActivateTab(IntPtr hwnd);
void SetActiveAlt(IntPtr hwnd); void SetActiveAlt(IntPtr hwnd);
} }
} }
@@ -3,21 +3,21 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[Guid("602D4995-B13A-429b-A66E-1935E44F4317")] [Guid("602D4995-B13A-429b-A66E-1935E44F4317")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport] [ComImport]
internal interface ITaskbarList2 : ITaskbarList internal interface ITaskbarList2 : ITaskbarList
{ {
void HrInit(); void HrInit();
void AddTab(IntPtr hwnd); void AddTab(IntPtr hwnd);
void DeleteTab(IntPtr hwnd); void DeleteTab(IntPtr hwnd);
void ActivateTab(IntPtr hwnd); void ActivateTab(IntPtr hwnd);
void SetActiveAlt(IntPtr hwnd); void SetActiveAlt(IntPtr hwnd);
void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen);
} }
} }
@@ -3,57 +3,57 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[Guid("ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf")] [Guid("ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[ComImport] [ComImport]
internal interface ITaskbarList3 : ITaskbarList2, ITaskbarList internal interface ITaskbarList3 : ITaskbarList2, ITaskbarList
{ {
void HrInit(); void HrInit();
void AddTab(IntPtr hwnd); void AddTab(IntPtr hwnd);
void DeleteTab(IntPtr hwnd); void DeleteTab(IntPtr hwnd);
void ActivateTab(IntPtr hwnd); void ActivateTab(IntPtr hwnd);
void SetActiveAlt(IntPtr hwnd); void SetActiveAlt(IntPtr hwnd);
void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen);
[PreserveSig] [PreserveSig]
HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal);
[PreserveSig] [PreserveSig]
HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags);
[PreserveSig] [PreserveSig]
HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI);
[PreserveSig] [PreserveSig]
HRESULT UnregisterTab(IntPtr hwndTab); HRESULT UnregisterTab(IntPtr hwndTab);
[PreserveSig] [PreserveSig]
HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore);
[PreserveSig] [PreserveSig]
HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved);
[PreserveSig] [PreserveSig]
HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons);
[PreserveSig] [PreserveSig]
HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons);
[PreserveSig] [PreserveSig]
HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl);
[PreserveSig] [PreserveSig]
HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription);
[PreserveSig] [PreserveSig]
HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip);
[PreserveSig] [PreserveSig]
HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip); HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip);
} }
} }
@@ -3,59 +3,59 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[Guid("ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf")] [Guid("ea1afb91-9e28-4b86-90e9-9e9f8a5eefaf")]
[ComImport] [ComImport]
internal interface ITaskbarList4 : ITaskbarList3, ITaskbarList2, ITaskbarList internal interface ITaskbarList4 : ITaskbarList3, ITaskbarList2, ITaskbarList
{ {
void HrInit(); void HrInit();
void AddTab(IntPtr hwnd); void AddTab(IntPtr hwnd);
void DeleteTab(IntPtr hwnd); void DeleteTab(IntPtr hwnd);
void ActivateTab(IntPtr hwnd); void ActivateTab(IntPtr hwnd);
void SetActiveAlt(IntPtr hwnd); void SetActiveAlt(IntPtr hwnd);
void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen); void MarkFullscreenWindow(IntPtr hwnd, [MarshalAs(UnmanagedType.Bool)] bool fFullscreen);
[PreserveSig] [PreserveSig]
HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal); HRESULT SetProgressValue(IntPtr hwnd, ulong ullCompleted, ulong ullTotal);
[PreserveSig] [PreserveSig]
HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags); HRESULT SetProgressState(IntPtr hwnd, TBPF tbpFlags);
[PreserveSig] [PreserveSig]
HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI); HRESULT RegisterTab(IntPtr hwndTab, IntPtr hwndMDI);
[PreserveSig] [PreserveSig]
HRESULT UnregisterTab(IntPtr hwndTab); HRESULT UnregisterTab(IntPtr hwndTab);
[PreserveSig] [PreserveSig]
HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore); HRESULT SetTabOrder(IntPtr hwndTab, IntPtr hwndInsertBefore);
[PreserveSig] [PreserveSig]
HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved); HRESULT SetTabActive(IntPtr hwndTab, IntPtr hwndMDI, uint dwReserved);
[PreserveSig] [PreserveSig]
HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); HRESULT ThumbBarAddButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons);
[PreserveSig] [PreserveSig]
HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons); HRESULT ThumbBarUpdateButtons(IntPtr hwnd, uint cButtons, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] THUMBBUTTON[] pButtons);
[PreserveSig] [PreserveSig]
HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl); HRESULT ThumbBarSetImageList(IntPtr hwnd, [MarshalAs(UnmanagedType.IUnknown)] object himl);
[PreserveSig] [PreserveSig]
HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription); HRESULT SetOverlayIcon(IntPtr hwnd, IntPtr hIcon, [MarshalAs(UnmanagedType.LPWStr)] string pszDescription);
[PreserveSig] [PreserveSig]
HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip); HRESULT SetThumbnailTooltip(IntPtr hwnd, [MarshalAs(UnmanagedType.LPWStr)] string pszTip);
[PreserveSig] [PreserveSig]
HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip); HRESULT SetThumbnailClip(IntPtr hwnd, RefRECT prcClip);
void SetTabProperties(IntPtr hwndTab, STPF stpFlags); void SetTabProperties(IntPtr hwndTab, STPF stpFlags);
} }
} }
@@ -2,9 +2,9 @@
namespace Standard namespace Standard
{ {
internal enum KDC internal enum KDC
{ {
FREQUENT = 1, FREQUENT = 1,
RECENT RECENT
} }
} }
@@ -3,36 +3,36 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
internal struct LOGFONT internal struct LOGFONT
{ {
public int lfHeight; public int lfHeight;
public int lfWidth; public int lfWidth;
public int lfEscapement; public int lfEscapement;
public int lfOrientation; public int lfOrientation;
public int lfWeight; public int lfWeight;
public byte lfItalic; public byte lfItalic;
public byte lfUnderline; public byte lfUnderline;
public byte lfStrikeOut; public byte lfStrikeOut;
public byte lfCharSet; public byte lfCharSet;
public byte lfOutPrecision; public byte lfOutPrecision;
public byte lfClipPrecision; public byte lfClipPrecision;
public byte lfQuality; public byte lfQuality;
public byte lfPitchAndFamily; public byte lfPitchAndFamily;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] [MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)]
public string lfFaceName; public string lfFaceName;
} }
} }
@@ -2,14 +2,14 @@
namespace Standard namespace Standard
{ {
internal struct MARGINS internal struct MARGINS
{ {
public int cxLeftWidth; public int cxLeftWidth;
public int cxRightWidth; public int cxRightWidth;
public int cyTopHeight; public int cyTopHeight;
public int cyBottomHeight; public int cyBottomHeight;
} }
} }
@@ -2,13 +2,13 @@
namespace Standard namespace Standard
{ {
[Flags] [Flags]
internal enum MF : uint internal enum MF : uint
{ {
DOES_NOT_EXIST = 4294967295u, DOES_NOT_EXIST = 4294967295u,
ENABLED = 0u, ENABLED = 0u,
BYCOMMAND = 0u, BYCOMMAND = 0u,
GRAYED = 1u, GRAYED = 1u,
DISABLED = 2u DISABLED = 2u
} }
} }
@@ -2,16 +2,16 @@
namespace Standard namespace Standard
{ {
internal struct MINMAXINFO internal struct MINMAXINFO
{ {
public POINT ptReserved; public POINT ptReserved;
public POINT ptMaxSize; public POINT ptMaxSize;
public POINT ptMaxPosition; public POINT ptMaxPosition;
public POINT ptMinTrackSize; public POINT ptMinTrackSize;
public POINT ptMaxTrackSize; public POINT ptMaxTrackSize;
} }
} }
@@ -3,15 +3,15 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class MONITORINFO internal class MONITORINFO
{ {
public int cbSize = Marshal.SizeOf(typeof(MONITORINFO)); public int cbSize = Marshal.SizeOf(typeof(MONITORINFO));
public RECT rcMonitor; public RECT rcMonitor;
public RECT rcWork; public RECT rcWork;
public int dwFlags; public int dwFlags;
} }
} }
@@ -2,9 +2,9 @@
namespace Standard namespace Standard
{ {
internal enum MOUSEEVENTF internal enum MOUSEEVENTF
{ {
LEFTDOWN = 2, LEFTDOWN = 2,
LEFTUP = 4 LEFTUP = 4
} }
} }
@@ -2,18 +2,18 @@
namespace Standard namespace Standard
{ {
internal struct MOUSEINPUT internal struct MOUSEINPUT
{ {
public int dx; public int dx;
public int dy; public int dy;
public int mouseData; public int mouseData;
public int dwFlags; public int dwFlags;
public int time; public int time;
public IntPtr dwExtraInfo; public IntPtr dwExtraInfo;
} }
} }
@@ -2,10 +2,10 @@
namespace Standard namespace Standard
{ {
internal enum MSGFLT internal enum MSGFLT
{ {
RESET, RESET,
ALLOW, ALLOW,
DISALLOW DISALLOW
} }
} }
@@ -2,11 +2,11 @@
namespace Standard namespace Standard
{ {
internal enum MSGFLTINFO internal enum MSGFLTINFO
{ {
NONE, NONE,
ALREADYALLOWED_FORWND, ALREADYALLOWED_FORWND,
ALREADYDISALLOWED_FORWND, ALREADYDISALLOWED_FORWND,
ALLOWED_HIGHER ALLOWED_HIGHER
} }
} }
@@ -6,145 +6,145 @@ using System.Runtime.InteropServices.ComTypes;
namespace Standard namespace Standard
{ {
internal sealed class ManagedIStream : IStream, IDisposable internal sealed class ManagedIStream : IStream, IDisposable
{ {
public ManagedIStream(Stream source) public ManagedIStream(Stream source)
{ {
Verify.IsNotNull<Stream>(source, "source"); Verify.IsNotNull<Stream>(source, "source");
this._source = source; this._source = source;
} }
private void _Validate() private void _Validate()
{ {
if (this._source == null) if (this._source == null)
{ {
throw new ObjectDisposedException("this"); throw new ObjectDisposedException("this");
} }
} }
[SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Standard.HRESULT.ThrowIfFailed(System.String)")] [SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Standard.HRESULT.ThrowIfFailed(System.String)")]
[Obsolete("The method is not implemented", true)] [Obsolete("The method is not implemented", true)]
public void Clone(out IStream ppstm) public void Clone(out IStream ppstm)
{ {
ppstm = null; ppstm = null;
HRESULT.STG_E_INVALIDFUNCTION.ThrowIfFailed("The method is not implemented."); HRESULT.STG_E_INVALIDFUNCTION.ThrowIfFailed("The method is not implemented.");
} }
public void Commit(int grfCommitFlags) public void Commit(int grfCommitFlags)
{ {
this._Validate(); this._Validate();
this._source.Flush(); this._source.Flush();
} }
[SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
[SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")] [SuppressMessage("Microsoft.Design", "CA1062:Validate arguments of public methods", MessageId = "0")]
public void CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten) public void CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten)
{ {
Verify.IsNotNull<IStream>(pstm, "pstm"); Verify.IsNotNull<IStream>(pstm, "pstm");
this._Validate(); this._Validate();
byte[] array = new byte[4096]; byte[] array = new byte[4096];
long num; long num;
int num2; int num2;
for (num = 0L; num < cb; num += (long)num2) for (num = 0L; num < cb; num += (long) num2)
{ {
num2 = this._source.Read(array, 0, array.Length); num2 = this._source.Read(array, 0, array.Length);
if (num2 == 0) if (num2 == 0)
{ {
break; break;
} }
pstm.Write(array, num2, IntPtr.Zero); pstm.Write(array, num2, IntPtr.Zero);
} }
if (IntPtr.Zero != pcbRead) if (IntPtr.Zero != pcbRead)
{ {
Marshal.WriteInt64(pcbRead, num); Marshal.WriteInt64(pcbRead, num);
} }
if (IntPtr.Zero != pcbWritten) if (IntPtr.Zero != pcbWritten)
{ {
Marshal.WriteInt64(pcbWritten, num); Marshal.WriteInt64(pcbWritten, num);
} }
} }
[SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Standard.HRESULT.ThrowIfFailed(System.String)")] [SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Standard.HRESULT.ThrowIfFailed(System.String)")]
[Obsolete("The method is not implemented", true)] [Obsolete("The method is not implemented", true)]
public void LockRegion(long libOffset, long cb, int dwLockType) public void LockRegion(long libOffset, long cb, int dwLockType)
{ {
HRESULT.STG_E_INVALIDFUNCTION.ThrowIfFailed("The method is not implemented."); HRESULT.STG_E_INVALIDFUNCTION.ThrowIfFailed("The method is not implemented.");
} }
[SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
public void Read(byte[] pv, int cb, IntPtr pcbRead) public void Read(byte[] pv, int cb, IntPtr pcbRead)
{ {
this._Validate(); this._Validate();
int val = this._source.Read(pv, 0, cb); int val = this._source.Read(pv, 0, cb);
if (IntPtr.Zero != pcbRead) if (IntPtr.Zero != pcbRead)
{ {
Marshal.WriteInt32(pcbRead, val); Marshal.WriteInt32(pcbRead, val);
} }
} }
[SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Standard.HRESULT.ThrowIfFailed(System.String)")] [SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Standard.HRESULT.ThrowIfFailed(System.String)")]
[Obsolete("The method is not implemented", true)] [Obsolete("The method is not implemented", true)]
public void Revert() public void Revert()
{ {
HRESULT.STG_E_INVALIDFUNCTION.ThrowIfFailed("The method is not implemented."); HRESULT.STG_E_INVALIDFUNCTION.ThrowIfFailed("The method is not implemented.");
} }
[SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
public void Seek(long dlibMove, int dwOrigin, IntPtr plibNewPosition) public void Seek(long dlibMove, int dwOrigin, IntPtr plibNewPosition)
{ {
this._Validate(); this._Validate();
long val = this._source.Seek(dlibMove, (SeekOrigin)dwOrigin); long val = this._source.Seek(dlibMove, (SeekOrigin) dwOrigin);
if (IntPtr.Zero != plibNewPosition) if (IntPtr.Zero != plibNewPosition)
{ {
Marshal.WriteInt64(plibNewPosition, val); Marshal.WriteInt64(plibNewPosition, val);
} }
} }
public void SetSize(long libNewSize) public void SetSize(long libNewSize)
{ {
this._Validate(); this._Validate();
this._source.SetLength(libNewSize); this._source.SetLength(libNewSize);
} }
public void Stat(out System.Runtime.InteropServices.ComTypes.STATSTG pstatstg, int grfStatFlag) public void Stat(out System.Runtime.InteropServices.ComTypes.STATSTG pstatstg, int grfStatFlag)
{ {
pstatstg = default(System.Runtime.InteropServices.ComTypes.STATSTG); pstatstg = default(System.Runtime.InteropServices.ComTypes.STATSTG);
this._Validate(); this._Validate();
pstatstg.type = 2; pstatstg.type = 2;
pstatstg.cbSize = this._source.Length; pstatstg.cbSize = this._source.Length;
pstatstg.grfMode = 2; pstatstg.grfMode = 2;
pstatstg.grfLocksSupported = 2; pstatstg.grfLocksSupported = 2;
} }
[Obsolete("The method is not implemented", true)] [Obsolete("The method is not implemented", true)]
[SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Standard.HRESULT.ThrowIfFailed(System.String)")] [SuppressMessage("Microsoft.Globalization", "CA1303:Do not pass literals as localized parameters", MessageId = "Standard.HRESULT.ThrowIfFailed(System.String)")]
public void UnlockRegion(long libOffset, long cb, int dwLockType) public void UnlockRegion(long libOffset, long cb, int dwLockType)
{ {
HRESULT.STG_E_INVALIDFUNCTION.ThrowIfFailed("The method is not implemented."); HRESULT.STG_E_INVALIDFUNCTION.ThrowIfFailed("The method is not implemented.");
} }
[SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
public void Write(byte[] pv, int cb, IntPtr pcbWritten) public void Write(byte[] pv, int cb, IntPtr pcbWritten)
{ {
this._Validate(); this._Validate();
this._source.Write(pv, 0, cb); this._source.Write(pv, 0, cb);
if (IntPtr.Zero != pcbWritten) if (IntPtr.Zero != pcbWritten)
{ {
Marshal.WriteInt32(pcbWritten, cb); Marshal.WriteInt32(pcbWritten, cb);
} }
} }
public void Dispose() public void Dispose()
{ {
this._source = null; this._source = null;
} }
private const int STGTY_STREAM = 2; private const int STGTY_STREAM = 2;
private const int STGM_READWRITE = 2; private const int STGM_READWRITE = 2;
private const int LOCK_EXCLUSIVE = 2; private const int LOCK_EXCLUSIVE = 2;
private Stream _source; private Stream _source;
} }
} }
@@ -2,5 +2,5 @@
namespace Standard namespace Standard
{ {
internal delegate IntPtr MessageHandler(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled); internal delegate IntPtr MessageHandler(WM uMsg, IntPtr wParam, IntPtr lParam, out bool handled);
} }
@@ -7,126 +7,126 @@ using System.Windows.Threading;
namespace Standard namespace Standard
{ {
internal sealed class MessageWindow : DispatcherObject, IDisposable internal sealed class MessageWindow : DispatcherObject, IDisposable
{ {
public IntPtr Handle { get; private set; } public IntPtr Handle { get; private set; }
[SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
public MessageWindow(CS classStyle, WS style, WS_EX exStyle, Rect location, string name, WndProc callback) public MessageWindow(CS classStyle, WS style, WS_EX exStyle, Rect location, string name, WndProc callback)
{ {
this._wndProcCallback = callback; this._wndProcCallback = callback;
this._className = "MessageWindowClass+" + Guid.NewGuid().ToString(); this._className = "MessageWindowClass+" + Guid.NewGuid().ToString();
WNDCLASSEX wndclassex = new WNDCLASSEX WNDCLASSEX wndclassex = new WNDCLASSEX
{ {
cbSize = Marshal.SizeOf(typeof(WNDCLASSEX)), cbSize = Marshal.SizeOf(typeof(WNDCLASSEX)),
style = classStyle, style = classStyle,
lpfnWndProc = MessageWindow.s_WndProc, lpfnWndProc = MessageWindow.s_WndProc,
hInstance = NativeMethods.GetModuleHandle(null), hInstance = NativeMethods.GetModuleHandle(null),
hbrBackground = NativeMethods.GetStockObject(StockObject.NULL_BRUSH), hbrBackground = NativeMethods.GetStockObject(StockObject.NULL_BRUSH),
lpszMenuName = "", lpszMenuName = "",
lpszClassName = this._className lpszClassName = this._className
}; };
NativeMethods.RegisterClassEx(ref wndclassex); NativeMethods.RegisterClassEx(ref wndclassex);
GCHandle value = default(GCHandle); GCHandle value = default(GCHandle);
try try
{ {
value = GCHandle.Alloc(this); value = GCHandle.Alloc(this);
IntPtr lpParam = (IntPtr)value; IntPtr lpParam = (IntPtr) value;
this.Handle = NativeMethods.CreateWindowEx(exStyle, this._className, name, style, (int)location.X, (int)location.Y, (int)location.Width, (int)location.Height, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, lpParam); this.Handle = NativeMethods.CreateWindowEx(exStyle, this._className, name, style, (int) location.X, (int) location.Y, (int) location.Width, (int) location.Height, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, lpParam);
} }
finally finally
{ {
value.Free(); value.Free();
} }
} }
~MessageWindow() ~MessageWindow()
{ {
this._Dispose(false, false); this._Dispose(false, false);
} }
public void Dispose() public void Dispose()
{ {
this._Dispose(true, false); this._Dispose(true, false);
GC.SuppressFinalize(this); GC.SuppressFinalize(this);
} }
[SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "disposing")] [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "disposing")]
private void _Dispose(bool disposing, bool isHwndBeingDestroyed) private void _Dispose(bool disposing, bool isHwndBeingDestroyed)
{ {
if (this._isDisposed) if (this._isDisposed)
{ {
return; return;
} }
this._isDisposed = true; this._isDisposed = true;
IntPtr hwnd = this.Handle; IntPtr hwnd = this.Handle;
string className = this._className; string className = this._className;
if (isHwndBeingDestroyed) if (isHwndBeingDestroyed)
{ {
base.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new DispatcherOperationCallback((object arg) => MessageWindow._DestroyWindow(IntPtr.Zero, className))); base.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new DispatcherOperationCallback((object arg) => MessageWindow._DestroyWindow(IntPtr.Zero, className)));
} }
else if (this.Handle != IntPtr.Zero) else if (this.Handle != IntPtr.Zero)
{ {
if (base.CheckAccess()) if (base.CheckAccess())
{ {
MessageWindow._DestroyWindow(hwnd, className); MessageWindow._DestroyWindow(hwnd, className);
} }
else else
{ {
base.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new DispatcherOperationCallback((object arg) => MessageWindow._DestroyWindow(hwnd, className))); base.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new DispatcherOperationCallback((object arg) => MessageWindow._DestroyWindow(hwnd, className)));
} }
} }
MessageWindow.s_windowLookup.Remove(hwnd); MessageWindow.s_windowLookup.Remove(hwnd);
this._className = null; this._className = null;
this.Handle = IntPtr.Zero; this.Handle = IntPtr.Zero;
} }
[SuppressMessage("Microsoft.Usage", "CA1816:CallGCSuppressFinalizeCorrectly")] [SuppressMessage("Microsoft.Usage", "CA1816:CallGCSuppressFinalizeCorrectly")]
private static IntPtr _WndProc(IntPtr hwnd, WM msg, IntPtr wParam, IntPtr lParam) private static IntPtr _WndProc(IntPtr hwnd, WM msg, IntPtr wParam, IntPtr lParam)
{ {
IntPtr result = IntPtr.Zero; IntPtr result = IntPtr.Zero;
MessageWindow messageWindow = null; MessageWindow messageWindow = null;
if (msg == WM.CREATE) if (msg == WM.CREATE)
{ {
messageWindow = (MessageWindow)GCHandle.FromIntPtr(((CREATESTRUCT)Marshal.PtrToStructure(lParam, typeof(CREATESTRUCT))).lpCreateParams).Target; messageWindow = (MessageWindow) GCHandle.FromIntPtr(((CREATESTRUCT) Marshal.PtrToStructure(lParam, typeof(CREATESTRUCT))).lpCreateParams).Target;
MessageWindow.s_windowLookup.Add(hwnd, messageWindow); MessageWindow.s_windowLookup.Add(hwnd, messageWindow);
} }
else if (!MessageWindow.s_windowLookup.TryGetValue(hwnd, out messageWindow)) else if (!MessageWindow.s_windowLookup.TryGetValue(hwnd, out messageWindow))
{ {
return NativeMethods.DefWindowProc(hwnd, msg, wParam, lParam); return NativeMethods.DefWindowProc(hwnd, msg, wParam, lParam);
} }
WndProc wndProcCallback = messageWindow._wndProcCallback; WndProc wndProcCallback = messageWindow._wndProcCallback;
if (wndProcCallback != null) if (wndProcCallback != null)
{ {
result = wndProcCallback(hwnd, msg, wParam, lParam); result = wndProcCallback(hwnd, msg, wParam, lParam);
} }
else else
{ {
result = NativeMethods.DefWindowProc(hwnd, msg, wParam, lParam); result = NativeMethods.DefWindowProc(hwnd, msg, wParam, lParam);
} }
if (msg == WM.NCDESTROY) if (msg == WM.NCDESTROY)
{ {
messageWindow._Dispose(true, true); messageWindow._Dispose(true, true);
GC.SuppressFinalize(messageWindow); GC.SuppressFinalize(messageWindow);
} }
return result; return result;
} }
private static object _DestroyWindow(IntPtr hwnd, string className) private static object _DestroyWindow(IntPtr hwnd, string className)
{ {
Utility.SafeDestroyWindow(ref hwnd); Utility.SafeDestroyWindow(ref hwnd);
NativeMethods.UnregisterClass(className, NativeMethods.GetModuleHandle(null)); NativeMethods.UnregisterClass(className, NativeMethods.GetModuleHandle(null));
return null; return null;
} }
private static readonly WndProc s_WndProc = new WndProc(MessageWindow._WndProc); private static readonly WndProc s_WndProc = new WndProc(MessageWindow._WndProc);
private static readonly Dictionary<IntPtr, MessageWindow> s_windowLookup = new Dictionary<IntPtr, MessageWindow>(); private static readonly Dictionary<IntPtr, MessageWindow> s_windowLookup = new Dictionary<IntPtr, MessageWindow>();
private WndProc _wndProcCallback; private WndProc _wndProcCallback;
private string _className; private string _className;
private bool _isDisposed; private bool _isDisposed;
} }
} }
@@ -2,18 +2,18 @@
namespace Standard namespace Standard
{ {
[Flags] [Flags]
internal enum NIF : uint internal enum NIF : uint
{ {
MESSAGE = 1u, MESSAGE = 1u,
ICON = 2u, ICON = 2u,
TIP = 4u, TIP = 4u,
STATE = 8u, STATE = 8u,
INFO = 16u, INFO = 16u,
GUID = 32u, GUID = 32u,
REALTIME = 64u, REALTIME = 64u,
SHOWTIP = 128u, SHOWTIP = 128u,
XP_MASK = 59u, XP_MASK = 59u,
VISTA_MASK = 251u VISTA_MASK = 251u
} }
} }
@@ -2,16 +2,16 @@
namespace Standard namespace Standard
{ {
internal enum NIIF internal enum NIIF
{ {
NONE, NONE,
INFO, INFO,
WARNING, WARNING,
ERROR, ERROR,
USER, USER,
NOSOUND = 16, NOSOUND = 16,
LARGE_ICON = 32, LARGE_ICON = 32,
NIIF_RESPECT_QUIET_TIME = 128, NIIF_RESPECT_QUIET_TIME = 128,
XP_ICON_MASK = 15 XP_ICON_MASK = 15
} }
} }
@@ -2,12 +2,12 @@
namespace Standard namespace Standard
{ {
internal enum NIM : uint internal enum NIM : uint
{ {
ADD, ADD,
MODIFY, MODIFY,
DELETE, DELETE,
SETFOCUS, SETFOCUS,
SETVERSION SETVERSION
} }
} }
@@ -4,62 +4,62 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
internal struct NONCLIENTMETRICS internal struct NONCLIENTMETRICS
{ {
[SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
public static NONCLIENTMETRICS VistaMetricsStruct public static NONCLIENTMETRICS VistaMetricsStruct
{ {
get get
{ {
return new NONCLIENTMETRICS return new NONCLIENTMETRICS
{ {
cbSize = Marshal.SizeOf(typeof(NONCLIENTMETRICS)) cbSize = Marshal.SizeOf(typeof(NONCLIENTMETRICS))
}; };
} }
} }
[SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
public static NONCLIENTMETRICS XPMetricsStruct public static NONCLIENTMETRICS XPMetricsStruct
{ {
get get
{ {
return new NONCLIENTMETRICS return new NONCLIENTMETRICS
{ {
cbSize = Marshal.SizeOf(typeof(NONCLIENTMETRICS)) - 4 cbSize = Marshal.SizeOf(typeof(NONCLIENTMETRICS)) - 4
}; };
} }
} }
public int cbSize; public int cbSize;
public int iBorderWidth; public int iBorderWidth;
public int iScrollWidth; public int iScrollWidth;
public int iScrollHeight; public int iScrollHeight;
public int iCaptionWidth; public int iCaptionWidth;
public int iCaptionHeight; public int iCaptionHeight;
public LOGFONT lfCaptionFont; public LOGFONT lfCaptionFont;
public int iSmCaptionWidth; public int iSmCaptionWidth;
public int iSmCaptionHeight; public int iSmCaptionHeight;
public LOGFONT lfSmCaptionFont; public LOGFONT lfSmCaptionFont;
public int iMenuWidth; public int iMenuWidth;
public int iMenuHeight; public int iMenuHeight;
public LOGFONT lfMenuFont; public LOGFONT lfMenuFont;
public LOGFONT lfStatusFont; public LOGFONT lfStatusFont;
public LOGFONT lfMessageFont; public LOGFONT lfMessageFont;
public int iPaddedBorderWidth; public int iPaddedBorderWidth;
} }
} }
@@ -4,41 +4,41 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class NOTIFYICONDATA internal class NOTIFYICONDATA
{ {
public int cbSize; public int cbSize;
public IntPtr hWnd; public IntPtr hWnd;
public int uID; public int uID;
public NIF uFlags; public NIF uFlags;
public int uCallbackMessage; public int uCallbackMessage;
public IntPtr hIcon; public IntPtr hIcon;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 128)]
public char[] szTip = new char[128]; public char[] szTip = new char[128];
public uint dwState; public uint dwState;
public uint dwStateMask; public uint dwStateMask;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 256)]
public char[] szInfo = new char[256]; public char[] szInfo = new char[256];
public uint uVersion; public uint uVersion;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)] [MarshalAs(UnmanagedType.ByValArray, SizeConst = 64)]
public char[] szInfoTitle = new char[64]; public char[] szInfoTitle = new char[64];
public uint dwInfoFlags; public uint dwInfoFlags;
public Guid guidItem; public Guid guidItem;
private IntPtr hBalloonIcon; private IntPtr hBalloonIcon;
} }
} }
File diff suppressed because it is too large. Load diff
@@ -2,11 +2,11 @@
namespace Standard namespace Standard
{ {
internal enum OLECMDEXECOPT internal enum OLECMDEXECOPT
{ {
DODEFAULT, DODEFAULT,
PROMPTUSER, PROMPTUSER,
DONTPROMPTUSER, DONTPROMPTUSER,
SHOWHELP SHOWHELP
} }
} }
@@ -2,13 +2,13 @@
namespace Standard namespace Standard
{ {
internal enum OLECMDF internal enum OLECMDF
{ {
SUPPORTED = 1, SUPPORTED = 1,
ENABLED, ENABLED,
LATCHED = 4, LATCHED = 4,
NINCHED = 8, NINCHED = 8,
INVISIBLE = 16, INVISIBLE = 16,
DEFHIDEONCTXTMENU = 32 DEFHIDEONCTXTMENU = 32
} }
} }
@@ -2,64 +2,64 @@
namespace Standard namespace Standard
{ {
internal enum OLECMDID internal enum OLECMDID
{ {
OPEN = 1, OPEN = 1,
NEW, NEW,
SAVE, SAVE,
SAVEAS, SAVEAS,
SAVECOPYAS, SAVECOPYAS,
PRINT, PRINT,
PRINTPREVIEW, PRINTPREVIEW,
PAGESETUP, PAGESETUP,
SPELL, SPELL,
PROPERTIES, PROPERTIES,
CUT, CUT,
COPY, COPY,
PASTE, PASTE,
PASTESPECIAL, PASTESPECIAL,
UNDO, UNDO,
REDO, REDO,
SELECTALL, SELECTALL,
CLEARSELECTION, CLEARSELECTION,
ZOOM, ZOOM,
GETZOOMRANGE, GETZOOMRANGE,
UPDATECOMMANDS, UPDATECOMMANDS,
REFRESH, REFRESH,
STOP, STOP,
HIDETOOLBARS, HIDETOOLBARS,
SETPROGRESSMAX, SETPROGRESSMAX,
SETPROGRESSPOS, SETPROGRESSPOS,
SETPROGRESSTEXT, SETPROGRESSTEXT,
SETTITLE, SETTITLE,
SETDOWNLOADSTATE, SETDOWNLOADSTATE,
STOPDOWNLOAD, STOPDOWNLOAD,
ONTOOLBARACTIVATED, ONTOOLBARACTIVATED,
FIND, FIND,
DELETE, DELETE,
HTTPEQUIV, HTTPEQUIV,
HTTPEQUIV_DONE, HTTPEQUIV_DONE,
ENABLE_INTERACTION, ENABLE_INTERACTION,
ONUNLOAD, ONUNLOAD,
PROPERTYBAG2, PROPERTYBAG2,
PREREFRESH, PREREFRESH,
SHOWSCRIPTERROR, SHOWSCRIPTERROR,
SHOWMESSAGE, SHOWMESSAGE,
SHOWFIND, SHOWFIND,
SHOWPAGESETUP, SHOWPAGESETUP,
SHOWPRINT, SHOWPRINT,
CLOSE, CLOSE,
ALLOWUILESSSAVEAS, ALLOWUILESSSAVEAS,
DONTDOWNLOADCSS, DONTDOWNLOADCSS,
UPDATEPAGESTATUS, UPDATEPAGESTATUS,
PRINT2, PRINT2,
PRINTPREVIEW2, PRINTPREVIEW2,
SETPRINTTEMPLATE, SETPRINTTEMPLATE,
GETPRINTTEMPLATE, GETPRINTTEMPLATE,
PAGEACTIONBLOCKED = 55, PAGEACTIONBLOCKED = 55,
PAGEACTIONUIQUERY, PAGEACTIONUIQUERY,
FOCUSVIEWCONTROLS, FOCUSVIEWCONTROLS,
FOCUSVIEWCONTROLSQUERY, FOCUSVIEWCONTROLSQUERY,
SHOWPAGEACTIONMENU SHOWPAGEACTIONMENU
} }
} }
@@ -3,29 +3,29 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[StructLayout(LayoutKind.Sequential, Pack = 4)] [StructLayout(LayoutKind.Sequential, Pack = 4)]
internal struct PKEY internal struct PKEY
{ {
public PKEY(Guid fmtid, uint pid) public PKEY(Guid fmtid, uint pid)
{ {
this._fmtid = fmtid; this._fmtid = fmtid;
this._pid = pid; this._pid = pid;
} }
private readonly Guid _fmtid; private readonly Guid _fmtid;
private readonly uint _pid; private readonly uint _pid;
public static readonly PKEY Title = new PKEY(new Guid("F29F85E0-4FF9-1068-AB91-08002B27B3D9"), 2u); public static readonly PKEY Title = new PKEY(new Guid("F29F85E0-4FF9-1068-AB91-08002B27B3D9"), 2u);
public static readonly PKEY AppUserModel_ID = new PKEY(new Guid("9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3"), 5u); public static readonly PKEY AppUserModel_ID = new PKEY(new Guid("9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3"), 5u);
public static readonly PKEY AppUserModel_IsDestListSeparator = new PKEY(new Guid("9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3"), 6u); public static readonly PKEY AppUserModel_IsDestListSeparator = new PKEY(new Guid("9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3"), 6u);
public static readonly PKEY AppUserModel_RelaunchCommand = new PKEY(new Guid("9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3"), 2u); public static readonly PKEY AppUserModel_RelaunchCommand = new PKEY(new Guid("9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3"), 2u);
public static readonly PKEY AppUserModel_RelaunchDisplayNameResource = new PKEY(new Guid("9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3"), 4u); public static readonly PKEY AppUserModel_RelaunchDisplayNameResource = new PKEY(new Guid("9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3"), 4u);
public static readonly PKEY AppUserModel_RelaunchIconResource = new PKEY(new Guid("9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3"), 3u); public static readonly PKEY AppUserModel_RelaunchIconResource = new PKEY(new Guid("9F4C2855-9F79-4B39-A8D0-E1D42DE1D5F3"), 3u);
} }
} }
@@ -2,10 +2,10 @@
namespace Standard namespace Standard
{ {
internal struct POINT internal struct POINT
{ {
public int x; public int x;
public int y; public int y;
} }
} }
@@ -4,91 +4,91 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
[StructLayout(LayoutKind.Explicit)] [StructLayout(LayoutKind.Explicit)]
internal class PROPVARIANT : IDisposable internal class PROPVARIANT : IDisposable
{ {
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public VarEnum VarType public VarEnum VarType
{ {
get get
{ {
return (VarEnum)this.vt; return (VarEnum) this.vt;
} }
} }
[SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
public string GetValue() public string GetValue()
{ {
if (this.vt == 31) if (this.vt == 31)
{ {
return Marshal.PtrToStringUni(this.pointerVal); return Marshal.PtrToStringUni(this.pointerVal);
} }
return null; return null;
} }
public void SetValue(bool f) public void SetValue(bool f)
{ {
this.Clear(); this.Clear();
this.vt = 11; this.vt = 11;
this.boolVal = (short)(f ? -1 : 0); this.boolVal = (short) (f ? -1 : 0);
} }
[SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")] [SuppressMessage("Microsoft.Security", "CA2122:DoNotIndirectlyExposeMethodsWithLinkDemands")]
public void SetValue(string val) public void SetValue(string val)
{ {
this.Clear(); this.Clear();
this.vt = 31; this.vt = 31;
this.pointerVal = Marshal.StringToCoTaskMemUni(val); this.pointerVal = Marshal.StringToCoTaskMemUni(val);
} }
public void Clear() public void Clear()
{ {
PROPVARIANT.NativeMethods.PropVariantClear(this); PROPVARIANT.NativeMethods.PropVariantClear(this);
} }
public void Dispose() public void Dispose()
{ {
this.Dispose(true); this.Dispose(true);
GC.SuppressFinalize(this); GC.SuppressFinalize(this);
} }
~PROPVARIANT() ~PROPVARIANT()
{ {
this.Dispose(false); this.Dispose(false);
} }
[SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "disposing")] [SuppressMessage("Microsoft.Usage", "CA1801:ReviewUnusedParameters", MessageId = "disposing")]
private void Dispose(bool disposing) private void Dispose(bool disposing)
{ {
this.Clear(); this.Clear();
} }
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
[FieldOffset(0)] [FieldOffset(0)]
private ushort vt; private ushort vt;
[SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources")] [SuppressMessage("Microsoft.Reliability", "CA2006:UseSafeHandleToEncapsulateNativeResources")]
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
[FieldOffset(8)] [FieldOffset(8)]
private IntPtr pointerVal; private IntPtr pointerVal;
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
[FieldOffset(8)] [FieldOffset(8)]
private byte byteVal; private byte byteVal;
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
[FieldOffset(8)] [FieldOffset(8)]
private long longVal; private long longVal;
[SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")] [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields")]
[FieldOffset(8)] [FieldOffset(8)]
private short boolVal; private short boolVal;
private static class NativeMethods private static class NativeMethods
{ {
[DllImport("ole32.dll")] [DllImport("ole32.dll")]
internal static extern HRESULT PropVariantClear(PROPVARIANT pvar); internal static extern HRESULT PropVariantClear(PROPVARIANT pvar);
} }
} }
} }
@@ -2,12 +2,12 @@
namespace Standard namespace Standard
{ {
internal enum READYSTATE internal enum READYSTATE
{ {
UNINITIALIZED, UNINITIALIZED,
LOADING, LOADING,
LOADED, LOADED,
INTERACTIVE, INTERACTIVE,
COMPLETE COMPLETE
} }
} }
@@ -3,150 +3,150 @@ using System.Diagnostics.CodeAnalysis;
namespace Standard namespace Standard
{ {
internal struct RECT internal struct RECT
{ {
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public void Offset(int dx, int dy) public void Offset(int dx, int dy)
{ {
this._left += dx; this._left += dx;
this._top += dy; this._top += dy;
this._right += dx; this._right += dx;
this._bottom += dy; this._bottom += dy;
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public int Left public int Left
{ {
get get
{ {
return this._left; return this._left;
} }
set set
{ {
this._left = value; this._left = value;
} }
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public int Right public int Right
{ {
get get
{ {
return this._right; return this._right;
} }
set set
{ {
this._right = value; this._right = value;
} }
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public int Top public int Top
{ {
get get
{ {
return this._top; return this._top;
} }
set set
{ {
this._top = value; this._top = value;
} }
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public int Bottom public int Bottom
{ {
get get
{ {
return this._bottom; return this._bottom;
} }
set set
{ {
this._bottom = value; this._bottom = value;
} }
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public int Width public int Width
{ {
get get
{ {
return this._right - this._left; return this._right - this._left;
} }
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public int Height public int Height
{ {
get get
{ {
return this._bottom - this._top; return this._bottom - this._top;
} }
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public POINT Position public POINT Position
{ {
get get
{ {
return new POINT return new POINT
{ {
x = this._left, x = this._left,
y = this._top y = this._top
}; };
} }
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public SIZE Size public SIZE Size
{ {
get get
{ {
return new SIZE return new SIZE
{ {
cx = this.Width, cx = this.Width,
cy = this.Height cy = this.Height
}; };
} }
} }
public static RECT Union(RECT rect1, RECT rect2) public static RECT Union(RECT rect1, RECT rect2)
{ {
return new RECT return new RECT
{ {
Left = Math.Min(rect1.Left, rect2.Left), Left = Math.Min(rect1.Left, rect2.Left),
Top = Math.Min(rect1.Top, rect2.Top), Top = Math.Min(rect1.Top, rect2.Top),
Right = Math.Max(rect1.Right, rect2.Right), Right = Math.Max(rect1.Right, rect2.Right),
Bottom = Math.Max(rect1.Bottom, rect2.Bottom) Bottom = Math.Max(rect1.Bottom, rect2.Bottom)
}; };
} }
public override bool Equals(object obj) public override bool Equals(object obj)
{ {
bool result; bool result;
try try
{ {
RECT rect = (RECT)obj; RECT rect = (RECT) obj;
result = (rect._bottom == this._bottom && rect._left == this._left && rect._right == this._right && rect._top == this._top); result = (rect._bottom == this._bottom && rect._left == this._left && rect._right == this._right && rect._top == this._top);
} }
catch (InvalidCastException) catch (InvalidCastException)
{ {
result = false; result = false;
} }
return result; return result;
} }
public override int GetHashCode() public override int GetHashCode()
{ {
return (this._left << 16 | Utility.LOWORD(this._right)) ^ (this._top << 16 | Utility.LOWORD(this._bottom)); return (this._left << 16 | Utility.LOWORD(this._right)) ^ (this._top << 16 | Utility.LOWORD(this._bottom));
} }
private int _left; private int _left;
private int _top; private int _top;
private int _right; private int _right;
private int _bottom; private int _bottom;
} }
} }
@@ -2,14 +2,14 @@
namespace Standard namespace Standard
{ {
internal struct RGBQUAD internal struct RGBQUAD
{ {
public byte rgbBlue; public byte rgbBlue;
public byte rgbGreen; public byte rgbGreen;
public byte rgbRed; public byte rgbRed;
public byte rgbReserved; public byte rgbReserved;
} }
} }
@@ -2,12 +2,12 @@
namespace Standard namespace Standard
{ {
internal enum RGN internal enum RGN
{ {
AND = 1, AND = 1,
OR, OR,
XOR, XOR,
DIFF, DIFF,
COPY COPY
} }
} }
@@ -4,12 +4,12 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class RefPOINT internal class RefPOINT
{ {
public int x; public int x;
public int y; public int y;
} }
} }
@@ -4,104 +4,104 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Sequential)]
internal class RefRECT internal class RefRECT
{ {
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public RefRECT(int left, int top, int right, int bottom) public RefRECT(int left, int top, int right, int bottom)
{ {
this._left = left; this._left = left;
this._top = top; this._top = top;
this._right = right; this._right = right;
this._bottom = bottom; this._bottom = bottom;
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public int Width public int Width
{ {
get get
{ {
return this._right - this._left; return this._right - this._left;
} }
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public int Height public int Height
{ {
get get
{ {
return this._bottom - this._top; return this._bottom - this._top;
} }
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public int Left public int Left
{ {
get get
{ {
return this._left; return this._left;
} }
set set
{ {
this._left = value; this._left = value;
} }
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public int Right public int Right
{ {
get get
{ {
return this._right; return this._right;
} }
set set
{ {
this._right = value; this._right = value;
} }
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public int Top public int Top
{ {
get get
{ {
return this._top; return this._top;
} }
set set
{ {
this._top = value; this._top = value;
} }
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public int Bottom public int Bottom
{ {
get get
{ {
return this._bottom; return this._bottom;
} }
set set
{ {
this._bottom = value; this._bottom = value;
} }
} }
[SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
public void Offset(int dx, int dy) public void Offset(int dx, int dy)
{ {
this._left += dx; this._left += dx;
this._top += dy; this._top += dy;
this._right += dx; this._right += dx;
this._bottom += dy; this._bottom += dy;
} }
private int _left; private int _left;
private int _top; private int _top;
private int _right; private int _right;
private int _bottom; private int _bottom;
} }
} }
@@ -2,30 +2,30 @@
namespace Standard namespace Standard
{ {
internal enum SC internal enum SC
{ {
SIZE = 61440, SIZE = 61440,
MOVE = 61456, MOVE = 61456,
MINIMIZE = 61472, MINIMIZE = 61472,
MAXIMIZE = 61488, MAXIMIZE = 61488,
NEXTWINDOW = 61504, NEXTWINDOW = 61504,
PREVWINDOW = 61520, PREVWINDOW = 61520,
CLOSE = 61536, CLOSE = 61536,
VSCROLL = 61552, VSCROLL = 61552,
HSCROLL = 61568, HSCROLL = 61568,
MOUSEMENU = 61584, MOUSEMENU = 61584,
KEYMENU = 61696, KEYMENU = 61696,
ARRANGE = 61712, ARRANGE = 61712,
RESTORE = 61728, RESTORE = 61728,
TASKLIST = 61744, TASKLIST = 61744,
SCREENSAVE = 61760, SCREENSAVE = 61760,
HOTKEY = 61776, HOTKEY = 61776,
DEFAULT = 61792, DEFAULT = 61792,
MONITORPOWER = 61808, MONITORPOWER = 61808,
CONTEXTHELP = 61824, CONTEXTHELP = 61824,
SEPARATOR = 61455, SEPARATOR = 61455,
F_ISSECURE = 1, F_ISSECURE = 1,
ICON = 61472, ICON = 61472,
ZOOM = 61488 ZOOM = 61488
} }
} }
@@ -2,42 +2,42 @@
namespace Standard namespace Standard
{ {
[Flags] [Flags]
internal enum SFGAO : uint internal enum SFGAO : uint
{ {
CANCOPY = 1u, CANCOPY = 1u,
CANMOVE = 2u, CANMOVE = 2u,
CANLINK = 4u, CANLINK = 4u,
STORAGE = 8u, STORAGE = 8u,
CANRENAME = 16u, CANRENAME = 16u,
CANDELETE = 32u, CANDELETE = 32u,
HASPROPSHEET = 64u, HASPROPSHEET = 64u,
DROPTARGET = 256u, DROPTARGET = 256u,
CAPABILITYMASK = 375u, CAPABILITYMASK = 375u,
ENCRYPTED = 8192u, ENCRYPTED = 8192u,
ISSLOW = 16384u, ISSLOW = 16384u,
GHOSTED = 32768u, GHOSTED = 32768u,
LINK = 65536u, LINK = 65536u,
SHARE = 131072u, SHARE = 131072u,
READONLY = 262144u, READONLY = 262144u,
HIDDEN = 524288u, HIDDEN = 524288u,
DISPLAYATTRMASK = 1032192u, DISPLAYATTRMASK = 1032192u,
FILESYSANCESTOR = 268435456u, FILESYSANCESTOR = 268435456u,
FOLDER = 536870912u, FOLDER = 536870912u,
FILESYSTEM = 1073741824u, FILESYSTEM = 1073741824u,
HASSUBFOLDER = 2147483648u, HASSUBFOLDER = 2147483648u,
CONTENTSMASK = 2147483648u, CONTENTSMASK = 2147483648u,
VALIDATE = 16777216u, VALIDATE = 16777216u,
REMOVABLE = 33554432u, REMOVABLE = 33554432u,
COMPRESSED = 67108864u, COMPRESSED = 67108864u,
BROWSABLE = 134217728u, BROWSABLE = 134217728u,
NONENUMERATED = 1048576u, NONENUMERATED = 1048576u,
NEWCONTENT = 2097152u, NEWCONTENT = 2097152u,
CANMONIKER = 4194304u, CANMONIKER = 4194304u,
HASSTORAGE = 4194304u, HASSTORAGE = 4194304u,
STREAM = 4194304u, STREAM = 4194304u,
STORAGEANCESTOR = 8388608u, STORAGEANCESTOR = 8388608u,
STORAGECAPMASK = 1891958792u, STORAGECAPMASK = 1891958792u,
PKEYSFGAOMASK = 2164539392u PKEYSFGAOMASK = 2164539392u
} }
} }
@@ -2,14 +2,14 @@
namespace Standard namespace Standard
{ {
internal enum SHARD internal enum SHARD
{ {
PIDL = 1, PIDL = 1,
PATHA, PATHA,
PATHW, PATHW,
APPIDINFO, APPIDINFO,
APPIDINFOIDLIST, APPIDINFOIDLIST,
LINK, LINK,
APPIDINFOLINK APPIDINFOLINK
} }
} }
@@ -4,14 +4,14 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
[StructLayout(LayoutKind.Sequential, Pack = 4)] [StructLayout(LayoutKind.Sequential, Pack = 4)]
internal class SHARDAPPIDINFO internal class SHARDAPPIDINFO
{ {
[MarshalAs(UnmanagedType.Interface)] [MarshalAs(UnmanagedType.Interface)]
private object psi; private object psi;
[MarshalAs(UnmanagedType.LPWStr)] [MarshalAs(UnmanagedType.LPWStr)]
private string pszAppID; private string pszAppID;
} }
} }
@@ -4,13 +4,13 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
[StructLayout(LayoutKind.Sequential, Pack = 4)] [StructLayout(LayoutKind.Sequential, Pack = 4)]
internal class SHARDAPPIDINFOIDLIST internal class SHARDAPPIDINFOIDLIST
{ {
private IntPtr pidl; private IntPtr pidl;
[MarshalAs(UnmanagedType.LPWStr)] [MarshalAs(UnmanagedType.LPWStr)]
private string pszAppID; private string pszAppID;
} }
} }
@@ -4,13 +4,13 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")] [SuppressMessage("Microsoft.Performance", "CA1812:AvoidUninstantiatedInternalClasses")]
[StructLayout(LayoutKind.Sequential, Pack = 4)] [StructLayout(LayoutKind.Sequential, Pack = 4)]
internal class SHARDAPPIDINFOLINK internal class SHARDAPPIDINFOLINK
{ {
private IntPtr psl; private IntPtr psl;
[MarshalAs(UnmanagedType.LPWStr)] [MarshalAs(UnmanagedType.LPWStr)]
private string pszAppID; private string pszAppID;
} }
} }
@@ -2,19 +2,19 @@
namespace Standard namespace Standard
{ {
internal enum SHCONTF internal enum SHCONTF
{ {
CHECKING_FOR_CHILDREN = 16, CHECKING_FOR_CHILDREN = 16,
FOLDERS = 32, FOLDERS = 32,
NONFOLDERS = 64, NONFOLDERS = 64,
INCLUDEHIDDEN = 128, INCLUDEHIDDEN = 128,
INIT_ON_FIRST_NEXT = 256, INIT_ON_FIRST_NEXT = 256,
NETPRINTERSRCH = 512, NETPRINTERSRCH = 512,
SHAREABLE = 1024, SHAREABLE = 1024,
STORAGE = 2048, STORAGE = 2048,
NAVIGATION_ENUM = 4096, NAVIGATION_ENUM = 4096,
FASTITEMS = 8192, FASTITEMS = 8192,
FLATLIST = 16384, FLATLIST = 16384,
ENABLE_ASYNC = 32768 ENABLE_ASYNC = 32768
} }
} }
@@ -3,26 +3,26 @@ using System.Runtime.InteropServices;
namespace Standard namespace Standard
{ {
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode, Pack = 1)] [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode, Pack = 1)]
internal struct SHFILEOPSTRUCT internal struct SHFILEOPSTRUCT
{ {
public IntPtr hwnd; public IntPtr hwnd;
[MarshalAs(UnmanagedType.U4)] [MarshalAs(UnmanagedType.U4)]
public FO wFunc; public FO wFunc;
public string pFrom; public string pFrom;
public string pTo; public string pTo;
[MarshalAs(UnmanagedType.U2)] [MarshalAs(UnmanagedType.U2)]
public FOF fFlags; public FOF fFlags;
[MarshalAs(UnmanagedType.Bool)] [MarshalAs(UnmanagedType.Bool)]
public int fAnyOperationsAborted; public int fAnyOperationsAborted;
public IntPtr hNameMappings; public IntPtr hNameMappings;
public string lpszProgressTitle; public string lpszProgressTitle;
} }
} }
Loaded 100 of 156 files, more files were not shown because too many files have changed in this diff. Show more