title: How to set the local path into Media Engine URL?
body: <p>I want to use below code to set the <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/hh448017(v=vs.85).aspx" rel="nofollow noreferrer">MFMediaEngine Source</a> URL. Below method, is reading from the disk, and converting it into IMByteStream. Now I want to know how can I achieve below code in  Visual Win32(c++ code) Project. Is it possible ? If so, please provide some way or hints to do so. Note: Below code is a sample code took from Universal Windows Platform.     </p>
  
  <pre><code>      using namespace Windows::Storage;
        #include &lt;Mfmediaengine.h&gt;
        #include &lt;wrl.h&gt;
        Microsoft::WRL::ComPtr&lt;IMFMediaEngine&gt; m_mediaEngine;
        Microsoft::WRL::ComPtr&lt;IMFMediaEngineEx&gt; m_mediaEngineEx;
  
        void CPlayer::SetBytestream(IRandomAccessStream^ streamHandle)
          {
              HRESULT hr = S_OK;
              ComPtr&lt;IMFByteStream&gt; spMFByteStream = nullptr;
  
              MEDIA::ThrowIfFailed(
                  MFCreateMFByteStreamOnStreamEx((IUnknown*)streamHandle, &amp;spMFByteStream)
                  );
  
              MEDIA::ThrowIfFailed(
                  m_mediaEngineEx-&gt;SetSourceFromByteStream(spMFByteStream.Get(), m_bstrURL)
                  );
  
              return;
          }
  </code></pre>