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. Difference between an EXE and DLL

Difference between an EXE and DLL

Scheduled Pinned Locked Moved C#
dotnetdebuggingtutorialquestion
3 Posts 3 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.
  • J Offline
    J Offline
    jdkulkarni
    wrote on last edited by
    #1

    When we change a project type from a DLL to EXE or vice versa, what exactly internally happens? How CLR know that this is executable? Is there any tag in the MSIL generated for that assembly? How to check it? What I tried, I have a DLL without Main. I compiled it and used it. Then I put Main in it and recompiled. Then I renamed Test.Dll to Test.Exe but I got this E:\AssemblyVersioning\DotNetFunda\bin\Debug\Test.exe is not a valid Win32 application. I want to know the internals of EXE and DLL.

    Jayant D. Kulkarni

    O B 2 Replies Last reply
    0
    • J jdkulkarni

      When we change a project type from a DLL to EXE or vice versa, what exactly internally happens? How CLR know that this is executable? Is there any tag in the MSIL generated for that assembly? How to check it? What I tried, I have a DLL without Main. I compiled it and used it. Then I put Main in it and recompiled. Then I renamed Test.Dll to Test.Exe but I got this E:\AssemblyVersioning\DotNetFunda\bin\Debug\Test.exe is not a valid Win32 application. I want to know the internals of EXE and DLL.

      Jayant D. Kulkarni

      O Offline
      O Offline
      originSH
      wrote on last edited by
      #2

      http://en.wikipedia.org/wiki/Portable_Executable[^]

      1 Reply Last reply
      0
      • J jdkulkarni

        When we change a project type from a DLL to EXE or vice versa, what exactly internally happens? How CLR know that this is executable? Is there any tag in the MSIL generated for that assembly? How to check it? What I tried, I have a DLL without Main. I compiled it and used it. Then I put Main in it and recompiled. Then I renamed Test.Dll to Test.Exe but I got this E:\AssemblyVersioning\DotNetFunda\bin\Debug\Test.exe is not a valid Win32 application. I want to know the internals of EXE and DLL.

        Jayant D. Kulkarni

        B Offline
        B Offline
        Brady Kelly
        wrote on last edited by
        #3

        An EXE is a specially packaged file that contains information on how to start running the code in the file in a Windows process.  A DLL only contains code, not all the housekeeping information.  A program called a linker is used to link OS related housekeeping code into the EXE file to make it executable.

        Semicolons. the number one seller of ostomy bags world wide. - dan neely

        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