title: Dll Import : Unable to find Entry Point "fnMultiply" in DLL "ImportDLL"
body: <p>I am trying to use DLLImport for using Win32 dll method in C#.</p>
  
  <p>Win32 dll C++
  // .h file</p>
  
  <pre><code>#ifdef IMPORTDLL_EXPORTS
  #define IMPORTDLL_API __declspec(dllexport)
  #else
  #define IMPORTDLL_API __declspec(dllimport)
  #endif
  
  // This class is exported from the ImportDLL.dll
  class IMPORTDLL_API CImportDLL {
  public:
      CImportDLL(void);
      // TODO: add your methods here.
      int Add(int a , int b);
  };
  
  extern IMPORTDLL_API int nImportDLL;
  
  IMPORTDLL_API int fnImportDLL(void);
  IMPORTDLL_API int fnMultiply(int a,int b);
  </code></pre>
  
  <p>// .cpp file</p>
  
  <p>// ImportDLL.cpp : Defines the exported functions for the DLL application.
  //</p>
  
  <pre><code>#include "stdafx.h"
  #include "ImportDLL.h"
  
  
  // This is an example of an exported variable
  IMPORTDLL_API int nImportDLL=0;
  
  // This is an example of an exported function.
  IMPORTDLL_API int fnImportDLL(void)
  {
      return 42;
  }
  
  IMPORTDLL_API int fnMultiply(int a , int b)
  {
      return (a*b);
  }
  </code></pre>
  
  <p>Once i build this i get ImportDLL.dll</p>
  
  <p>Now i create Windows Application and add this dll in debug folder and try to use this method using DLLImport</p>
  
  <pre><code>[DllImport("ImportDLL.dll")]
   public static extern int fnMultiply(int a, int b);
  </code></pre>
  
  <p>And I try to call this in C# 
   <code>int a = fnMultiply(5, 6);</code> // This line gives error Unable to find an entry point</p>
  
  <p>Can any body tell what i am missing?
  Thanks.</p>