vb.net - Running function of one application from within another application -


i've got 2 standalone applications: first one:

    namespace firstapplication         class mainwindow             public sub new()                 initializecomponent()             end sub              public function runbatch(parameter string) double                 'do work                 return somevalue             end function          end class     end namespace 

second application:

    namespace secondapplication         class mainwindow             public sub new()                 initializecomponent()             end sub              public sub runbatch()                 'call runbatch() first application, show result                 msgbox(runbatch)             end function          end class     end namespace 

both wpf, .net 4.0 based. goal have second application call on first 1 , execute function in it.

the key part both applications used independently , second calls on first. because both applications need exist executable, don't want solve problem creating dll of first application - need maintain both executable , dll update date potentially disastrous consequences if fall out of sync.

so question whether it's possible, create instance of first application within appdomain of second 1 and, crucially, execute functions of instance.

i don't believe can create 1 appdomain inside of another.

any other options have (using wcf, or old style .net remoting, or crossing appdomains) going more complicated making single dll both applications can reference. long don't change assembly number of shared dll won't have recompile each exe if make changes dll (assuming don't make breaking changes changing method signatures).

does firstapplication have secondapplication? trying control feature of 1 application another? if need wcf (using named pipes or self-hosted web service). or trying not have write same code twice? simplest approach create single dll both applications reference.


Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -