|
// ------------------------------------------------------------------------------
// <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 UI.Shell
{
[Guid("EAC04BC0-3791-11D2-BB95-0060977B464C")]
[SupportedOSPlatform("windows5.0")]
[global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.151+58e949951d.RR")]
internal unsafe partial struct IAutoComplete2
:IVTable<IAutoComplete2,IAutoComplete2.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]<IAutoComplete2*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IAutoComplete2*)Unsafe.AsPointer(ref this), riid, ppvObject);
}
public uint AddRef()
{
return ((delegate *unmanaged [Stdcall]<IAutoComplete2*,uint>)lpVtbl[1])((IAutoComplete2*)Unsafe.AsPointer(ref this));
}
public uint Release()
{
return ((delegate *unmanaged [Stdcall]<IAutoComplete2*,uint>)lpVtbl[2])((IAutoComplete2*)Unsafe.AsPointer(ref this));
}
/// <inheritdoc cref="Init(winmdroot.Foundation.HWND, winmdroot.System.Com.IUnknown*, winmdroot.Foundation.PCWSTR, winmdroot.Foundation.PCWSTR)"/>
internal unsafe void Init(winmdroot.Foundation.HWND hwndEdit, winmdroot.System.Com.IUnknown* punkACL, string pwszRegKeyPath, string pwszQuickComplete)
{
fixed (char* pwszQuickCompleteLocal = pwszQuickComplete)
{
fixed (char* pwszRegKeyPathLocal = pwszRegKeyPath)
{
this.Init(hwndEdit, punkACL, pwszRegKeyPathLocal, pwszQuickCompleteLocal);
}
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Init(IAutoComplete2* pThis, winmdroot.Foundation.HWND hwndEdit, winmdroot.System.Com.IUnknown* punkACL, winmdroot.Foundation.PCWSTR pwszRegKeyPath, winmdroot.Foundation.PCWSTR pwszQuickComplete)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Init(hwndEdit, punkACL, pwszRegKeyPath, pwszQuickComplete);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
public unsafe void Init(winmdroot.Foundation.HWND hwndEdit, winmdroot.System.Com.IUnknown* punkACL, winmdroot.Foundation.PCWSTR pwszRegKeyPath, winmdroot.Foundation.PCWSTR pwszQuickComplete)
{
((delegate *unmanaged [Stdcall]<IAutoComplete2*,winmdroot.Foundation.HWND ,winmdroot.System.Com.IUnknown* ,winmdroot.Foundation.PCWSTR ,winmdroot.Foundation.PCWSTR ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IAutoComplete2*)Unsafe.AsPointer(ref this), hwndEdit, punkACL, pwszRegKeyPath, pwszQuickComplete).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT Enable(IAutoComplete2* pThis, winmdroot.Foundation.BOOL fEnable)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.Enable(fEnable);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
public void Enable(winmdroot.Foundation.BOOL fEnable)
{
((delegate *unmanaged [Stdcall]<IAutoComplete2*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IAutoComplete2*)Unsafe.AsPointer(ref this), fEnable).ThrowOnFailure();
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT SetOptions(IAutoComplete2* pThis, uint dwFlag)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.SetOptions(dwFlag);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Sets the current autocomplete options. (IAutoComplete2.SetOptions)</summary>
/// <param name="dwFlag">
/// <para>Type: <b>DWORD</b> One or more flags from the <a href="https://docs.microsoft.com/windows/desktop/api/shldisp/ne-shldisp-autocompleteoptions">AUTOCOMPLETEOPTIONS</a> enumeration that specify autocomplete options.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shldisp/nf-shldisp-iautocomplete2-setoptions#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>The TAB key is disabled by default because it is typically used to navigate from control to control, not within a control. If you set the <a href="https://docs.microsoft.com/windows/desktop/api/shldisp/ne-shldisp-autocompleteoptions">ACO_USETAB</a> flag in <i>dwFlag</i>, users can navigate to a string in the drop-down list by pressing the TAB key. If the drop-down list is closed, the TAB key allows the user to navigate from control to control, as usual. The user can close the drop-down list by pressing the ESC key.</remarks>
public winmdroot.Foundation.HRESULT SetOptions(uint dwFlag)
{
return ((delegate *unmanaged [Stdcall]<IAutoComplete2*,uint ,winmdroot.Foundation.HRESULT>)lpVtbl[5])((IAutoComplete2*)Unsafe.AsPointer(ref this), dwFlag);
}
/// <inheritdoc cref="GetOptions(uint*)"/>
internal unsafe void GetOptions(out uint pdwFlag)
{
fixed (uint* pdwFlagLocal = &pdwFlag)
{
this.GetOptions(pdwFlagLocal);
}
}
[UnmanagedCallersOnly(CallConvs = new []{
typeof(CallConvStdcall)}
)]
private static winmdroot.Foundation.HRESULT GetOptions(IAutoComplete2* pThis, uint* pdwFlag)
{
try
{
winmdroot.Foundation.HRESULT __hr = ComHelpers.UnwrapCCW(pThis, out Interface __object);
if (__hr.Failed)
{
return __hr;
}
return __object.GetOptions(pdwFlag);
}
catch (Exception ex)
{
return (winmdroot.Foundation.HRESULT)ex.HResult;
}
}
/// <summary>Gets the current autocomplete options. (IAutoComplete2.GetOptions)</summary>
/// <param name="pdwFlag">
/// <para>Type: <b>DWORD*</b> One or more flags from the <a href="https://docs.microsoft.com/windows/desktop/api/shldisp/ne-shldisp-autocompleteoptions">AUTOCOMPLETEOPTIONS</a> enumeration that indicate the options that are currently set.</para>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shldisp/nf-shldisp-iautocomplete2-getoptions#parameters">Read more on docs.microsoft.com</see>.</para>
/// </param>
/// <returns>
/// <para>Type: <b>HRESULT</b> If this method succeeds, it returns <b>S_OK</b>. Otherwise, it returns an <b>HRESULT</b> error code.</para>
/// </returns>
/// <remarks>
/// <para><see href="https://learn.microsoft.com/windows/win32/api/shldisp/nf-shldisp-iautocomplete2-getoptions">Learn more about this API from docs.microsoft.com</see>.</para>
/// </remarks>
public unsafe void GetOptions(uint* pdwFlag)
{
((delegate *unmanaged [Stdcall]<IAutoComplete2*,uint* ,winmdroot.Foundation.HRESULT>)lpVtbl[6])((IAutoComplete2*)Unsafe.AsPointer(ref this), pdwFlag).ThrowOnFailure();
}
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]<IAutoComplete2*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1;
internal delegate *unmanaged [Stdcall]<IAutoComplete2*,uint> AddRef_2;
internal delegate *unmanaged [Stdcall]<IAutoComplete2*,uint> Release_3;
internal delegate *unmanaged [Stdcall]<IAutoComplete2*,winmdroot.Foundation.HWND ,winmdroot.System.Com.IUnknown* ,winmdroot.Foundation.PCWSTR ,winmdroot.Foundation.PCWSTR ,winmdroot.Foundation.HRESULT> Init_4;
internal delegate *unmanaged [Stdcall]<IAutoComplete2*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT> Enable_5;
internal delegate *unmanaged [Stdcall]<IAutoComplete2*,uint ,winmdroot.Foundation.HRESULT> SetOptions_6;
internal delegate *unmanaged [Stdcall]<IAutoComplete2*,uint* ,winmdroot.Foundation.HRESULT> GetOptions_7;
}
public static void PopulateVTable(Vtbl* vtable)
{
vtable->Init_4 = &Init;
vtable->Enable_5 = &Enable;
vtable->SetOptions_6 = &SetOptions;
vtable->GetOptions_7 = &GetOptions;
}
private void** lpVtbl;
/// <summary>The IID guid for this interface.</summary>
/// <value>{eac04bc0-3791-11d2-bb95-0060977b464c}</value>
internal static readonly Guid IID_Guid = new Guid(0xEAC04BC0, 0x3791, 0x11D2, 0xBB, 0x95, 0x00, 0x60, 0x97, 0x7B, 0x46, 0x4C);
static ref readonly Guid IComIID.Guid {
[MethodImpl(MethodImplOptions.AggressiveInlining)]
get
{
ReadOnlySpan<byte> data = new byte[] {
0xC0,0x4B,0xC0,0xEA,0x91,0x37,0xD2,0x11,0xBB,0x95,0x00,0x60,0x97,0x7B,0x46,0x4C };
return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data));
}
}
[Guid("EAC04BC0-3791-11D2-BB95-0060977B464C"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()]
[SupportedOSPlatform("windows5.0")]
internal interface Interface
:winmdroot.UI.Shell.IAutoComplete.Interface {
[PreserveSig()]
unsafe new winmdroot.Foundation.HRESULT Init(winmdroot.Foundation.HWND hwndEdit, winmdroot.System.Com.IUnknown* punkACL, winmdroot.Foundation.PCWSTR pwszRegKeyPath, winmdroot.Foundation.PCWSTR pwszQuickComplete);
[PreserveSig()]
new winmdroot.Foundation.HRESULT Enable(winmdroot.Foundation.BOOL fEnable);
[PreserveSig()]
winmdroot.Foundation.HRESULT SetOptions(uint dwFlag);
[PreserveSig()]
unsafe winmdroot.Foundation.HRESULT GetOptions(uint* pdwFlag);
}
}
}
}
|