Jsut wanted to add, that according to the MSDN, it's important to notify the system that you have made a change. You do this with the function SHChangeNotify. To notify Windows of a file association change, call the function like this:
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_DWORD, NULL, NULL);
If you do not call this function, Windows might not recognize your new filetype, or the change you made, before the system has been restarted.
René Gundersen (email@example.com)