File: Windows.Win32.PInvokeCore.OLE32.dll.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
{

	/// <content>
	/// Contains extern methods from "OLE32.dll".
	/// </content>
	internal static partial class PInvokeCore
	{
		/// <inheritdoc cref="CoCreateInstance(Guid*, global::Windows.Win32.System.Com.IUnknown*, global::Windows.Win32.System.Com.CLSCTX, Guid*, void**)"/>
		internal static unsafe global::Windows.Win32.Foundation.HRESULT CoCreateInstance<T>(in Guid rclsid, global::Windows.Win32.System.Com.IUnknown* pUnkOuter, global::Windows.Win32.System.Com.CLSCTX dwClsContext, out T* ppv)
where T : unmanaged

		{
			global::Windows.Win32.Foundation.HRESULT hr = CoCreateInstance(rclsid, pUnkOuter, dwClsContext, typeof(T).GUID, out void* o);
			ppv = (T*)o;
			return hr;
		}

		/// <inheritdoc cref="CoCreateInstance(global::System.Guid*, winmdroot.System.Com.IUnknown*, winmdroot.System.Com.CLSCTX, global::System.Guid*, void**)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.HRESULT CoCreateInstance(in global::System.Guid rclsid, winmdroot.System.Com.IUnknown* pUnkOuter, winmdroot.System.Com.CLSCTX dwClsContext, in global::System.Guid riid, out void* ppv)
		{
			fixed (void** ppvLocal = &ppv)
			{
				fixed (global::System.Guid* riidLocal = &riid)
				{
					fixed (global::System.Guid* rclsidLocal = &rclsid)
					{
						winmdroot.Foundation.HRESULT __result = PInvokeCore.CoCreateInstance(rclsidLocal, pUnkOuter, dwClsContext, riidLocal, ppvLocal);
						return __result;
					}
				}
			}
		}

		/// <summary>Creates a single uninitialized object of the class associated with a specified CLSID.</summary>
		/// <param name="rclsid">The CLSID associated with the data and code that will be used to create the object.</param>
		/// <param name="pUnkOuter">If <b>NULL</b>, indicates that the object is not being created as part of an aggregate. If non-<b>NULL</b>, pointer to the aggregate object's <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nn-unknwn-iunknown">IUnknown</a> interface (the controlling <b>IUnknown</b>).</param>
		/// <param name="dwClsContext">Context in which the code that manages the newly created object will run. The values are taken from the enumeration <a href="https://docs.microsoft.com/windows/desktop/api/wtypesbase/ne-wtypesbase-clsctx">CLSCTX</a>.</param>
		/// <param name="riid">A reference to the identifier of the interface to be used to communicate with the object.</param>
		/// <param name="ppv">Address of pointer variable that receives the interface pointer requested in <i>riid</i>. Upon successful return, *<i>ppv</i> contains the requested interface pointer. Upon failure, *<i>ppv</i> contains <b>NULL</b>.</param>
		/// <returns>
		/// <para>This function can return the following values. </para>
		/// <para>This doc was truncated.</para>
		/// </returns>
		/// <remarks>
		/// <para>The <b>CoCreateInstance</b> function provides a convenient shortcut by connecting to the class object associated with the specified CLSID, creating a default-initialized instance, and releasing the class object. As such, it encapsulates the following functionality:</para>
		/// <para></para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/combaseapi/nf-combaseapi-cocreateinstance#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("OLE32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.HRESULT CoCreateInstance(global::System.Guid* rclsid, [Optional] winmdroot.System.Com.IUnknown* pUnkOuter, winmdroot.System.Com.CLSCTX dwClsContext, global::System.Guid* riid, void** ppv);

		/// <inheritdoc cref="DoDragDrop(winmdroot.System.Com.IDataObject*, winmdroot.System.Ole.IDropSource*, winmdroot.System.Ole.DROPEFFECT, winmdroot.System.Ole.DROPEFFECT*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.HRESULT DoDragDrop(winmdroot.System.Com.IDataObject* pDataObj, winmdroot.System.Ole.IDropSource* pDropSource, winmdroot.System.Ole.DROPEFFECT dwOKEffects, out winmdroot.System.Ole.DROPEFFECT pdwEffect)
		{
			fixed (winmdroot.System.Ole.DROPEFFECT* pdwEffectLocal = &pdwEffect)
			{
				winmdroot.Foundation.HRESULT __result = PInvokeCore.DoDragDrop(pDataObj, pDropSource, dwOKEffects, pdwEffectLocal);
				return __result;
			}
		}

		/// <summary>Carries out an OLE drag and drop operation.</summary>
		/// <param name="pDataObj">Pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> interface on a data object that contains the data being dragged.</param>
		/// <param name="pDropSource">Pointer to an implementation of the <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nn-oleidl-idropsource">IDropSource</a> interface, which is used to communicate with the source during the drag operation.</param>
		/// <param name="dwOKEffects">Effects the source allows in the OLE drag-and-drop operation. Most significant is whether it permits a move. The <i>dwOKEffect</i> and <i>pdwEffect</i> parameters obtain values from the <a href="https://docs.microsoft.com/windows/desktop/com/dropeffect-constants">DROPEFFECT</a> enumeration. For a list of values, see <b>DROPEFFECT</b>.</param>
		/// <param name="pdwEffect">Pointer to a value that indicates how the OLE drag-and-drop operation affected the source data. The <i>pdwEffect</i> parameter is set only if the operation is not canceled.</param>
		/// <returns>
		/// <para>This function returns S_OK on success. Other possible values include the following. </para>
		/// <para>This doc was truncated.</para>
		/// </returns>
		/// <remarks>
		/// <para>If you are developing an application that can act as a data source for an OLE drag-and-drop operation, you must call <b>DoDragDrop</b> when you detect that the user has started an OLE drag-and-drop operation.</para>
		/// <para>The <b>DoDragDrop</b> function enters a loop in which it calls various methods in the <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nn-oleidl-idropsource">IDropSource</a> and <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nn-oleidl-idroptarget">IDropTarget</a> interfaces. (For a successful drag-and-drop operation, the application acting as the data source must also implement <b>IDropSource</b>, while the target application must implement <b>IDropTarget</b>.) </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/ole2/nf-ole2-dodragdrop#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("OLE32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.HRESULT DoDragDrop(winmdroot.System.Com.IDataObject* pDataObj, winmdroot.System.Ole.IDropSource* pDropSource, winmdroot.System.Ole.DROPEFFECT dwOKEffects, winmdroot.System.Ole.DROPEFFECT* pdwEffect);

		/// <summary>Duplicates the data found in the specified handle and returns a handle to the duplicated data. The source data is in a clipboard format. Use this function to help implement some of the data transfer interfaces such as IDataObject.</summary>
		/// <param name="hSrc">Handle of the source data.</param>
		/// <param name="cfFormat">Clipboard format of the source data.</param>
		/// <param name="uiFlags">Flags to be used to allocate global memory for the copied data. These flags are passed to GlobalAlloc. If the value of <i>uiFlags</i> is <b>NULL</b>, GMEM_MOVEABLE is used as a default flag.</param>
		/// <returns>On success the HANDLE to the source data is returned; on failure a  <b>NULL</b> value is returned.</returns>
		/// <remarks>The CF_METAFILEPICT, CF_PALETTE, or CF_BITMAP formats receive special handling. They are GDI handles and a new GDI object must be created instead of just copying the bytes. All other formats are duplicated byte-wise.</remarks>
		[DllImport("OLE32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Foundation.HANDLE OleDuplicateData(winmdroot.Foundation.HANDLE hSrc, winmdroot.System.Ole.CLIPBOARD_FORMAT cfFormat, winmdroot.System.Memory.GLOBAL_ALLOC_FLAGS uiFlags);

		/// <summary>Carries out the clipboard shutdown sequence. It also releases the IDataObject pointer that was placed on the clipboard by the OleSetClipboard function.</summary>
		/// <returns>
		/// <para>This function returns S_OK on success. Other possible values include the following. </para>
		/// <para>This doc was truncated.</para>
		/// </returns>
		/// <remarks>
		/// <para><b>OleFlushClipboard</b> renders the data from a data object onto the clipboard and releases the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> pointer to the data object. While the application that put the data object on the clipboard is running, the clipboard holds only a pointer to the data object, thus saving memory. If you are writing an application that acts as the source of a clipboard operation, you can call the <b>OleFlushClipboard</b> function when your application is closed, such as when the user exits from your application. Calling <b>OleFlushClipboard</b> enables pasting and paste-linking of OLE objects after application shutdown. Before calling <b>OleFlushClipboard</b>, you can easily determine if your data is still on the clipboard with a call to the <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-oleiscurrentclipboard">OleIsCurrentClipboard</a> function. <b>OleFlushClipboard</b> leaves all formats offered by the data transfer object, including the OLE 1 compatibility formats, on the clipboard so they are available after application shutdown. In addition to OLE 1 compatibility formats, these include all formats offered on a global handle medium (all except for TYMED_FILE) and formatted with a <b>NULL</b> target device. For example, if a data-source application offers a particular clipboard format (say cfFOO) on an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-istorage">IStorage</a> object, and calls the <b>OleFlushClipboard</b> function, the storage object is copied into memory and the hglobal memory handle is put on the clipboard. To retrieve the information on the clipboard, you can call the <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-olegetclipboard">OleGetClipboard</a> function from another application, which creates a default data object, and the hglobal from the clipboard again becomes a storage object. Furthermore, the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/ns-objidl-formatetc">FORMATETC</a> enumerator and the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-querygetdata">IDataObject::QueryGetData</a> method would all correctly indicate that the original clipboard format (cfFOO) is again available on a TYMED_ISTORAGE. To empty the clipboard, call the <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-olesetclipboard">OleSetClipboard</a> function specifying a <b>NULL</b> value for its parameter. The application should call this when it closes if there is no need to leave data on the clipboard after shutdown, or if data will be placed on the clipboard using the standard Windows clipboard functions.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/ole2/nf-ole2-oleflushclipboard#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("OLE32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Foundation.HRESULT OleFlushClipboard();

		/// <summary>Retrieves a data object that you can use to access the contents of the clipboard.</summary>
		/// <param name="ppDataObj">Address of <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> pointer variable that receives the interface pointer to the clipboard data object.</param>
		/// <returns>
		/// <para>This function returns S_OK on success. Other possible values include the following. </para>
		/// <para>This doc was truncated.</para>
		/// </returns>
		/// <remarks>
		/// <para><div class="alert"><b>Caution</b>  Clipboard data is not trusted. Parse the data carefully before using it in your application.</div> <div> </div> If you are writing an application that can accept data from the clipboard, call the <b>OleGetClipboard</b> function to get a pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> interface that you can use to retrieve the contents of the clipboard. <b>OleGetClipboard</b> handles three cases:</para>
		/// <para></para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/ole2/nf-ole2-olegetclipboard#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("OLE32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.HRESULT OleGetClipboard(winmdroot.System.Com.IDataObject** ppDataObj);

		/// <inheritdoc cref="OleInitialize(void*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.HRESULT OleInitialize()
		{
			winmdroot.Foundation.HRESULT __result = PInvokeCore.OleInitialize(default);
			return __result;
		}

		/// <summary>Initializes the COM library on the current apartment, identifies the concurrency model as single-thread apartment (STA), and enables additional functionality described in the Remarks section below.</summary>
		/// <param name="pvReserved">This parameter is reserved and must be <b>NULL</b>.</param>
		/// <returns>
		/// <para>This function returns S_OK on success. Other possible values include the following. </para>
		/// <para>This doc was truncated.</para>
		/// </returns>
		/// <remarks>
		/// <para>Applications that use the following functionality must call <b>OleInitialize</b> before calling any other function in the COM library:</para>
		/// <para></para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/ole2/nf-ole2-oleinitialize#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("OLE32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.HRESULT OleInitialize(void* pvReserved);

		/// <summary>Places a pointer to a specific data object onto the clipboard. This makes the data object accessible to the OleGetClipboard function.</summary>
		/// <param name="pDataObj">Pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-idataobject">IDataObject</a> interface on the data object from which the data to be placed on the clipboard can be obtained. This parameter can be <b>NULL</b>; in which case the clipboard is emptied.</param>
		/// <returns>
		/// <para>This function returns S_OK on success. Other possible values include the following. </para>
		/// <para>This doc was truncated.</para>
		/// </returns>
		/// <remarks>
		/// <para>If you are writing an application that can act as the source of a clipboard operation, you must do the following: </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/ole2/nf-ole2-olesetclipboard#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("OLE32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.HRESULT OleSetClipboard(winmdroot.System.Com.IDataObject* pDataObj);

		/// <summary>Closes the COM library on the apartment, releases any class factories, other COM objects, or servers held by the apartment, disables RPC on the apartment, and frees any resources the apartment maintains.</summary>
		/// <remarks>
		/// <para>Call <b>OleUninitialize</b> on application shutdown, as the last COM library call, if the apartment was initialized with a call to <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-oleinitialize">OleInitialize</a>. <b>OleUninitialize</b> calls the <a href="https://docs.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-couninitialize">CoUninitialize</a> function internally to shut down the OLE Component Object(COM) Library. If the COM library was initialized on the apartment with a call to <a href="https://docs.microsoft.com/windows/desktop/api/objbase/nf-objbase-coinitialize">CoInitialize</a> or <a href="https://docs.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-coinitializeex">CoInitializeEx</a>, it must be closed with a call to <a href="https://docs.microsoft.com/windows/desktop/api/combaseapi/nf-combaseapi-couninitialize">CoUninitialize</a>. The <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-oleinitialize">OleInitialize</a> and <b>OleUninitialize</b> calls must be balanced. If there are multiple calls to the <b>OleInitialize</b> function, there must be the same number of calls to <b>OleUninitialize</b>; only the <b>OleUninitialize</b> call corresponding to the <b>OleInitialize</b> call that actually initialized the library can close it. Because there is no way to control the order in which in-process servers are loaded or unloaded, do not call <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-oleinitialize">OleInitialize</a> or <b>OleUninitialize</b> from the <a href="https://docs.microsoft.com/windows/desktop/Dlls/dllmain">DllMain</a> function.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/ole2/nf-ole2-oleuninitialize#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("OLE32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern void OleUninitialize();

		/// <inheritdoc cref="PropVariantClear(winmdroot.System.Com.StructuredStorage.PROPVARIANT*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe winmdroot.Foundation.HRESULT PropVariantClear(ref winmdroot.System.Com.StructuredStorage.PROPVARIANT pvar)
		{
			fixed (winmdroot.System.Com.StructuredStorage.PROPVARIANT* pvarLocal = &pvar)
			{
				winmdroot.Foundation.HRESULT __result = PInvokeCore.PropVariantClear(pvarLocal);
				return __result;
			}
		}

		/// <summary>Frees all elements that can be freed in a given PROPVARIANT structure.</summary>
		/// <param name="pvar">
		/// <para>A pointer to an initialized <a href="https://docs.microsoft.com/windows/desktop/api/propidl/ns-propidl-propvariant">PROPVARIANT</a> structure for which any deallocatable elements are to be freed. On return, all zeroes are written to the <b>PROPVARIANT</b> structure.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/combaseapi/nf-combaseapi-propvariantclear#parameters">Read more on docs.microsoft.com</see>.</para>
		/// </param>
		/// <returns>This function returns HRESULT.</returns>
		/// <remarks>
		/// <para>At any level of indirection, <b>NULL</b> pointers are ignored. For example, the <i>pvar</i> parameter  points to a <a href="https://docs.microsoft.com/windows/desktop/api/propidl/ns-propidl-propvariant">PROPVARIANT</a> structure of type <b>VT_CF</b>. The  <b>pclipdata</b> member of the <b>PROPVARIANT</b> structure points to a <b>CLIPDATA</b> structure. The <i>pClipData</i> pointer in the <b>CLIPDATA</b> structure is  <b>NULL</b>.  In this example, the <i>pClipData</i> pointer is ignored.  However, the <b>CLIPDATA</b> structure pointed to by the <b>pclipdata</b> member of the <b>PROPVARIANT</b> structure is freed. On return, this function writes zeroes to the specified <a href="https://docs.microsoft.com/windows/desktop/api/propidl/ns-propidl-propvariant">PROPVARIANT</a> structure, so the VT-type is <b>VT_EMPTY</b>. Passing <b>NULL</b> as the <i>pvar</i> parameter produces a return code of S_OK. <div class="alert"><b>Note</b>  Do not use this function to initialize <a href="https://docs.microsoft.com/windows/desktop/api/propidl/ns-propidl-propvariant">PROPVARIANT</a> structures. Instead, initialize these structures using the <a href="https://docs.microsoft.com/windows/desktop/api/propidl/nf-propidl-propvariantinit">PropVariantInit</a> macro (defined in Propidl.h).</div> <div> </div></para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/combaseapi/nf-combaseapi-propvariantclear#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("OLE32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.HRESULT PropVariantClear(winmdroot.System.Com.StructuredStorage.PROPVARIANT* pvar);

		/// <summary>Registers the specified window as one that can be the target of an OLE drag-and-drop operation and specifies the IDropTarget instance to use for drop operations.</summary>
		/// <param name="hwnd">Handle to a window that can be a target for an OLE drag-and-drop operation.</param>
		/// <param name="pDropTarget">Pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nn-oleidl-idroptarget">IDropTarget</a> interface on the object that is to be the target of a drag-and-drop operation in a specified window. This interface is used to communicate OLE drag-and-drop information for that window.</param>
		/// <returns>
		/// <para>This function returns S_OK on success. Other possible values include the following. </para>
		/// <para>This doc was truncated.</para>
		/// </returns>
		/// <remarks>
		/// <para>If your application can accept dropped objects during OLE drag-and-drop operations, you must call the <b>RegisterDragDrop</b> function. Do this whenever one of your application windows is available as a potential drop target, i.e., when the window appears unobscured on the screen. The application thread that calls the <b>RegisterDragDrop</b> function must be pumping messages, presumably by calling the <a href="https://docs.microsoft.com/previous-versions/windows/desktop/fax/-mfax-faxaccountincomingarchive-getmessage-vb">GetMessage</a> function with a <b>NULL</b><i>hWnd</i> parameter, because OLE creates windows on the thread that need messages processed. If this requirement is not met, any application that drags an object over the window that is registered as a drop target will hang until the target application closes. The <b>RegisterDragDrop</b> function only registers one window at a time, so you must call it for each application window capable of accepting dropped objects. As the mouse passes over unobscured portions of the target window during an OLE drag-and-drop operation, the <a href="https://docs.microsoft.com/windows/desktop/api/ole2/nf-ole2-dodragdrop">DoDragDrop</a> function calls the specified <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-dragover">IDropTarget::DragOver</a> method for the current window. When a drop operation actually occurs in a given window, the <b>DoDragDrop</b> function calls <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nf-oleidl-idroptarget-drop">IDropTarget::Drop</a>. The <b>RegisterDragDrop</b> function also calls the <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-addref">IUnknown::AddRef</a> method on the <a href="https://docs.microsoft.com/windows/desktop/api/oleidl/nn-oleidl-idroptarget">IDropTarget</a> pointer.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/ole2/nf-ole2-registerdragdrop#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("OLE32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe winmdroot.Foundation.HRESULT RegisterDragDrop(winmdroot.Foundation.HWND hwnd, winmdroot.System.Ole.IDropTarget* pDropTarget);

		/// <inheritdoc cref="ReleaseStgMedium(winmdroot.System.Com.STGMEDIUM*)"/>
		[SupportedOSPlatform("windows5.0")]
		internal static unsafe void ReleaseStgMedium(ref winmdroot.System.Com.STGMEDIUM param0)
		{
			fixed (winmdroot.System.Com.STGMEDIUM* param0Local = &param0)
			{
				PInvokeCore.ReleaseStgMedium(param0Local);
			}
		}

		/// <summary>Frees the specified storage medium.</summary>
		/// <remarks>
		/// <para>The <b>ReleaseStgMedium</b> function calls the appropriate method or function to release the specified storage medium. Use this function during data transfer operations where storage medium structures are parameters, such as <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-getdata">IDataObject::GetData</a> or <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-setdata">IDataObject::SetData</a>. In addition to identifying the type of the storage medium, this structure specifies the appropriate <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-release">Release</a> method for releasing the storage medium when it is no longer needed. It is common to pass a <a href="https://docs.microsoft.com/windows/win32/api/objidl/ns-objidl-ustgmedium-r1">STGMEDIUM</a> from one body of code to another, such as in <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nf-objidl-idataobject-getdata">IDataObject::GetData</a>, in which the one called can allocate a medium and return it to the caller. <b>ReleaseStgMedium</b> permits flexibility in whether the receiving body of code owns the medium, or whether the original provider of the medium still owns it, in which case the receiving code needs to inform the provider that it can free the medium. When the original provider of the medium is responsible for freeing the medium, the provider calls <b>ReleaseStgMedium</b>, specifying the medium and the appropriate <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nn-unknwn-iunknown">IUnknown</a> pointer as the <b>punkForRelease</b> structure member. Depending on the type of storage medium being freed, one of the following actions is taken, followed by a call to the <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-release">IUnknown::Release</a> method on the specified <b>IUnknown</b> pointer. </para>
		/// <para>This doc was truncated.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/ole2/nf-ole2-releasestgmedium#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("OLE32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern unsafe void ReleaseStgMedium(winmdroot.System.Com.STGMEDIUM* param0);

		/// <summary>Revokes the registration of the specified application window as a potential target for OLE drag-and-drop operations.</summary>
		/// <param name="hwnd">Handle to a window previously registered as a target for an OLE drag-and-drop operation.</param>
		/// <returns>
		/// <para>This function returns S_OK on success. Other possible values include the following. </para>
		/// <para>This doc was truncated.</para>
		/// </returns>
		/// <remarks>
		/// <para>When your application window is no longer available as a potential target for an OLE drag-and-drop operation, you must call <b>RevokeDragDrop</b>. This function calls the <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nf-unknwn-iunknown-release">IUnknown::Release</a> method for your drop target interface.</para>
		/// <para><see href="https://learn.microsoft.com/windows/win32/api/ole2/nf-ole2-revokedragdrop#">Read more on docs.microsoft.com</see>.</para>
		/// </remarks>
		[DllImport("OLE32.dll", ExactSpelling = true),DefaultDllImportSearchPaths(DllImportSearchPath.System32)]
		[SupportedOSPlatform("windows5.0")]
		internal static extern winmdroot.Foundation.HRESULT RevokeDragDrop(winmdroot.Foundation.HWND hwnd);
	}
}