mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-16 19:57:57 +01:00
* CA1052: Static holder types should be Static or NotInheritable * CA1041: Provide ObsoleteAttribute message * CA1062: Validate arguments of public methods * CA1304: Specify CultureInfo / CA1305: Specify IFormatProvider / CA1307: Specify StringComparison for clarity * CA1802: Use Literals Where Appropriate * CA1820: Test for empty strings using string length * CA1707: Identifiers should not contain underscores * CA1805: Do not initialize unnecessarily. * CA1822: Mark members as static * CA2227: Collection properties should be read only * CA1054: URI parameters should not be strings * CA1031: Do not catch general exception types * CA1060: Move P/Invokes to NativeMethods class * CA1308: Normalize strings to uppercase * CA2000: Dispose objects before losing scope / CA2234: Pass System.Uri objects instead of strings * CA2234: Pass System.Uri objects instead of strings * CA1044: Properties should not be write only * CA1716: Identifiers should not match keywords * CA2007: Do not directly await a Task * CA2007: Do not directly await a Task (Suppressed) * CA5350: Do Not Use Weak Cryptographic Algorithms (Suppressed) * CA1724: Type names should not match namespaces (renamed Settings.cs to PowerToysRunSettings.cs) * CA1033: Interface methods should be callable by child types (Added sealed modifier to class) * CA1724: Type names should not match namespaces (Renamed Plugin.cs to RunPlugin.cs) * CA1724: Type names should not match namespaces (Renamed Http.cs to HttpClient.cs) * CA5364: Do not use deprecated security protocols (Remove unused code) * Enabled FxCopAnalyzer for Wox.Infrastructure * fixed comment * Addressed comments - Changed Ordinal to InvariantCulture - Added comments - Removed unused obsolete code - Removed unused method (CA2007: Do not directly await a Task) * Addressed comments - fixed justification for CA1031 suppression * Addressed comments - Fixed justification for CA1031 suppression in Wox.Core/Wox.Plugin
42 lines
1.2 KiB
C#
42 lines
1.2 KiB
C#
// Copyright (c) Microsoft Corporation
|
|
// The Microsoft Corporation licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace Wox.Infrastructure.Image
|
|
{
|
|
internal enum SIGDN : uint
|
|
{
|
|
NORMALDISPLAY = 0,
|
|
PARENTRELATIVEPARSING = 0x80018001,
|
|
PARENTRELATIVEFORADDRESSBAR = 0x8001c001,
|
|
DESKTOPABSOLUTEPARSING = 0x80028000,
|
|
PARENTRELATIVEEDITING = 0x80031001,
|
|
DESKTOPABSOLUTEEDITING = 0x8004c000,
|
|
FILESYSPATH = 0x80058000,
|
|
URL = 0x80068000,
|
|
}
|
|
|
|
[ComImport]
|
|
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
|
|
[Guid("43826d1e-e718-42ee-bc55-a1e261c37bfe")]
|
|
internal interface IShellItem
|
|
{
|
|
void BindToHandler(
|
|
IntPtr pbc,
|
|
[MarshalAs(UnmanagedType.LPStruct)] Guid bhid,
|
|
[MarshalAs(UnmanagedType.LPStruct)] Guid riid,
|
|
out IntPtr ppv);
|
|
|
|
void GetParent(out IShellItem ppsi);
|
|
|
|
void GetDisplayName(SIGDN sigdnName, out IntPtr ppszName);
|
|
|
|
void GetAttributes(uint sfgaoMask, out uint psfgaoAttribs);
|
|
|
|
void Compare(IShellItem psi, uint hint, out int piOrder);
|
|
}
|
|
}
|