C# console application to dll and register.....
-
Hello everyone... Im a bit new to c#.... I have written simple program which produces beeps in every 10min i want it to be converted to dll and i wanna use it on my system so that it beeps in every 10min..... I know it can be easily done with exe file of that project but i wanna use dll and register in system32 and make a part of windows..... all i know that it's done with csc compiler but what have to be written in /t:library...... ex.... csc /t:library simpledll.cs it says missing reference or assemblies..... Thnx....
-
Hello everyone... Im a bit new to c#.... I have written simple program which produces beeps in every 10min i want it to be converted to dll and i wanna use it on my system so that it beeps in every 10min..... I know it can be easily done with exe file of that project but i wanna use dll and register in system32 and make a part of windows..... all i know that it's done with csc compiler but what have to be written in /t:library...... ex.... csc /t:library simpledll.cs it says missing reference or assemblies..... Thnx....
You appear to be under the mistake belief that just because you register the .DLL that the code automatically runs. Such is not the case. .DLL's have to be loaded by another process and explicitly execute the code contained within. You can make this a .DLL all you want - nothing is going to happen. And it does NOT "become part of Windows" when you register something. You have to leave this as an .EXE, or at least an .EXE that loads and runs the code in the .DLL.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
You appear to be under the mistake belief that just because you register the .DLL that the code automatically runs. Such is not the case. .DLL's have to be loaded by another process and explicitly execute the code contained within. You can make this a .DLL all you want - nothing is going to happen. And it does NOT "become part of Windows" when you register something. You have to leave this as an .EXE, or at least an .EXE that loads and runs the code in the .DLL.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...i know it can't run on own.....i tried to register with regsvr32...................... what is the exact procedure can u please tell...in google im quite messed up....
-
i know it can't run on own.....i tried to register with regsvr32...................... what is the exact procedure can u please tell...in google im quite messed up....
No it can't. An exe somewhere has to call the code contained in the dll. This could be a scheduled task, a service or whatever but a dll is incapable of running 'standalone'.
Dave
Generic BackgroundWorker - My latest article!
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Why are you using VB6? Do you hate yourself? (Christian Graus) -
No it can't. An exe somewhere has to call the code contained in the dll. This could be a scheduled task, a service or whatever but a dll is incapable of running 'standalone'.
Dave
Generic BackgroundWorker - My latest article!
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Why are you using VB6? Do you hate yourself? (Christian Graus)Hmmmm i got it thnx!....but then why we register dll to system32 using regsvr32 i was in notion that to use as a part of window(i was so wrong!).....
-
Hmmmm i got it thnx!....but then why we register dll to system32 using regsvr32 i was in notion that to use as a part of window(i was so wrong!).....
So an application that uses the objects in that .DLL can instantiate them without knowing the filename and path of the .DLL hosting it. Regsitration only works for COM-based .DLL's. Library and resource .DLL's don't use registration at all.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009... -
So an application that uses the objects in that .DLL can instantiate them without knowing the filename and path of the .DLL hosting it. Regsitration only works for COM-based .DLL's. Library and resource .DLL's don't use registration at all.
A guide to posting questions on CodeProject[^]
Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
2006, 2007, 2008
But no longer in 2009...cool i got it..in short u meant for reusability to avoid long messy procedures........... Thnx alot :thumbsup: