title: Windows 8 store app C++ file access
body: <p>I'm working on a Windows 8 store app which uses C# for the GUI and C++ (as another project in the same solution, set to make a DLL) for image processing and am trying to open a <code>.png</code> image in the C++ from a path specified from the C#. This works fine when the images are located in the Apps asset folder i.e <code>.\\Assets\\image.png</code> but when I try to access an image in the Pictures library I get <code>E_ACCESSDENIED</code> in the C++ code. I have specified the Documents and Pictures library capabilities in the c# project manifest but the C++ still gets access denied. Anyone know how to give the C++ code access rights to certain folders?</p>
  
  <p>e.g calling the function defined in wincodec.h, if 'filename' is somthing like "C:\Users\Name\Pictures\image0.png" hr will have the result <code>E_ACCESSDENIED</code></p>
  
  <pre><code>if (SUCCEEDED(hr))
  {
      hr = pFactory-&gt;CreateDecoderFromFilename(
          filename,
          NULL,
          GENERIC_READ,
          WICDecodeMetadataCacheOnDemand,
          &amp;pDecoder);
  
  
  }
  </code></pre>