O'Reilly logo

Managing The Windows 2000 Registry by Paul Robichaux

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The Shell Utility API Routines

The shell utility API routines allow you to use a different set of API routines instead of the ones I’ve discussed up until now. While this might seem like a needless fragmentation of what should be a unified API, there’s are two reasons for it. First, some of the tasks that the shell utility API can do don’t have direct equivalents in the Win32 API. For example, the shell API has routines to copy a key and its contents, delete an entire key and all its subkeys, and so on. Second, Microsoft is clearly trying to position the utility API as the thing you use if you’re writing small utility components- not all of which will necessarily run on Windows as we know it today. (For example, what about an embedded version of Windows running on a smart card?)

Tip

The shell API routine definitions are unnecessarily confusing because of their naming scheme (or lack of one.) Most of the Registry-related routines have names that start with SHReg, but some don’t (e.g., SHDeleteValue or SHGetValue). Worse still, the file association routine names don’t use the SH prefix at all.

Working with File Associations

One of the biggest innovations of the Macintosh when it was originally introduced was the idea that documents would somehow “know” what application they belonged to. The Mac OS implemented this by storing eight bytes of type and creator information with each file. The type bytes identified the file’s datatype, and the creator bytes associated the file with a particular ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required