Am Sonntag, 17. Februar 2008 01:38:50 schrieb Andrew Talbot:
And I presume that if the underlying struct tags are different between two similar types, then the compiler would warn of type incompatibility if such an assignment were attempted.
Not quite. You can have a DDSURFACEDESC2 *ddsd pointer, with ddsd->dwSize == sizeof(DDSURFACEDESC). Then you have in binary a DDSURFACEDESC *, not a DDSURFACEDESC2 *. The compiler won't see that, since the type is determined at runtime.
(Don't blame me, Microsoft invented that)