| title | IHttpServer2::GetExtendedInterface Method |
|---|---|
| description | Describes the IHttpServer2::GetExtendedInterface method and details its syntax, parameters, return value, remarks, and requirements. |
| ms.date | 10/07/2016 |
| ms.assetid | 36084663-a38a-4941-bfe4-f6782594efd9 |
Retrieves the correct down-casted pointer based on version GUID (globally unique identifier) values.
virtual HRESULT GetExtendedInterface(
_In_ const GUID & Version1,
_In_ PVOID pInput,
_In_ const GUID & Version2,
_Outptr_ PVOID * ppOutput
) = 0; Version1
[IN] GUID of the legacy instance.
pInput
[IN] Points to the legacy instance.
Version2
[IN] GUID of the interface to down cast to.
ppOutput
[OUT] Points to the down-casted instance.
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. |
This method is intended for down casting a base class pointer to a derived class. For example, assuming you have an existing instance pointer to IHttpRequest. your code would need to down cast to its derived class IHttpRequest2 in order to call one of its new methods.
HRESULT SomeFunction(
IHttpServer2* pHttpServer,
IHttpRequest pHttpRequest
)
{
IHttpRequest2 pHttpRequest2 = NULL;
// Grab a new interface!
pHttpServer-> GetExtendedInterface(__uuidof(pHttpRequest), pHttpRequest, __uuidof(pHttpRequest2), &pHttpRequest2 );
…
}
Instead of using GetExtendedInterface, you could use the client HttpGetExtendedInterface utility function to down cast the pointer.
| Type | Description |
|---|---|
| Client | - IIS 7.0 on [!INCLUDEwinvista] - IIS 7.5 on Windows 7 - IIS 8.0 on Windows 8 - IIS 10.0 on Windows 10 |
| Server | - IIS 7.0 on [!INCLUDEwinsrv2008] - 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 |
| Product | - IIS 7.0, IIS 7.5, IIS 8.0, IIS 8.5, IIS 10.0 - [!INCLUDEiisexp75], [!INCLUDEiisexp80], [!INCLUDEiisexp100] |
| Header | Httpserv.h |