winlabs/gowin32 — pull request #12 by dgolub (2014-11-13 21:19:51+00:00)
Title: CM-1931 (Mark) Fix size of VARIANT on 64-bit Windows

@markbenvenuto This is a gowin32 bug fix to address the fact that `VARIANT` has a different size on 64-bit versions of Windows than on 32-bit versions of Windows. It's not immediately obvious from glancing at the header file, but `BRECORD` is a pair of pointers, requiring 16 bytes on a 64-bit system and causing the size of `VARIANT` to grow from 16 bytes to 24 bytes. This hadn't posed an issue when running on Windows 7 because we never use anything beyond the first 16 bytes. However, on Windows Server 2008 R2, `VariantInit` zeros out the entirety of the structure, causing memory corruption and making the Automation Agent crash if it isn't big enough.