Hi, all.
I've been doing some work with the Windows API (icky, real icky). Often times when setting the members of a structure, you have to also store the size of the structure; for example, the SECURITY_ATTRIB UTES structure. I don't understand why this needs to be done. If a function is expecting a SECURITY_ATTRIB UTES structure, shouldn't it know the size of it too, via sizeof(SECURITY _ATTRIBUTES)? Is there a purpose to this?
I've been doing some work with the Windows API (icky, real icky). Often times when setting the members of a structure, you have to also store the size of the structure; for example, the SECURITY_ATTRIB UTES structure. I don't understand why this needs to be done. If a function is expecting a SECURITY_ATTRIB UTES structure, shouldn't it know the size of it too, via sizeof(SECURITY _ATTRIBUTES)? Is there a purpose to this?
Comment