title: CreateDC fails with Network Printer - error code 1801
body: <p>I am currently facing a problem of the HANDLE returns NULL from network located printers.</p>
  
  <pre><code>//NOTE:szDriver is the driver location
  //my device name  = "\\somelocation\HP Color LaserJet CP3505 PCL 6",
  HANDLE hDC;
  hDC = CreateDC(szDriver,(char*)pDevMode-&gt;dmDeviceName,NULL,pDevMode);
  </code></pre>
  
  <p>hDC will return NULL even I have double checked my printer and did my test print.</p>
  
  <p>i put a GetLastError() call, which returns me error 1801 which means Printer Name is Invalid.</p>
  
  <p>Then I had another look on pDevMode->dmDeviceName which seems like truncated. It ONLY shows part of my actual printer name. </p>