The Chinese language is to find a middle layer, so that he translated into VB can know the thing, not to say nonsense, began slightly
Chinese real name is nothing more than the use of IE Iurlsearchhook, but 3721 is not so play, he is using API hook to intercept IE Commbox message,,, you simply can not get him,, hey,, 3721 Sinister put, although we can not achieve the global hook, In VB can only use sub class subclass technology, this thing we do not finish, we play another
We first want to implement IObjectWithSite, IUnknown these two interfaces,
We need to create a ODL file, through which to create a TLB
Save it as Odl then, create a TLB file with typelib, and we'll refer to the file after it's created.
Add the following code
Implements Iobjectwithsitetlb.iobjectwithsite
Dim WithEvents IE as InternetExplorer
Dim M_site as Iunknownvb
Private Sub Iobjectwithsite_getsite (ByVal priid as Iobjectwithsitetlb.guidptr, ppvobj as Iobjectwithsitetlb.voidptr)
M_site.queryinterface Priid, Ppvobj
End Sub
Private Sub Iobjectwithsite_setsite (ByVal psite as IOBJECTWITHSITETLB.IUNKNOWNVB)
Set M_site = Psite
Set IE = Psite
End Sub
We have now implemented these two interfaces, in order to achieve our Chinese search, we can not use the Urlsearchhook
So we implement our functions through interface InternetExplorer.
Private Sub Ie_beforenavigate2 (ByVal pdisp as Object, URL as Variant, Flags as Variant, Targetframename as Variant, POSTDA Ta As Variant, Headers as Variant, Cancel as Boolean
Here to fill in the code you need,.
End Sub
The concrete is not much to say, ... Guys, look at this.
You need to add the inside of the brow Help object to the registry, and the name for this COM classid
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.