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. General Programming
  3. C#
  4. C# make executabloe a dll

C# make executabloe a dll

Scheduled Pinned Locked Moved C#
questioncsharpsecurityworkspace
7 Posts 5 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.
  • S Offline
    S Offline
    sc steinhayse
    wrote on last edited by
    #1

    I have a question about converting a C# 2010 application that is currently run as an executable to be run as a DLL instead. I do not know what parts of the entire solution file should be part of the dll file and what parts (if any) should remain as an executable. I was briefly advised by a contract shop that when the current application calls a web service, that portion should become the dll. I was also told by the contract shop that the chelper.cs code (that calls the web service) should be part of the dll. This same contract shop also said I could write separate dlls for each 'type' of method that is called. If I did that, I would use portions of code from each project file. So basically I have part of one project file out of 4 project files that should be included in the dll file? Here is a description of the current project files: 1. one project file has various routines that are tied with the web service. 2. Another project file is a handshaker to verify security. 3. There is the 'driver' project file. 4. There is a 'sample' code project file that was written by the contract shop that supports the web service. Can you tell me how you would decide to setup the application I listed above as dll file(s)? How would you change the code that I just listed above? How would you setup the code tio convert it (use it) as a dll file?

    A P M P 4 Replies Last reply
    0
    • S sc steinhayse

      I have a question about converting a C# 2010 application that is currently run as an executable to be run as a DLL instead. I do not know what parts of the entire solution file should be part of the dll file and what parts (if any) should remain as an executable. I was briefly advised by a contract shop that when the current application calls a web service, that portion should become the dll. I was also told by the contract shop that the chelper.cs code (that calls the web service) should be part of the dll. This same contract shop also said I could write separate dlls for each 'type' of method that is called. If I did that, I would use portions of code from each project file. So basically I have part of one project file out of 4 project files that should be included in the dll file? Here is a description of the current project files: 1. one project file has various routines that are tied with the web service. 2. Another project file is a handshaker to verify security. 3. There is the 'driver' project file. 4. There is a 'sample' code project file that was written by the contract shop that supports the web service. Can you tell me how you would decide to setup the application I listed above as dll file(s)? How would you change the code that I just listed above? How would you setup the code tio convert it (use it) as a dll file?

      A Offline
      A Offline
      Abhinav S
      wrote on last edited by
      #2

      Based on your requirements, you will not convert your entire project into a dll. Try to group out all the business / data layer components and moved them into the service layer. The executable file will still need to call the service.

      WP7.5 Apps - XKCD | Calvin | SMBC | Sound Meter | Speed Dial

      1 Reply Last reply
      0
      • S sc steinhayse

        I have a question about converting a C# 2010 application that is currently run as an executable to be run as a DLL instead. I do not know what parts of the entire solution file should be part of the dll file and what parts (if any) should remain as an executable. I was briefly advised by a contract shop that when the current application calls a web service, that portion should become the dll. I was also told by the contract shop that the chelper.cs code (that calls the web service) should be part of the dll. This same contract shop also said I could write separate dlls for each 'type' of method that is called. If I did that, I would use portions of code from each project file. So basically I have part of one project file out of 4 project files that should be included in the dll file? Here is a description of the current project files: 1. one project file has various routines that are tied with the web service. 2. Another project file is a handshaker to verify security. 3. There is the 'driver' project file. 4. There is a 'sample' code project file that was written by the contract shop that supports the web service. Can you tell me how you would decide to setup the application I listed above as dll file(s)? How would you change the code that I just listed above? How would you setup the code tio convert it (use it) as a dll file?

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        I wouldn't make any changes just because someone else says I should. And I'm not impressed with what you've said they said. Does the system work? There's nothing magical about DLLs and they can't do anything an executable can't do. At the extreme, only the main method needs to be in an EXE and everything else can be in a DLL -- but would it make sense for you to do it that way just to satisfy someone who won't have to live with the code? As mentioned, think in terms of layers; put a minimum of code in the top-most layer -- that could be the EXE and everything else can be in one or more DLLs if that makes sense to you. Also: how likely are you to need to refer to the DLL from another app? If not, then why bother?

        S 1 Reply Last reply
        0
        • S sc steinhayse

          I have a question about converting a C# 2010 application that is currently run as an executable to be run as a DLL instead. I do not know what parts of the entire solution file should be part of the dll file and what parts (if any) should remain as an executable. I was briefly advised by a contract shop that when the current application calls a web service, that portion should become the dll. I was also told by the contract shop that the chelper.cs code (that calls the web service) should be part of the dll. This same contract shop also said I could write separate dlls for each 'type' of method that is called. If I did that, I would use portions of code from each project file. So basically I have part of one project file out of 4 project files that should be included in the dll file? Here is a description of the current project files: 1. one project file has various routines that are tied with the web service. 2. Another project file is a handshaker to verify security. 3. There is the 'driver' project file. 4. There is a 'sample' code project file that was written by the contract shop that supports the web service. Can you tell me how you would decide to setup the application I listed above as dll file(s)? How would you change the code that I just listed above? How would you setup the code tio convert it (use it) as a dll file?

          M Offline
          M Offline
          Mycroft Holmes
          wrote on last edited by
          #4

          I agree with Piebald, restructuring for it's own sake is a waste of time, if you don't have a reason to make the change then don't bother. Having said that I always structure an application, I imagine any developer quickly comes to this decision, I would keep the UI elements in the exe, the business logic in another and the data access in a third but this is just for my convenience and to make support easier.

          Never underestimate the power of human stupidity RAH

          1 Reply Last reply
          0
          • P PIEBALDconsult

            I wouldn't make any changes just because someone else says I should. And I'm not impressed with what you've said they said. Does the system work? There's nothing magical about DLLs and they can't do anything an executable can't do. At the extreme, only the main method needs to be in an EXE and everything else can be in a DLL -- but would it make sense for you to do it that way just to satisfy someone who won't have to live with the code? As mentioned, think in terms of layers; put a minimum of code in the top-most layer -- that could be the EXE and everything else can be in one or more DLLs if that makes sense to you. Also: how likely are you to need to refer to the DLL from another app? If not, then why bother?

            S Offline
            S Offline
            sc steinhayse
            wrote on last edited by
            #5

            I wanted to mention that the program I talking about is executed from 2 other programs. Thus does it make sense to make part of this called program a dll?

            P 1 Reply Last reply
            0
            • S sc steinhayse

              I have a question about converting a C# 2010 application that is currently run as an executable to be run as a DLL instead. I do not know what parts of the entire solution file should be part of the dll file and what parts (if any) should remain as an executable. I was briefly advised by a contract shop that when the current application calls a web service, that portion should become the dll. I was also told by the contract shop that the chelper.cs code (that calls the web service) should be part of the dll. This same contract shop also said I could write separate dlls for each 'type' of method that is called. If I did that, I would use portions of code from each project file. So basically I have part of one project file out of 4 project files that should be included in the dll file? Here is a description of the current project files: 1. one project file has various routines that are tied with the web service. 2. Another project file is a handshaker to verify security. 3. There is the 'driver' project file. 4. There is a 'sample' code project file that was written by the contract shop that supports the web service. Can you tell me how you would decide to setup the application I listed above as dll file(s)? How would you change the code that I just listed above? How would you setup the code tio convert it (use it) as a dll file?

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #6

              Is this the same contract shop that gave you a console app to control the web service? If it is, any advice from them should be ignored as they are clueless morons who should be kept away from electronic equipment.

              *pre-emptive celebratory nipple tassle jiggle* - Sean Ewington

              "Mind bleach! Send me mind bleach!" - Nagy Vilmos

              CodeStash - Online Snippet Management | My blog | MoXAML PowerToys | Mole 2010 - debugging made easier

              1 Reply Last reply
              0
              • S sc steinhayse

                I wanted to mention that the program I talking about is executed from 2 other programs. Thus does it make sense to make part of this called program a dll?

                P Offline
                P Offline
                PIEBALDconsult
                wrote on last edited by
                #7

                Quite possibly.

                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