HttpGetExtendedInterface Function

IIS 7.0
 

Retrieves an extended HTTP interface given the HTTP server instance and the pointer to be down cast.

template <class HttpType1, class HttpType2>
HRESULT HttpGetExtendedInterface(
   __in IHttpServer* pHttpServer,
   __in HttpType1* pInput,
   __deref_out HttpType2** ppOutput
);

pHttpServer

[IN] Points to an instance of the IHttpServer interface.

pInput

[IN] Points to an instance of the interface to be down cast.

ppOutput

[OUT] Points to the extended HTTP interface.

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

Value

Description

S_OK

Indicates that the operation was successful.

Template parameters (HttpType1 and HttpType2) can be deduced from the arguments to the function, as shown in the following example.

IHttpRequest * pHttpRequest = pHttpContext->GetRequest();
IHttpRequest2 * pHttpRequest2;
HRESULT hr = HttpGetExtendedInterface(g_pHttpServer, pHttpRequest, &pHttpRequest2);
if( SUCCEEDED(hr) )
{
    // Use pHttpRequest2.
}

Where pHttpContext is an IHttpContext pointer and g_pHttpServer is an IHttpServer pointer.

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

Show: