title: URLOpenBlockingStream
body: <p>Can I use URLOpenBlockingStream on win32 console application ? </p>
  
  <p>I have a simple code:</p>
  
  <pre><code>#include "stdafx.h"
  #include &lt;urlmon.h&gt;
  #include &lt;iostream&gt;
  
  using namespace std;
  
  bool url(){
  
  LPCWSTR pfile(NULL);
  HRESULT hRez = URLDownloadToFile( NULL, _T("www.google.com"), (pfile), 0, NULL );
  if( hRez == 0 ){
  return 1;
  // download ok
  }
  else{
  
  return 0;// download failed
  }
  }
  
  int _tmain(int argc, _TCHAR* argv[])
  {
  
  cout&lt;&lt; url();
  return 0;
  }
  </code></pre>
  
  <p>and it returns compiler error</p>
  
  <pre><code>All outputs are up-to-date.
  1&gt;vvconsole.obj : error LNK2019: unresolved external symbol _URLDownloadToFileW@20 referenced in      function "bool __cdecl url(void)" (?url@@YA_NXZ)
  1&gt;C:\Users\Prem kumar Sekaran\Documents\Visual Studio 2010\Projects\vvconsole\Debug\vvconsole.exe   : fatal error LNK1120: 1 unresolved externals
  1&gt;Build FAILED.
  </code></pre>
  
  <p>I am using built in libraries, Do I still need to link the .lib file ? </p>