title: sprintf an LPCWSTR variable
body: <p>I'm trying to debug print an <code>LPCWSTR</code> string, but I get a problem during the <code>sprintf</code> push in the buffer, because it retrieves only the first character from the string.</p>
  
  <p>Here is the code:</p>
  
  <pre><code>HANDLE WINAPI hookedCreateFileW(LPCWSTR lpFileName, DWORD dwDesiredAccess, DWORD dwShareMode, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD dwCreationDisposition, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) {
      char buffer[1024];
      sprintf_s(buffer, 1024, "CreateFileW: %s", lpFileName);
      OutputDebugString(buffer); 
      return trueCreateFileW(lpFileName, dwDesiredAccess, dwShareMode, lpSecurityAttributes, dwFlagsAndAttributes, dwCreationDisposition, hTemplateFile);
  }
  </code></pre>
  
  <p>For example I get <code>CreateFileW: C</code> or <code>CreateFileW: \</code>.</p>
  
  <p>How do I properly push it into the buffer?</p>
  
  <p>Thank you.</p>