Quantcast
Channel: The Old New Thing
Browsing all 3085 articles
Browse latest View live

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 Set­Security­Info function to update the security, and they observed that the function propagates...

View Article


Anybody 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 Article


Image may be NSFW.
Clik here to view.

Tree-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 Article

Image may be NSFW.
Clik here to view.

Tree-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 Article

Image may be NSFW.
Clik here to view.

Tree-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

Browsing all 3085 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>