IDropSourceNotify
using System;
using System.CodeDom.Compiler;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using Windows.Win32.Foundation;
namespace Windows.Win32.System.Ole
{
[Guid("0000012B-0000-0000-C000-000000000046")]
[SupportedOSPlatform("windows6.0.6000")]
[GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal struct IDropSourceNotify : IVTable<IDropSourceNotify, IDropSourceNotify.Vtbl>, IVTable, IComIID
{
internal struct Vtbl
{
internal IntPtr QueryInterface_1;
internal IntPtr AddRef_2;
internal IntPtr Release_3;
internal IntPtr DragEnterTarget_4;
internal IntPtr DragLeaveTarget_5;
}
[ComImport]
[Guid("0000012B-0000-0000-C000-000000000046")]
[InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
[SupportedOSPlatform("windows6.0.6000")]
internal interface Interface
{
[PreserveSig]
HRESULT DragEnterTarget(HWND hwndTarget);
[PreserveSig]
HRESULT DragLeaveTarget();
}
private unsafe void** lpVtbl;
internal static readonly Guid IID_Guid = new Guid(299, 0, 0, 192, 0, 0, 0, 0, 0, 0, 70);
[IsReadOnly]
static unsafe ref Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
[return: IsReadOnly]
get {
return ref Unsafe.As<byte, Guid>(ref MemoryMarshal.GetReference(new ReadOnlySpan<byte>(&global::<PrivateImplementationDetails>.1684025D4F48E6D7F932A0E34931D6637474C64859E812F0F3CE5E8D9236AB26, 16)));
}
}
internal unsafe HRESULT QueryInterface([In] [IsReadOnly] ref Guid riid, out void* ppvObject)
{
fixed (void** ppvObject2 = &ppvObject) {
fixed (Guid* riid2 = &riid) {
return QueryInterface(riid2, ppvObject2);
}
}
}
public unsafe HRESULT QueryInterface(Guid* riid, void** ppvObject)
{
IntPtr intPtr = (IntPtr)(*lpVtbl);
return (HRESULT);
}
public unsafe uint AddRef()
{
IntPtr intPtr = (IntPtr)lpVtbl[1];
return (uint);
}
public unsafe uint Release()
{
IntPtr intPtr = (IntPtr)lpVtbl[2];
return (uint);
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT DragEnterTarget(IDropSourceNotify* pThis, HWND hwndTarget)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IDropSourceNotify, Interface>(pThis, out object);
if (!result.Failed)
return object.DragEnterTarget(hwndTarget);
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT DragEnterTarget(HWND hwndTarget)
{
IntPtr intPtr = (IntPtr)lpVtbl[3];
return (HRESULT);
}
[UnmanagedCallersOnly(CallConvs = new Type[] {
typeof(CallConvStdcall)
})]
private unsafe static HRESULT DragLeaveTarget(IDropSourceNotify* pThis)
{
try {
Interface object;
HRESULT result = ComHelpers.UnwrapCCW<IDropSourceNotify, Interface>(pThis, out object);
if (!result.Failed)
return object.DragLeaveTarget();
return result;
} catch (Exception ex) {
return (HRESULT)ex.HResult;
}
}
public unsafe HRESULT DragLeaveTarget()
{
IntPtr intPtr = (IntPtr)lpVtbl[4];
return (HRESULT);
}
internal unsafe HRESULT QueryInterface<[IsUnmanaged] T>(out T* ppv) where T : struct
{
Guid riid = typeof(T).GUID;
void* ppvObject;
HRESULT result = QueryInterface(ref riid, out ppvObject);
if (result.Succeeded)
ppv = (T*)ppvObject;
else
ppv = null;
return result;
}
public unsafe static void PopulateVTable(Vtbl* vtable)
{
vtable->DragEnterTarget_4 = (IntPtr)(void*);
vtable->DragLeaveTarget_5 = (IntPtr)(void*);
}
unsafe void IVTable<IDropSourceNotify, Vtbl>.PopulateVTable(Vtbl* vtable)
{
this.PopulateVTable(vtable);
}
}
}