title: Format double with swprintf_s and send to OutputDebugStringW
body: <p>I have problem formatting a double for printout in the debug Window. I have tried to use swprintf_s function and the %d, the value is 0.804 but its not working at all. </p>
  
  <p><img src="https://i.stack.imgur.com/rtMBM.jpg" alt="enter image description here"></p>
  
  <p>I get value 65384... How shall i improve this code?</p>
  
  <pre><code>void MyOutputFunction(const wchar_t *format, double args)
  {  
    wchar_t buf[2048];    
    swprintf_s(buf, _countof(buf), format, args);
    OutputDebugStringW(buf);
  }
  </code></pre>