From b937bf43f709be21e186aceb7c7acccf8358237b Mon Sep 17 00:00:00 2001 From: Paul Chote Date: Fri, 11 Aug 2017 23:06:16 +0100 Subject: [PATCH] Switch to .NET 4.5 compatible Marshal.SizeOf overload. --- packaging/windows/WindowsLauncher.cs.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packaging/windows/WindowsLauncher.cs.in b/packaging/windows/WindowsLauncher.cs.in index b9d6096334..dfaed3aa1e 100644 --- a/packaging/windows/WindowsLauncher.cs.in +++ b/packaging/windows/WindowsLauncher.cs.in @@ -100,7 +100,7 @@ namespace OpenRA SHFILEINFO sfi = new SHFILEINFO(); for (var i = 0; i < 2; i++) { - SHGetFileInfo(Assembly.GetExecutingAssembly().Location, 0, ref sfi, (uint)Marshal.SizeOf(sfi), (uint)(0x100 + i)); + SHGetFileInfo(Assembly.GetExecutingAssembly().Location, 0, ref sfi, (uint)Marshal.SizeOf(typeof(SHFILEINFO)), (uint)(0x100 + i)); iconHandle[i] = sfi.hIcon; SendMessage(gameProcess.MainWindowHandle, 0x80, (uint)(1 - i), sfi.hIcon); }