Search code examples
c++internet-explorercom

Async Pluggable Protocol Handler: Forward to other protocol?


When implementing an asyncrhonous plauggable protocol handler, is it possible to "redirect" the implementation to another protocol?

Instantiating the protocol handler for another protocol (such as file: or res:) looks a bit scary and not intended.


Solution

  • Call IInternetProtocolSink::ReportResult passing INET_E_REDIRECT_FAILED for the first parameter, and the desired URL for the last (the second parameter doesn't matter; 302 would be as good a choice as any).