NativeMethods.cs
1 // Copyright (c) Microsoft Corporation 2 // The Microsoft Corporation licenses this file to you under the MIT license. 3 // See the LICENSE file in the project root for more information. 4 5 using System; 6 using System.Runtime.InteropServices; 7 8 namespace Wox.Infrastructure.Image 9 { 10 internal static class NativeMethods 11 { 12 [DllImport("shell32.dll", CharSet = CharSet.Unicode, SetLastError = true)] 13 internal static extern int SHCreateItemFromParsingName( 14 [MarshalAs(UnmanagedType.LPWStr)] string path, 15 IntPtr pbc, 16 ref Guid riid, 17 [MarshalAs(UnmanagedType.Interface)] out IShellItem shellItem); 18 19 [DllImport("gdi32.dll")] 20 [return: MarshalAs(UnmanagedType.Bool)] 21 internal static extern bool DeleteObject(IntPtr hObject); 22 } 23 }