title: LoadLibrary cannot find ntoskrnl
body: <p>I am writing a small app which calls KeBugCheck and crashes the system but LoadLibrary is unable to find ntoskrnl.exe (I get 126 as return value when calling GetLastError)</p>
  
  <p>Here is my code:</p>
  
  <pre><code>void* fnc;
  HMODULE bcLib;
  bcLib = LoadLibrary((LPCWSTR)"ntoskrnl.exe");
  fnc = (void*) GetProcAddress(bcLib, (LPCSTR)"KeBugCheck");
  int(*KeBugCheck)(ULONG);
  KeBugCheck = (int(*)(ULONG))fnc;
  KeBugCheck(0x000000E2);
  </code></pre>
  
  <p>Also, in the debug window, I see this error:</p>
  
  <blockquote>
    <p>First-chance exception at 0x00000000 in app.exe: 0xC0000005:
    Access violation executing location 0x00000000.</p>
  </blockquote>
  
  <p>Any help will be very much appriciated </p>