Condividi tramite


Metodo IHttpServer2::GetExtendedInterface

Recupera il puntatore sottoposto a down cast corretto in base ai valori GUID della versione (identificatore univoco globale).

Sintassi

virtual HRESULT GetExtendedInterface(  
   _In_ const GUID &       Version1,  
   _In_ PVOID              pInput,  
   _In_ const GUID &       Version2,  
   _Outptr_ PVOID *        ppOutput  
) = 0;  

Parametri

Version1
[IN] GUID dell'istanza legacy.

pInput
[IN] Punta all'istanza legacy.

Version2
[IN] GUID dell'interfaccia a cui eseguire il cast verso il basso.

ppOutput
[OUT] Punta all'istanza di cui è stato eseguito il cast in basso.

Valore restituito

Oggetto HRESULT. I valori possibili includono, ma non sono limitati a, quelli indicati nella tabella seguente.

Valore Descrizione
S_OK Indica che l'operazione è riuscita.

Commenti

Questo metodo è destinato al down casting di un puntatore della classe di base a una classe derivata. Si supponga, ad esempio, di avere un puntatore di istanza esistente a IHttpRequest. Per chiamare uno dei nuovi metodi, il codice deve eseguire il cast alla classe derivata IHttpRequest2 .

HRESULT SomeFunction(   
    IHttpServer2* pHttpServer,  
    IHttpRequest pHttpRequest   
)  
{  
    IHttpRequest2 pHttpRequest2 = NULL;  
    // Grab a new interface!  
    pHttpServer-> GetExtendedInterface(__uuidof(pHttpRequest), pHttpRequest, __uuidof(pHttpRequest2), &pHttpRequest2 );  
    …  
}  

Invece di usare GetExtendedInterface, è possibile usare la funzione dell'utilità HttpGetExtendedInterface client per eseguire il cast del puntatore.

Requisiti

Tipo Descrizione
Client - IIS 7.0 in Windows Vista
- IIS 7.5 in Windows 7
- IIS 8.0 in Windows 8
- IIS 10.0 in Windows 10
Server - IIS 7.0 in Windows Server 2008
- IIS 7.5 in Windows Server 2008 R2
- IIS 8.0 in Windows Server 2012
- IIS 8.5 in Windows Server 2012 R2
- IIS 10.0 in Windows Server 2016
Prodotto - 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
Intestazione Httpserv.h

Vedere anche

Interfaccia IHttpServer2