File: Windows.Win32.IDropTarget.g.cs
Project: src\src\System.Private.Windows.Core\src\System.Private.Windows.Core.csproj (System.Private.Windows.Core)
// ------------------------------------------------------------------------------
// <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("00000122-0000-0000-C000-000000000046")]
		[SupportedOSPlatform("windows5.0")]
		[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
		internal unsafe partial struct IDropTarget
			:IVTable<IDropTarget,IDropTarget.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]<IDropTarget*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IDropTarget*)Unsafe.AsPointer(ref this), riid, ppvObject);
			}

			public uint AddRef()
			{
				return ((delegate *unmanaged [Stdcall]<IDropTarget*,uint>)lpVtbl[1])((IDropTarget*)Unsafe.AsPointer(ref this));
			}

			public uint Release()
			{
				return ((delegate *unmanaged [Stdcall]<IDropTarget*,uint>)lpVtbl[2])((IDropTarget*)Unsafe.AsPointer(ref this));
			}

			/// <inheritdoc cref="DragEnter(winmdroot.System.Com.IDataObject*, winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS, winmdroot.Foundation.POINTL, winmdroot.System.Ole.DROPEFFECT*)"/>
			internal unsafe winmdroot.Foundation.HRESULT DragEnter(winmdroot.System.Com.IDataObject* pDataObj, winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS grfKeyState, winmdroot.Foundation.POINTL pt, ref winmdroot.System.Ole.DROPEFFECT pdwEffect)
			{
				fixed (winmdroot.System.Ole.DROPEFFECT* pdwEffectLocal = &pdwEffect)
				{
					winmdroot.Foundation.HRESULT __result = this.DragEnter(pDataObj, grfKeyState, pt, pdwEffectLocal);
					return __result;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT DragEnter(IDropTarget* pThis, winmdroot.System.Com.IDataObject* pDataObj, winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS grfKeyState, winmdroot.Foundation.POINTL pt, winmdroot.System.Ole.DROPEFFECT* pdwEffect)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.DragEnter(pDataObj, grfKeyState, pt, pdwEffect);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Indicates whether a drop can be accepted, and, if so, the effect of the drop.</summary>
			/// <param name="pDataObj">A pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> interface on the data object. This data object contains the data being transferred in the drag-and-drop operation. If the drop occurs, this data object will be incorporated into the target.</param>
			/// <param name="grfKeyState">The current state of the keyboard modifier keys on the keyboard. Possible values can be a combination of any of the flags MK_CONTROL, MK_SHIFT, MK_ALT, MK_BUTTON, MK_LBUTTON, MK_MBUTTON, and MK_RBUTTON.</param>
			/// <param name="pt">A <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-pointl">POINTL</a> structure containing the current cursor coordinates in screen coordinates.</param>
			/// <param name="pdwEffect">On input, pointer to the value of the <i>pdwEffect</i> parameter of the <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-dodragdrop">DoDragDrop</a> function. On return, must contain one of the <a href="https://docs.microsoft.com/windows/desktop/com/dropeffect-constants">DROPEFFECT</a> flags, which indicates what the result of the drop operation would be.</param>
			/// <returns>
			/// <para>This method returns S_OK on success. Other possible values include the following. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para>You do not call <b>DragEnter</b> directly; instead the <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-dodragdrop">DoDragDrop</a> function calls it to determine the effect of a drop the first time the user drags the mouse into the registered window of a drop target. To implement <b>DragEnter</b>, you must determine whether the target can use the data in the source data object by checking three things: </para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/oleidl/nf-oleidl-idroptarget-dragenter#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT DragEnter(winmdroot.System.Com.IDataObject* pDataObj, winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS grfKeyState, winmdroot.Foundation.POINTL pt, winmdroot.System.Ole.DROPEFFECT* pdwEffect)
			{
				return ((delegate *unmanaged [Stdcall]<IDropTarget*,winmdroot.System.Com.IDataObject* ,winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS ,winmdroot.Foundation.POINTL ,winmdroot.System.Ole.DROPEFFECT* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IDropTarget*)Unsafe.AsPointer(ref this), pDataObj, grfKeyState, pt, pdwEffect);
			}

			/// <inheritdoc cref="DragOver(winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS, winmdroot.Foundation.POINTL, winmdroot.System.Ole.DROPEFFECT*)"/>
			internal unsafe winmdroot.Foundation.HRESULT DragOver(winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS grfKeyState, winmdroot.Foundation.POINTL pt, ref winmdroot.System.Ole.DROPEFFECT pdwEffect)
			{
				fixed (winmdroot.System.Ole.DROPEFFECT* pdwEffectLocal = &pdwEffect)
				{
					winmdroot.Foundation.HRESULT __result = this.DragOver(grfKeyState, pt, pdwEffectLocal);
					return __result;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT DragOver(IDropTarget* pThis, winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS grfKeyState, winmdroot.Foundation.POINTL pt, winmdroot.System.Ole.DROPEFFECT* pdwEffect)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.DragOver(grfKeyState, pt, pdwEffect);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Provides target feedback to the user and communicates the drop's effect to the DoDragDrop function so it can communicate the effect of the drop back to the source.</summary>
			/// <param name="grfKeyState">The current state of the keyboard modifier keys on the keyboard. Valid values can be a combination of any of the flags MK_CONTROL, MK_SHIFT, MK_ALT, MK_BUTTON, MK_LBUTTON, MK_MBUTTON, and MK_RBUTTON.</param>
			/// <param name="pt">A <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-pointl">POINTL</a> structure containing the current cursor coordinates in screen coordinates.</param>
			/// <param name="pdwEffect">On input, pointer to the value of the <i>pdwEffect</i> parameter of the <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-dodragdrop">DoDragDrop</a> function. On return, must contain one of the <a href="https://docs.microsoft.com/windows/desktop/com/dropeffect-constants">DROPEFFECT</a> flags, which indicates what the result of the drop operation would be.</param>
			/// <returns>
			/// <para>This method returns S_OK on success. Other possible values include the following. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para>You do not call <b>DragOver</b> directly. The <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-dodragdrop">DoDragDrop</a> function calls this method each time the user moves the mouse across a given target window. <b>DoDragDrop</b> exits the loop if the drag-and-drop operation is canceled, if the user drags the mouse out of the target window, or if the drop is completed. In implementing <b>IDropTarget::DragOver</b>, you must provide features similar to those in <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-dragenter">IDropTarget::DragEnter</a>. You must determine the effect of dropping the data on the target by examining the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> defining the data object's formats and medium, along with the state of the modifier keys. The mouse position may also play a role in determining the effect of a drop. The following modifier keys affect the result of the drop. </para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/oleidl/nf-oleidl-idroptarget-dragover#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT DragOver(winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS grfKeyState, winmdroot.Foundation.POINTL pt, winmdroot.System.Ole.DROPEFFECT* pdwEffect)
			{
				return ((delegate *unmanaged [Stdcall]<IDropTarget*,winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS ,winmdroot.Foundation.POINTL ,winmdroot.System.Ole.DROPEFFECT* ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IDropTarget*)Unsafe.AsPointer(ref this), grfKeyState, pt, pdwEffect);
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT DragLeave(IDropTarget* pThis)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.DragLeave();
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Removes target feedback and releases the data object.</summary>
			/// <returns>
			/// <para>This method returns S_OK on success. Other possible values include the following. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para>You do not call this method directly. The <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-dodragdrop">DoDragDrop</a> function calls this method in either of the following cases: </para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/oleidl/nf-oleidl-idroptarget-dragleave#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public winmdroot.Foundation.HRESULT DragLeave()
			{
				return ((delegate *unmanaged [Stdcall]<IDropTarget*,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IDropTarget*)Unsafe.AsPointer(ref this));
			}

			/// <inheritdoc cref="Drop(winmdroot.System.Com.IDataObject*, winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS, winmdroot.Foundation.POINTL, winmdroot.System.Ole.DROPEFFECT*)"/>
			internal unsafe winmdroot.Foundation.HRESULT Drop(winmdroot.System.Com.IDataObject* pDataObj, winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS grfKeyState, winmdroot.Foundation.POINTL pt, ref winmdroot.System.Ole.DROPEFFECT pdwEffect)
			{
				fixed (winmdroot.System.Ole.DROPEFFECT* pdwEffectLocal = &pdwEffect)
				{
					winmdroot.Foundation.HRESULT __result = this.Drop(pDataObj, grfKeyState, pt, pdwEffectLocal);
					return __result;
				}
			}

			[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
			private static winmdroot.Foundation.HRESULT Drop(IDropTarget* pThis, winmdroot.System.Com.IDataObject* pDataObj, winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS grfKeyState, winmdroot.Foundation.POINTL pt, winmdroot.System.Ole.DROPEFFECT* pdwEffect)
			{
				try
				{
					winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
					if (__hr.Failed)
					{
						return __hr;
					}
					return __object.Drop(pDataObj, grfKeyState, pt, pdwEffect);
				}
				catch (Exception ex)
				{
					return (winmdroot.Foundation.HRESULT)ex.HResult;
				}
			}

			/// <summary>Incorporates the source data into the target window, removes target feedback, and releases the data object.</summary>
			/// <param name="pDataObj">A pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> interface on the data object being transferred in the drag-and-drop operation.</param>
			/// <param name="grfKeyState">The current state of the keyboard modifier keys on the keyboard. Possible values can be a combination of any of the flags MK_CONTROL, MK_SHIFT, MK_ALT, MK_BUTTON, MK_LBUTTON, MK_MBUTTON, and MK_RBUTTON.</param>
			/// <param name="pt">A <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-pointl">POINTL</a> structure containing the current cursor coordinates in screen coordinates.</param>
			/// <param name="pdwEffect">On input, pointer to the value of the <i>pdwEffect</i> parameter of the <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-dodragdrop">DoDragDrop</a> function. On return, must contain one of the <a href="https://docs.microsoft.com/windows/desktop/com/dropeffect-constants">DROPEFFECT</a> flags, which indicates what the result of the drop operation would be.</param>
			/// <returns>
			/// <para>This method returns S_OK on success. Other possible values include the following. </para>
			/// <para>This doc was truncated.</para>
			/// </returns>
			/// <remarks>
			/// <para>You do not call this method directly. The <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-dodragdrop">DoDragDrop</a> function calls this method when the user completes the drag-and-drop operation. In implementing <b>Drop</b>, you must incorporate the data object into the target. Use the formats available in <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a>, available through <i>pDataObj</i>, along with the current state of the modifier keys to determine how the data is to be incorporated, such as linking or embedding. In addition to incorporating the data, you must also clean up as you do in the <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-dragleave">IDropTarget::DragLeave</a> method: </para>
			/// <para>This doc was truncated.</para>
			/// <para><see href="https://learn.microsoft.com/windows/win32/api/oleidl/nf-oleidl-idroptarget-drop#">Read more on docs.microsoft.com</see>.</para>
			/// </remarks>
			public unsafe winmdroot.Foundation.HRESULT Drop(winmdroot.System.Com.IDataObject* pDataObj, winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS grfKeyState, winmdroot.Foundation.POINTL pt, winmdroot.System.Ole.DROPEFFECT* pdwEffect)
			{
				return ((delegate *unmanaged [Stdcall]<IDropTarget*,winmdroot.System.Com.IDataObject* ,winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS ,winmdroot.Foundation.POINTL ,winmdroot.System.Ole.DROPEFFECT* ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IDropTarget*)Unsafe.AsPointer(ref this), pDataObj, grfKeyState, pt, pdwEffect);
			}

			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]<IDropTarget*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;

				internal delegate *unmanaged [Stdcall]<IDropTarget*,uint> AddRef_2;

				internal delegate *unmanaged [Stdcall]<IDropTarget*,uint> Release_3;

				internal delegate *unmanaged [Stdcall]<IDropTarget*,winmdroot.System.Com.IDataObject* ,winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS ,winmdroot.Foundation.POINTL ,winmdroot.System.Ole.DROPEFFECT* ,winmdroot.Foundation.HRESULT> DragEnter_4;

				internal delegate *unmanaged [Stdcall]<IDropTarget*,winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS ,winmdroot.Foundation.POINTL ,winmdroot.System.Ole.DROPEFFECT* ,winmdroot.Foundation.HRESULT> DragOver_5;

				internal delegate *unmanaged [Stdcall]<IDropTarget*,winmdroot.Foundation.HRESULT> DragLeave_6;

				internal delegate *unmanaged [Stdcall]<IDropTarget*,winmdroot.System.Com.IDataObject* ,winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS ,winmdroot.Foundation.POINTL ,winmdroot.System.Ole.DROPEFFECT* ,winmdroot.Foundation.HRESULT> Drop_7;
			} 
			public static void PopulateVTable(Vtbl* vtable)
			{
				vtable->DragEnter_4 = &DragEnter;
				vtable->DragOver_5 = &DragOver;
				vtable->DragLeave_6 = &DragLeave;
				vtable->Drop_7 = &Drop;
			}

			private void** lpVtbl;

			/// <summary>The IID guid for this interface.</summary>
			/// <value>{00000122-0000-0000-c000-000000000046}</value>
			internal static readonly Guid IID_Guid = new Guid(0x00000122, 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[]					{
0x22,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("00000122-0000-0000-C000-000000000046"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
			[SupportedOSPlatform("windows5.0")]
			internal interface Interface
			{
				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT DragEnter(winmdroot.System.Com.IDataObject* pDataObj, winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS grfKeyState, winmdroot.Foundation.POINTL pt, winmdroot.System.Ole.DROPEFFECT* pdwEffect);

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT DragOver(winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS grfKeyState, winmdroot.Foundation.POINTL pt, winmdroot.System.Ole.DROPEFFECT* pdwEffect);

								[PreserveSig()]
winmdroot.Foundation.HRESULT DragLeave();

				[PreserveSig()]
				unsafe winmdroot.Foundation.HRESULT Drop(winmdroot.System.Com.IDataObject* pDataObj, winmdroot.System.SystemServices.MODIFIERKEYS_FLAGS grfKeyState, winmdroot.Foundation.POINTL pt, winmdroot.System.Ole.DROPEFFECT* pdwEffect);
			}
		}
	}
}