How to expose a function in a DLL writen by C#?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • heack
    New Member
    • Jul 2008
    • 1

    How to expose a function in a DLL writen by C#?

    in C++ we could use "__declspec(dll export)" keyword to expose a function, but How could I make A function in a class exposed to VBA(excel).
    In order to call a function in a C++ DLL, I could use declare sentence, but How could I declare a reference to a C# DLL? It always throws errors: cannot find entry point xxx(function name). Could Anyone give me the keyword to expose the function in C# DLL and I will greatly appreciate !
  • Curtis Rutland
    Recognized Expert Specialist
    • Apr 2008
    • 3264

    #2
    Look up DllImport
    that would be dll import (the l and the capital i look the same).

    Comment

    • Plater
      Recognized Expert Expert
      • Apr 2007
      • 7872

      #3
      If you want to use your managed DLL as a COM object, you need to set the ComVisible property and I think register your DLL

      Comment

      Working...