mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
ContextMenu changes for the IE capture and plug-ins
git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1997 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
parent
e5e6b3bd43
commit
0ee25e8cac
4 changed files with 24 additions and 13 deletions
|
@ -42,8 +42,8 @@ namespace Greenshot.Helpers.IEInterop {
|
|||
private static CoreConfiguration configuration = IniConfig.GetIniSection<CoreConfiguration>();
|
||||
private static readonly List<string> CAPTURE_TAGS = new List<string>();
|
||||
private const int E_ACCESSDENIED = unchecked((int)0x80070005L);
|
||||
private static Guid IID_IWebBrowserApp = new Guid("0002DF05-0000-0000-C000-000000000046");
|
||||
private static Guid IID_IWebBrowser2 = new Guid("D30C1661-CDAF-11D0-8A3E-00C04FC9E26E");
|
||||
private static readonly Guid IID_IWebBrowserApp = new Guid("0002DF05-0000-0000-C000-000000000046");
|
||||
private static readonly Guid IID_IWebBrowser2 = new Guid("D30C1661-CDAF-11D0-8A3E-00C04FC9E26E");
|
||||
private static int counter = 0;
|
||||
private int id = counter++;
|
||||
private IHTMLDocument2 document2;
|
||||
|
@ -189,7 +189,6 @@ namespace Greenshot.Helpers.IEInterop {
|
|||
LOG.DebugFormat("Zoomlevel {0}, {1}", zoomLevelX, zoomLevelY);
|
||||
} catch (Exception e) {
|
||||
LOG.Warn("Can't get certain properties for documents, using default. due to: ", e);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -200,6 +199,7 @@ namespace Greenshot.Helpers.IEInterop {
|
|||
}
|
||||
} catch {
|
||||
}
|
||||
|
||||
try {
|
||||
url = document2.url;
|
||||
} catch {
|
||||
|
@ -311,7 +311,9 @@ namespace Greenshot.Helpers.IEInterop {
|
|||
|
||||
// Use IServiceProvider.QueryService to get IWebBrowser2 object.
|
||||
Object brws = null;
|
||||
sp.QueryService(ref IID_IWebBrowserApp, ref IID_IWebBrowser2, out brws);
|
||||
Guid webBrowserApp = IID_IWebBrowserApp.Clone();
|
||||
Guid webBrowser2 = IID_IWebBrowser2.Clone();
|
||||
sp.QueryService(ref webBrowserApp, ref webBrowser2, out brws);
|
||||
|
||||
// Get the document from IWebBrowser2.
|
||||
IWebBrowser2 browser = (IWebBrowser2)(brws);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue