Renaming .exe file to .dll file ???
-
hi there, I had created a UserControl.exe. I want to add it to a project by using "Add References". But it only take .dll file. 1) Can I just rename UserControl.exe to UserControl.dll ? 2) Will it cause any error ?? 3) What's the best to create a userControl file with .dll in vs.net ? Thank you very much. ;)
-
hi there, I had created a UserControl.exe. I want to add it to a project by using "Add References". But it only take .dll file. 1) Can I just rename UserControl.exe to UserControl.dll ? 2) Will it cause any error ?? 3) What's the best to create a userControl file with .dll in vs.net ? Thank you very much. ;)
luckyShek wrote: What's the best to create a userControl file with .dll in vs.net ? Set the compiler to build a dll. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
luckyShek wrote: What's the best to create a userControl file with .dll in vs.net ? Set the compiler to build a dll. Christian I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
-
hi there, I had created a UserControl.exe. I want to add it to a project by using "Add References". But it only take .dll file. 1) Can I just rename UserControl.exe to UserControl.dll ? 2) Will it cause any error ?? 3) What's the best to create a userControl file with .dll in vs.net ? Thank you very much. ;)
1+2. Yes, in theory everything should be ok. 3. See CG's post. You can actually reference an exe if you compile from the commandline. top secret
Download xacc-ide 0.0.6 now!
See some screenshots -
hi there, I had created a UserControl.exe. I want to add it to a project by using "Add References". But it only take .dll file. 1) Can I just rename UserControl.exe to UserControl.dll ? 2) Will it cause any error ?? 3) What's the best to create a userControl file with .dll in vs.net ? Thank you very much. ;)
An EXE and a DLL contain different headers. An EXE contains an entry point while a DLL does not, though it typically contains a load address of where in memory relative to the EXE base it should be loaded. In the case of .NET assemblies, the EXE entry point references
mscoree.dll!_CorExeMain
, which creates the unmanaged AppDomain, loads a managed AppDomain then your assembly, and runs the entry point. A DLL will simply load into the process space but contains no entry point. While the IL module(s) contained in the assembly are basically file format-agnostic, the PE/COFF headers of the executable that contain the manifest and IL module(s) (and any other embedded files or resources) are different. This posting is provided "AS IS" with no warranties, and confers no rights. Software Design Engineer Developer Division Sustained Engineering Microsoft [My Articles] [My Blog]