CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2010
    Posts
    7

    Can't see methods in DLL... why?

    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

  2. #2
    Join Date
    Oct 2005
    Location
    Seattle, WA U.S.A.
    Posts
    353

    Re: Can't see methods in DLL... why?

    I was able to almost-replicate the problem ... using a similar DLL, I also crashed but with a slightly different message.

    If you have some free time you might try the following and see what happens ...
    1. remove the "public extern static void setHooks();" statement.
    2. add a 'using Kosmala.Michal.ActiveXTest' statement to the main program
    3. be certain the 'references' section points to the appropriate DLL
    4. prepend the call to 'SetHooks' appropriately (i.e. reference to the containing class or instantiation).

    Maybe that'll help, or at least change the problem, perhaps making it more readily addressed.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured