title: 0xC0000005: Access violation executing location 0x00000000
body: <p>I'm writing an MFC project that try to call a function in the DLL which will return some information in a string. The function in the DLL is as follows:</p>
  
  <pre><code>int GetInfo(char* Info)
  </code></pre>
  
  <p>The function will return 0 if success. Information will be returned in the string parameter. The calling routine is as follows:</p>
  
  <pre><code>typedef int (WINAPI *FUNC1)(char* szInfo);
  
  
  HINSTANCE hinstLib;
  FUNC1 GetInfo;
  char szInfo[50];
  
  hinstLib = LoadLibrary(TEXT("DevInfo.dll"));
  
  // If the handle is valid, try to get the function address.
  if (hinstLib != NULL) 
  { 
      GetInfo = (FUNC1) GetProcAddress(hinstLib, "GetInfo"); 
  
      // If the function address is valid, call the function.
      if (NULL != GetInfo) 
      {
          if((GetInfo) (szInfo)) // Error here!!
          {
              AfxMessageBox(_T("Error Reading"));
          }
      }
  
      FreeLibrary(hinstLib);
  } 
  </code></pre>
  
  <p>This code does not have error in compiling and linking. When executing, it will return the error of "Access violation executing location 0x00000000" at the location stated above. Can anyone advice?</p>