Why doesn’t RegSetKeySecurity propagate inheritable ACEs, but SetSecurityInfo...
A customer was updating some code that manipulated registry key security. The old code used the SetSecurityInfo function to update the security, and they observed that the function propagates...
View ArticleAnybody who writes #pragma pack(1) may as well just wear a sign on their...
When you use #pragma pack(1), this changes the default structure packing to byte packing, removing all padding bytes normally inserted to preserve alignment. Consider these two structures: // no...
View ArticleTree-walking algorithms: Incrementally enumerating leaf nodes of an N-ary tree
Suppose you have an N-ary tree, in which the node operations are Get first child. Get next sibling. Get parent. For example, this type of tree structure may represent a window hierarchy. You also see...
View ArticleTree-walking algorithms: Incrementally performing a preorder walk of an N-ary...
We continue our exploration of algorithms for walking incrementally through an N-ary tree by perform a preorder walk through the tree. Recall that our goal is to follow the red arrows through the tree,...
View ArticleTree-walking algorithms: Incrementally performing a postorder walk of an...
We continue our exploration of algorithms for walking incrementally through an N-ary tree by perform a postorder walk through the tree. Recall that our goal is to follow the red arrows through the...
View Article