|
// ------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
// ------------------------------------------------------------------------------
#pragma warning disable CS1591,CS1573,CS0465,CS0649,CS8019,CS1570,CS1584,CS1658,CS0436,CS8981
using global::System;
using global::System.Diagnostics;
using global::System.Diagnostics.CodeAnalysis;
using global::System.Runtime.CompilerServices;
using global::System.Runtime.InteropServices;
using global::System.Runtime.Versioning;
using winmdroot = global::Windows.Win32;
namespace Windows.Win32
{
namespace System.Ole
{
[Guid("0000012B-0000-0000-C000-000000000046")]
[SupportedOSPlatform("windows6.0.6000")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IDropSourceNotify
:IVTable<IDropSourceNotify,IDropSourceNotify.Vtbl>,IComIID {
/// <inheritdoc cref="QueryInterface(global::System.Guid*, void**)"/>
internal unsafe winmdroot.Foundation.HRESULT QueryInterface(in global::System.Guid riid, out void* ppvObject)
{
fixed (void** ppvObjectLocal = &ppvObject)
{
fixed (global::System.Guid* riidLocal = &riid)
{
winmdroot.Foundation.HRESULT __result = this.QueryInterface(riidLocal, ppvObjectLocal);
return __result;
}
}
}
public unsafe winmdroot.Foundation.HRESULT QueryInterface(global::System.Guid* riid, void** ppvObject)
{
return ((delegate *unmanaged [Stdcall]<IDropSourceNotify*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IDropSourceNotify*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IDropSourceNotify*,uint>)lpVtbl[1])((IDropSourceNotify*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IDropSourceNotify*,uint>)lpVtbl[2])((IDropSourceNotify*)Unsafe.AsPointer(ref this));
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT DragEnterTarget(IDropSourceNotify* pThis, winmdroot.Foundation.HWND hwndTarget)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.DragEnterTarget(hwndTarget);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>OLE calls this method when the user drags the mouse cursor into a potential drop target window.</summary>
/// <param name="hwndTarget">The window handle of the potential drop target window.</param>
/// <returns>This method returns S_OK on success.</returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oleidl/nf-oleidl-idropsourcenotify-dragentertarget">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public winmdroot.Foundation.HRESULT DragEnterTarget(winmdroot.Foundation.HWND hwndTarget)
{
return ((delegate *unmanaged [Stdcall]<IDropSourceNotify*,winmdroot.Foundation.HWND ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IDropSourceNotify*)Unsafe.AsPointer(ref this), hwndTarget);
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT DragLeaveTarget(IDropSourceNotify* pThis)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.DragLeaveTarget();
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>OLE calls this method when the user drags the mouse cursor out of a potential drop target window.</summary>
/// <returns>This method returns S_OK on success.</returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oleidl/nf-oleidl-idropsourcenotify-dragleavetarget">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public winmdroot.Foundation.HRESULT DragLeaveTarget()
{
return ((delegate *unmanaged [Stdcall]<IDropSourceNotify*,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IDropSourceNotify*)Unsafe.AsPointer(ref this));
}
internal unsafe global::Windows.Win32.Foundation.HRESULT QueryInterface<T>(out T* ppv)
where T : unmanaged
{
var hr = this.QueryInterface(typeof(T).GUID, out void* pv);
if (hr.Succeeded)
{
ppv = (T*)pv;
}
else
{
ppv = null;
}
return hr;
}
internal struct Vtbl
{
internal delegate *unmanaged [Stdcall]<IDropSourceNotify*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IDropSourceNotify*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IDropSourceNotify*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IDropSourceNotify*,winmdroot.Foundation.HWND ,winmdroot.Foundation.HRESULT> DragEnterTarget_4;
internal delegate *unmanaged [Stdcall]<IDropSourceNotify*,winmdroot.Foundation.HRESULT> DragLeaveTarget_5;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->DragEnterTarget_4 = &DragEnterTarget;
vtable->DragLeaveTarget_5 = &DragLeaveTarget;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{0000012b-0000-0000-c000-000000000046}</value>
internal static readonly Guid IID_Guid = new Guid(0x0000012B, 0x0000, 0x0000, 0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0x2B,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("0000012B-0000-0000-C000-000000000046"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[SupportedOSPlatform("windows6.0.6000")]
internal interface Interface
{
[PreserveSig()]
winmdroot.Foundation.HRESULT DragEnterTarget(winmdroot.Foundation.HWND hwndTarget);
[PreserveSig()]
winmdroot.Foundation.HRESULT DragLeaveTarget();
}
}
}
}
|