IHttpTraceContext::SetTraceConfiguration Method

 

Sets the trace configuration for the trace context.

Syntax

virtual HRESULT SetTraceConfiguration(  
   IN HTTP_MODULE_ID moduleId,  
   IN HTTP_TRACE_CONFIGURATION* pHttpTraceConfiguration,  
   IN DWORD cHttpTraceConfiguration = 1  
) = 0;)  

Parameters

moduleId
[IN] An HTTP_MODULE_ID pointer that contains the module identifier for the trace configuration.

pHttpTraceConfiguration
[IN] An array of HTTP_TRACE_CONFIGURATION structures of length cHttpTraceConfiguration.

cHttpTraceConfiguration
[IN] A DWORD that contains the number of HTTP_TRACE_CONFIGURATION structures pointed to by pHttpTraceConfiguration. The default is 1.

Note

HTTP_MODULE_ID is a type definition of a void pointer.

Return Value

An HRESULT. Possible values include, but are not limited to, those in the following table.

Value Definition
S_OK Indicates that the operation was successful.
E_FAIL Indicates that the operation failed.
E_OUTOFMEMORY Indicates that an internal new operation returned NULL because the heap memory is exhausted.
ERROR_INVALID_PARAMETER Indicates that the HTTP_TRACE_CONFIGURATION::pProviderGuid property for the pHttpTraceConfiguration parameter is NULL.
ERROR_NOT_FOUND Indicates that an attempt to disable tracing occurred for a provider that does not exist.

Remarks

Neither the moduleId nor the pHttpTraceConfiguration parameter can be NULL; otherwise, the SetTraceConfiguration method will cause an access violation.

Thread Safety

Most implementers of the IHttpTraceContext interface are thread safe if only the GetTraceConfiguration method is called. Calling the SetTraceConfiguration method is not guaranteed to be thread safe.

Comments

For more information on how to create and deploy a native DLL module, see Walkthrough: Creating a Request-Level HTTP Module By Using Native Code.

Requirements

Type Description
Client - IIS 7.0 on Windows Vista
- IIS 7.5 on Windows 7
- IIS 8.0 on Windows 8
- IIS 10.0 on Windows 10
Server - IIS 7.0 on Windows Server 2008
- IIS 7.5 on Windows Server 2008 R2
- IIS 8.0 on Windows Server 2012
- IIS 8.5 on Windows Server 2012 R2
- IIS 10.0 on Windows Server 2016 Technical Preview
Product - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0
- IIS Express 7.5, IIS Express 8.0, IIS Express 10.0
Header Httpserv.h

See Also

IHttpTraceContext Interface