title: Open device name using CreateFile
body: <p>I am working on a simple device driver I want to comunicate with the driver from user-mode using IRP.</p>
  
  <p>I am having trouble opening the device driver. Using <a href="http://www.osronline.com/article.cfm?article=97" rel="noreferrer">DeviceTree</a> I am able to see the device name eg \Device\MyDevice.</p>
  
  <p>But when I try to open it like this :</p>
  
  <pre><code>hand := CreateFile('\Device\MyDevice', GENERIC_WRITE, 0, nil, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);  
  </code></pre>
  
  <p>I always get <code>INVALID_HANDLE_VALUE</code> and GetLastError is (The System cannot find the path specified)</p>
  
  <p>What I am doing wrong ? I know the driver works because I can see it running and printing stuff in DebugView. So any tips ?</p>
  
  <p><img src="https://i.stack.imgur.com/x5bHU.png" alt="enter image description here"></p>