Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. Article Writing
  4. DLLs

DLLs

Scheduled Pinned Locked Moved Article Writing
csharpc++tutorial
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    Venet
    wrote on last edited by
    #1

    Hi All, I was looking through projects, especially DLL section and found out that, there are no articles describing how to create a DLL file in C#. You C# Wizards planning to write an article how to do that, or what would be an alternative in C# of the article on how to create a DLLs in C++ :) Thanks, Venet. -------- Black holes are where God divided by zero.(Steven Wright)

    C 1 Reply Last reply
    0
    • V Venet

      Hi All, I was looking through projects, especially DLL section and found out that, there are no articles describing how to create a DLL file in C#. You C# Wizards planning to write an article how to do that, or what would be an alternative in C# of the article on how to create a DLLs in C++ :) Thanks, Venet. -------- Black holes are where God divided by zero.(Steven Wright)

      C Offline
      C Offline
      Christopher Lord
      wrote on last edited by
      #2

      Umm.. If your looking for c# dlls its fairly easy, just choose the right project type and the assembly will be built as a DLL. If your talking about COM Dlls, its the same process I think but with a wrapper-dll.

      V 1 Reply Last reply
      0
      • C Christopher Lord

        Umm.. If your looking for c# dlls its fairly easy, just choose the right project type and the assembly will be built as a DLL. If your talking about COM Dlls, its the same process I think but with a wrapper-dll.

        V Offline
        V Offline
        Venet
        wrote on last edited by
        #3

        Christopher Lord wrote: If your talking about COM Dlls, its the same process I think but with a wrapper-dll. No, actually I was thinking about C# DLLs. Christopher Lord wrote: If your looking for c# dlls its fairly easy, just choose the right project type and the assembly will be built as a DLL. But do you need to have DllMain or shared section and things like that in a C# dll? Thanks, Venet. -------- Black holes are where God divided by zero.(Steven Wright)

        C 1 Reply Last reply
        0
        • V Venet

          Christopher Lord wrote: If your talking about COM Dlls, its the same process I think but with a wrapper-dll. No, actually I was thinking about C# DLLs. Christopher Lord wrote: If your looking for c# dlls its fairly easy, just choose the right project type and the assembly will be built as a DLL. But do you need to have DllMain or shared section and things like that in a C# dll? Thanks, Venet. -------- Black holes are where God divided by zero.(Steven Wright)

          C Offline
          C Offline
          Christopher Lord
          wrote on last edited by
          #4

          Ok, I got ya now. When you include a .NET DLL into your project, it is as if all public classes and types in it are in your project. (you may have to include the namespace with the using directive at the top) This is how you get access to System.*, they are stored in DLLs in this manner. For dynamically loading DLL's, such as in a plugin system, you only need to build an interface, and then use Assembly.Load() to get references to them. Then you can 'as' the refs to your interface and use the loaded DLL. Things like dllmain are no longer needed, since constructors of types serve that purpose now.

          V 1 Reply Last reply
          0
          • C Christopher Lord

            Ok, I got ya now. When you include a .NET DLL into your project, it is as if all public classes and types in it are in your project. (you may have to include the namespace with the using directive at the top) This is how you get access to System.*, they are stored in DLLs in this manner. For dynamically loading DLL's, such as in a plugin system, you only need to build an interface, and then use Assembly.Load() to get references to them. Then you can 'as' the refs to your interface and use the loaded DLL. Things like dllmain are no longer needed, since constructors of types serve that purpose now.

            V Offline
            V Offline
            Venet
            wrote on last edited by
            #5

            Ok, cool. But what if I write a dll using Windows API and then call its functions from my C# application. Is that possible? :) Regards, Venet. -------- Black holes are where God divided by zero.(Steven Wright)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups