Home All Groups Group Topic Archive Search About
Author
22 Jan 2006 10:12 PM
Rob Meade
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

Author
22 Jan 2006 10:18 PM
Armin Zingler
Show quote Hide quote
"Rob Meade" <ten.bewdoowsg***@edaem.bbor> schrieb
> 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..


If you write a DLL, it can be used just like you use other DLLs, like
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
Author
23 Jan 2006 8:43 AM
R. MacDonald
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
>
>
Author
23 Jan 2006 10:23 AM
Rob Meade
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