4 ms·
There's a reason examples tend to use ZeroMemory or other mechanism for zero-initializing the entire struct ;) There are other subtle edge cases as well - like
by MaulingMonkey 5y ago
There's a reason examples tend to use ZeroMemory or other mechanism for zero-initializing the entire struct ;)
There are other subtle edge cases as well - like needing to make sure all code (including third party libs) is built with the same defines and settings if they might share said structs without painstaking checking cbSize & never passing by value. (Even that might not be enough when statically linking, as it's an ODR violation - and thus undefined behavior - to mix and match different definitions of the same struct...)