2011-07-15 7 views
2

私はBHO(Managed Browser Helper Object)を開発しました。これは、1つを除くすべてのマシンで機能します。ブラウザヘルパーオブジェクトの問題:1台のマシンでsetsite/getsiteが呼び出されない

保護モードがオフであり、UACもこのマシンでオフになっていることを確認しました。

この特定のマシンはIE 8

とのWin Vistaの私はGetSiteとSetsiteにいくつかのデバッグログとメッセージボックスを追加しました。これらのログやメッセージボックスは表示されません。私はこれらが何らかの理由で呼び出されていないと仮定しています。

私の問題をデバッグする方法がありますか?

おかげ

+0

はあなたの問題を解決したのですか?問題は何でしたか? 私も同様の問題があります。 http://stackoverflow.com/questions/9869279/bho-for-capturing-user-clicks-works-fine-in-windows-other-than-windows-7-home-pr/9906163#9906163 助けて。ありがとう –

答えて

5

私が間違ってCOMオブジェクトのGUIDを入力したときに、それは私に起こったら。以下のように「なくてはならない」インターフェイス「IObjectWithSite」は、定義が-でなければなりません:

/// <summary> 
/// Interface to hook into IE 
/// </summary> 
[ 
    ComImport(), 
    ComVisible(true), 
    InterfaceType(ComInterfaceType.InterfaceIsIUnknown), 
    Guid("FC4801A3-2BA9-11CF-A229-00AA003D7352") // Defined here: http://msdn.microsoft.com/en-us/library/aa768186(v=vs.85).aspx 
] 
interface IObjectWithSite 
{ 
    /// <summary> 
    /// Function will register our program with actual browser 
    /// </summary> 
    /// <param name="pUnkSite"></param> 
    /// <returns></returns> 
    //[PreserveSig] 
    void SetSite([In, MarshalAs(UnmanagedType.IUnknown)] object pUnkSite); 

    /// <summary> 
    /// Callers invoke this to retrieve the container site previously sent to SetSite(). 
    /// This implementation handles the return of appropriate HRESULT per the 
    /// documented interface requirements for IObjectWithSite. 
    /// </summary> 
    /// <param name="riid">GUID for the interface requested of the site object</param> 
    /// <param name="ppvSite">Fill this with the site object if we find the interface through QI call</param> 
    void GetSite(ref Guid riid, [MarshalAs(UnmanagedType.IUnknown)] out object ppvSite); 

}//interface close 

しかし、1つのマシンだけがそれをサポートしていないことをあなたは悲しいので、...

関連する問題