私が間違って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つのマシンだけがそれをサポートしていないことをあなたは悲しいので、...
はあなたの問題を解決したのですか?問題は何でしたか? 私も同様の問題があります。 http://stackoverflow.com/questions/9869279/bho-for-capturing-user-clicks-works-fine-in-windows-other-than-windows-7-home-pr/9906163#9906163 助けて。ありがとう –