MR Michael Robellard (5314) schrieb: > We have created a COM object that runs under IE to implement the > IURLSearchHook2 interface. This allows you to intercept invalid URLs and > run a search for them in the address bar of IE. Everything has been > running great on my XP box with IE6 installed on it. > > We went to test it on an IE7 machine and we have instant issues with it. > When you search in IE7 using the code it will randomly hang the search. > The rest of IE continues to function. If you then execute a second > search in the address bar, it will execute the second search and then > the hung search will successfully execute. > > Attached is a standalone python module that successfully reproduces this > issue. You will need to add the following GUID as the only string value > in the key: > {0BC6E3FA-78EF-4886-842C-5A1258C4455A} > to this key in the registry > HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\URLSearchHooks
Thanks you for preparing this standalone test case. I have tried it out but as I said in posts before I cannot get it to work neither with a XP IE6 machine nor with a XP IE7 machine. I will try it out over the weekend when I find a different machine. > So the questions are: > Have we done something in our implementation that is causing this issue? > Is there an issue with how _ctypes.pyd is handling the GIL for these > calls? I noticed from the logging output, at least on my XP IE7 machine, that indeed the com object seems to hang somehow, although I see a different behaviour in IE with the first and the second search than you describe. When I close IE after trying out a search, the GUI closes but the process still keeps running - I have to kill it so that it closes. So it seems that maybe IE tries to make some COM calls to the search object but they are blocked... I will further check this out when I have more time, for now I changed the threading model that your sample code uses, and indeed when I reregister the object with threadingmodel 'None' then IE shuts down correctly (although the search still does not work). To test this yourself you should remove or comment out the line that reads _reg_threading_ = "Both" and reregister the object. > As a workaround we have a C++ COM object that receives the calls on this > interface and then forwards them to a localserver python com object that > does the work. Not ideal but it seems to work. -- Thanks, Thomas ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ comtypes-users mailing list comtypes-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/comtypes-users