You create a file extension association in the registry which links the file extension to your application. When somebody double clicks on a file, Windows will launch your application using the command line "myapp.exe <the file>". It's up to your app to process the command line argument to get the filename to use.