Refactored code location of the isGDIAllowed/isDWMAllowed, also changed the timeout for getting the HTML object from a window to 5 Seconds (instead of 1).

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@1877 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2012-05-18 07:36:18 +00:00
commit cac99fbaf3
5 changed files with 54 additions and 52 deletions

View file

@ -153,7 +153,7 @@ namespace Greenshot.Helpers {
}
LOG.DebugFormat("Trying WM_HTML_GETOBJECT on {0}", ieServer.ClassName);
UIntPtr response;
User32.SendMessageTimeout(ieServer.Handle, windowMessage, IntPtr.Zero, IntPtr.Zero, SendMessageTimeoutFlags.SMTO_NORMAL, 1000, out response);
User32.SendMessageTimeout(ieServer.Handle, windowMessage, IntPtr.Zero, IntPtr.Zero, SendMessageTimeoutFlags.SMTO_NORMAL, 5000, out response);
if (response != UIntPtr.Zero) {
document2 = (IHTMLDocument2)Accessible.ObjectFromLresult(response, typeof(IHTMLDocument).GUID, IntPtr.Zero);
if (document2 == null) {