mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-03-30 10:19:51 +08:00
50 lines
1.4 KiB
C#
50 lines
1.4 KiB
C#
using MicaSetup.Natives;
|
|
using System;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace MicaSetup.Shell.Dialogs;
|
|
|
|
public static class PropertySystemNativeMethods
|
|
{
|
|
public enum RelativeDescriptionType
|
|
{
|
|
General,
|
|
Date,
|
|
Size,
|
|
Count,
|
|
Revision,
|
|
Length,
|
|
Duration,
|
|
Speed,
|
|
Rate,
|
|
Rating,
|
|
Priority
|
|
}
|
|
|
|
[DllImport(Lib.PropSys, CharSet = CharSet.Unicode, SetLastError = true)]
|
|
public static extern int PSGetNameFromPropertyKey(
|
|
ref PropertyKey propkey,
|
|
[Out, MarshalAs(UnmanagedType.LPWStr)] out string ppszCanonicalName
|
|
);
|
|
|
|
[DllImport(Lib.PropSys, CharSet = CharSet.Unicode, SetLastError = true)]
|
|
public static extern HResult PSGetPropertyDescription(
|
|
ref PropertyKey propkey,
|
|
ref Guid riid,
|
|
[Out, MarshalAs(UnmanagedType.Interface)] out IPropertyDescription ppv
|
|
);
|
|
|
|
[DllImport(Lib.PropSys, CharSet = CharSet.Unicode, SetLastError = true)]
|
|
public static extern int PSGetPropertyDescriptionListFromString(
|
|
[In, MarshalAs(UnmanagedType.LPWStr)] string pszPropList,
|
|
[In] ref Guid riid,
|
|
out IPropertyDescriptionList ppv
|
|
);
|
|
|
|
[DllImport(Lib.PropSys, CharSet = CharSet.Unicode, SetLastError = true)]
|
|
public static extern int PSGetPropertyKeyFromName(
|
|
[In, MarshalAs(UnmanagedType.LPWStr)] string pszCanonicalName,
|
|
out PropertyKey propkey
|
|
);
|
|
}
|