I haven't done it recently but basically on Windows you have keys in the registry under HKEY_CLASSES_ROOT to associate your program with a specific file extension. You can view the registry with regedit. Your application is called with the filename as parameter on the command line.