Switch to .NET 4.5 compatible Marshal.SizeOf overload.

This commit is contained in:
Paul Chote
2017-08-11 23:06:16 +01:00
committed by abcdefg30
parent f4d4a7eed4
commit b937bf43f7

View File

@@ -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);
}