Topic: Selection of necessary storage under a security descriptor in 32/64 windows
Greetings to all;
At copying of the rights in windows through GetFileSecurity it is necessary to select sufficient memory size under structure of a security descriptor of a copied file/folder. That then through GetMem or HeapAlloc it to select and transfer in GetFileSecurity.
In Delphi there is such constant SECURITY_DESCRIPTOR_MIN_LENGTH, but it sets the minimum size and suits only reset of adjustments of safety. Is as GetSecurityDescriptorLength but it works with already filled structure and sense from it a little.
Advise how to define necessary memory size in this case?