CPF/CPF.Windows/ComWrapper/IShellItemProxy.cs
2023-11-21 23:05:03 +08:00

94 lines
3.5 KiB
C#

// <auto-generated>
// Code generated by COM Proxy Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is
// regenerated.
// </auto-generated>
#nullable enable
using ComInterfaceDispatch = System.Runtime.InteropServices.ComWrappers.ComInterfaceDispatch;
using Marshal = System.Runtime.InteropServices.Marshal;
namespace CPF.Windows.ComWrapper
{
[System.Runtime.Versioning.SupportedOSPlatform("windows")]
unsafe partial class IShellItemProxy
{
[System.Runtime.InteropServices.UnmanagedCallersOnly]
public static int BindToHandler(System.IntPtr thisPtr, global::System.IntPtr pbc, global::System.Guid* rbhid, global::System.Guid* riid, global::System.IntPtr* ppvOut, uint* retVal)
{
try
{
var inst = ComInterfaceDispatch.GetInstance< IShellItem>((ComInterfaceDispatch*)thisPtr);
*retVal = inst.BindToHandler(pbc, ref *rbhid, ref *riid, out *ppvOut);
}
catch (System.Exception __e)
{
return __e.HResult;
}
return 0; // S_OK;
}
[System.Runtime.InteropServices.UnmanagedCallersOnly]
public static int GetParent(System.IntPtr thisPtr, System.IntPtr* ppsi, uint* retVal)
{
try
{
var inst = ComInterfaceDispatch.GetInstance< IShellItem>((ComInterfaceDispatch*)thisPtr);
IShellItem local_0;
*retVal = inst.GetParent(out local_0);
*ppsi = local_0 == null ? System.IntPtr.Zero : Marshal.GetIUnknownForObject(local_0);
}
catch (System.Exception __e)
{
return __e.HResult;
}
return 0; // S_OK;
}
[System.Runtime.InteropServices.UnmanagedCallersOnly]
public static int GetDisplayName(System.IntPtr thisPtr, uint sigdnName, global::System.IntPtr* ppszName, uint* retVal)
{
try
{
var inst = ComInterfaceDispatch.GetInstance< IShellItem>((ComInterfaceDispatch*)thisPtr);
*retVal = inst.GetDisplayName(sigdnName, out *ppszName);
}
catch (System.Exception __e)
{
return __e.HResult;
}
return 0; // S_OK;
}
[System.Runtime.InteropServices.UnmanagedCallersOnly]
public static int GetAttributes(System.IntPtr thisPtr, uint sfgaoMask, uint* psfgaoAttribs, uint* retVal)
{
try
{
var inst = ComInterfaceDispatch.GetInstance< IShellItem>((ComInterfaceDispatch*)thisPtr);
*retVal = inst.GetAttributes(sfgaoMask, out *psfgaoAttribs);
}
catch (System.Exception __e)
{
return __e.HResult;
}
return 0; // S_OK;
}
[System.Runtime.InteropServices.UnmanagedCallersOnly]
public static int Compare(System.IntPtr thisPtr, System.IntPtr psi, uint hint, int* piOrder, uint* retVal)
{
try
{
var inst = ComInterfaceDispatch.GetInstance< IShellItem>((ComInterfaceDispatch*)thisPtr);
var local_0 = psi == System.IntPtr.Zero ? null : ( IShellItem)Marshal.GetObjectForIUnknown(psi);
*retVal = inst.Compare(local_0, hint, out *piOrder);
}
catch (System.Exception __e)
{
return __e.HResult;
}
return 0; // S_OK;
}
}
}