// ------------------------------------------------------------------------------ // <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,SYSLIB1092,CS3021,CS3019 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 UI.Shell { [Guid("4657278B-411B-11D2-839A-00C04FD918D0")] [CLSCompliant(false)] [SupportedOSPlatform("windows5.0")] [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.287+85e3fa26dd.RR")] internal unsafe partial struct IDropTargetHelper :winmdroot.IVTable<IDropTargetHelper,IDropTargetHelper.Vtbl>,IComIID { /// <inheritdoc cref="QueryInterface(global::System.Guid*, void**)"/> [OverloadResolutionPriority(1)] 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]<IDropTargetHelper*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IDropTargetHelper*)Unsafe.AsPointer(ref this), riid, ppvObject); } public uint AddRef() { return ((delegate *unmanaged [Stdcall]<IDropTargetHelper*,uint>)lpVtbl[1])((IDropTargetHelper*)Unsafe.AsPointer(ref this)); } public uint Release() { return ((delegate *unmanaged [Stdcall]<IDropTargetHelper*,uint>)lpVtbl[2])((IDropTargetHelper*)Unsafe.AsPointer(ref this)); } /// <inheritdoc cref="DragEnter(winmdroot.Foundation.HWND, winmdroot.System.Com.IDataObject*, global::System.Drawing.Point*, winmdroot.System.Ole.DROPEFFECT)"/> [OverloadResolutionPriority(1)] internal unsafe winmdroot.Foundation.HRESULT DragEnter(winmdroot.Foundation.HWND hwndTarget, winmdroot.System.Com.IDataObject* pDataObject, in global::System.Drawing.Point ppt, winmdroot.System.Ole.DROPEFFECT dwEffect) { fixed (global::System.Drawing.Point* pptLocal = &ppt) { winmdroot.Foundation.HRESULT __result = this.DragEnter(hwndTarget, pDataObject, pptLocal, dwEffect); return __result; } } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT DragEnter(IDropTargetHelper* pThis, winmdroot.Foundation.HWND hwndTarget, winmdroot.System.Com.IDataObject* pDataObject, global::System.Drawing.Point* ppt, winmdroot.System.Ole.DROPEFFECT dwEffect) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.DragEnter(hwndTarget, pDataObject, ppt, dwEffect); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Notifies the drag-image manager that the drop target's IDropTarget::DragEnter method has been called.</summary> /// <param name="hwndTarget"> /// <para>Type: <b>HWND</b> The target's window handle.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-idroptargethelper-dragenter#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="pDataObject"> /// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a>*</b> A pointer to the data object's <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> interface.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-idroptargethelper-dragenter#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="ppt"> /// <para>Type: <b><a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a>*</b> The <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a> structure pointer that was received in the <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-dragenter">IDropTarget::DragEnter</a> method's <i>pt</i> parameter.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-idroptargethelper-dragenter#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="dwEffect"> /// <para>Type: <b>DWORD</b> The value pointed to by the <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-dragenter">IDropTarget::DragEnter</a> method's <i>pdwEffect</i> parameter.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-idroptargethelper-dragenter#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <returns> /// <para>Type: <b>HRESULT</b> Returns S_OK if successful, or a COM error value otherwise.</para> /// </returns> /// <remarks>This method is called by a drop target when its <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-dragenter">IDropTarget::DragEnter</a> method is called. It notifies the drag-image manager that the drop target has been entered, and provides it with the information needed to display the drag image.</remarks> public unsafe winmdroot.Foundation.HRESULT DragEnter(winmdroot.Foundation.HWND hwndTarget, winmdroot.System.Com.IDataObject* pDataObject, global::System.Drawing.Point* ppt, winmdroot.System.Ole.DROPEFFECT dwEffect) { return ((delegate *unmanaged [Stdcall]<IDropTargetHelper*,winmdroot.Foundation.HWND ,winmdroot.System.Com.IDataObject* ,global::System.Drawing.Point* ,winmdroot.System.Ole.DROPEFFECT ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IDropTargetHelper*)Unsafe.AsPointer(ref this), hwndTarget, pDataObject, ppt, dwEffect); } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT DragLeave(IDropTargetHelper* pThis) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.DragLeave(); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Notifies the drag-image manager that the drop target's IDropTarget::DragLeave method has been called.</summary> /// <returns> /// <para>Type: <b>HRESULT</b> Returns S_OK if successful, or a COM error value otherwise.</para> /// </returns> /// <remarks>This method is called by a drop target when its <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-dragleave">IDropTarget::DragLeave</a> method is called. It notifies the drag-image manager that the cursor has left the drop target.</remarks> public winmdroot.Foundation.HRESULT DragLeave() { return ((delegate *unmanaged [Stdcall]<IDropTargetHelper*,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IDropTargetHelper*)Unsafe.AsPointer(ref this)); } /// <inheritdoc cref="DragOver(global::System.Drawing.Point*, winmdroot.System.Ole.DROPEFFECT)"/> [OverloadResolutionPriority(1)] internal unsafe winmdroot.Foundation.HRESULT DragOver(in global::System.Drawing.Point ppt, winmdroot.System.Ole.DROPEFFECT dwEffect) { fixed (global::System.Drawing.Point* pptLocal = &ppt) { winmdroot.Foundation.HRESULT __result = this.DragOver(pptLocal, dwEffect); return __result; } } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT DragOver(IDropTargetHelper* pThis, global::System.Drawing.Point* ppt, winmdroot.System.Ole.DROPEFFECT dwEffect) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.DragOver(ppt, dwEffect); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Notifies the drag-image manager that the drop target's IDropTarget::DragOver method has been called.</summary> /// <param name="ppt"> /// <para>Type: <b><a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a>*</b> The <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a> structure pointer that was received in the <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-dragover">IDropTarget::DragOver</a> method's <i>pt</i> parameter.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-idroptargethelper-dragover#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="dwEffect"> /// <para>Type: <b>DWORD</b> The value pointed to by the <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-dragover">IDropTarget::DragOver</a> method's <i>pdwEffect</i> parameter.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-idroptargethelper-dragover#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <returns> /// <para>Type: <b>HRESULT</b> Returns S_OK if successful, or a COM error value otherwise.</para> /// </returns> /// <remarks>This method is called by a drop target when its <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-dragover">IDropTarget::DragOver</a> method is called. It notifies the drag-image manager that the cursor position has changed and provides it with the information needed to display the drag image.</remarks> public unsafe winmdroot.Foundation.HRESULT DragOver(global::System.Drawing.Point* ppt, winmdroot.System.Ole.DROPEFFECT dwEffect) { return ((delegate *unmanaged [Stdcall]<IDropTargetHelper*,global::System.Drawing.Point* ,winmdroot.System.Ole.DROPEFFECT ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IDropTargetHelper*)Unsafe.AsPointer(ref this), ppt, dwEffect); } /// <inheritdoc cref="Drop(winmdroot.System.Com.IDataObject*, global::System.Drawing.Point*, winmdroot.System.Ole.DROPEFFECT)"/> [OverloadResolutionPriority(1)] internal unsafe winmdroot.Foundation.HRESULT Drop(winmdroot.System.Com.IDataObject* pDataObject, in global::System.Drawing.Point ppt, winmdroot.System.Ole.DROPEFFECT dwEffect) { fixed (global::System.Drawing.Point* pptLocal = &ppt) { winmdroot.Foundation.HRESULT __result = this.Drop(pDataObject, pptLocal, dwEffect); return __result; } } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT Drop(IDropTargetHelper* pThis, winmdroot.System.Com.IDataObject* pDataObject, global::System.Drawing.Point* ppt, winmdroot.System.Ole.DROPEFFECT dwEffect) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.Drop(pDataObject, ppt, dwEffect); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Notifies the drag-image manager that the drop target's IDropTarget::Drop method has been called.</summary> /// <param name="pDataObject"> /// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a>*</b> A pointer to the data object's <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> interface.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-idroptargethelper-drop#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="ppt"> /// <para>Type: <b><a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a>*</b> A <a href="https://docs.microsoft.com/windows/win32/api/windef/ns-windef-point">POINT</a> structure pointer that was received in the <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-drop">IDropTarget::Drop</a> method's <i>pt</i> parameter.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-idroptargethelper-drop#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="dwEffect"> /// <para>Type: <b>DWORD</b> The value pointed to by the <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-drop">IDropTarget::Drop</a> method's <i>pdwEffect</i> parameter.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-idroptargethelper-drop#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <returns> /// <para>Type: <b>HRESULT</b> Returns S_OK if successful, or a COM error value otherwise.</para> /// </returns> /// <remarks>This method is called by a drop target when its <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-drop">IDropTarget::Drop</a> method is called. It notifies the drag-image manager that the object has been dropped, and provides it with the information needed to display the drag image.</remarks> public unsafe winmdroot.Foundation.HRESULT Drop(winmdroot.System.Com.IDataObject* pDataObject, global::System.Drawing.Point* ppt, winmdroot.System.Ole.DROPEFFECT dwEffect) { return ((delegate *unmanaged [Stdcall]<IDropTargetHelper*,winmdroot.System.Com.IDataObject* ,global::System.Drawing.Point* ,winmdroot.System.Ole.DROPEFFECT ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IDropTargetHelper*)Unsafe.AsPointer(ref this), pDataObject, ppt, dwEffect); } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT Show(IDropTargetHelper* pThis, winmdroot.Foundation.BOOL fShow) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.Show(fShow); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Notifies the drag-image manager to show or hide the drag image.</summary> /// <param name="fShow"> /// <para>Type: <b>BOOL</b> A boolean value that is set to <b>TRUE</b> to show the drag image, and <b>FALSE</b> to hide it.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shobjidl_core/nf-shobjidl_core-idroptargethelper-show#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <returns> /// <para>Type: <b>HRESULT</b> Returns S_OK if successful, or a COM error value otherwise.</para> /// </returns> /// <remarks>This method is used when dragging over a target window in a low color-depth video mode. It allows the target to notify the drag-image manager to hide the drag image while it is painting the window. While you are painting a window that is currently being dragged over, hide the drag image by calling <b>Show</b> with <i>fShow</i> set to <b>FALSE</b>. Once the window has been painted, display the drag image again by calling <b>Show</b> with <i>fShow</i> set to <b>TRUE</b>.</remarks> public winmdroot.Foundation.HRESULT Show(winmdroot.Foundation.BOOL fShow) { return ((delegate *unmanaged [Stdcall]<IDropTargetHelper*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[7])((IDropTargetHelper*)Unsafe.AsPointer(ref this), fShow); } internal unsafe global::Windows.Win32.Foundation.HRESULT QueryInterface<T>(out T* ppv) where T : unmanaged { Guid guid = typeof(T).GUID; void* pv; var hr = this.QueryInterface(&guid, &pv); if (hr.Succeeded) { ppv = (T*)pv; } else { ppv = null; } return hr; } internal struct Vtbl { internal delegate *unmanaged [Stdcall]<IDropTargetHelper*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1; internal delegate *unmanaged [Stdcall]<IDropTargetHelper*,uint> AddRef_2; internal delegate *unmanaged [Stdcall]<IDropTargetHelper*,uint> Release_3; internal delegate *unmanaged [Stdcall]<IDropTargetHelper*,winmdroot.Foundation.HWND ,winmdroot.System.Com.IDataObject* ,global::System.Drawing.Point* ,winmdroot.System.Ole.DROPEFFECT ,winmdroot.Foundation.HRESULT> DragEnter_4; internal delegate *unmanaged [Stdcall]<IDropTargetHelper*,winmdroot.Foundation.HRESULT> DragLeave_5; internal delegate *unmanaged [Stdcall]<IDropTargetHelper*,global::System.Drawing.Point* ,winmdroot.System.Ole.DROPEFFECT ,winmdroot.Foundation.HRESULT> DragOver_6; internal delegate *unmanaged [Stdcall]<IDropTargetHelper*,winmdroot.System.Com.IDataObject* ,global::System.Drawing.Point* ,winmdroot.System.Ole.DROPEFFECT ,winmdroot.Foundation.HRESULT> Drop_7; internal delegate *unmanaged [Stdcall]<IDropTargetHelper*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT> Show_8; } public static void PopulateVTable(Vtbl* vtable) { vtable->DragEnter_4 = &DragEnter; vtable->DragLeave_5 = &DragLeave; vtable->DragOver_6 = &DragOver; vtable->Drop_7 = &Drop; vtable->Show_8 = &Show; } private void** lpVtbl; /// <summary>The IID guid for this interface.</summary> /// <value>{4657278b-411b-11d2-839a-00c04fd918d0}</value> internal static readonly Guid IID_Guid = new Guid(0x4657278B, 0x411B, 0x11D2, 0x83, 0x9A, 0x00, 0xC0, 0x4F, 0xD9, 0x18, 0xD0); static ref readonly Guid IComIID.Guid { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan<byte> data = new byte[] { 0x8B,0x27,0x57,0x46,0x1B,0x41,0xD2,0x11,0x83,0x9A,0x00,0xC0,0x4F,0xD9,0x18,0xD0 }; return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data)); } } [Guid("4657278B-411B-11D2-839A-00C04FD918D0"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()] [SupportedOSPlatform("windows5.0")] internal interface Interface { [PreserveSig()] unsafe winmdroot.Foundation.HRESULT DragEnter(winmdroot.Foundation.HWND hwndTarget, winmdroot.System.Com.IDataObject* pDataObject, global::System.Drawing.Point* ppt, winmdroot.System.Ole.DROPEFFECT dwEffect); [PreserveSig()] winmdroot.Foundation.HRESULT DragLeave(); [PreserveSig()] unsafe winmdroot.Foundation.HRESULT DragOver(global::System.Drawing.Point* ppt, winmdroot.System.Ole.DROPEFFECT dwEffect); [PreserveSig()] unsafe winmdroot.Foundation.HRESULT Drop(winmdroot.System.Com.IDataObject* pDataObject, global::System.Drawing.Point* ppt, winmdroot.System.Ole.DROPEFFECT dwEffect); [PreserveSig()] winmdroot.Foundation.HRESULT Show(winmdroot.Foundation.BOOL fShow); } } } }