|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
executing a .dll?I'm thinking of writing a small scheduling application - more for interest rather than anything else (I appreciate there's one that comes with my O/S!)... A colleague of mine mentioned that it would be a handy little tool to use on our servers if it could also execute functions within .dll's - from the way he said it it seemed to suggest he meant just the .dll's - ie, not running an .exe etc..he's pretty fluent with .net so I'm assuming this is possible. Does anyone know if you can do this, and if so - how would I? For example, if I had a .dll which created a text file in a folder with some text in it - an a function called "writeTextFile" - how would I be able to run that externally by anything else? Any info appreciated.. Rob
Show quote
Hide quote
"Rob Meade" <ten.bewdoowsg***@edaem.bbor> schrieb If you write a DLL, it can be used just like you use other DLLs, like> Lo all, > > I'm thinking of writing a small scheduling application - more for > interest rather than anything else (I appreciate there's one that > comes with my O/S!)... > > A colleague of mine mentioned that it would be a handy little tool > to use on our servers if it could also execute functions within > .dll's - from the way he said it it seemed to suggest he meant just > the .dll's - ie, not running an .exe etc..he's pretty fluent with > .net so I'm assuming this is possible. > > Does anyone know if you can do this, and if so - how would I? > > For example, if I had a .dll which created a text file in a folder > with some text in it - an a function called "writeTextFile" - how > would I be able to run that externally by anything else? > > Any info appreciated.. System.Windows.Forms.dll and others. Maybe "reflection" is what you're looking for: http://msdn.microsoft.com/library/en-us/cpguide/html/cpcondiscoveringtypeinformationatruntime.asp Armin Hello, Rob,
If you don't know in advance what functions or DLL's might be called, then you may find these references helpful: http://staff.develop.com/woodring http://www.codeproject.com/csharp/dyninvok.asp Cheers, Randy Rob Meade wrote: Show quoteHide quote > Lo all, > > I'm thinking of writing a small scheduling application - more for interest > rather than anything else (I appreciate there's one that comes with my > O/S!)... > > A colleague of mine mentioned that it would be a handy little tool to use on > our servers if it could also execute functions within .dll's - from the way > he said it it seemed to suggest he meant just the .dll's - ie, not running > an .exe etc..he's pretty fluent with .net so I'm assuming this is possible. > > Does anyone know if you can do this, and if so - how would I? > > For example, if I had a .dll which created a text file in a folder with some > text in it - an a function called "writeTextFile" - how would I be able to > run that externally by anything else? > > Any info appreciated.. > > Rob > > Hi guys,
Thanks for the replies. Yes, that's correct, I'd not know what the .dll's were or the function names etc, my thinking is that the scheduler would be able to do two things... 1. run an .exe at a scheduled time 2. enable the user to enter a path to the .dll and expose the functions within it, enabling them to choose one of run at a scheduled time Regards Rob
Hepl! No accessible 'Main' method with an appropriate signature was found ...
Q: primary key OK....forget the code...how about some pointers? API confusion "Global" Class Library: Best Practices? Threading question.... Problem with objects and automatic numbering in VB.NET Detect if user is logged in ADO.NET now or LINQ later Setting Individual Pixel Colors in VB 2005 |
|||||||||||||||||||||||