Depending on the value of ConfigId, pConfigInformation should point to a different type of structure. If it wasn't for this, I could redifine the PInvoke signature to explicitly specify the underlying structure type.
If your use of this API is focused aroudn a single value of ConfigId, you may want to change the IntPtr (pConfigInformation) to point directly to a managed version of the correct underlying structure and let the default marshaller take care of the interop layer marshaling for you (and your memory management).
if ((uint) ErrorCodes.NOERROR != retVal)
{
throw new Win32Exception(Convert.ToInt32(retVal));
}
}
Alternative Managed API:
Do you know one? Please contribute it!
The HttpDeleteServiceConfiguration function deletes specified information, such as IP addresses or SSL Certificates, from the HTTP API configuration store, one record at a time.
3/16/2007 7:47:51 AM - markg@microsoft.com-131.107.71.96
The HTTP_SERVICE_CONFIG_ID enumeration type defines service configuration options.
11/9/2010 10:45:54 AM - markg@microsoft.com-131.107.71.95
The HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM structure is used to specify an IP address to be added to or deleted from the list of IP addresses to which the HTTP service binds.
3/16/2007 8:16:48 AM - anonymous
The HTTP_SERVICE_CONFIG_SSL_KEY structure serves as the key by which a given Secure Sockets Layer (SSL) certificate record is identified. It appears in the HTTP_SERVICE_CONFIG_SSL_SET and the HTTP_SERVICE_CONFIG_SSL_QUERY structures, and is passed as the pConfigInformation parameter to HttpDeleteServiceConfiguration, HttpQueryServiceConfiguration, and HttpSetServiceConfiguration when the ConfigId parameter is equal to HttpServiceConfigSSLCertInfo.
3/16/2007 8:16:48 AM - anonymous
The HTTP_SERVICE_CONFIG_URLACL_SET structure is used to add a new record to the URL reservation store or retrieve an existing record from it. An instance of the structure is used to pass data in through the pConfigInformation parameter of the HTTPSetServiceConfiguration function, or to retrieve data through the pOutputConfigInformation parameter of the HTTPQueryServiceConfiguration function when the ConfigId parameter of either function is equal to HTTPServiceConfigUrlAclInfo.
The mechanism provided by the CLR that enables managed code to call static DLL exports.k
10/27/2022 9:24:28 PM - 114.37.143.20
The HTTP_SERVICE_CONFIG_IP_LISTEN_PARAM structure is used to specify an IP address to be added to or deleted from the list of IP addresses to which the HTTP service binds.
3/16/2007 8:16:48 AM - anonymous
The HTTP_SERVICE_CONFIG_SSL_KEY structure serves as the key by which a given Secure Sockets Layer (SSL) certificate record is identified. It appears in the HTTP_SERVICE_CONFIG_SSL_SET and the HTTP_SERVICE_CONFIG_SSL_QUERY structures, and is passed as the pConfigInformation parameter to HttpDeleteServiceConfiguration, HttpQueryServiceConfiguration, and HttpSetServiceConfiguration when the ConfigId parameter is equal to HttpServiceConfigSSLCertInfo.
3/16/2007 8:16:48 AM - anonymous
The HTTP_SERVICE_CONFIG_URLACL_SET structure is used to add a new record to the URL reservation store or retrieve an existing record from it. An instance of the structure is used to pass data in through the pConfigInformation parameter of the HTTPSetServiceConfiguration function, or to retrieve data through the pOutputConfigInformation parameter of the HTTPQueryServiceConfiguration function when the ConfigId parameter of either function is equal to HTTPServiceConfigUrlAclInfo.
An IntPtr is a pointer to a memory location (unmanaged) that adapts to the platform it is running on (64-bit, etc.) UNLIKE a standard int/Integer. You should always use this type for unmanaged calls that require it, even though an int will appear to work on your development machine.