|
// ------------------------------------------------------------------------------
// <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.Com
{
[Guid("00020400-0000-0000-C000-000000000046")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IDispatch
: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]<IDispatch*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IDispatch*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IDispatch*,uint>)lpVtbl[1])((IDispatch*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IDispatch*,uint>)lpVtbl[2])((IDispatch*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="GetTypeInfoCount(uint*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetTypeInfoCount(out uint pctinfo)
{
fixed (uint* pctinfoLocal = &pctinfo)
{
winmdroot.Foundation.HRESULT __result = this.GetTypeInfoCount(pctinfoLocal);
return __result;
}
}
/// <summary>Retrieves the number of type information interfaces that an object provides (either 0 or 1).</summary>
/// <param name="pctinfo">The number of type information interfaces provided by the object. If the object provides type information, this number is 1; otherwise the number is 0.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>The method may return zero, which indicates that the object does not provide any type information. In this case, the object may still be programmable through <b>IDispatch</b> or a VTBL, but does not provide run-time type information for browsers, compilers, or other programming tools that access type information. This can be useful for hiding an object from browsers.</remarks>
public unsafe winmdroot.Foundation.HRESULT GetTypeInfoCount(uint* pctinfo)
{
return ((delegate *unmanaged [Stdcall]<IDispatch*,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IDispatch*)Unsafe.AsPointer(ref this), pctinfo);
}
/// <summary>Retrieves the type information for an object, which can then be used to get the type information for an interface.</summary>
/// <param name="iTInfo">The type information to return. Pass 0 to retrieve type information for the <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nn-oaidl-idispatch">IDispatch</a> implementation.</param>
/// <param name="lcid">The locale identifier for the type information. An object may be able to return different type information for different languages. This is important for classes that support localized member names. For classes that do not support localized member names, this parameter can be ignored.</param>
/// <param name="ppTInfo">The requested type information object.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-idispatch-gettypeinfo">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetTypeInfo(uint iTInfo, uint lcid, winmdroot.System.Com.ITypeInfo** ppTInfo)
{
return ((delegate *unmanaged [Stdcall]<IDispatch*,uint ,uint ,winmdroot.System.Com.ITypeInfo** ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IDispatch*)Unsafe.AsPointer(ref this), iTInfo, lcid, ppTInfo);
}
/// <inheritdoc cref="GetIDsOfNames(global::System.Guid*, winmdroot.Foundation.PWSTR*, uint, uint, int*)"/>
internal unsafe winmdroot.Foundation.HRESULT GetIDsOfNames(in global::System.Guid riid, ReadOnlySpan<winmdroot.Foundation.PWSTR> rgszNames, uint lcid, Span<int> rgDispId)
{
fixed (int* rgDispIdLocal = rgDispId)
{
fixed (winmdroot.Foundation.PWSTR* rgszNamesLocal = rgszNames)
{
fixed (global::System.Guid* riidLocal = &riid)
{
if (rgszNames.Length != rgDispId.Length) throw new ArgumentException();
winmdroot.Foundation.HRESULT __result = this.GetIDsOfNames(riidLocal, rgszNamesLocal, (uint )rgDispId.Length, lcid, rgDispIdLocal);
return __result;
}
}
}
}
/// <summary>Maps a single member and an optional set of argument names to a corresponding set of integer DISPIDs, which can be used on subsequent calls to Invoke.</summary>
/// <param name="riid">Reserved for future use. Must be IID_NULL.</param>
/// <param name="rgszNames">The array of names to be mapped.</param>
/// <param name="cNames">The count of the names to be mapped.</param>
/// <param name="lcid">The locale context in which to interpret the names.</param>
/// <param name="rgDispId">Caller-allocated array, each element of which contains an identifier (ID) corresponding to one of the names passed in the rgszNames array. The first element represents the member name. The subsequent elements represent each of the member's parameters.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>An <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nn-oaidl-idispatch">IDispatch</a> implementation can associate any positive integer ID value with a given name. Zero is reserved for the default, or <b>Value</b> property; –1 is reserved to indicate an unknown name; and other negative values are defined for other purposes. For example, if <b>GetIDsOfNames</b> is called, and the implementation does not recognize one or more of the names, it returns DISP_E_UNKNOWNNAME, and the <i>rgDispId</i> array contains DISPID_UNKNOWN for the entries that correspond to the unknown names. The member and parameter DISPIDs must remain constant for the lifetime of the object. This allows a client to obtain the DISPIDs once, and cache them for later use. When <b>GetIDsOfNames</b> is called with more than one name, the first name (<i>rgszNames</i>[0]) corresponds to the member name, and subsequent names correspond to the names of the member's parameters. The same name may map to different DISPIDs, depending on context. For example, a name may have a DISPID when it is used as a member name with a particular interface, a different ID as a member of a different interface, and different mapping for each time it appears as a parameter. <b>GetIDsOfNames</b> is used when an <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nn-oaidl-idispatch">IDispatch</a> client binds to names at run time. To bind at compile time instead, an <b>IDispatch</b> client can map names to DISPIDs by using the type information interfaces described in <a href="https://docs.microsoft.com/previous-versions/windows/desktop/automat/type-description-interfaces">Type Description Interfaces</a>. This allows a client to bind to members at compile time and avoid calling <b>GetIDsOfNames</b> at run time. For a description of binding at compile time, see Type Description Interfaces. The implementation of <b>GetIDsOfNames</b> is case insensitive. Users that need case-sensitive name mapping should use type information interfaces to map names to DISPIDs, rather than call <b>GetIDsOfNames</b>. <div class="alert"><b>Caution</b> You cannot use this method to access values that have been added dynamically, such as values added through JavaScript. Instead, use the GetDispID of the IDispatchEx interface. For more information, see the <a href="https://docs.microsoft.com/previous-versions/windows/internet-explorer/ie-developer/windows-scripting/reference/idispatchex-interface">IDispatchEx interface</a>.</div> <div> </div></para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-idispatch-getidsofnames#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT GetIDsOfNames(global::System.Guid* riid, winmdroot.Foundation.PWSTR* rgszNames, uint cNames, uint lcid, int* rgDispId)
{
return ((delegate *unmanaged [Stdcall]<IDispatch*,global::System.Guid* ,winmdroot.Foundation.PWSTR* ,uint ,uint ,int* ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IDispatch*)Unsafe.AsPointer(ref this), riid, rgszNames, cNames, lcid, rgDispId);
}
/// <inheritdoc cref="Invoke(int, global::System.Guid*, uint, winmdroot.System.Com.DISPATCH_FLAGS, winmdroot.System.Com.DISPPARAMS*, winmdroot.System.Variant.VARIANT*, winmdroot.System.Com.EXCEPINFO*, uint*)"/>
internal unsafe winmdroot.Foundation.HRESULT Invoke(int dispIdMember, in global::System.Guid riid, uint lcid, winmdroot.System.Com.DISPATCH_FLAGS wFlags, in winmdroot.System.Com.DISPPARAMS pDispParams, winmdroot.System.Variant.VARIANT* pVarResult, winmdroot.System.Com.EXCEPINFO* pExcepInfo, uint* puArgErr)
{
fixed (winmdroot.System.Com.DISPPARAMS* pDispParamsLocal = &pDispParams)
{
fixed (global::System.Guid* riidLocal = &riid)
{
winmdroot.Foundation.HRESULT __result = this.Invoke(dispIdMember, riidLocal, lcid, wFlags, pDispParamsLocal, pVarResult, pExcepInfo, puArgErr);
return __result;
}
}
}
/// <summary>Provides access to properties and methods exposed by an object.</summary>
/// <param name="dispIdMember">Identifies the member. Use <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-idispatch-getidsofnames">GetIDsOfNames</a> or the object's documentation to obtain the dispatch identifier.</param>
/// <param name="riid">Reserved for future use. Must be IID_NULL.</param>
/// <param name="lcid">
/// <para>The locale context in which to interpret arguments. The <i>lcid</i> is used by the <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-idispatch-getidsofnames">GetIDsOfNames</a> function, and is also passed to <b>Invoke</b> to allow the object to interpret its arguments specific to a locale. Applications that do not support multiple national languages can ignore this parameter. For more information, refer to <a href="https://docs.microsoft.com/previous-versions/windows/desktop/automat/supporting-multiple-national-languages">Supporting Multiple National Languages</a> and <a href="https://docs.microsoft.com/previous-versions/windows/desktop/automat/exposing-activex-objects">Exposing ActiveX Objects</a>.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-idispatch-invoke#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="wFlags">
/// <para>Flags describing the context of the <b>Invoke</b> call. </para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-idispatch-invoke#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <param name="pDispParams">Pointer to a DISPPARAMS structure containing an array of arguments, an array of argument DISPIDs for named arguments, and counts for the number of elements in the arrays.</param>
/// <param name="pVarResult">Pointer to the location where the result is to be stored, or NULL if the caller expects no result. This argument is ignored if DISPATCH_PROPERTYPUT or DISPATCH_PROPERTYPUTREF is specified.</param>
/// <param name="pExcepInfo">Pointer to a structure that contains exception information. This structure should be filled in if DISP_E_EXCEPTION is returned. Can be NULL.</param>
/// <param name="puArgErr">The index within rgvarg of the first argument that has an error. Arguments are stored in pDispParams->rgvarg in reverse order, so the first argument is the one with the highest index in the array. This parameter is returned only when the resulting return value is DISP_E_TYPEMISMATCH or DISP_E_PARAMNOTFOUND. This argument can be set to null. For details, see <a href="https://docs.microsoft.com/previous-versions/windows/desktop/automat/returning-errors">Returning Errors</a>.</param>
/// <returns>
/// <para>This method can return one of these values. </para>
/// <para>This doc was truncated.</para>
/// </returns>
/// <remarks>
/// <para>Generally, you should not implement <b>Invoke</b> directly. Instead, use the dispatch interface to create functions <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oleauto/nf-oleauto-createstddispatch">CreateStdDispatch</a> and <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oleauto/nf-oleauto-dispinvoke">DispInvoke</a>. For details, refer to <b>CreateStdDispatch</b>, <b>DispInvoke</b>, <a href="https://docs.microsoft.com/previous-versions/windows/desktop/automat/creating-the-idispatch-interface">Creating the IDispatch Interface</a> and <a href="https://docs.microsoft.com/previous-versions/windows/desktop/automat/exposing-activex-objects">Exposing ActiveX Objects</a>. If some application-specific processing needs to be performed before calling a member, the code should perform the necessary actions, and then call <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-itypeinfo-invoke">ITypeInfo::Invoke</a> to invoke the member. <b>ITypeInfo::Invoke</b> acts exactly like <b>Invoke</b>. The standard implementations of <b>Invoke</b> created by <b>CreateStdDispatch</b> and <b>DispInvoke</b> defer to <b>ITypeInfo::Invoke</b>. In an ActiveX client, <b>Invoke</b> should be used to get and set the values of properties, or to call a method of an ActiveX object. The <i>dispIdMember</i> argument identifies the member to invoke. The DISPIDs that identify members are defined by the implementer of the object and can be determined by using the object's documentation, the <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nf-oaidl-idispatch-getidsofnames">IDispatch::GetIDsOfNames</a> function, or the <a href="https://docs.microsoft.com/previous-versions/windows/desktop/api/oaidl/nn-oaidl-itypeinfo">ITypeInfo</a> interface. When you use <b>IDispatch::Invoke()</b> with DISPATCH_PROPERTYPUT or DISPATCH_PROPERTYPUTREF, you have to specially initialize the <b>cNamedArgs</b> and <b>rgdispidNamedArgs</b> elements of your DISPPARAMS structure with the following:</para>
/// <para></para>
/// <para>This doc was truncated.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/oaidl/nf-oaidl-idispatch-invoke#">Read more on docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe winmdroot.Foundation.HRESULT Invoke(int dispIdMember, global::System.Guid* riid, uint lcid, winmdroot.System.Com.DISPATCH_FLAGS wFlags, winmdroot.System.Com.DISPPARAMS* pDispParams, [Optional] winmdroot.System.Variant.VARIANT* pVarResult, [Optional] winmdroot.System.Com.EXCEPINFO* pExcepInfo, [Optional] uint* puArgErr)
{
return ((delegate *unmanaged [Stdcall]<IDispatch*,int ,global::System.Guid* ,uint ,winmdroot.System.Com.DISPATCH_FLAGS ,winmdroot.System.Com.DISPPARAMS* ,winmdroot.System.Variant.VARIANT* ,winmdroot.System.Com.EXCEPINFO* ,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IDispatch*)Unsafe.AsPointer(ref this), dispIdMember, riid, lcid, wFlags, pDispParams, pVarResult, pExcepInfo, puArgErr);
}
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]<IDispatch*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IDispatch*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IDispatch*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IDispatch*,uint* ,winmdroot.Foundation.HRESULT> GetTypeInfoCount_4;
internal delegate *unmanaged [Stdcall]<IDispatch*,uint ,uint ,winmdroot.System.Com.ITypeInfo** ,winmdroot.Foundation.HRESULT> GetTypeInfo_5;
internal delegate *unmanaged [Stdcall]<IDispatch*,global::System.Guid* ,winmdroot.Foundation.PWSTR* ,uint ,uint ,int* ,winmdroot.Foundation.HRESULT> GetIDsOfNames_6;
internal delegate *unmanaged [Stdcall]<IDispatch*,int ,global::System.Guid* ,uint ,winmdroot.System.Com.DISPATCH_FLAGS ,winmdroot.System.Com.DISPPARAMS* ,winmdroot.System.Variant.VARIANT* ,winmdroot.System.Com.EXCEPINFO* ,uint* ,winmdroot.Foundation.HRESULT> Invoke_7;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{00020400-0000-0000-c000-000000000046}</value>
internal static readonly Guid IID_Guid = new Guid(0x00020400, 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[] {
0x00,0x04,0x02,0x00,0x00,0x00,0x00,0x00,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x46 };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
}
}
}
|