title: How to pass argument in Visual Studio 2010 C++ for Windows 8 ?
body: <p>Following code works in Windows XP and Windows 7, but not in Windows 8. 
  I can get the file path and open in XP and 7. But when I try to open in windows 8 it doesn't work. Why ? any idea ?  Thanks.</p>
  
  <pre><code>int main(int argc, char** argv)
  {
    if (argc == 2)
    {
      if(OpenFile(argv[1], false))
          cout&lt;&lt;"\nFile has been opened successfully."&lt;&lt;endl;
    }
    return 1;
  }
  </code></pre>