The Great Flying Tortoise

A hard-boiled look at Win32 C++ programming and the property system

Blog - About

About The Great Flying Tortoise

Ben Karas has been a developer working at Microsoft since 2003.  He hopes to write useful tidbits concerning the property system, Win32 C++ programming, and living in the Seattle area. 

I'll keep the rules simple:
 1. Use good judgement.
 2. See rule #1

All postings are provided "AS IS" with no warranties and confer no rights. Opinions expressed are those of the respective authors. More legal stuff here.

  • The Great Flying Tortoise

    What does a property handler accomplish?

    • 8 Comments
    A property handler is the piece of code that enables you to see the properties about your files as in the picture below. Don't worry about the ambiguity in this sentence; I will be much more specific concerning what component does what in later posts...
  • The Great Flying Tortoise

    Coding to the Windows SDK

    • 3 Comments
    In the near future I'll be posting code examples that compile and run. In case you'd like to follow along, here's my personal setup. My code should compile on RC1 also, so go ahead and use RC1 if that's what you can get a hold of. Windows Vista...
  • The Great Flying Tortoise

    Writing properties #9 - Summary

    • 0 Comments
    Coding to the Windows SDK Reading properties #7 - Summary Writing properties #1 - Simple beginnings Writing properties #2 - Filetype support? Writing properties #3 - Which properties are writable? Writing properties #4 - Which properties are writable...
  • The Great Flying Tortoise

    Properties coding expedition #1 - Binding to an item

    • 3 Comments
    The goal of this first expedition is to print lists of properties from items. This will give insight into the origins and capabilities of these different properties. Feel free to follow along and try out different things. There's a lot to explore. ...
  • The Great Flying Tortoise

    Introducing the PROPVARIANT

    • 0 Comments
    Values in the property system are stored in PROPVARIANT structures. Originally constructed for use in OLE structured storage, the property system reuses this structure to hold its data. As the name suggests, a PROPVARIANT can hold a variety of data...
  • The Great Flying Tortoise

    Property Handler Decisions and Preparation

    • 3 Comments
    Viewed as a data flow component , a property handler has a single file stream input and outputs a one or more properties. Unfortunately, writing one requires making many decisions before you even set eyes on the code. Let's look at a few of these preparations...
  • The Great Flying Tortoise

    Choosing your property API

    • 0 Comments
    It is time that I talk a little about what to do if you want your application to run on XP. There are three sets of APIs, each with subtle differences and caveats, and ultimately your choice requires deciding what platform your application must run on...
  • The Great Flying Tortoise

    Properties coding expedition #7 - The final output

    • 2 Comments
    This coding expedition has developed a tool that can dump out all the properties on a file. If you are curious about the property system, I highly recommend you build this tool and run it on various file types. Coding to the Windows SDK Part 1 ...
  • The Great Flying Tortoise

    Writing properties #1 - Simple beginnings

    • 2 Comments
    I'm going to be talking about writable properties over the next few days. I know that some of you are itching to try this out yourselves, so here is an overly simplistic program that will write a single property to a file. I have omitted a lot of diagnostic...
  • The Great Flying Tortoise

    Code for Previous Blog Posts

    • 0 Comments
    Someone asked if I had a copy of the code I've been using in my blog so far. Well, I didn't as of 5pm today, so I went back and collected the code into 3 projects: propreader.exe <file> - Prints a list of all properties we know about the file...
  • The Great Flying Tortoise

    Writing properties #5 - Property lists

    • 1 Comments
    So if a property handler doesn't enumerate which properties it supports writing , then how does the explorer pick which properties to show? Well, the shell namespace extension containing the item specifies the list of properties it wants to show in a...
  • The Great Flying Tortoise

    Writing properties #3 - Which properties are writable?

    • 3 Comments
    While we don't have a table of properties and filetypes that are writable, there is a programmatic method to determine if a given property can be written to a given property handler. Here's how it works: First, properties can be designated innate ...
  • The Great Flying Tortoise

    Save the World... of Warcraft

    • 2 Comments
    Yup, I'm one of "those" people. I play World of Warcraft to pass the time if I don't have anything else scheduled to do. It's the only game I play right now, so it weighed heavily in my decision to upgrade to Vista . At the time, I was very happy to find...
  • The Great Flying Tortoise

    PROPVARIANT helpers #1 - Initialization

    • 2 Comments
    PROPVARIANTs are easy to misuse . Because the data members are so cryptic, it is easy to get confused or to overlook errors. To help alleviate these and other problems (including readability), we provide a series of PROPVARIANT helpers for common uses...
  • The Great Flying Tortoise

    Property System Layers and Extensibility Points

    • 4 Comments
    It's easy to get confused about what points of extensibility exist and what layer provide what services. This isn't helped by the fact that we've lumped a bunch of things into the property system, but I'll try to diagram this out here and in future posts...
  • The Great Flying Tortoise

    Troubleshooting: Why isn't my property handler getting indexed?

    • 1 Comments
    Having trouble getting your property handler working with the indexer? Here are some troubleshooting tips. 1. Verify that your propdesc file(s) are in a global location 2. Verify that you registered your propdesc file(s) using absolute paths ...
  • The Great Flying Tortoise

    Writing properties #8 - Canonical Values

    • 0 Comments
    There's one last topic I want to touch on before I close this series: Canonical values. So far I've talked about how to determine when the property itself is writable. But once you decide to write a property, how do you figure out what type the value...
  • The Great Flying Tortoise

    What is a PROPERTYKEY?

    • 0 Comments
    So what's this PROPERTYKEY that the property system uses? Where do I get them? Well, property keys identify the particular property you are interested in. You can find a bunch of system-provided definitions in the Windows Vista Platform SDK in propkey...
  • The Great Flying Tortoise

    Property consumerism

    • 2 Comments
    Reading properties is rather simple. First, bind to the item. SHCreateItemFromIDList and SHCreateItemFromParsingName are appropriate for this. Then read your properties. Be sure to clean up after yourself. IShellItem2 *psi; if (SUCCEEDED(SHCreateItemFromParsingName...
  • The Great Flying Tortoise

    The source of property types

    • 1 Comments
    I mentioned that one of the property system layers coerces values to be of the correct type. But how does the system know the expected type? The property system maintains a data structure describing each property on the machine. Each property description...
  • The Great Flying Tortoise

    Understanding the Role of Property Handlers

    • 4 Comments
    Knowing what you are trying to accomplish is the first step to using the property system. Property handlers provide a specific set of services which support specific behaviors in the Windows shell. So let's delve into the role of a property handler and...
  • The Great Flying Tortoise

    The split personality critic

    • 3 Comments
    The 5 star rating control is misused in most applications today. How can I say that? What's more natural than selecting 5 stars for a movie or song? Actually, the intuitive nature of the rating star control is the cause of this subtle usability issue...
  • The Great Flying Tortoise

    The deal with IPropertyStoreCapabilities

    • 0 Comments
    Have you ever felt this before? It's the day after you send your product to manufacturing . You step back, look at the big picture, and start to see minor flaws. A dread sinks in when you realize you just blogged about it too! That was Monday morning...
  • The Great Flying Tortoise

    Properties coding expedition #2 - printing the IPropertyStore

    • 1 Comments
    Last time we saw how to bind to a shell item and get its property store. Today, we loop through the store printing out known properties. HRESULT _PrintPropertyStore(IPropertyStore *pps) { DWORD cProps; HRESULT hr = pps-> GetCount (&cProps...
  • The Great Flying Tortoise

    How I Learned to Stop Worrying and Love the Vista

    • 2 Comments
    Today I'd like to share the fearful tale about a Vista upgrade gone horribly wrong and of my fantastic recovery. Based on a true story... It is a still moonless night when I decide to take the plunge and upgrade my home machine to Windows Vista Ultimate...
Page 1 of 3 (58 items) 123