title: Using custom odbc driver with Power bi
body: <p>In short I have built a custom odbc driver that I've been using with power bi.
  In one segment of code I'm trying to load some other dll, mysql odbc driver, that I'm using in my own odbc driver. Basically I just use function <code>LoadLibrary</code> which when I call <code>GetLastError</code> returns number 126.</p>
  <p>Error 126 means :</p>
  <blockquote>
  <p>The specified module could not be found.</p>
  </blockquote>
  <p>What I tried so far</p>
  <ol>
  <li>Wrong path to dll - I checked that using my odbc driver with other programs, like excel and it loads fine</li>
  <li>Admin rights - I even started the Power bi with Admin rights and that still did not help.</li>
  <li>Loaded some other dll - I made some dummy dll that I loaded when Power bi made first call to my odbc driver and it worked fine.</li>
  <li>Added path to System environment variables.</li>
  </ol>
  <p>So it looks like he just wont load this specific dll.</p>
  <p>As far as code, there is nothing much, I made function that accepts string which I then pass to <code>LoadLibrary(path.c_str())</code>. This is the first line of code that I do when my odbc driver gets called for the first time.</p>
  <p>EDIT
  I used Process Monitor to see what is going on when trying to load that dll. When filtered only for that dll, I see two operation. One is FASTIO_NETWORK_QUERY_OPEN and result is FAST IO DISALLOWED. Second one is the IRP_MJ_CREATE and result is PATH NOT FOUND</p>