次の方法で共有


HttpGetExtendedInterface 関数

HTTP サーバー インスタンスとダウン キャストするポインターを指定して、拡張 HTTP インターフェイスを取得します。

構文

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

パラメーター

pHttpServer
[IN] IHttpServer インターフェイスのインスタンスを指します。

pInput
[IN]ダウン キャストするインターフェイスのインスタンスを指します。

ppOutput
[OUT]拡張 HTTP インターフェイスを指します。

戻り値

HRESULT。 有効な値を次の表に示しますが、これ以外にもあります。

説明
S_OK 操作が成功したことを示します。

解説

テンプレート パラメーター (HttpType1HttpType2) は、次の例に示すように、引数から 関数に推定できます。

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

pHttpContextIHttpContext ポインターで、g_pHttpServerIHttpServer ポインターです。

要件

Type 説明
Client - Windows Vista 上の IIS 7.0
- Windows 7 上の IIS 7.5
- Windows 8 の IIS 8.0
- Windows 10の IIS 10.0
サーバー - Windows Server 2008 の IIS 7.0
- Windows Server 2008 R2 上の IIS 7.5
- Windows Server 2012 上の IIS 8.0
- Windows Server 2012 R2 上の IIS 8.5
- Windows Server 2016上の IIS 10.0
製品 - 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

参照

Web Server Core 関数