CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2002
    Posts
    34

    Question Creating DLL in VB.net


    Hi!

    It's be three days that I try doing this without any success.

    I created a simple class that I compiled into a DLL file using vb.net. I then reference it using "Declare Ansi Function functName Lib "libName" (ByVal myVariable As String) As String". Everything compiles nice and easy. However, at run time when I make use of that linked function, I get an error: "An unhandled exception of type 'System.EntryPointNotFoundException' occurred in MyEXE.exe" and "Unable to find an entry point named functName in DLL MyDLL.dll".

    I checked the IL code and found no entry point for the function, which is kind of understandable since it is not a main function. I tried adding a ".entrypoint" right into the IL file generated using ILDASM tool, but then it didn't want to compile back into DLL file using the ILASM tool because functName is not a static function. Bt then i can't make functName into a static function either since it is a method called from somewhere else...

    Please help!

    Moon Night
    Have a nice day! (^_^)

  2. #2
    Join Date
    Jun 2001
    Location
    MO, USA
    Posts
    2,868
    You don't need to delare a .NET DLL it, just set a reference to it (Project... Add Reference... Browse...).

  3. #3
    Join Date
    Oct 2002
    Posts
    34

    Lightbulb

    Thank you so much. I am new to vb so your help is really appreciated!
    Have a nice day! (^_^)

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