none
Create a DLL RRS feed

  • Question

  •  Hi, I'm Pete Hepple. Win 10 64b. Visual Studio 2010.

    Looked all over the web for info on how to create a DLL.

    Have several projects and would like to extract some common Subs/Functions to this library.

    Would be obliged if you'd give simple and explicit instructions.!

    Project  A / imports MyLib

    Project B / imports MyLib

    MyLib.DLL

    Imports ...

    Imports ...

    Thanks, in anticipation

    Pete

    Sunday, December 2, 2018 6:09 PM

All replies

  • Hi Arthurltis,

    Thank you for posting here.

    For your question, what language you want to used for dll?

    If you want to doing this for C#, you could try the steps below.

    1. Create a C# Class bilrary and add some method to generate the dll.

    2. Project A/B add reference of this dll.

    3. Call the method via instance the class of the dll.

    If you want to make the dll in C++ and call in C#, you could try the steps in the link below.

    https://social.msdn.microsoft.com/Forums/vstudio/en-US/dbafec35-0759-4dde-9048-d1c0c80a2ffb/use-managed-c-class-library-with-c?forum=netfxbcl#2ad16543-0272-4e30-b0b4-617207408921

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Stanly Fan Wednesday, December 12, 2018 8:50 AM
    Monday, December 3, 2018 8:14 AM
    Moderator
  • Hello, 

    how to create a DLL

    In Studio

    Main menu => File => New Project 

    in opened window

    [Visail C# | Visual Basic ] = > Windows => Class Library


    Sincerely, Highly skilled coding monkey.

    Monday, December 3, 2018 8:55 AM
  • Hello,

    The following MSDN code sample "How to: Create a shared library in C#" may be of assistance. The idea is to have, in this case a shared library usable by many projects and have unit test too boot. If you are using VB.NET the idea is the same.

    Note there are no application projects (there is no demo project for those viewing the code to try it out as when uploading solutions only one can be uploaded) in the Visual Studio solution which is how a shared library should work.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Monday, December 3, 2018 8:10 PM