title: STATUS_STACK_BUFFER_OVERRUN with LoadLibrary
body: <p>When I load iphlpapi.dll with LoadLibrary my stack buffer overrun! How can I solve
  this problem?!</p>
  
  <pre><code>typedef DWORD (*GetExtendedTcpTable)(PVOID, PDWORD, BOOL, ULONG, TCP_TABLE_CLASS, ULONG);   
  GetExtendedTcpTable _GetExtendedTcpTable;
  
  // load function at runtime 
  HINSTANCE hstLibrary = LoadLibrary("C:\\Windows\\System32\\Iphlpapi.dll");
  
  if(!hstLibrary)
  {
      ::MessageBox(NULL,"Can't load Iphlpapi.dll!\n","Error",
              MB_OK + MB_ICONEXCLAMATION + MB_TASKMODAL);
  
      FreeLibrary(hstLibrary); // free memory
  
      exit(0);
  }
  
  // load function address from dll
  _GetExtendedTcpTable = (GetExtendedTcpTable)GetProcAddress(hstLibrary, "GetExtendedTcpTable");
  </code></pre>
  
  <p>The loading of the lib function and executing is working fine but at some point my program throws the STATUS_STACK_BUFFER_OVERRUN exception!
  (some point: when I comment the string operation the error occur few lines later)</p>
  
  <p>When I don't use LoadLibrary and GetProcAddress(static binding) -> no buffer overrun! </p>
  
  <p>Thanks and greets,</p>
  
  <p>leon22</p>