Skip to content

Commit

Permalink
Fix 'image properties' for Unicode characters
Browse files Browse the repository at this point in the history
Fix issue #31
  • Loading branch information
Dương Diệu Pháp committed Jan 1, 2016
1 parent f71dd2b commit d0be6cf
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 130 deletions.
10 changes: 7 additions & 3 deletions Source/Components/ImageGlass.Library/Image/ImageInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ private struct SHELLEXECUTEINFO
public int cbSize;
public int fMask;
public IntPtr hwnd;
[MarshalAs(UnmanagedType.LPWStr)]
public string lpVerb;
[MarshalAs(UnmanagedType.LPWStr)]
public string lpFile;
[MarshalAs(UnmanagedType.LPWStr)]
public string lpParameters;
[MarshalAs(UnmanagedType.LPWStr)]
public string lpDirectory;
public int nShow;
public IntPtr hInstApp;
Expand All @@ -53,8 +57,8 @@ private struct SHELLEXECUTEINFO
public IntPtr hProcess;
}

[DllImport("shell32.dll", EntryPoint = "ShellExecuteEx")]
private static extern int ShellExecute(ref SHELLEXECUTEINFO s);
[DllImport("shell32.dll", CharSet = CharSet.Auto)]
private static extern int ShellExecuteEx(ref SHELLEXECUTEINFO s);

/// <summary>
/// Show file property dialog
Expand All @@ -74,7 +78,7 @@ public static void DisplayFileProperties(string fileName, IntPtr hwnd)
shInfo.lpVerb = "properties";
shInfo.hwnd = hwnd;

ShellExecute(ref shInfo);
ShellExecuteEx(ref shInfo);
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion Source/ImageGlass/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Duong Dieu Phap")]
[assembly: AssemblyProduct("ImageGlass 3")]
[assembly: AssemblyCopyright("Copyright © 2010-2015 by Duong Dieu Phap")]
[assembly: AssemblyCopyright("Copyright © 2010-2016 by Duong Dieu Phap")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand Down
47 changes: 26 additions & 21 deletions Source/ImageGlass/frmMain.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d0be6cf

Please sign in to comment.