diff --git a/PInvoke/HttpApi/http.Func.cs b/PInvoke/HttpApi/http.Func.cs index 828ca18b..22506470 100644 --- a/PInvoke/HttpApi/http.Func.cs +++ b/PInvoke/HttpApi/http.Func.cs @@ -924,6 +924,75 @@ public static partial class HttpApi public static extern Win32Error HttpDeleteServiceConfiguration([In, Optional] IntPtr ServiceHandle, [In] HTTP_SERVICE_CONFIG_ID ConfigId, [In] IntPtr pConfigInformation, [In] uint ConfigInformationLength, [In, Optional] IntPtr pOverlapped); + /// + /// The HttpDeleteServiceConfiguration function deletes specified data, such as IP addresses or SSL Certificates, from the HTTP + /// Server API configuration store, one record at a time. + /// + /// The type of . + /// + /// Contains data required for the type of configuration specified in the ConfigId parameter. + /// + /// + /// ConfigId value + /// Meaning + /// + /// + /// HttpServiceConfigIPListenList + /// HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM structure. + /// + /// + /// HttpServiceConfigSSLCertInfo + /// HTTP_SERVICE_CONFIG_SSL_SET structure. + /// + /// + /// HttpServiceConfigUrlAclInfo + /// HTTP_SERVICE_CONFIG_URLACL_SET structure. + /// + /// + /// HttpServiceConfigTimeouts + /// HTTP_SERVICE_CONFIG_TIMEOUT_KEY structure. Windows Vista and later: This structure is supported. + /// + /// + /// HttpServiceConfigSslSniCertInfo + /// + /// HTTP_SERVICE_CONFIG_SSL_SNI_SET structure. The hostname will be "*" when the SSL central certificate store is queried and wildcard + /// bindings are used, and a host name for regular SNI. Windows 8 and later: This structure is supported. + /// + /// + /// + /// HttpServiceConfigSslCcsCertInfo + /// HTTP_SERVICE_CONFIG_SSL_CCS_SET structure. Windows 8 and later: This structure is supported. + /// + /// + /// + /// + /// If the function succeeds, the function returns NO_ERROR. + /// If the function fails, it returns one of the following error codes. + /// + /// + /// Value + /// Meaning + /// + /// + /// ERROR_INVALID_PARAMETER + /// One of the parameters are invalid. + /// + /// + /// Other + /// A system error code defined in WinError.h. + /// + /// + /// + /// pConfigInformation + [PInvokeData("http.h", MSDNShortId = "NF:http.HttpDeleteServiceConfiguration")] + public static Win32Error HttpDeleteServiceConfiguration(in T pConfigInformation) where T: struct + { + if (!CorrespondingTypeAttribute.CanSet(out var ConfigId)) + throw new ArgumentOutOfRangeException(nameof(pConfigInformation)); + using var mem = new SafeCoTaskMemStruct(pConfigInformation); + return HttpDeleteServiceConfiguration(default, ConfigId, mem, mem.Size, default); + } + /// Retrieves a URL group ID for a URL and a request queue. /// /// Type: _In_ PCWSTR @@ -1540,7 +1609,7 @@ public static partial class HttpApi /// [PInvokeData("http.h", MSDNShortId = "NF:http.HttpQueryServiceConfiguration")] public static Win32Error HttpQueryServiceConfiguration([In] HTTP_SERVICE_CONFIG_ID ConfigId, - in TIn pInput, out TOut pOutput) where TIn: struct where TOut: struct + in TIn pInput, out SafeCoTaskMemStruct pOutput) where TIn: struct where TOut: struct { using var mem = new SafeCoTaskMemStruct(pInput); using var output = new SafeCoTaskMemStruct(); @@ -1668,7 +1737,7 @@ public static partial class HttpApi /// [PInvokeData("http.h", MSDNShortId = "NF:http.HttpQueryServiceConfiguration")] public static Win32Error HttpQueryServiceConfiguration([In] HTTP_SERVICE_CONFIG_ID ConfigId, - out TOut pOutput) where TOut : struct + out SafeCoTaskMemStruct pOutput) where TOut : struct { using var output = new SafeCoTaskMemStruct(); var err = HttpQueryServiceConfiguration(default, ConfigId, default, 0, output, output.Size, out var len, default);