/// <summary>
        /// Gets metadata that describes a specified field.
        /// <inheritdoc path="https://docs.microsoft.com/en-us/windows/win32/api/credentialprovider/nf-credentialprovider-icredentialprovider-getfielddescriptorat"/>
        /// </summary>
        /// <param name="dwIndex">The zero-based index of the field for which the information should be retrieved.</param>
        /// <param name="ppcpfd">The address of a pointer to a <see cref="_CREDENTIAL_PROVIDER_FIELD_DESCRIPTOR"/> structure which receives the information about the field.</param>
        /// <returns><see cref="HRESULT"/></returns>
        public virtual int GetFieldDescriptorAt(uint dwIndex, [Out] IntPtr ppcpfd)
        {
            if (view.GetField((int)dwIndex, ppcpfd))
            {
                return(HRESULT.S_OK);
            }

            return(HRESULT.E_INVALIDARG);
        }