0

I developed a DLL in C#

When I am trying to call it I get:

System.EntryPointNotFoundException: Unable to find an entry point named:

It means that DLL doens't export any methods visible from DLL. Dumpbin doesn't show any methods either:

dumpbin.exe -exports ActiveXTest.dll
Dump of file ActiveXTest.dll
File Type: DLL
  Summary
        2000 .reloc
        2000 .rsrc
        2000 .text

What's wrong????

The DLL looks ok.. according to documentation:

namespace Kosmala.Michal.ActiveXTest
        public static void setHooks()
        {
        ....
        }

Here is how I call it:

namespace IWFHotkeyStarter
{
    class Program
    {
        [DllImport("D:\\work\\iwf\\_ctrl-tab-modless_dlg_testing\\activex\\VSProjects\\AcriveXSourceCode\\bin\\Debug\\ActiveXTest.dll")]
        public extern static void setHooks();
        static void Main(string[] args)
        {
            Program p = new Program();
            p.run();
        }
        private void run(){
            Console.WriteLine("run<<");
            setHooks();
            Console.WriteLine("run>>");    
        }
    }
}

Please help

Edited by mike_2000_17: Fixed formatting

2
Contributors
1
Reply
2
Views
6 Years
Discussion Span
Last Post by Momerath
0

If you developed the DLL in C# just add a reference to the DLL in your project and it will be available to the project. You can add a "using" statement so you don't have to type all the rest out. What you are doing is trying to import it as a non-.NET DLL.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.