Home All Groups Group Topic Archive Search About

Designing A Process and Report Scheduler/Spooler Application

Author
7 Feb 2006 8:25 PM
Ben Kim
Hello all,

Prior to our days with .NET (yesterday - grin), we could LoadLibrary any
application DLL and call a function/procedure.   If we stored our Class
DLL's in the GAC (since we are designing multiple application executables
that could call common DLL's), is there a similar function in VB.NET that we
can dynamically call / load a DLL and call a method from the resource?

For example (pseudo code):

MyProcesses.DLL
    ProcessItemHistory
    ProcessTotalSales

MyReports.DLL
    PrintItemHistory
    PrintTotalSales

MyScheduler.EXE (Run on any machine)
    Loop
        Find next scheduled job
        If no jobs found, break and sleep until next timer event
        Am I the preferred server?  Has the "preferred" time expired?  No ->
Cycle
        Call up the corresponding DLL
        Thread execute the procedure/method using the properties
(parameters) set by the user when creating the job
        Mark job as started (the called procedure will remove it from the
queue when completed)
        Have we exceeded or at the user defined maximum number of threads?
Yes -> Break
        Sleep for a while (give the OS time to startup and run the thread)
    End

I assume it is possible with VB.NET but need to be pointed in the right
direction.  These class DLL's cannot be "referenced" at compile time.  For
those of you that worked on IBM System 3x/400 systems you will know what I
am speaking of (IE: Job/Work Q).  Doable?

Thanks!

Ben Kim
Emergitech

Author
7 Feb 2006 9:23 PM
m.posseth
Investigate Reflection

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconReflectionOverview.asp

regards

Michel Posseth [MCP]


Show quoteHide quote
"Ben Kim" <bkim@NOSPAMemergitech.com> wrote in message
news:eMfF1SCLGHA.1028@TK2MSFTNGP11.phx.gbl...
> Hello all,
>
> Prior to our days with .NET (yesterday - grin), we could LoadLibrary any
> application DLL and call a function/procedure.   If we stored our Class
> DLL's in the GAC (since we are designing multiple application executables
> that could call common DLL's), is there a similar function in VB.NET that
> we can dynamically call / load a DLL and call a method from the resource?
>
> For example (pseudo code):
>
> MyProcesses.DLL
>    ProcessItemHistory
>    ProcessTotalSales
>
> MyReports.DLL
>    PrintItemHistory
>    PrintTotalSales
>
> MyScheduler.EXE (Run on any machine)
>    Loop
>        Find next scheduled job
>        If no jobs found, break and sleep until next timer event
>        Am I the preferred server?  Has the "preferred" time expired?
>  No -> Cycle
>        Call up the corresponding DLL
>        Thread execute the procedure/method using the properties
> (parameters) set by the user when creating the job
>        Mark job as started (the called procedure will remove it from the
> queue when completed)
>        Have we exceeded or at the user defined maximum number of threads?
> Yes -> Break
>        Sleep for a while (give the OS time to startup and run the thread)
>    End
>
> I assume it is possible with VB.NET but need to be pointed in the right
> direction.  These class DLL's cannot be "referenced" at compile time.  For
> those of you that worked on IBM System 3x/400 systems you will know what I
> am speaking of (IE: Job/Work Q).  Doable?
>
> Thanks!
>
> Ben Kim
> Emergitech
>