Share via


IHttpTraceContext::GetTraceConfiguration Method

 

Returns the trace configuration for the trace context.

Syntax

virtual HRESULT GetTraceConfiguration(  
   IN OUT HTTP_TRACE_CONFIGURATION* pHttpTraceConfiguration  
) = 0;  

Parameters

pHttpTraceConfiguration
[IN] [OUT] A pointer to an HTTP_TRACE_CONFIGURATION structure that contains information for trace configuration.

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.

Remarks

Call the GetTraceConfiguration method to determine if an event consumer exists before you call the RaiseTraceEvent method.

Note

While current IHttpTraceContext implementers return only S_OK from GetTraceConfiguration, you should test for success or failure by passing the returned HRESULT to the SUCCEEDED or FAILED macros, respectively, because the implementation may change.

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.

Notes for Implementers

Implementers of the GetTraceConfiguration method are responsible for copying any internal data into the HTTP_TRACE_CONFIGURATION structure, because callers are responsible for disposing of this data when it is no longer needed.

Notes for Callers

Callers to the GetTraceConfiguration method are responsible for disposing of any HTTP_TRACE_CONFIGURATION data and its fields when this data is no longer needed.

For more information about 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
IHttpTraceContext::SetTraceConfiguration Method