You can examine the command line that starts your application by using the lpCmdLine parameter. The lpCmdLine parameter points to the start of a character array that contains the command exactly as it was typed by the user. To extract filenames or options from the command line, you need to parse the command line into individual values. Alternatively, you can use the __argc and __argv variables.