|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Call EXE method from DLL using named instanceHi
Is there a way that I can call a method in an EXE (managed code, VB.NET) from a .NET DLL by passing a reference to the instance of the EXE? Multiple instances of EXE might be running and loaded in memory and I need the DLL to invoke a method within the running instance by passing a reference (such as the application title, window handler etc). TIA Hello pvveeram***@gmail.com,
Whoa. That's just.. messed up. You call function in DLLs from applications.. not the other way around. Rethink your architecture. -Boo Show quoteHide quote > Hi > Is there a way that I can call a method in an EXE (managed code, > VB.NET) from a .NET DLL by passing a reference to the instance of the > EXE? Multiple instances of EXE might be running and loaded in memory > and I need the DLL to invoke a method within the running instance by > passing a reference (such as the application title, window handler > etc). > TIA > Well, not quite... The DLL acts as a wrapper class and the method that
invokes the call to the EXE is actually called from an Access VBA module. GhostInAK wrote: Show quoteHide quote > Hello pvveeram***@gmail.com, > > Whoa. That's just.. messed up. You call function in DLLs from applications.. > not the other way around. Rethink your architecture. > > -Boo > > > Hi > > Is there a way that I can call a method in an EXE (managed code, > > VB.NET) from a .NET DLL by passing a reference to the instance of the > > EXE? Multiple instances of EXE might be running and loaded in memory > > and I need the DLL to invoke a method within the running instance by > > passing a reference (such as the application title, window handler > > etc). > > TIA > > <pvveeram***@gmail.com> wrote in message
news:1153778635.866146.138800@b28g2000cwb.googlegroups.com... Unless things have drastically changed for the worse, a DLL is, by > Well, not quite... The DLL acts as a wrapper class and the method that > invokes the call to the EXE is actually called from an Access VBA > module. definition, an in-process server. Each exe will reference a different instance of that DLL. Normally, the way to "call" methods in a standard EXE (vs and Out of process server... which I have no idea if dotNet supports or not), you reference your DLL from the EXE, call a method/set a property/whatever in that DLL and, sometime later, the DLL fires an event. The exe can trap that event. The DLL can pass any information to the exe as arguments to the event handler. I'm just 'poking around' here though so..... In VB6, this kind of stuff is gravy. Especially when dealing with a VBA back-end. -- Ken Halter - MS-MVP-VB (visiting from VB6 world) - http://www.vbsight.com Please keep all discussions in the groups.. In Loving Memory - http://www.vbsight.com/Remembrance.htm |
|||||||||||||||||||||||