mirror of
https://github.com/greenshot/greenshot
synced 2025-08-14 02:37:03 -07:00
Improved the support for dragging and dropping images from a website, now also parsing HTML img src information, to be able to download that image. For this we need the HtmlAgilityPack.dll (#294)
Removed a lot of dead code, and remove the old OCR code as we don't even know if it still works.
This commit is contained in:
parent
90cab1e8a3
commit
26fe579d31
151 changed files with 1138 additions and 8174 deletions
|
@ -35,24 +35,14 @@ namespace GreenshotPlugin.UnmanagedHelpers {
|
|||
return (Win32Error)Marshal.GetLastWin32Error();
|
||||
}
|
||||
|
||||
public static long GetHResult(Win32Error errorCode) {
|
||||
int error = (int)errorCode;
|
||||
|
||||
if ((error & 0x80000000) == 0x80000000) {
|
||||
return error;
|
||||
}
|
||||
|
||||
return 0x80070000 | (uint)(error & 0xffff);
|
||||
}
|
||||
|
||||
public static string GetMessage(Win32Error errorCode) {
|
||||
StringBuilder buffer = new StringBuilder(0x100);
|
||||
var buffer = new StringBuilder(0x100);
|
||||
|
||||
if (FormatMessage(0x3200, IntPtr.Zero, (uint)errorCode, 0, buffer, buffer.Capacity, IntPtr.Zero) == 0) {
|
||||
return "Unknown error (0x" + ((int)errorCode).ToString("x") + ")";
|
||||
}
|
||||
|
||||
StringBuilder result = new StringBuilder();
|
||||
var result = new StringBuilder();
|
||||
int i = 0;
|
||||
|
||||
while (i < buffer.Length) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue