mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 18:57:19 +02:00
24 lines
812 B
C#
24 lines
812 B
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 static class NativeMethods
|
|||
|
|
{
|
|||
|
|
[DllImport("shell32.dll", CharSet = CharSet.Unicode, SetLastError = true)]
|
|||
|
|
internal static extern int SHCreateItemFromParsingName(
|
|||
|
|
[MarshalAs(UnmanagedType.LPWStr)] string path,
|
|||
|
|
IntPtr pbc,
|
|||
|
|
ref Guid riid,
|
|||
|
|
[MarshalAs(UnmanagedType.Interface)] out IShellItem shellItem);
|
|||
|
|
|
|||
|
|
[DllImport("gdi32.dll")]
|
|||
|
|
[return: MarshalAs(UnmanagedType.Bool)]
|
|||
|
|
internal static extern bool DeleteObject(IntPtr hObject);
|
|||
|
|
}
|
|||
|
|
}
|