// ------------------------------------------------------------------------------ // <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("00BB2762-6A77-11D0-A535-00C04FD7D062")] [CLSCompliant(false)] [SupportedOSPlatform("windows5.0")] [global::System.CodeDom.Compiler.GeneratedCode("Microsoft.Windows.CsWin32", "0.3.287+85e3fa26dd.RR")] internal unsafe partial struct IAutoComplete :winmdroot.IVTable<IAutoComplete,IAutoComplete.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]<IAutoComplete*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT>)lpVtbl[0])((IAutoComplete*)Unsafe.AsPointer(ref this), riid, ppvObject); } public uint AddRef() { return ((delegate *unmanaged [Stdcall]<IAutoComplete*,uint>)lpVtbl[1])((IAutoComplete*)Unsafe.AsPointer(ref this)); } public uint Release() { return ((delegate *unmanaged [Stdcall]<IAutoComplete*,uint>)lpVtbl[2])((IAutoComplete*)Unsafe.AsPointer(ref this)); } /// <inheritdoc cref="Init(winmdroot.Foundation.HWND, winmdroot.System.Com.IUnknown*, winmdroot.Foundation.PCWSTR, winmdroot.Foundation.PCWSTR)"/> [OverloadResolutionPriority(1)] internal unsafe void Init(winmdroot.Foundation.HWND hwndEdit, winmdroot.System.Com.IUnknown* punkACL, [Optional] string pwszRegKeyPath, [Optional] 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(IAutoComplete* pThis, winmdroot.Foundation.HWND hwndEdit, winmdroot.System.Com.IUnknown* punkACL, [Optional] winmdroot.Foundation.PCWSTR pwszRegKeyPath, [Optional] winmdroot.Foundation.PCWSTR pwszQuickComplete) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.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; } } /// <summary>Initializes the autocomplete object.</summary> /// <param name="hwndEdit"> /// <para>Type: <b>HWND</b> A handle to the window for the system edit control for which autocompletion will be enabled.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shldisp/nf-shldisp-iautocomplete-init#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="punkACL"> /// <para>Type: <b><a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nn-unknwn-iunknown">IUnknown</a>*</b> A pointer to the <a href="https://docs.microsoft.com/windows/desktop/api/unknwn/nn-unknwn-iunknown">IUnknown</a> interface of the string list object that generates candidates for the completed string. The object must expose an <a href="https://docs.microsoft.com/windows/desktop/api/objidl/nn-objidl-ienumstring">IEnumString</a> interface.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shldisp/nf-shldisp-iautocomplete-init#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="pwszRegKeyPath"> /// <para>Type: <b>LPCWSTR</b> A pointer to an optional, null-terminated Unicode string that gives the registry path, including the value name, where the format string is stored as a <b>REG_SZ</b> value. The autocomplete object first looks for the path under <b>HKEY_CURRENT_USER</b>. If it fails, it tries <b>HKEY_LOCAL_MACHINE</b>. For a discussion of the format string, see the definition of <i>pwszQuickComplete</i>.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shldisp/nf-shldisp-iautocomplete-init#parameters">Read more on learn.microsoft.com</see>.</para> /// </param> /// <param name="pwszQuickComplete"> /// <para>Type: <b>LPCWSTR</b> A pointer to an optional null-terminated Unicode string that specifies the format to be used if the user enters text and presses CTRL+ENTER. Set this parameter to <b>NULL</b> to disable quick completion. Otherwise, the autocomplete object treats <i>pwszQuickComplete</i> as a <a href="https://docs.microsoft.com/windows/desktop/api/strsafe/nf-strsafe-stringcchprintfa">StringCchPrintf</a> format string and the text in the edit box as its associated argument, to produce a new string. For example, set <i>pwszQuickComplete</i> to "http://www.%s.com/". When a user enters "MyURL" into the edit box and presses CTRL+ENTER, the text in the edit box is updated to "http://www.MyURL.com/".</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shldisp/nf-shldisp-iautocomplete-init#parameters">Read more on learn.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-iautocomplete-init">Learn more about this API from learn.microsoft.com</see>.</para> /// </remarks> public unsafe void Init(winmdroot.Foundation.HWND hwndEdit, winmdroot.System.Com.IUnknown* punkACL, [Optional] winmdroot.Foundation.PCWSTR pwszRegKeyPath, [Optional] winmdroot.Foundation.PCWSTR pwszQuickComplete) { ((delegate *unmanaged [Stdcall]<IAutoComplete*,winmdroot.Foundation.HWND ,winmdroot.System.Com.IUnknown* ,winmdroot.Foundation.PCWSTR ,winmdroot.Foundation.PCWSTR ,winmdroot.Foundation.HRESULT>)lpVtbl[3])((IAutoComplete*)Unsafe.AsPointer(ref this), hwndEdit, punkACL, pwszRegKeyPath, pwszQuickComplete).ThrowOnFailure(); } [UnmanagedCallersOnly(CallConvs = new []{ typeof(CallConvStdcall)} )] private static winmdroot.Foundation.HRESULT Enable(IAutoComplete* pThis, winmdroot.Foundation.BOOL fEnable) { try { winmdroot.Foundation.HRESULT __hr = winmdroot.ComHelpers.UnwrapCCW(pThis, out Interface __object); if (__hr.Failed) { return __hr; } return __object.Enable(fEnable); } catch (Exception ex) { return (winmdroot.Foundation.HRESULT)ex.HResult; } } /// <summary>Enables or disables autocompletion.</summary> /// <param name="fEnable"> /// <para>Type: <b>BOOL</b> A value that is set to <b>TRUE</b> to enable autocompletion, or <b>FALSE</b> to disable it.</para> /// <para><see href="https://learn.microsoft.com/windows/win32/api/shldisp/nf-shldisp-iautocomplete-enable#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>Autocompletion is enabled by default. Applications need only to call this method to disable autocompletion or to reenable it if it has been disabled.</remarks> public void Enable(winmdroot.Foundation.BOOL fEnable) { ((delegate *unmanaged [Stdcall]<IAutoComplete*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT>)lpVtbl[4])((IAutoComplete*)Unsafe.AsPointer(ref this), fEnable).ThrowOnFailure(); } 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]<IAutoComplete*,global::System.Guid* ,void** ,winmdroot.Foundation.HRESULT> QueryInterface_1; internal delegate *unmanaged [Stdcall]<IAutoComplete*,uint> AddRef_2; internal delegate *unmanaged [Stdcall]<IAutoComplete*,uint> Release_3; internal delegate *unmanaged [Stdcall]<IAutoComplete*,winmdroot.Foundation.HWND ,winmdroot.System.Com.IUnknown* ,winmdroot.Foundation.PCWSTR ,winmdroot.Foundation.PCWSTR ,winmdroot.Foundation.HRESULT> Init_4; internal delegate *unmanaged [Stdcall]<IAutoComplete*,winmdroot.Foundation.BOOL ,winmdroot.Foundation.HRESULT> Enable_5; } public static void PopulateVTable(Vtbl* vtable) { vtable->Init_4 = &Init; vtable->Enable_5 = &Enable; } private void** lpVtbl; /// <summary>The IID guid for this interface.</summary> /// <value>{00bb2762-6a77-11d0-a535-00c04fd7d062}</value> internal static readonly Guid IID_Guid = new Guid(0x00BB2762, 0x6A77, 0x11D0, 0xA5, 0x35, 0x00, 0xC0, 0x4F, 0xD7, 0xD0, 0x62); static ref readonly Guid IComIID.Guid { [MethodImpl(MethodImplOptions.AggressiveInlining)] get { ReadOnlySpan<byte> data = new byte[] { 0x62,0x27,0xBB,0x00,0x77,0x6A,0xD0,0x11,0xA5,0x35,0x00,0xC0,0x4F,0xD7,0xD0,0x62 }; return ref Unsafe.As<byte,Guid>(ref MemoryMarshal.GetReference(data)); } } [Guid("00BB2762-6A77-11D0-A535-00C04FD7D062"),InterfaceType(ComInterfaceType.InterfaceIsIUnknown),ComImport()] [SupportedOSPlatform("windows5.0")] internal interface Interface { [PreserveSig()] unsafe winmdroot.Foundation.HRESULT Init(winmdroot.Foundation.HWND hwndEdit, winmdroot.System.Com.IUnknown* punkACL, [Optional] winmdroot.Foundation.PCWSTR pwszRegKeyPath, [Optional] winmdroot.Foundation.PCWSTR pwszQuickComplete); [PreserveSig()] winmdroot.Foundation.HRESULT Enable(winmdroot.Foundation.BOOL fEnable); } } } }