Kevin,
These associations are stored in the registry. You can add an association manually, then search for that string in the registry to see the entries it created. You can also to do a search in the registry to see where the file extension is assocated with a file type.
In downloads I believe there is some code to help with reading/writing to the registry.
Then, of course, you have to determine if the different flavors of Windows use the same registry entries to take care of this.
Sounds like fun :)
>I'd like to do this in code, is possible
Steve Gibson