RE: Loading applications at runtime

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Joanna,

I am currently working on a project where we have done pretty much what you
are trying to do. Our project consists of an exe that acts as the shell, and
all the modules that slot into this shell are developed as DLL's with user
controls in them.

The way we have tackled the problem was to make the controls in our DLL
implement an interface that we defined. The interface itself is pretty
basic, and it just has a few details in there such as the controls display
name.

The shell searches a specified directory on startup that contains all of our
dll's. The shell then loads each dll in turn into an assembly and loops
through the types collection looking for items that implement our defined
interface. Once it has found a match we use reflection to get some
information out of the control and add it to a menu.

When a menu item is clicked, we use the information we stored to load the
control via reflection and display it in our shell program.

Using this method, we have made the shell application completly seperate
from our modules, all it requires is that the module implements our defined
interface.

We have also used a custom implementation of an observer pattern so that the
modules can communicate with the shell.

I hope this is of some help or at least pointed you in the right direction
of where to start looking for more information?

Kevin

"joannax" wrote:

> Hi,
> I am an experienced programmer in several languages, but new to VB .NET. I
> am designing an application which consists of a single "menu" program/form
> that selectively transfers control to several other programs/forms. This is
> straightforward when all the forms are in one assembly. But I need this to
> be modular and dynamic so that each program loaded can be in its own .exe and
> the central program can load and execute it then regain control when the
> called program is done. I've tried "process.start" but I feel there must be
> a better way, especially since I'd like to be able to communicate information
> between the controller and the satellite applications.
> Important point is that the controller will be designed so that it doesn't
> know beforehand which programs are installed and can be called.
> Also, there is some communication with a server by all the programs, but the
> classes involved do not need to be shared if this cannot be done.
> In other languages there is an external call, load or "chain" mechanism for
> resolving references at runtime. Can this be done in VB .NET?
>
> Thanks for any help.
> --
> Joanna
.



Relevant Pages

  • Re: /lib/ld-2.2.4.so
    ... "noexec" are hardly of any security value, and it is a great mistake to ... coming from shell users, ... needed to do it is excessive and functionality impact is pretty severe. ... Default Linux shells do not extensively support trust / access control. ...
    (Vuln-Dev)
  • RE: Loading applications at runtime
    ... > all the modules that slot into this shell are developed as DLL's with user ... > implement an interface that we defined. ... > information out of the control and add it to a menu. ... >> between the controller and the satellite applications. ...
    (microsoft.public.dotnet.languages.vb)
  • RE: Opening Access database
    ... Here's a Shell function method, but it will give you limited automation ... You can then control the application using Access objects and methods, ... maximizes the project window within the Access main window, ... then that app will receive the keystrokes. ...
    (microsoft.public.excel.programming)
  • Re: C++ Interop - Getting String value back from ATL COM Server
    ... Shell MegaPack: GUI Controls For Drop-In Windows Explorer like Shell ... Browsing Functionality For Your App. ... Control but I can't seem to figure out how to get a string value back from ...
    (microsoft.public.dotnet.general)
  • Re: Is there any way to start (and later quit) an EXE file.
    ... the QuitApp subroutine so that it will terminate any process named "VNC.exe" ... Is there also a way to avoid the first macro trying to load the EXE a ... regain complete control of XP and lose barcode scanner control. ... You can use the Shell function to launch an executable file but you ...
    (microsoft.public.excel.misc)