title: How to use GetLastError() in VC++ 2010
body: <p>Making the conversion from Java to c++ isn't easy so help me guys.</p>
  
  <p>i want to see if i'm getting an Access_Error violation in this code:</p>
  
  <pre><code>BOOL didThisFail = FALSE;
  
  if (CopyFile(L"MyApplication.exe", szPath, didThisFail))
      cout &lt;&lt; "File was copied" &lt;&lt; endl;
  </code></pre>