title: When I use C# callback function in VBA it shows "entry point not found "
body: <p>I want to use C# callback function in VBA. But when I call C# function it shows "entry point not found "</p>
  
  <p>How can I fix it?
  Thanks</p>
  
  <p>PS:I checked Make assembly COM-Visible and Register for COM inter
  Environment:MS Office Excel 2007, MS Visual Studio 2008</p>
  
  <p><strong>VBA code:</strong></p>
  
  <pre><code>Declare Function Result Lib"C:\Users\admin\Desktop\myprog\New_DLL_Test\New_DLL_Test\bin\Debug\New_DLL_Test.dll" Alias "Msg" (ByVal p As Long) As Integer
  
  Function Disp()
     MsgBox x
  End Function
  
  Sub AddResult(ByVal p As Long)
      Dim x As Long   
      x = Result(p)
      Debug.Print x
  End Sub
  
  Sub testnow_Click()
      Call AddResult(AddressOf Disp)
  End Sub
  </code></pre>
  
  <p><strong>C# code:</strong></p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Text;
  using System.Runtime.InteropServices;
  
  
  namespace New_DLL_Test
  {
      [Guid("f1286974-0f1a-466c-8389-dd1ab7e3eed2"), InterfaceType(ComInterfaceType.InterfaceIsDual)]
      interface Msginterface
      {
          int Msg;
      }
      public unsafe class MsgProcess
      {
          public int Msg(int* p)
          {
             return add(p,1);
          }
          public int add(int* p, int j)
          {
              return j+1;
          }
      }
  
  }
  </code></pre>