/* [out] */ idroptarget __rpc_far *__rpc_far *ppdroptarget) {
return e_notimpl;
}
virtual hresult stdmethodcalltype getexternal(
/* [out] */ idispatch __rpc_far *__rpc_far *ppdispatch) {
*ppdispatch = new mycommandhandler();
return s_ok;
}
virtual hresult stdmethodcalltype translateurl(
/* [in] */ dword dwtranslate,
/* [in] */ olechar __rpc_far *pchurlin,
/* [out] */ olechar __rpc_far *__rpc_far *ppchurlout) {
return e_notimpl;
}
virtual hresult stdmethodcalltype filterdataobject(
/* [in] */ idataobject __rpc_far *pdo,
/* [out] */ idataobject __rpc_far *__rpc_far *ppdoret) {
return e_notimpl;
}
};
上面重载了showcontextmenu方法屏蔽掉右键菜单,使用户不能得到网页代码,关于getexternal是这样实现的:
| virtual hresult stdmethodcalltype getexternal( /* [out] */ idispatch __rpc_far *__rpc_far *ppdispatch) { *ppdispatch = new mycommandhandler(); return s_ok; } |